[llvm-commits] [llvm] r66567 - /llvm/branches/Apple/Dib/lib/Transforms/Utils/SimplifyCFG.cpp

Bill Wendling isanbard at gmail.com
Tue Mar 10 13:12:37 PDT 2009


Author: void
Date: Tue Mar 10 15:12:37 2009
New Revision: 66567

URL: http://llvm.org/viewvc/llvm-project?rev=66567&view=rev
Log:
--- Merging (from foreign repository) r66554 into '.':
U    lib/Transforms/Utils/SimplifyCFG.cpp

Ignore dbg info, while estimating size of jump through block.

Modified:
    llvm/branches/Apple/Dib/lib/Transforms/Utils/SimplifyCFG.cpp

Modified: llvm/branches/Apple/Dib/lib/Transforms/Utils/SimplifyCFG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Dib/lib/Transforms/Utils/SimplifyCFG.cpp?rev=66567&r1=66566&r2=66567&view=diff

==============================================================================
--- llvm/branches/Apple/Dib/lib/Transforms/Utils/SimplifyCFG.cpp (original)
+++ llvm/branches/Apple/Dib/lib/Transforms/Utils/SimplifyCFG.cpp Tue Mar 10 15:12:37 2009
@@ -1096,8 +1096,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