diff options
author | Dale Johannesen <dalej@apple.com> | 2009-03-11 22:19:43 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2009-03-11 22:19:43 +0000 |
commit | a891518c4dfd7dddc2f88be0100f8204e738afb3 (patch) | |
tree | 8472c2837f952c24989d697ec46be621782e114f | |
parent | a597a9761845652807c311e6622d6d727a5f1725 (diff) | |
download | external_llvm-a891518c4dfd7dddc2f88be0100f8204e738afb3.zip external_llvm-a891518c4dfd7dddc2f88be0100f8204e738afb3.tar.gz external_llvm-a891518c4dfd7dddc2f88be0100f8204e738afb3.tar.bz2 |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66716 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Transforms/Scalar/InstructionCombining.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index 2bf87c0..b2a6864 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/lib/Transforms/Scalar/InstructionCombining.cpp @@ -10954,10 +10954,10 @@ Instruction *InstCombiner::visitAllocationInst(AllocationInst &AI) { 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... |