[llvm] [AsmPrinter] Replace improper use of Register with MCRegUnit (NFC) (PR #167682)
Sergei Barannikov via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 12 04:17:23 PST 2025
https://github.com/s-barannikov created https://github.com/llvm/llvm-project/pull/167682
None
>From 6faaaea8686bb254ec8864d2e4654a14d1f46b95 Mon Sep 17 00:00:00 2001
From: Sergei Barannikov <barannikov88 at gmail.com>
Date: Wed, 12 Nov 2025 15:15:58 +0300
Subject: [PATCH] [AsmPrinter] Replace improper use of Register with MCRegUnit
(NFC)
---
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index fde48a30a8203..30db817ba3144 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -589,9 +589,9 @@ struct FwdRegParamInfo {
/// Register worklist for finding call site values.
using FwdRegWorklist = MapVector<uint64_t, SmallVector<FwdRegParamInfo, 2>>;
-/// Container for the set of registers known to be clobbered on the path to a
-/// call site.
-using ClobberedRegSet = SmallSet<Register, 16>;
+/// Container for the set of register units known to be clobbered on the path
+/// to a call site.
+using ClobberedRegUnitSet = SmallSet<MCRegUnit, 16>;
/// Append the expression \p Addition to \p Original and return the result.
static const DIExpression *combineDIExpressions(const DIExpression *Original,
@@ -663,7 +663,7 @@ static void addToFwdRegWorklist(FwdRegWorklist &Worklist, unsigned Reg,
static void interpretValues(const MachineInstr *CurMI,
FwdRegWorklist &ForwardedRegWorklist,
ParamSet &Params,
- ClobberedRegSet &ClobberedRegUnits) {
+ ClobberedRegUnitSet &ClobberedRegUnits) {
const MachineFunction *MF = CurMI->getMF();
const DIExpression *EmptyExpr =
@@ -695,7 +695,7 @@ static void interpretValues(const MachineInstr *CurMI,
// If the MI is an instruction defining one or more parameters' forwarding
// registers, add those defines.
- ClobberedRegSet NewClobberedRegUnits;
+ ClobberedRegUnitSet NewClobberedRegUnits;
auto getForwardingRegsDefinedByMI = [&](const MachineInstr &MI,
SmallSetVector<unsigned, 4> &Defs) {
if (MI.isDebugInstr())
@@ -778,7 +778,7 @@ static void interpretValues(const MachineInstr *CurMI,
static bool interpretNextInstr(const MachineInstr *CurMI,
FwdRegWorklist &ForwardedRegWorklist,
ParamSet &Params,
- ClobberedRegSet &ClobberedRegUnits) {
+ ClobberedRegUnitSet &ClobberedRegUnits) {
// Skip bundle headers.
if (CurMI->isBundle())
return true;
@@ -848,7 +848,7 @@ static void collectCallSiteParameters(const MachineInstr *CallMI,
bool ShouldTryEmitEntryVals = MBB->getIterator() == MF->begin();
// Search for a loading value in forwarding registers inside call delay slot.
- ClobberedRegSet ClobberedRegUnits;
+ ClobberedRegUnitSet ClobberedRegUnits;
if (CallMI->hasDelaySlot()) {
auto Suc = std::next(CallMI->getIterator());
// Only one-instruction delay slot is supported.
More information about the llvm-commits
mailing list