[llvm] Add a pass to collect dropped var stats for MIR. (PR #115566)

Orlando Cazalet-Hyams via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 12 01:47:43 PST 2024


https://github.com/OCHyams commented:

What's actually different between the MIR and IR versions. Skimming the patch it looks like:

* the types `Function` -> `MachineFunction`, `Instruction` -> `MachineInstr` for iterating
* getting VarID from `DbgVaraibleRecord` -> `MachineInstr`

I feel like this could probably be re-structured so that most of the machinery between the IR and MIR versions is shared with some amount of templating or/or generic lambda usage, to reduce code duplication. Wdyt?

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


More information about the llvm-commits mailing list