We already sorted the blocks when fixing up a set of mutual
loop entries, however, there can be multiple sets of such
mutual loop entries, and the order we encounter them
should not be random, so sort them too.
Details
Details
Diff Detail
Diff Detail
Event Timeline
llvm/lib/Target/WebAssembly/WebAssemblyFixIrreducibleControlFlow.cpp | ||
---|---|---|
72 | do we need to capture everything [&] here? |
Comment Actions
There seem to be multiple places that call Graph.getLoopEntries(). I guess we should sort all of them..? How about sort LoopEntries at the end of calculate() once and for all?
Comment Actions
We actually don't need to sort all of them - just where it matters. For example at the end of processRegion the different sets are guaranteed to be disjoint, and so we can process them in any order (see comment inside the loop). And it might be a little faster to not sort unnecessarily.
llvm/lib/Target/WebAssembly/WebAssemblyFixIrreducibleControlFlow.cpp | ||
---|---|---|
72 | Ah, we don't good point. This code was just copied around but good idea to fix that. |
do we need to capture everything [&] here?