[llvm-commits] [llvm] r98431 - /llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp
Chris Lattner
sabre at nondot.org
Sat Mar 13 00:04:35 PST 2010
Author: lattner
Date: Sat Mar 13 02:04:35 2010
New Revision: 98431
URL: http://llvm.org/viewvc/llvm-project?rev=98431&view=rev
Log:
simplify some overly general code. The stack always grows down on x86.
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=98431&r1=98430&r2=98431&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp Sat Mar 13 02:04:35 2010
@@ -938,10 +938,7 @@
std::vector<MachineMove> &Moves = MMI->getFrameMoves();
const TargetData *TD = MF.getTarget().getTargetData();
uint64_t NumBytes = 0;
- int stackGrowth =
- (MF.getTarget().getFrameInfo()->getStackGrowthDirection() ==
- TargetFrameInfo::StackGrowsUp ?
- TD->getPointerSize() : -TD->getPointerSize());
+ int stackGrowth = -TD->getPointerSize();
if (HasFP) {
// Calculate required stack adjustment.
@@ -978,8 +975,7 @@
}
// Change the rule for the FramePtr to be an "offset" rule.
- MachineLocation FPDst(MachineLocation::VirtualFP,
- 2 * stackGrowth);
+ MachineLocation FPDst(MachineLocation::VirtualFP, 2 * stackGrowth);
MachineLocation FPSrc(FramePtr);
Moves.push_back(MachineMove(FrameLabelId, FPDst, FPSrc));
}
More information about the llvm-commits
mailing list