[llvm] CodeGen: Keep reference to TargetRegisterInfo in TargetInstrInfo (PR #158224)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 12 03:48:30 PDT 2025


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

I was trying to make it so targets would be forced to use the local reference in their own code but dropped that somewhere in the middle. I could revisit to make TRI private and force access through something that performs the local target cast 

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


More information about the llvm-commits mailing list