Skip to content

Commit

Permalink
[RDF] Do not return register masks in PhysicalRegisterInfo::getAliasSet
Browse files Browse the repository at this point in the history
  • Loading branch information
Krzysztof Parzyszek committed Jun 13, 2023
1 parent 369dba5 commit bd66f4b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
2 changes: 1 addition & 1 deletion llvm/include/llvm/CodeGen/RDFRegisters.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ struct PhysicalRegisterInfo {
}

// Returns the set of aliased physical registers or register masks.
// The returned set does not contain register units.
// The returned set only contains physical registers (not masks or units).
std::set<RegisterId> getAliasSet(RegisterId Reg) const;

RegisterRef getRefForUnit(uint32_t U) const {
Expand Down
11 changes: 1 addition & 10 deletions llvm/lib/CodeGen/RDFRegisters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,22 +115,13 @@ std::set<RegisterId> PhysicalRegisterInfo::getAliasSet(RegisterId Reg) const {
continue;
AS.insert(i);
}
for (const uint32_t *RM : RegMasks) {
RegisterId MI = getRegMaskId(RM);
if (MI != Reg && aliasMM(RegisterRef(Reg), RegisterRef(MI)))
AS.insert(MI);
}
return AS;
}

assert(RegisterRef::isRegId(Reg));
for (MCRegAliasIterator AI(Reg, &TRI, false); AI.isValid(); ++AI)
AS.insert(*AI);
for (const uint32_t *RM : RegMasks) {
RegisterId MI = getRegMaskId(RM);
if (aliasRM(RegisterRef(Reg), RegisterRef(MI)))
AS.insert(MI);
}

return AS;
}

Expand Down

0 comments on commit bd66f4b

Please sign in to comment.