Skip to content

Commit fea7e69

Browse files
authored
[PowerPC] Remove custom original type tracking (NFCI) (#154090)
The OrigTy is passed to CC lowering nowadays, so use it directly instead of custom pre-analysis.
1 parent af5f16b commit fea7e69

File tree

6 files changed

+4
-92
lines changed

6 files changed

+4
-92
lines changed

llvm/lib/Target/PowerPC/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ add_llvm_target(PowerPCCodeGen
2525
PPCBranchSelector.cpp
2626
PPCBranchCoalescing.cpp
2727
PPCCallingConv.cpp
28-
PPCCCState.cpp
2928
PPCCTRLoops.cpp
3029
PPCCTRLoopsVerify.cpp
3130
PPCExpandAtomicPseudoInsts.cpp

llvm/lib/Target/PowerPC/PPCCCState.cpp

Lines changed: 0 additions & 33 deletions
This file was deleted.

llvm/lib/Target/PowerPC/PPCCCState.h

Lines changed: 0 additions & 43 deletions
This file was deleted.

llvm/lib/Target/PowerPC/PPCCallingConv.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
#include "PPCCallingConv.h"
1010
#include "PPCSubtarget.h"
11-
#include "PPCCCState.h"
1211
using namespace llvm;
1312

1413
inline bool CC_PPC_AnyReg_Error(unsigned &, MVT &, MVT &,

llvm/lib/Target/PowerPC/PPCCallingConv.td

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,9 @@ class CCIfNotSubtarget<string F, CCAction A>
2121
F),
2222
A>;
2323
class CCIfOrigArgWasNotPPCF128<CCAction A>
24-
: CCIf<"!static_cast<PPCCCState *>(&State)->WasOriginalArgPPCF128(ValNo)",
25-
A>;
24+
: CCIf<"!OrigTy->isPPC_FP128Ty()", A>;
2625
class CCIfOrigArgWasPPCF128<CCAction A>
27-
: CCIf<"static_cast<PPCCCState *>(&State)->WasOriginalArgPPCF128(ValNo)",
28-
A>;
26+
: CCIf<"OrigTy->isPPC_FP128Ty()", A>;
2927

3028
//===----------------------------------------------------------------------===//
3129
// Return Value Calling Convention

llvm/lib/Target/PowerPC/PPCISelLowering.cpp

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#include "MCTargetDesc/PPCMCTargetDesc.h"
1515
#include "MCTargetDesc/PPCPredicates.h"
1616
#include "PPC.h"
17-
#include "PPCCCState.h"
1817
#include "PPCCallingConv.h"
1918
#include "PPCFrameLowering.h"
2019
#include "PPCInstrInfo.h"
@@ -4330,17 +4329,13 @@ SDValue PPCTargetLowering::LowerFormalArguments_32SVR4(
43304329

43314330
// Assign locations to all of the incoming arguments.
43324331
SmallVector<CCValAssign, 16> ArgLocs;
4333-
PPCCCState CCInfo(CallConv, isVarArg, DAG.getMachineFunction(), ArgLocs,
4332+
CCState CCInfo(CallConv, isVarArg, DAG.getMachineFunction(), ArgLocs,
43344333
*DAG.getContext());
43354334

43364335
// Reserve space for the linkage area on the stack.
43374336
unsigned LinkageSize = Subtarget.getFrameLowering()->getLinkageSize();
43384337
CCInfo.AllocateStack(LinkageSize, PtrAlign);
4339-
if (useSoftFloat())
4340-
CCInfo.PreAnalyzeFormalArguments(Ins);
4341-
43424338
CCInfo.AnalyzeFormalArguments(Ins, CC_PPC32_SVR4);
4343-
CCInfo.clearWasPPCF128();
43444339

43454340
for (unsigned i = 0, e = ArgLocs.size(); i != e; ++i) {
43464341
CCValAssign &VA = ArgLocs[i];
@@ -6062,13 +6057,11 @@ SDValue PPCTargetLowering::LowerCall_32SVR4(
60626057

60636058
// Assign locations to all of the outgoing arguments.
60646059
SmallVector<CCValAssign, 16> ArgLocs;
6065-
PPCCCState CCInfo(CallConv, IsVarArg, MF, ArgLocs, *DAG.getContext());
6060+
CCState CCInfo(CallConv, IsVarArg, MF, ArgLocs, *DAG.getContext());
60666061

60676062
// Reserve space for the linkage area on the stack.
60686063
CCInfo.AllocateStack(Subtarget.getFrameLowering()->getLinkageSize(),
60696064
PtrAlign);
6070-
if (useSoftFloat())
6071-
CCInfo.PreAnalyzeCallOperands(Outs);
60726065

60736066
if (IsVarArg) {
60746067
// Handle fixed and variable vector arguments differently.
@@ -6101,7 +6094,6 @@ SDValue PPCTargetLowering::LowerCall_32SVR4(
61016094
// All arguments are treated the same.
61026095
CCInfo.AnalyzeCallOperands(Outs, CC_PPC32_SVR4);
61036096
}
6104-
CCInfo.clearWasPPCF128();
61056097

61066098
// Assign locations to all of the outgoing aggregate by value arguments.
61076099
SmallVector<CCValAssign, 16> ByValArgLocs;

0 commit comments

Comments
 (0)