[Mlir-commits] [llvm] [mlir] [TableGen] Store only the fields that defs do not inherit unchanged (PR #236049)

Jay Foad llvmlistbot at llvm.org
Fri Oct 30 02:17:46 PDT 2026


================
@@ -2116,6 +2165,10 @@ class RecordKeeper {
     assert(Ins && "Class already exists");
   }
 
+  /// Set whether defs are built in compacted form. See Record::startCompact().
+  void setCompactDefs(bool Compact) { CompactDefs = Compact; }
+  bool getCompactDefs() const { return CompactDefs; }
----------------
jayfoad wrote:

"compact" is intended as an adjective: "get/set whether defs should be built in compact form".

(At some point during development there was a `compactDefs` function where it was a verb, but that did not survive into the published version of the patch.)

Full disclosure, although the idea was mine, calling it "compact" was Claude's idea. I'm open to other names.

I'm also hopeful that in future all defs will be represented in the same way, so we won't need a special name for the "compact" form. But there are a bunch of things I need to work through before we get there.

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


More information about the Mlir-commits mailing list