[llvm-commits] [llvm] r66554 - /llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp

Devang Patel dpatel at apple.com
Tue Mar 10 11:00:06 PDT 2009


Author: dpatel
Date: Tue Mar 10 13:00:05 2009
New Revision: 66554

URL: http://llvm.org/viewvc/llvm-project?rev=66554&view=rev
Log:
Ignore dbg info, while estimating size of jump through block.

Modified:
    llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp

Modified: llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp?rev=66554&r1=66553&r2=66554&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp Tue Mar 10 13:00:05 2009
@@ -1112,8 +1112,10 @@
   
   // If this basic block contains anything other than a PHI (which controls the
   // branch) and branch itself, bail out.  FIXME: improve this in the future.
-  for (BasicBlock::iterator BBI = BB->begin(); &*BBI != BI; ++BBI, ++Size) {
+  for (BasicBlock::iterator BBI = BB->begin(); &*BBI != BI; ++BBI) {
     if (Size > 10) return false;  // Don't clone large BB's.
+    if (!isa<DbgInfoIntrinsic>(BBI))
+      ++Size;
     
     // We can only support instructions that are do not define values that are
     // live outside of the current basic block.





More information about the llvm-commits mailing list