diff options
author | James Y Knight <jyknight@google.com> | 2015-08-15 02:32:35 +0000 |
---|---|---|
committer | James Y Knight <jyknight@google.com> | 2015-08-15 02:32:35 +0000 |
commit | 5567bafe93d8dfce39c4f9fa909165ef9ff0c30f (patch) | |
tree | c65a18906483a717708927b6d41a0b7b23e12333 /llvm/lib/CodeGen/TargetFrameLoweringImpl.cpp | |
parent | caad877d3e7a98eb47a6dd9b536dab9319726387 (diff) | |
download | llvm-5567bafe93d8dfce39c4f9fa909165ef9ff0c30f.zip llvm-5567bafe93d8dfce39c4f9fa909165ef9ff0c30f.tar.gz llvm-5567bafe93d8dfce39c4f9fa909165ef9ff0c30f.tar.bz2 |
Remove redundant TargetFrameLowering::getFrameIndexOffset virtual
function.
This was the same as getFrameIndexReference, but without the FrameReg
output.
Differential Revision: http://reviews.llvm.org/D12042
llvm-svn: 245148
Diffstat (limited to 'llvm/lib/CodeGen/TargetFrameLoweringImpl.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetFrameLoweringImpl.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/llvm/lib/CodeGen/TargetFrameLoweringImpl.cpp b/llvm/lib/CodeGen/TargetFrameLoweringImpl.cpp index f3cccd8..847027e 100644 --- a/llvm/lib/CodeGen/TargetFrameLoweringImpl.cpp +++ b/llvm/lib/CodeGen/TargetFrameLoweringImpl.cpp @@ -32,25 +32,22 @@ bool TargetFrameLowering::noFramePointerElim(const MachineFunction &MF) const { return Attr.getValueAsString() == "true"; } -/// getFrameIndexOffset - Returns the displacement from the frame register to -/// the stack frame of the specified index. This is the default implementation -/// which is overridden for some targets. -int TargetFrameLowering::getFrameIndexOffset(const MachineFunction &MF, - int FI) const { - const MachineFrameInfo *MFI = MF.getFrameInfo(); - return MFI->getObjectOffset(FI) + MFI->getStackSize() - - getOffsetOfLocalArea() + MFI->getOffsetAdjustment(); -} - +/// Returns the displacement from the frame register to the stack +/// frame of the specified index, along with the frame register used +/// (in output arg FrameReg). This is the default implementation which +/// is overridden for some targets. int TargetFrameLowering::getFrameIndexReference(const MachineFunction &MF, int FI, unsigned &FrameReg) const { + const MachineFrameInfo *MFI = MF.getFrameInfo(); const TargetRegisterInfo *RI = MF.getSubtarget().getRegisterInfo(); // By default, assume all frame indices are referenced via whatever // getFrameRegister() says. The target can override this if it's doing // something different. FrameReg = RI->getFrameRegister(MF); - return getFrameIndexOffset(MF, FI); + + return MFI->getObjectOffset(FI) + MFI->getStackSize() - + getOffsetOfLocalArea() + MFI->getOffsetAdjustment(); } bool TargetFrameLowering::needsFrameIndexResolution( |