[PATCH] D87080: [AST] Reduce the size of TemplateArgumentLocInfo.
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 21 02:46:45 PDT 2020
sammccall accepted this revision.
sammccall added a comment.
This revision is now accepted and ready to land.
Forgot to mention, 3% memory saving is huge, way more than I expected (was mostly just hoping for no regression).
Nice work!
================
Comment at: clang/include/clang/AST/TemplateBase.h:428
+ TemplateArgumentLocInfo(Expr *E) { Pointer = E; }
+ // Ctx is used for allocation.
+ TemplateArgumentLocInfo(ASTContext &Ctx, NestedNameSpecifierLoc QualifierLoc,
----------------
I'd extend this comment a bit to explain why: "This case is unusually large and also rare, so we store the payload out-of-line."
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87080/new/
https://reviews.llvm.org/D87080
More information about the cfe-commits
mailing list