[llvm-commits] CVS: llvm/lib/Transforms/Utils/LCSSA.cpp

Chris Lattner lattner at cs.uiuc.edu
Tue Aug 1 17:17:01 PDT 2006



Changes in directory llvm/lib/Transforms/Utils:

LCSSA.cpp updated: 1.26 -> 1.27
---
Log message:

Add special check to avoid isLoop call.  Simple, but doesn't seem to speed
up lcssa much in practice.


---
Diffs of the changes:  (+2 -2)

 LCSSA.cpp |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Index: llvm/lib/Transforms/Utils/LCSSA.cpp
diff -u llvm/lib/Transforms/Utils/LCSSA.cpp:1.26 llvm/lib/Transforms/Utils/LCSSA.cpp:1.27
--- llvm/lib/Transforms/Utils/LCSSA.cpp:1.26	Tue Aug  1 19:06:09 2006
+++ llvm/lib/Transforms/Utils/LCSSA.cpp	Tue Aug  1 19:16:47 2006
@@ -177,7 +177,7 @@
     }
     
     // If the user is in the loop, don't rewrite it!
-    if (inLoop(UserBB)) {
+    if (UserBB == Instr->getParent() || inLoop(UserBB)) {
       ++UI;
       continue;
     }
@@ -215,7 +215,7 @@
           UserBB = p->getIncomingBlock(OperandNo/2);
         }
         
-        if (!inLoop(UserBB)) {
+        if (*BB != UserBB && !inLoop(UserBB)) {
           AffectedValues.insert(I);
           break;
         }






More information about the llvm-commits mailing list