diff options
| author | Dale Johannesen <dalej@apple.com> | 2009-03-03 01:43:03 +0000 | 
|---|---|---|
| committer | Dale Johannesen <dalej@apple.com> | 2009-03-03 01:43:03 +0000 | 
| commit | 0192552340b1d04bbeb7db6934b9a9be512222bb (patch) | |
| tree | 05694d8ad3216b0dba4561a088518c8fc7677d9c /llvm/lib/Transforms/Scalar/InstructionCombining.cpp | |
| parent | 8dc671cdc93e02953b1f69e10719cbb7d7b94199 (diff) | |
| download | bcm5719-llvm-0192552340b1d04bbeb7db6934b9a9be512222bb.tar.gz bcm5719-llvm-0192552340b1d04bbeb7db6934b9a9be512222bb.zip  | |
Don't count DebugInfo instructions in another limit
(lest they affect codegen).
llvm-svn: 65915
Diffstat (limited to 'llvm/lib/Transforms/Scalar/InstructionCombining.cpp')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 8 | 
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index e0d3ac4d428..f3fb4fb7f48 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp @@ -11439,12 +11439,18 @@ Instruction *InstCombiner::visitStoreInst(StoreInst &SI) {                                  SI.getAlignment()))      SI.setAlignment(KnownAlign); -  // Do really simple DSE, to catch cases where there are several consequtive +  // Do really simple DSE, to catch cases where there are several consecutive    // stores to the same location, separated by a few arithmetic operations. This    // situation often occurs with bitfield accesses.    BasicBlock::iterator BBI = &SI;    for (unsigned ScanInsts = 6; BBI != SI.getParent()->begin() && ScanInsts;         --ScanInsts) { +    // Don't count debug info directives, lest they affect codegen. +    if (isa<DbgInfoIntrinsic>(BBI)) { +      ScanInsts++; +      --BBI; +      continue; +    }          --BBI;      if (StoreInst *PrevSI = dyn_cast<StoreInst>(BBI)) {  | 

