================
@@ -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, "
----------------
s-barannikov wrote:

> Most targets have TRI inside TII. After this PR, they all do.

I'd prefer the opposite.
I think most traget have TRI inside TII because it was easier to call 
`this->getRegInfo()` from inside a TII method than to call 
`MI->getMF().getSubtarget()->getRegInfo()`. If we have an STI reference as a 
member of TII, we could get TRI by `this->STI.getRegInfo()`.


https://github.com/llvm/llvm-project/pull/158224
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to