[PATCH] Partially fix PR20058: reduce compile time for loop unrolling with very high count

Mark Heffernan meheff at google.com
Wed Jun 25 09:28:29 PDT 2014


================
Comment at: lib/Transforms/Utils/LoopUnroll.cpp:433
@@ -424,2 +432,3 @@
       BasicBlock *Dest = Term->getSuccessor(0);
-      if (BasicBlock *Fold = FoldBlockIntoPredecessor(Dest, LI, LPM))
+      if (BasicBlock *Fold = FoldBlockIntoPredecessor(Dest, LI, LPM,
+                                                      LoopForgotten))
----------------
hfinkel at anl.gov wrote:
> How do you know that LI->getLoopFor(Dest) returns the same Loop for all Dest in this loop?
Good point.  Changed to using a pointer set to keep track of forgotten loops.

http://reviews.llvm.org/D4285






More information about the llvm-commits mailing list