Skip to content

Commit b73c8db

Browse files
committed
delete some unused code
1 parent 154a7cb commit b73c8db

File tree

1 file changed

+6
-22
lines changed

1 file changed

+6
-22
lines changed

llvm/lib/Target/PowerPC/PPCISelLowering.cpp

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7366,9 +7366,6 @@ SDValue PPCTargetLowering::LowerFormalArguments_AIX(
73667366

73677367
const bool IsPPC64 = Subtarget.isPPC64();
73687368
const unsigned PtrByteSize = IsPPC64 ? 8 : 4;
7369-
// Potential tail calls could cause overwriting of argument stack slots.
7370-
const bool IsImmutable = !(getTargetMachine().Options.GuaranteedTailCallOpt &&
7371-
(CallConv == CallingConv::Fast));
73727369

73737370
// Assign locations to all of the incoming arguments.
73747371
SmallVector<CCValAssign, 16> ArgLocs;
@@ -7434,6 +7431,10 @@ SDValue PPCTargetLowering::LowerFormalArguments_AIX(
74347431
// Objects are right-justified because AIX is big-endian.
74357432
if (LocSize > ValSize)
74367433
CurArgOffset += LocSize - ValSize;
7434+
// Potential tail calls could cause overwriting of argument stack slots.
7435+
const bool IsImmutable =
7436+
!(getTargetMachine().Options.GuaranteedTailCallOpt &&
7437+
(CallConv == CallingConv::Fast));
74377438
int FI = MFI.CreateFixedObject(ValSize, CurArgOffset, IsImmutable);
74387439
SDValue FIN = DAG.getFrameIndex(FI, PtrVT);
74397440
SDValue ArgValue =
@@ -7744,12 +7745,6 @@ SDValue PPCTargetLowering::LowerCall_AIX(
77447745
const unsigned NumBytes = std::max<unsigned>(
77457746
LinkageSize + MinParameterSaveAreaSize, CCInfo.getStackSize());
77467747

7747-
unsigned AlignNumBytes =
7748-
EnsureStackAlignment(Subtarget.getFrameLowering(), NumBytes);
7749-
int SPDiff = IsSibCall ? 0
7750-
: CalculateTailCallSPDiff(DAG, CFlags.IsTailCall,
7751-
AlignNumBytes);
7752-
77537748
// To protect arguments on the stack from being clobbered in a tail call,
77547749
// force all the loads to happen before doing any other lowering.
77557750
if (CFlags.IsTailCall)
@@ -7760,12 +7755,9 @@ SDValue PPCTargetLowering::LowerCall_AIX(
77607755
if (!IsSibCall)
77617756
Chain = DAG.getCALLSEQ_START(Chain, NumBytes, 0, dl);
77627757
SDValue CallSeqStart = Chain;
7763-
SDValue LROp, FPOp;
7764-
Chain = EmitTailCallLoadFPAndRetAddr(DAG, SPDiff, Chain, LROp, FPOp, dl);
77657758

77667759
SmallVector<std::pair<unsigned, SDValue>, 8> RegsToPass;
77677760
SmallVector<SDValue, 8> MemOpChains;
7768-
SmallVector<TailCallArgumentInfo, 8> TailCallArguments;
77697761

77707762
// Set up a copy of the stack pointer for loading and storing any
77717763
// arguments that may not fit in the registers available for argument
@@ -7942,18 +7934,13 @@ SDValue PPCTargetLowering::LowerCall_AIX(
79427934
}
79437935

79447936
if (VA.isMemLoc()) {
7945-
if (!CFlags.IsTailCall) {
79467937
SDValue PtrOff =
79477938
DAG.getConstant(VA.getLocMemOffset(), dl, StackPtr.getValueType());
79487939
PtrOff = DAG.getNode(ISD::ADD, dl, PtrVT, StackPtr, PtrOff);
79497940
MemOpChains.push_back(
79507941
DAG.getStore(Chain, dl, Arg, PtrOff,
79517942
MachinePointerInfo::getStack(MF, VA.getLocMemOffset()),
79527943
Subtarget.getFrameLowering()->getStackAlign()));
7953-
} else
7954-
CalculateTailCallArgDest(DAG, MF, false, Arg, SPDiff,
7955-
VA.getLocMemOffset(), TailCallArguments);
7956-
79577944
continue;
79587945
}
79597946

@@ -8034,11 +8021,8 @@ SDValue PPCTargetLowering::LowerCall_AIX(
80348021
Chain = DAG.getCopyToReg(Chain, dl, Reg.first, Reg.second, InGlue);
80358022
InGlue = Chain.getValue(1);
80368023
}
8037-
/*
8038-
if (CFlags.IsTailCall && !IsSibCall)
8039-
PrepareTailCall(DAG, InGlue, Chain, dl, SPDiff, NumBytes, LROp, FPOp,
8040-
TailCallArguments);
8041-
*/
8024+
8025+
const int SPDiff = 0;
80428026
return FinishCall(CFlags, dl, DAG, RegsToPass, InGlue, Chain, CallSeqStart,
80438027
Callee, SPDiff, NumBytes, Ins, InVals, CB);
80448028
}

0 commit comments

Comments
 (0)