[PATCH] D31843: [LCSSA] Try to not walk the dominator tree more than necessary

Davide Italiano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 12 18:03:13 PDT 2017


davide added inline comments.


================
Comment at: lib/Transforms/Utils/LCSSA.cpp:90
     Loop *L = LI.getLoopFor(InstBB);
+    assert(L && "tinky winky");
     if (!LoopExitBlocks.count(L))   
----------------
Please ignore this assert, it helped me to find bugs during the development, I think it can committed separately (with a proper message)


================
Comment at: lib/Transforms/Utils/LCSSA.cpp:274-277
+    // Exit blocks can have an immediate dominator which doesn't belong to
+    // the loop, I think. XXX: this may be overcautious, check again.
+    if (!L.contains(IDomBB))
+      continue;
----------------
I'm not entirely sure if this one is needed. I'll try to find examples where this can happen && remove and see if that triggers failures in the testsuite.


https://reviews.llvm.org/D31843





More information about the llvm-commits mailing list