[llvm] CodeGen: Add RegisterClass by HwMode (PR #158269)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 18 22:47:40 PDT 2025


================
@@ -1316,6 +1394,14 @@ void InstrInfoEmitter::emitEnums(
   }
   OS << "    INSTRUCTION_LIST_END = " << NumberedInstructions.size() << '\n';
   OS << "  };\n";
+
+  if (!Target.getAllRegClassByHwMode().empty()) {
----------------
topperc wrote:

Should we put `Target.getAllRegClassByHwMode()` in a variable instead of calling it twice?

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


More information about the llvm-commits mailing list