[llvm-commits] [llvm] r105758 - /llvm/trunk/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
Jim Grosbach
grosbach at apple.com
Wed Jun 9 15:21:24 PDT 2010
Author: grosbach
Date: Wed Jun 9 17:21:24 2010
New Revision: 105758
URL: http://llvm.org/viewvc/llvm-project?rev=105758&view=rev
Log:
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.
Modified:
llvm/trunk/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
Modified: llvm/trunk/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMLoadStoreOptimizer.cpp?rev=105758&r1=105757&r2=105758&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMLoadStoreOptimizer.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMLoadStoreOptimizer.cpp Wed Jun 9 17:21:24 2010
@@ -1024,10 +1024,6 @@
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 @@
}
}
- 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)
More information about the llvm-commits
mailing list