[llvm] [MCA] Enable customization of individual instructions (PR #155420)

Min-Yih Hsu via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 26 15:13:23 PDT 2025


================
@@ -87,7 +92,8 @@ class InstrBuilder {
 
   Expected<unsigned> getVariantSchedClassID(const MCInst &MCI, unsigned SchedClassID);
   Expected<const InstrDesc &>
-  createInstrDescImpl(const MCInst &MCI, const SmallVector<Instrument *> &IVec);
+  createInstrDescImpl(const MCInst &MCI, const SmallVector<Instrument *> &IVec,
+                      std::function<void(InstrDesc &)> Customizer = {});
----------------
mshockwave wrote:

please use `llvm::function_ref`: https://www.llvm.org/docs/ProgrammersManual.html#passing-functions-and-other-callable-objects

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


More information about the llvm-commits mailing list