[clang] [llvm] [mlir] [TableGen] Only store direct superclasses in Record (PR #123072)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 24 02:01:53 PST 2025
================
@@ -1630,9 +1630,9 @@ class Record {
SmallVector<AssertionInfo, 0> Assertions;
SmallVector<DumpInfo, 0> Dumps;
- // All superclasses in the inheritance forest in post-order (yes, it
+ // Direct superclasses, which are roots of the inheritance forest (yes, it
// must be a forest; diamond-shaped inheritance is not allowed).
- SmallVector<std::pair<const Record *, SMRange>, 0> SuperClasses;
+ SmallVector<std::pair<const Record *, SMRange>, 0> DirectSuperClasses;
----------------
jayfoad wrote:
I tried N=1 but it seemed to increase memory usage overall. I think the problem is that `Record` is used for too many different things, some of which have superclasses and some do not. I would much prefer that we use more specialized types. Most importantly I think "static" objects like `class` statements and `def` statements should be represented differently from "runtime" objects like instantiated defs.
https://github.com/llvm/llvm-project/pull/123072
More information about the llvm-commits
mailing list