What I prefer is after you add a CFG Simplify pass, you can add an assert in
the backend if we meet empty BB. Suppose this should not occur anymore.
My concern is we may further gather some CFG info besides "loopInfo" to GEN IR.
So, when adding new info logic need an extra label Fix here.
At least I think you can let removeEmptyLabels() return quickly if there is no
empty BBs.
> + }
> + revLabelMap.insert(std::make_pair(next, index));
> + insn->remove();
> + removeBlock(&BB);
> + }
> + });
If no empty BB. Simply return here.
> + // fix labels for loops
> + for (auto &x : loops) {
> + for (auto &y : x->bbs) {
> + if (labelMap.find(y) != labelMap.end())
> + y = labelMap.find(y)->second;
> + }
> +
> + for (auto &z : x->exits) {
> + if (labelMap.find(z.first) != labelMap.end())
> + z.first = labelMap.find(z.first)->second;
> + if (labelMap.find(z.second) != labelMap.end())
> + z.second = labelMap.find(z.second)->second;
> + }
> + }
> +
_______________________________________________
Beignet mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/beignet