Skip to content

[CodeGen] Remove unused argument from getCoveringSubRegIndexes. NFC. #122884

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions llvm/include/llvm/CodeGen/TargetRegisterInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -426,8 +426,7 @@ class TargetRegisterInfo : public MCRegisterInfo {
///
/// If this is possible, returns true and appends the best matching set of
/// indexes to \p Indexes. If this is not possible, returns false.
bool getCoveringSubRegIndexes(const MachineRegisterInfo &MRI,
const TargetRegisterClass *RC,
bool getCoveringSubRegIndexes(const TargetRegisterClass *RC,
LaneBitmask LaneMask,
SmallVectorImpl<unsigned> &Indexes) const;

Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/CodeGen/InitUndef.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ bool InitUndef::handleSubReg(MachineFunction &MF, MachineInstr &MI,
});

SmallVector<unsigned> SubRegIndexNeedInsert;
TRI->getCoveringSubRegIndexes(*MRI, TargetRegClass, NeedDef,
TRI->getCoveringSubRegIndexes(TargetRegClass, NeedDef,
SubRegIndexNeedInsert);

// It's not possible to create the INIT_UNDEF when there is no register
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/CodeGen/SplitKit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ SlotIndex SplitEditor::buildCopy(Register FromReg, Register ToReg,
SmallVector<unsigned, 8> SubIndexes;

// Abort if we cannot possibly implement the COPY with the given indexes.
if (!TRI.getCoveringSubRegIndexes(MRI, RC, LaneMask, SubIndexes))
if (!TRI.getCoveringSubRegIndexes(RC, LaneMask, SubIndexes))
report_fatal_error("Impossible to implement partial COPY");

SlotIndex Def;
Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/CodeGen/TargetRegisterInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -556,8 +556,8 @@ TargetRegisterInfo::getRegSizeInBits(Register Reg,
}

bool TargetRegisterInfo::getCoveringSubRegIndexes(
const MachineRegisterInfo &MRI, const TargetRegisterClass *RC,
LaneBitmask LaneMask, SmallVectorImpl<unsigned> &NeededIndexes) const {
const TargetRegisterClass *RC, LaneBitmask LaneMask,
SmallVectorImpl<unsigned> &NeededIndexes) const {
SmallVector<unsigned, 8> PossibleIndexes;
unsigned BestIdx = 0;
unsigned BestCover = 0;
Expand Down
6 changes: 3 additions & 3 deletions llvm/lib/CodeGen/VirtRegMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -660,9 +660,9 @@ void VirtRegRewriter::rewrite() {

// TODO: Just use one super register def if none of the lanes
// are needed?
if (!TRI->getCoveringSubRegIndexes(
*MRI, MRI->getRegClass(VirtReg), LiveOutUndefLanes,
CoveringIndexes))
if (!TRI->getCoveringSubRegIndexes(MRI->getRegClass(VirtReg),
LiveOutUndefLanes,
CoveringIndexes))
llvm_unreachable(
"cannot represent required subregister defs");

Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Target/AMDGPU/SIFormMemoryClauses.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ bool SIFormMemoryClauses::runOnMachineFunction(MachineFunction &MF) {

SmallVector<unsigned> KilledIndexes;
bool Success = TRI->getCoveringSubRegIndexes(
*MRI, MRI->getRegClass(Reg), KilledMask, KilledIndexes);
MRI->getRegClass(Reg), KilledMask, KilledIndexes);
(void)Success;
assert(Success && "Failed to find subregister mask to cover lanes");
for (unsigned SubReg : KilledIndexes) {
Expand Down
Loading