[llvm-commits] [llvm] r66716 - /llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp

Dale Johannesen dalej at apple.com
Wed Mar 11 15:19:43 PDT 2009


Author: johannes
Date: Wed Mar 11 17:19:43 2009
New Revision: 66716

URL: http://llvm.org/viewvc/llvm-project?rev=66716&view=rev
Log:
Skip interleaved debug info when fast-forwarding through
allocations.  Apparently the assumption is there is an
instruction (terminator?) following the allocation so I
am allowing the same assumption.


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

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

==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Wed Mar 11 17:19:43 2009
@@ -10954,10 +10954,10 @@
       InsertNewInstBefore(New, AI);
 
       // Scan to the end of the allocation instructions, to skip over a block of
-      // allocas if possible...
+      // allocas if possible...also skip interleaved debug info
       //
       BasicBlock::iterator It = New;
-      while (isa<AllocationInst>(*It)) ++It;
+      while (isa<AllocationInst>(*It) || isa<DbgInfoIntrinsic>(*It)) ++It;
 
       // Now that I is pointing to the first non-allocation-inst in the block,
       // insert our getelementptr instruction...





More information about the llvm-commits mailing list