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

Wang Pengcheng via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 4 20:56:45 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"))
----------------
wangpc-pp wrote:

```suggestion
  if (!Records.getAllDerivedDefinitions("Instruction").empty())
```
Do this only if there are `Instruction` definitions instead of `Instruction` class definition.


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


More information about the llvm-commits mailing list