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 | 3a208ae6a713461313e373c8e486b74e143829c9 (patch) | |
| tree | 80b0841ad3965a0f06bf856c611e89117893e93d /lib/Target/ARM/ARMLoadStoreOptimizer.cpp | |
| parent | b11c7250429eb18cc214617cf95caec9159297f7 (diff) | |
| download | external_llvm-3a208ae6a713461313e373c8e486b74e143829c9.zip external_llvm-3a208ae6a713461313e373c8e486b74e143829c9.tar.gz external_llvm-3a208ae6a713461313e373c8e486b74e143829c9.tar.bz2 | |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105758 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMLoadStoreOptimizer.cpp')
| -rw-r--r-- | lib/Target/ARM/ARMLoadStoreOptimizer.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/Target/ARM/ARMLoadStoreOptimizer.cpp b/lib/Target/ARM/ARMLoadStoreOptimizer.cpp index b39d44f..ab69f1e 100644 --- a/lib/Target/ARM/ARMLoadStoreOptimizer.cpp +++ b/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) |
