Skip to content

Commit bf0a6ae

Browse files
authored
[RISCV] Add "MIPS" to name of MIPS-specific RISCVSubtarget functions. NFC (#162122)
1 parent 596ff85 commit bf0a6ae

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

llvm/lib/Target/RISCV/RISCVFeatures.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1421,7 +1421,7 @@ def HasVendorXMIPSCMov
14211421
: Predicate<"Subtarget->hasVendorXMIPSCMov()">,
14221422
AssemblerPredicate<(all_of FeatureVendorXMIPSCMov),
14231423
"'Xmipscmov' ('mips.ccmov' instruction)">;
1424-
def UseCCMovInsn : Predicate<"Subtarget->useCCMovInsn()">;
1424+
def UseMIPSCCMovInsn : Predicate<"Subtarget->useMIPSCCMovInsn()">;
14251425

14261426
def FeatureVendorXMIPSLSP
14271427
: RISCVExtension<1, 0, "MIPS optimization for hardware load-store bonding">;

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ RISCVTargetLowering::RISCVTargetLowering(const TargetMachine &TM,
434434
setOperationAction(ISD::ABS, MVT::i32, Custom);
435435
}
436436

437-
if (!Subtarget.useCCMovInsn() && !Subtarget.hasVendorXTHeadCondMov())
437+
if (!Subtarget.useMIPSCCMovInsn() && !Subtarget.hasVendorXTHeadCondMov())
438438
setOperationAction(ISD::SELECT, XLenVT, Custom);
439439

440440
if (Subtarget.hasVendorXqcia() && !Subtarget.is64Bit()) {

llvm/lib/Target/RISCV/RISCVInstrInfoXMips.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ def MIPS_CCMOV : RVInstR4<0b11, 0b011, OPC_CUSTOM_0, (outs GPR:$rd),
175175
Sched<[]>;
176176
}
177177

178-
let Predicates = [UseCCMovInsn] in {
178+
let Predicates = [UseMIPSCCMovInsn] in {
179179
def : Pat<(select (riscv_setne (XLenVT GPR:$rs2)),
180180
(XLenVT GPR:$rs1), (XLenVT GPR:$rs3)),
181181
(MIPS_CCMOV GPR:$rs1, GPR:$rs2, GPR:$rs3)>;

llvm/lib/Target/RISCV/RISCVLoadStoreOptimizer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ bool RISCVLoadStoreOpt::runOnMachineFunction(MachineFunction &Fn) {
9292
if (skipFunction(Fn.getFunction()))
9393
return false;
9494
const RISCVSubtarget &Subtarget = Fn.getSubtarget<RISCVSubtarget>();
95-
if (!Subtarget.useLoadStorePairs())
95+
if (!Subtarget.useMIPSLoadStorePairs())
9696
return false;
9797

9898
bool MadeChange = false;

llvm/lib/Target/RISCV/RISCVSubtarget.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ static cl::opt<bool> UseMIPSLoadStorePairsOpt(
6565
cl::desc("Enable the load/store pair optimization pass"), cl::init(false),
6666
cl::Hidden);
6767

68-
static cl::opt<bool> UseCCMovInsn("use-riscv-ccmov",
69-
cl::desc("Use 'mips.ccmov' instruction"),
70-
cl::init(true), cl::Hidden);
68+
static cl::opt<bool> UseMIPSCCMovInsn("use-riscv-mips-ccmov",
69+
cl::desc("Use 'mips.ccmov' instruction"),
70+
cl::init(true), cl::Hidden);
7171

7272
void RISCVSubtarget::anchor() {}
7373

@@ -246,10 +246,10 @@ void RISCVSubtarget::overridePostRASchedPolicy(
246246
}
247247
}
248248

249-
bool RISCVSubtarget::useLoadStorePairs() const {
249+
bool RISCVSubtarget::useMIPSLoadStorePairs() const {
250250
return UseMIPSLoadStorePairsOpt && HasVendorXMIPSLSP;
251251
}
252252

253-
bool RISCVSubtarget::useCCMovInsn() const {
254-
return UseCCMovInsn && HasVendorXMIPSCMov;
253+
bool RISCVSubtarget::useMIPSCCMovInsn() const {
254+
return UseMIPSCCMovInsn && HasVendorXMIPSCMov;
255255
}

llvm/lib/Target/RISCV/RISCVSubtarget.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,8 @@ class RISCVSubtarget : public RISCVGenSubtargetInfo {
227227
unsigned getXLen() const {
228228
return is64Bit() ? 64 : 32;
229229
}
230-
bool useLoadStorePairs() const;
231-
bool useCCMovInsn() const;
230+
bool useMIPSLoadStorePairs() const;
231+
bool useMIPSCCMovInsn() const;
232232
unsigned getFLen() const {
233233
if (HasStdExtD)
234234
return 64;

0 commit comments

Comments
 (0)