Skip to content

Commit

Permalink
Remove the plumbing for isDarwinABI from EmitTailCallLoadFPAndRetAddr.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274716 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
echristo committed Jul 7, 2016
1 parent 147d36a commit 77bb5f9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
13 changes: 5 additions & 8 deletions lib/Target/PowerPC/PPCISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4144,7 +4144,7 @@ CalculateTailCallArgDest(SelectionDAG &DAG, MachineFunction &MF, bool isPPC64,
/// LROpOut/FPOpout. Used when tail calling.
SDValue PPCTargetLowering::EmitTailCallLoadFPAndRetAddr(
SelectionDAG &DAG, int SPDiff, SDValue Chain, SDValue &LROpOut,
SDValue &FPOpOut, bool isDarwinABI, const SDLoc &dl) const {
SDValue &FPOpOut, const SDLoc &dl) const {
if (SPDiff) {
// Load the LR and FP stack slot for later adjusting.
EVT VT = Subtarget.isPPC64() ? MVT::i64 : MVT::i32;
Expand All @@ -4155,7 +4155,7 @@ SDValue PPCTargetLowering::EmitTailCallLoadFPAndRetAddr(

// When using the 32/64-bit SVR4 ABI there is no need to load the FP stack
// slot as the FP is never overwritten.
if (isDarwinABI) {
if (Subtarget.isDarwinABI()) {
FPOpOut = getFramePointerFrameIndex(DAG);
FPOpOut = DAG.getLoad(VT, dl, Chain, FPOpOut, MachinePointerInfo(),
false, false, false, 0);
Expand Down Expand Up @@ -4755,8 +4755,7 @@ SDValue PPCTargetLowering::LowerCall_32SVR4(
// Load the return address and frame pointer so it can be moved somewhere else
// later.
SDValue LROp, FPOp;
Chain = EmitTailCallLoadFPAndRetAddr(DAG, SPDiff, Chain, LROp, FPOp, false,
dl);
Chain = EmitTailCallLoadFPAndRetAddr(DAG, SPDiff, Chain, LROp, FPOp, dl);

// Set up a copy of the stack pointer for use loading and storing any
// arguments that may not fit in the registers available for argument
Expand Down Expand Up @@ -5056,8 +5055,7 @@ SDValue PPCTargetLowering::LowerCall_64SVR4(
// Load the return address and frame pointer so it can be move somewhere else
// later.
SDValue LROp, FPOp;
Chain = EmitTailCallLoadFPAndRetAddr(DAG, SPDiff, Chain, LROp, FPOp, true,
dl);
Chain = EmitTailCallLoadFPAndRetAddr(DAG, SPDiff, Chain, LROp, FPOp, dl);

// Set up a copy of the stack pointer for use loading and storing any
// arguments that may not fit in the registers available for argument
Expand Down Expand Up @@ -5622,8 +5620,7 @@ SDValue PPCTargetLowering::LowerCall_Darwin(
// Load the return address and frame pointer so it can be move somewhere else
// later.
SDValue LROp, FPOp;
Chain = EmitTailCallLoadFPAndRetAddr(DAG, SPDiff, Chain, LROp, FPOp, true,
dl);
Chain = EmitTailCallLoadFPAndRetAddr(DAG, SPDiff, Chain, LROp, FPOp, dl);

// Set up a copy of the stack pointer for use loading and storing any
// arguments that may not fit in the registers available for argument
Expand Down
2 changes: 1 addition & 1 deletion lib/Target/PowerPC/PPCISelLowering.h
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,7 @@ namespace llvm {

SDValue EmitTailCallLoadFPAndRetAddr(SelectionDAG &DAG, int SPDiff,
SDValue Chain, SDValue &LROpOut,
SDValue &FPOpOut, bool isDarwinABI,
SDValue &FPOpOut,
const SDLoc &dl) const;

SDValue LowerRETURNADDR(SDValue Op, SelectionDAG &DAG) const;
Expand Down

0 comments on commit 77bb5f9

Please sign in to comment.