Skip to content

Commit d6b224e

Browse files
committed
[RISCV] Rename isAllUsesReadW to hasAllWUsers in RISCVSExtWRemoval. NFC
1 parent 70508b6 commit d6b224e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

llvm/lib/Target/RISCV/RISCVSExtWRemoval.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,7 @@ static void addUses(const MachineInstr &MI,
7373
// returns true if all uses of OrigMI only depend on the lower word of its
7474
// output, so we can transform OrigMI to the corresponding W-version.
7575
// TODO: handle multiple interdependent transformations
76-
static bool isAllUsesReadW(const MachineInstr &OrigMI,
77-
MachineRegisterInfo &MRI) {
76+
static bool hasAllWUsers(const MachineInstr &OrigMI, MachineRegisterInfo &MRI) {
7877

7978
SmallPtrSet<const MachineInstr *, 4> Visited;
8079
SmallVector<const MachineInstr *, 4> Worklist;
@@ -258,7 +257,7 @@ static bool isSignExtendingOpW(MachineInstr &MI, MachineRegisterInfo &MRI,
258257
case RISCV::ADDI:
259258
if (MI.getOperand(1).isReg() && MI.getOperand(1).getReg() == RISCV::X0)
260259
return true;
261-
if (isAllUsesReadW(MI, MRI)) {
260+
if (hasAllWUsers(MI, MRI)) {
262261
// transform to ADDIW
263262
FixableDef.insert(&MI);
264263
return true;
@@ -286,7 +285,7 @@ static bool isSignExtendingOpW(MachineInstr &MI, MachineRegisterInfo &MRI,
286285
case RISCV::LWU:
287286
case RISCV::MUL:
288287
case RISCV::SUB:
289-
if (isAllUsesReadW(MI, MRI)) {
288+
if (hasAllWUsers(MI, MRI)) {
290289
FixableDef.insert(&MI);
291290
return true;
292291
}

0 commit comments

Comments
 (0)