Skip to content

Commit e182b06

Browse files
ro-ikcloudy0717
authored andcommitted
[NFC] Refactor TargetLowering::getTgtMemIntrinsic to take CallBase parameter (llvm#170334)
cf. llvm#133907 (comment)
1 parent bae4f80 commit e182b06

23 files changed

+28
-29
lines changed

llvm/include/llvm/CodeGen/TargetLowering.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1243,7 +1243,7 @@ class LLVM_ABI TargetLoweringBase {
12431243
/// to a MemIntrinsicNode (touches memory). If this is the case, it returns
12441244
/// true and store the intrinsic information into the IntrinsicInfo that was
12451245
/// passed to the function.
1246-
virtual bool getTgtMemIntrinsic(IntrinsicInfo &, const CallInst &,
1246+
virtual bool getTgtMemIntrinsic(IntrinsicInfo &, const CallBase &,
12471247
MachineFunction &,
12481248
unsigned /*Intrinsic*/) const {
12491249
return false;

llvm/lib/Target/AArch64/AArch64ISelLowering.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17227,7 +17227,7 @@ SDValue AArch64TargetLowering::LowerVSCALE(SDValue Op,
1722717227
template <unsigned NumVecs>
1722817228
static bool
1722917229
setInfoSVEStN(const AArch64TargetLowering &TLI, const DataLayout &DL,
17230-
AArch64TargetLowering::IntrinsicInfo &Info, const CallInst &CI) {
17230+
AArch64TargetLowering::IntrinsicInfo &Info, const CallBase &CI) {
1723117231
Info.opc = ISD::INTRINSIC_VOID;
1723217232
// Retrieve EC from first vector argument.
1723317233
const EVT VT = TLI.getMemValueType(DL, CI.getArgOperand(0)->getType());
@@ -17252,7 +17252,7 @@ setInfoSVEStN(const AArch64TargetLowering &TLI, const DataLayout &DL,
1725217252
/// MemIntrinsicNodes. The associated MachineMemOperands record the alignment
1725317253
/// specified in the intrinsic calls.
1725417254
bool AArch64TargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
17255-
const CallInst &I,
17255+
const CallBase &I,
1725617256
MachineFunction &MF,
1725717257
unsigned Intrinsic) const {
1725817258
auto &DL = I.getDataLayout();

llvm/lib/Target/AArch64/AArch64ISelLowering.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ class AArch64TargetLowering : public TargetLowering {
206206
EmitInstrWithCustomInserter(MachineInstr &MI,
207207
MachineBasicBlock *MBB) const override;
208208

209-
bool getTgtMemIntrinsic(IntrinsicInfo &Info, const CallInst &I,
209+
bool getTgtMemIntrinsic(IntrinsicInfo &Info, const CallBase &I,
210210
MachineFunction &MF,
211211
unsigned Intrinsic) const override;
212212

llvm/lib/Target/AMDGPU/SIISelLowering.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1309,7 +1309,7 @@ static unsigned getIntrMemWidth(unsigned IntrID) {
13091309
}
13101310
}
13111311

1312-
static void getCoopAtomicOperandsInfo(const CallInst &CI, bool IsLoad,
1312+
static void getCoopAtomicOperandsInfo(const CallBase &CI, bool IsLoad,
13131313
TargetLoweringBase::IntrinsicInfo &Info) {
13141314
Value *OrderingArg = CI.getArgOperand(IsLoad ? 1 : 2);
13151315
unsigned Ord = cast<ConstantInt>(OrderingArg)->getZExtValue();
@@ -1339,7 +1339,7 @@ static void getCoopAtomicOperandsInfo(const CallInst &CI, bool IsLoad,
13391339
}
13401340

13411341
bool SITargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
1342-
const CallInst &CI,
1342+
const CallBase &CI,
13431343
MachineFunction &MF,
13441344
unsigned IntrID) const {
13451345
Info.flags = MachineMemOperand::MONone;

llvm/lib/Target/AMDGPU/SIISelLowering.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ class SITargetLowering final : public AMDGPUTargetLowering {
334334
MVT getPointerTy(const DataLayout &DL, unsigned AS) const override;
335335
MVT getPointerMemTy(const DataLayout &DL, unsigned AS) const override;
336336

337-
bool getTgtMemIntrinsic(IntrinsicInfo &, const CallInst &,
337+
bool getTgtMemIntrinsic(IntrinsicInfo &, const CallBase &,
338338
MachineFunction &MF,
339339
unsigned IntrinsicID) const override;
340340

llvm/lib/Target/ARM/ARMISelLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20665,7 +20665,7 @@ bool ARMTargetLowering::isFPImmLegal(const APFloat &Imm, EVT VT,
2066520665
/// MemIntrinsicNodes. The associated MachineMemOperands record the alignment
2066620666
/// specified in the intrinsic calls.
2066720667
bool ARMTargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
20668-
const CallInst &I,
20668+
const CallBase &I,
2066920669
MachineFunction &MF,
2067020670
unsigned Intrinsic) const {
2067120671
switch (Intrinsic) {

llvm/lib/Target/ARM/ARMISelLowering.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,7 @@ class VectorType;
315315
bool isFPImmLegal(const APFloat &Imm, EVT VT,
316316
bool ForCodeSize = false) const override;
317317

318-
bool getTgtMemIntrinsic(IntrinsicInfo &Info,
319-
const CallInst &I,
318+
bool getTgtMemIntrinsic(IntrinsicInfo &Info, const CallBase &I,
320319
MachineFunction &MF,
321320
unsigned Intrinsic) const override;
322321

llvm/lib/Target/Hexagon/HexagonISelLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2115,7 +2115,7 @@ static Value *getUnderLyingObjectForBrevLdIntr(Value *V) {
21152115
/// true and store the intrinsic information into the IntrinsicInfo that was
21162116
/// passed to the function.
21172117
bool HexagonTargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
2118-
const CallInst &I,
2118+
const CallBase &I,
21192119
MachineFunction &MF,
21202120
unsigned Intrinsic) const {
21212121
switch (Intrinsic) {

llvm/lib/Target/Hexagon/HexagonISelLowering.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ class HexagonTargetLowering : public TargetLowering {
145145
const SmallVectorImpl<SDValue> &OutVals,
146146
const SmallVectorImpl<ISD::InputArg> &Ins, SelectionDAG& DAG) const;
147147

148-
bool getTgtMemIntrinsic(IntrinsicInfo &Info, const CallInst &I,
148+
bool getTgtMemIntrinsic(IntrinsicInfo &Info, const CallBase &I,
149149
MachineFunction &MF,
150150
unsigned Intrinsic) const override;
151151

llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8912,7 +8912,7 @@ bool LoongArchTargetLowering::hasAndNot(SDValue Y) const {
89128912
}
89138913

89148914
bool LoongArchTargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
8915-
const CallInst &I,
8915+
const CallBase &I,
89168916
MachineFunction &MF,
89178917
unsigned Intrinsic) const {
89188918
switch (Intrinsic) {

0 commit comments

Comments
 (0)