diff options
| author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2019-06-25 20:53:35 +0000 |
|---|---|---|
| committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2019-06-25 20:53:35 +0000 |
| commit | 8fcc70f1414895c12d3a8c1e1e9b2ca39a5572ef (patch) | |
| tree | 3a0f9780ebaefe53445a95e36ed59aceb98d2f88 /llvm | |
| parent | b90cb57b63aec4a234d1a138e31af4e0b603ccff (diff) | |
| download | bcm5719-llvm-8fcc70f1414895c12d3a8c1e1e9b2ca39a5572ef.tar.gz bcm5719-llvm-8fcc70f1414895c12d3a8c1e1e9b2ca39a5572ef.zip | |
Don't look for the TargetFrameLowering in the implementation
The same oddity was apparently copy-pasted between multiple targets.
llvm-svn: 364349
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/lib/Target/AArch64/AArch64FrameLowering.cpp | 3 | ||||
| -rw-r--r-- | llvm/lib/Target/AMDGPU/SIFrameLowering.cpp | 3 | ||||
| -rw-r--r-- | llvm/lib/Target/AVR/AVRFrameLowering.cpp | 3 | ||||
| -rw-r--r-- | llvm/lib/Target/X86/X86FrameLowering.cpp | 3 |
4 files changed, 4 insertions, 8 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp b/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp index 5dbee91bee5..3239cf05381 100644 --- a/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp +++ b/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp @@ -250,8 +250,7 @@ MachineBasicBlock::iterator AArch64FrameLowering::eliminateCallFramePseudoInstr( bool IsDestroy = Opc == TII->getCallFrameDestroyOpcode(); uint64_t CalleePopAmount = IsDestroy ? I->getOperand(1).getImm() : 0; - const TargetFrameLowering *TFI = MF.getSubtarget().getFrameLowering(); - if (!TFI->hasReservedCallFrame(MF)) { + if (!hasReservedCallFrame(MF)) { unsigned Align = getStackAlignment(); int64_t Amount = I->getOperand(0).getImm(); diff --git a/llvm/lib/Target/AMDGPU/SIFrameLowering.cpp b/llvm/lib/Target/AMDGPU/SIFrameLowering.cpp index 8ded85f00f6..6226b78d02c 100644 --- a/llvm/lib/Target/AMDGPU/SIFrameLowering.cpp +++ b/llvm/lib/Target/AMDGPU/SIFrameLowering.cpp @@ -826,8 +826,7 @@ MachineBasicBlock::iterator SIFrameLowering::eliminateCallFramePseudoInstr( bool IsDestroy = Opc == TII->getCallFrameDestroyOpcode(); uint64_t CalleePopAmount = IsDestroy ? I->getOperand(1).getImm() : 0; - const TargetFrameLowering *TFI = MF.getSubtarget().getFrameLowering(); - if (!TFI->hasReservedCallFrame(MF)) { + if (!hasReservedCallFrame(MF)) { unsigned Align = getStackAlignment(); Amount = alignTo(Amount, Align); diff --git a/llvm/lib/Target/AVR/AVRFrameLowering.cpp b/llvm/lib/Target/AVR/AVRFrameLowering.cpp index f39575b0afe..b1b1fd14380 100644 --- a/llvm/lib/Target/AVR/AVRFrameLowering.cpp +++ b/llvm/lib/Target/AVR/AVRFrameLowering.cpp @@ -361,13 +361,12 @@ MachineBasicBlock::iterator AVRFrameLowering::eliminateCallFramePseudoInstr( MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator MI) const { const AVRSubtarget &STI = MF.getSubtarget<AVRSubtarget>(); - const TargetFrameLowering &TFI = *STI.getFrameLowering(); const AVRInstrInfo &TII = *STI.getInstrInfo(); // There is nothing to insert when the call frame memory is allocated during // function entry. Delete the call frame pseudo and replace all pseudo stores // with real store instructions. - if (TFI.hasReservedCallFrame(MF)) { + if (hasReservedCallFrame(MF)) { fixStackStores(MBB, MI, TII, false); return MBB.erase(MI); } diff --git a/llvm/lib/Target/X86/X86FrameLowering.cpp b/llvm/lib/Target/X86/X86FrameLowering.cpp index ac9bbe42c1d..f50e91fdabe 100644 --- a/llvm/lib/Target/X86/X86FrameLowering.cpp +++ b/llvm/lib/Target/X86/X86FrameLowering.cpp @@ -1906,8 +1906,7 @@ X86FrameLowering::getFrameIndexReferencePreferSP(const MachineFunction &MF, // If !hasReservedCallFrame the function might have SP adjustement in the // body. So, even though the offset is statically known, it depends on where // we are in the function. - const TargetFrameLowering *TFI = MF.getSubtarget().getFrameLowering(); - if (!IgnoreSPUpdates && !TFI->hasReservedCallFrame(MF)) + if (!IgnoreSPUpdates && !hasReservedCallFrame(MF)) return getFrameIndexReference(MF, FI, FrameReg); // We don't handle tail calls, and shouldn't be seeing them either. |

