[llvm-commits] [llvm] r61214 - /llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp
Dan Gohman
gohman at apple.com
Thu Dec 18 14:01:54 PST 2008
Author: djg
Date: Thu Dec 18 16:01:52 2008
New Revision: 61214
URL: http://llvm.org/viewvc/llvm-project?rev=61214&view=rev
Log:
When setting up the frame pointer, add it as a live-in register to all
non-entry blocks, so that it doesn't appear use-before-def anywhere.
Modified:
llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp
Modified: llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp?rev=61214&r1=61213&r2=61214&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp Thu Dec 18 16:01:52 2008
@@ -745,6 +745,11 @@
BuildMI(MBB, MBBI, TII.get(Is64Bit ? X86::MOV64rr : X86::MOV32rr), FramePtr)
.addReg(StackPtr);
+ // Mark the FramePtr as live-in in every block except the entry.
+ for (MachineFunction::iterator I = next(MF.begin()), E = MF.end();
+ I != E; ++I)
+ I->addLiveIn(FramePtr);
+
// Realign stack
if (needsStackRealignment(MF))
BuildMI(MBB, MBBI,
More information about the llvm-commits
mailing list