diff options
author | Haojian Wu <hokein.wu@gmail.com> | 2025-06-03 21:44:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-06-03 21:44:08 +0200 |
commit | 0d02150c3d7e8960ad0fe247baecfa76c7ce1129 (patch) | |
tree | f486dece56c584a4d7f1fe7c4b3523cae183c2c5 /llvm/lib/Analysis/ModuleSummaryAnalysis.cpp | |
parent | 50f9b8acafdca48e87e6b8e393c1f116a2d193ee (diff) | |
download | llvm-0d02150c3d7e8960ad0fe247baecfa76c7ce1129.zip llvm-0d02150c3d7e8960ad0fe247baecfa76c7ce1129.tar.gz llvm-0d02150c3d7e8960ad0fe247baecfa76c7ce1129.tar.bz2 |
[clang][AST] Reduce some AST node size. (#142585)
This patch reduces the size of several AST nodes by moving some fields
into the free bitfield space in the base `Stmt` class:
* `CXXForRangeStmt`: 96 → 88 bytes
* `ChooseExpr`: 56 → 48 bytes
* `ArrayTypeTraitExpr`: 56 → 48 bytes
* `ExpressionTraitExpr`: 40 → 32 bytes
* `CXXFoldExpr`: 64 → 56 bytes
* `ShuffleExpr`: 40 → 32 bytes
* `PackIndexingExpr`: 48 → 40 bytes
There are no noticeable memory savings (`Expr/Stmt` memory usage
125,824,496 vs 125,826,336 bytes for `SemaExpr.cpp`) in my testing,
likely because these node types are not among the most common in typical
ASTs.
Diffstat (limited to 'llvm/lib/Analysis/ModuleSummaryAnalysis.cpp')
0 files changed, 0 insertions, 0 deletions