[llvm-commits] [llvm] r84641 - /llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp
Jim Grosbach
grosbach at apple.com
Tue Oct 20 09:33:57 PDT 2009
Author: grosbach
Date: Tue Oct 20 11:33:57 2009
New Revision: 84641
URL: http://llvm.org/viewvc/llvm-project?rev=84641&view=rev
Log:
Register re-use for scavenged frame indices must check for re-deginition
of the register in the instruction which kills the scavenged value.
Modified:
llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp
Modified: llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp?rev=84641&r1=84640&r2=84641&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp (original)
+++ llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp Tue Oct 20 11:33:57 2009
@@ -873,6 +873,10 @@
PrevLastUseOp = i;
CurrentScratchReg = CurrentVirtReg = 0;
havePrevValue = trackingCurrentValue;
+ // Re-scan the operands of this instruction to catch definitions
+ // of the scratch register we're using. This is to handle things
+ // like ldr "r2, [scratch]" where scratch is r2.
+ i = 0;
}
}
RS->forward(MI);
More information about the llvm-commits
mailing list