[llvm] CodeGen: Pass SubtargetInfo to TargetGenInstrInfo constructors (PR #157337)

Sergei Barannikov via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 7 05:33:42 PDT 2025


================
@@ -1070,7 +1070,9 @@ void InstrInfoEmitter::run(raw_ostream &OS) {
   OS << "namespace llvm {\n";
   OS << "struct " << ClassName << " : public TargetInstrInfo {\n"
      << "  explicit " << ClassName
-     << "(unsigned CFSetupOpcode = ~0u, unsigned CFDestroyOpcode = ~0u, "
+     << "(const TargetSubtargetInfo &STI, unsigned CFSetupOpcode = ~0u, "
+        "unsigned "
+        "CFDestroyOpcode = ~0u, "
----------------
s-barannikov wrote:

```suggestion
        "unsigned CFDestroyOpcode = ~0u, "
```

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


More information about the llvm-commits mailing list