Skip to content
Merged
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
8 changes: 4 additions & 4 deletions llvm/lib/DWARFCFIChecker/Registers.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ namespace llvm {
/// This analysis only keeps track and cares about super registers, not the
/// subregisters. All reads from/writes to subregisters are considered the
/// same operation to super registers.
inline bool isSuperReg(const MCRegisterInfo *MCRI, MCPhysReg Reg) {
inline bool isSuperReg(const MCRegisterInfo *MCRI, MCRegister Reg) {
return MCRI->superregs(Reg).empty();
}

inline SmallVector<MCPhysReg> getSuperRegs(const MCRegisterInfo *MCRI) {
SmallVector<MCPhysReg> SuperRegs;
for (auto &&RegClass : MCRI->regclasses())
for (unsigned I = 0; I < RegClass.getNumRegs(); I++) {
MCPhysReg Reg = RegClass.getRegister(I);
MCRegister Reg = RegClass.getRegister(I);
if (isSuperReg(MCRI, Reg))
SuperRegs.push_back(Reg);
SuperRegs.push_back(Reg.id());
}

sort(SuperRegs.begin(), SuperRegs.end());
Expand All @@ -49,7 +49,7 @@ inline SmallVector<MCPhysReg> getTrackingRegs(const MCRegisterInfo *MCRI) {
return TrackingRegs;
}

inline MCPhysReg getSuperReg(const MCRegisterInfo *MCRI, MCPhysReg Reg) {
inline MCRegister getSuperReg(const MCRegisterInfo *MCRI, MCRegister Reg) {
if (isSuperReg(MCRI, Reg))
return Reg;
for (auto SuperReg : MCRI->superregs(Reg))
Expand Down
Loading