[llvm] [TableGen] Extend direct lookup to instruction values in generic tables. (PR #80486)

Jason Eckhardt via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 5 05:44:46 PST 2024


================
@@ -663,6 +682,8 @@ void SearchableTableEmitter::run(raw_ostream &OS) {
   // Emit tables in a deterministic order to avoid needless rebuilds.
   SmallVector<std::unique_ptr<GenericTable>, 4> Tables;
   DenseMap<Record *, GenericTable *> TableMap;
+  if (Records.getClass("Instruction"))
----------------
nvjle wrote:

Done.
I've added the derived definitions guard as suggested. I needed to leave in the original guard since the derived definitions lookup will fail with "The class 'Instruction' is not defined" for clients that do not happen to have a Instruction class at all.

If I could also trouble you (or anyone else) to merge on my behalf, I'd appreciate that.  

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


More information about the llvm-commits mailing list