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

Min-Yih Hsu via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 16 10:33:57 PDT 2025


================
@@ -513,10 +513,14 @@ int main(int argc, char **argv) {
   if (!DisableInstrumentManager) {
     IM = std::unique_ptr<mca::InstrumentManager>(
         TheTarget->createInstrumentManager(*STI, *MCII));
-  }
-  if (!IM) {
-    // If the target doesn't have its own IM implemented (or the -disable-cb
-    // flag is set) then we use the base class (which does nothing).
+    if (!IM) {
+      // If the target doesn't have its own IM implemented we use base class
+      // with instruments enabled.
+      IM = std::make_unique<mca::InstrumentManager>(*STI, *MCII, true);
----------------
mshockwave wrote:

```suggestion
      IM = std::make_unique<mca::InstrumentManager>(*STI, *MCII, /*EnableInstruments=*/true);
```

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


More information about the llvm-commits mailing list