[llvm] [DWARF][NFC] Remove unused 'Reads' param from checkCFADiff and checkRegDiff (PR #174941)

AmirHossein PashaeeHir via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 8 06:19:45 PST 2026


================
@@ -158,19 +158,18 @@ void DWARFCFIAnalysis::update(const MCInst &Inst,
   assert(MaybeNextRow && "previous row existed, so should the current row");
   auto NextRow = *MaybeNextRow;
 
-  checkCFADiff(Inst, PrevRow, NextRow, Reads, Writes);
+  checkCFADiff(Inst, PrevRow, NextRow, Writes);
----------------
amsen20 wrote:

If `Reads` is not used, then the program shouldn't create it earlier in:

```C++
...
SmallSet<DWARFRegNum, 4> ..., Reads;
...
  for (unsigned I = 0; I < MCInstInfo.NumImplicitUses; I++)
    Reads.insert(MCRI->getDwarfRegNum(
        getSuperReg(MCRI, MCInstInfo.implicit_uses()[I]), IsEH));
...
else if (Op.getReg())
        Reads.insert(
            MCRI->getDwarfRegNum(getSuperReg(MCRI, Op.getReg()), IsEH));
```

https://github.com/llvm/llvm-project/pull/174941


More information about the llvm-commits mailing list