[llvm-commits] [llvm] r69631 - /llvm/trunk/lib/Transforms/Scalar/LoopUnroll.cpp

Dale Johannesen dalej at apple.com
Mon Apr 20 15:19:34 PDT 2009


Author: johannes
Date: Mon Apr 20 17:19:33 2009
New Revision: 69631

URL: http://llvm.org/viewvc/llvm-project?rev=69631&view=rev
Log:
Adjust loop size estimate for full unrolling;
GEP's don't usually become instructions.


Modified:
    llvm/trunk/lib/Transforms/Scalar/LoopUnroll.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/LoopUnroll.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopUnroll.cpp?rev=69631&r1=69630&r2=69631&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopUnroll.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopUnroll.cpp Mon Apr 20 17:19:33 2009
@@ -89,6 +89,8 @@
         // Ignore instructions only used by the loop terminator.
       } else if (isa<DbgInfoIntrinsic>(I)) {
         // Ignore debug instructions
+      } else if (isa<GetElementPtrInst>(I) && I->hasOneUse()) {
+        // Ignore GEP as they generally are subsumed into a load or store.
       } else if (isa<CallInst>(I)) {
         // Estimate size overhead introduced by call instructions which
         // is higher than other instructions. Here 3 and 10 are magic





More information about the llvm-commits mailing list