[llvm] [llvm][AsmPrinter] Add an option to print instruction latencies (PR #113243)
Quentin Colombet via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 23 04:39:35 PDT 2024
qcolombet wrote:
> > > [#113243 (review)](https://github.com/llvm/llvm-project/pull/113243#pullrequestreview-2384034868)
> >
> >
> > +1 on this
> > E.g., templatize the getLatency function on MachineInstr/MCInst and provide a functor to call `SubTargetInfo::resolveSchedClass`.
>
> I am not sure where to put the common thing after adding overloads for that: `MCSchedModel` seems like the obvious place, but putting it there would be a layering violation, since it would cause `MC` to depend on `CodeGen`.
The instantiation of the template can be in the right library, no?
And the functor I was mentioning would be nullptr by default and only implemented in the CodeGen library.
https://github.com/llvm/llvm-project/pull/113243
More information about the llvm-commits
mailing list