[PATCH] D40699: Split IndirectBr critical edges before PGO gen/use passes.

Hiroshi Yamauchi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 7 17:41:11 PST 2017


yamauchi added inline comments.


================
Comment at: lib/Transforms/Instrumentation/PGOInstrumentation.cpp:539
+    // invalidating the MST.
+    SmallSetVector<BasicBlock *, 16> IndirectBrTargets;
+    for (auto &E : MST.AllEdges) {
----------------
davidxl wrote:
> Why not splitting the edges before MST is computed? 
This is trying to not split unless it's necessary (that is, if it's a non-MST indirectbr critical edges.) For that, we need to compute the MST once before making a decision to split. We could split all indirectbr critical edges unconditionally before computing the MST, but I thought it may be somewhat nicer that way as it would minimize CFG changes (eg, the indirectbr.ll test previously had to be changed even though it didn't suffer from this assert failure.) 


https://reviews.llvm.org/D40699





More information about the llvm-commits mailing list