[llvm] c98b2e2 - LiveRangeEdit: Use Register
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 17 14:34:59 PDT 2023
Author: Matt Arsenault
Date: 2023-03-17T17:34:52-04:00
New Revision: c98b2e20c9498d042bdc00b9a22faebc6e0a1b62
URL: https://github.com/llvm/llvm-project/commit/c98b2e20c9498d042bdc00b9a22faebc6e0a1b62
DIFF: https://github.com/llvm/llvm-project/commit/c98b2e20c9498d042bdc00b9a22faebc6e0a1b62.diff
LOG: LiveRangeEdit: Use Register
Added:
Modified:
llvm/include/llvm/CodeGen/LiveRangeEdit.h
llvm/lib/CodeGen/LiveRangeEdit.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/CodeGen/LiveRangeEdit.h b/llvm/include/llvm/CodeGen/LiveRangeEdit.h
index 507258fe665a2..fe7af0a8fb45b 100644
--- a/llvm/include/llvm/CodeGen/LiveRangeEdit.h
+++ b/llvm/include/llvm/CodeGen/LiveRangeEdit.h
@@ -211,7 +211,7 @@ class LiveRangeEdit : private MachineRegisterInfo::Delegate {
/// by new MI in the index map.
/// Return the SlotIndex of the new instruction.
SlotIndex rematerializeAt(MachineBasicBlock &MBB,
- MachineBasicBlock::iterator MI, unsigned DestReg,
+ MachineBasicBlock::iterator MI, Register DestReg,
const Remat &RM, const TargetRegisterInfo &,
bool Late = false, unsigned SubIdx = 0,
MachineInstr *ReplaceIndexMI = nullptr);
diff --git a/llvm/lib/CodeGen/LiveRangeEdit.cpp b/llvm/lib/CodeGen/LiveRangeEdit.cpp
index d8b024fbdfea4..67902686b90cd 100644
--- a/llvm/lib/CodeGen/LiveRangeEdit.cpp
+++ b/llvm/lib/CodeGen/LiveRangeEdit.cpp
@@ -82,7 +82,7 @@ void LiveRangeEdit::scanRemattable() {
for (VNInfo *VNI : getParent().valnos) {
if (VNI->isUnused())
continue;
- unsigned Original = VRM->getOriginal(getReg());
+ Register Original = VRM->getOriginal(getReg());
LiveInterval &OrigLI = LIS.getInterval(Original);
VNInfo *OrigVNI = OrigLI.getVNInfoAt(VNI->def);
if (!OrigVNI)
@@ -181,11 +181,9 @@ bool LiveRangeEdit::canRematerializeAt(Remat &RM, VNInfo *OrigVNI,
SlotIndex LiveRangeEdit::rematerializeAt(MachineBasicBlock &MBB,
MachineBasicBlock::iterator MI,
- unsigned DestReg,
- const Remat &RM,
+ Register DestReg, const Remat &RM,
const TargetRegisterInfo &tri,
- bool Late,
- unsigned SubIdx,
+ bool Late, unsigned SubIdx,
MachineInstr *ReplaceIndexMI) {
assert(RM.OrigMI && "Invalid remat");
TII.reMaterialize(MBB, MI, DestReg, SubIdx, *RM.OrigMI, tri);
@@ -306,7 +304,7 @@ void LiveRangeEdit::eliminateDeadDef(MachineInstr *MI, ToShrinkSet &ToShrink) {
LLVM_DEBUG(dbgs() << "Deleting dead def " << Idx << '\t' << *MI);
// Collect virtual registers to be erased after MI is gone.
- SmallVector<unsigned, 8> RegsToErase;
+ SmallVector<Register, 8> RegsToErase;
bool ReadsPhysRegs = false;
bool isOrigDef = false;
Register Dest;
More information about the llvm-commits
mailing list