Skip to content

Commit 499bebe

Browse files
committed
NumLoads => ClusterSize to match #73757
1 parent f8ce744 commit 499bebe

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

llvm/lib/Target/RISCV/RISCVInstrInfo.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2267,7 +2267,7 @@ static bool memOpsHaveSameBasePtr(const MachineInstr &MI1,
22672267

22682268
bool RISCVInstrInfo::shouldClusterMemOps(
22692269
ArrayRef<const MachineOperand *> BaseOps1,
2270-
ArrayRef<const MachineOperand *> BaseOps2, unsigned NumLoads,
2270+
ArrayRef<const MachineOperand *> BaseOps2, unsigned ClusterSize,
22712271
unsigned NumBytes) const {
22722272
// If the mem ops (to be clustered) do not have the same base ptr, then they
22732273
// should not be clustered
@@ -2283,7 +2283,7 @@ bool RISCVInstrInfo::shouldClusterMemOps(
22832283

22842284
// TODO: Use a more carefully chosen heuristic, e.g. only cluster if offsets
22852285
// indicate they likely share a cache line.
2286-
return NumLoads <= 4;
2286+
return ClusterSize <= 4;
22872287
}
22882288

22892289
// Set BaseReg (the base register operand), Offset (the byte offset being

llvm/lib/Target/RISCV/RISCVInstrInfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ class RISCVInstrInfo : public RISCVGenInstrInfo {
159159

160160
bool shouldClusterMemOps(ArrayRef<const MachineOperand *> BaseOps1,
161161
ArrayRef<const MachineOperand *> BaseOps2,
162-
unsigned NumLoads, unsigned NumBytes) const override;
162+
unsigned ClusterSize, unsigned NumBytes) const override;
163163

164164
bool getMemOperandWithOffsetWidth(const MachineInstr &LdSt,
165165
const MachineOperand *&BaseOp,

0 commit comments

Comments
 (0)