diff options
author | Jim Grosbach <grosbach@apple.com> | 2010-06-09 22:21:24 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2010-06-09 22:21:24 +0000 |
commit | 5fa0158ecd6dd9f0f19275bd094ac35e3cf749ec (patch) | |
tree | 956d39a1fbce0e7f69a9c961e61ed5c42a8d77bb /llvm/lib | |
parent | 0d3b18dd6fc321997e8ad42881be8e10ed001929 (diff) | |
download | bcm5719-llvm-5fa0158ecd6dd9f0f19275bd094ac35e3cf749ec.tar.gz bcm5719-llvm-5fa0158ecd6dd9f0f19275bd094ac35e3cf749ec.zip |
be slightly more subtle about skipping dbg_value instructions; otherwise, if a
dbg_value immediately follows a sequence of ldr/str instructions that should
be combined into an ldm/stm and is the last instruction in the block, then
combine may end up being skipped.
llvm-svn: 105758
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp b/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp index b39d44fb6f9..ab69f1e365f 100644 --- a/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp +++ b/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp @@ -1024,10 +1024,6 @@ bool ARMLoadStoreOpt::LoadStoreMultipleOpti(MachineBasicBlock &MBB) { RS->enterBasicBlock(&MBB); MachineBasicBlock::iterator MBBI = MBB.begin(), E = MBB.end(); while (MBBI != E) { - if (MBBI->isDebugValue()) { - ++MBBI; - continue; - } if (FixInvalidRegPairOp(MBB, MBBI)) continue; @@ -1094,7 +1090,12 @@ bool ARMLoadStoreOpt::LoadStoreMultipleOpti(MachineBasicBlock &MBB) { } } - if (Advance) { + if (MBBI->isDebugValue()) { + ++MBBI; + if (MBBI == E) + // Reach the end of the block, try merging the memory instructions. + TryMerge = true; + } else if (Advance) { ++Position; ++MBBI; if (MBBI == E) |