================
@@ -355,6 +351,13 @@ class alignas(8) Decl {
   LLVM_PREFERRED_TYPE(Linkage)
   mutable unsigned CacheValidAndLinkage : 3;
 
+  /// The attributes attached to this declaration, or null if it has none.
+  ///
+  /// This pointer is the sole record of whether the declaration has
+  /// attributes, so it must be cleared whenever the vector becomes empty.
+  /// Owned by the ASTContext that allocated it.
+  AttrVec *Attrs = nullptr;
----------------
steffenlarsen wrote:

Aye, good shout @zygoloid. I added back the bit in a [temporary perf 
branch](https://github.com/steffenlarsen/llvm-project/commits/perf/steffen/move_attrs_ownership_bit_overflow_2/)
 and the results are 
[here](https://llvm-compile-time-tracker.com/compare.php?from=8b6145d2aa547768cede4bf934db963890124550&to=cdd7552b6bab2fc1198f0892ba0d1a8dc9b81ea0&stat=max-rss).
 The max-rss increases as expected, though not as much as I personally expected.

https://github.com/llvm/llvm-project/pull/219138
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to