Skip to content

Commit 702e228

Browse files
authored
[clang] Reduce LateInstantiatedAttrVec vector default size. (#142840)
This increases clang's template instantiation depths. I can see 7% increase (1510 -> 1612 on my local machine) for the `clang/test/SemaTemplate/instantiation-depth-default.cpp` case. No performance regressions have been observed: https://llvm-compile-time-tracker.com/compare.php?from=5f8cf33650c0c71119ecf81f07014329d9466d0d&to=05c2403b0f784325f5b88760ef43a15b6aaf4181&stat=instructions:u
1 parent 754f2ca commit 702e228

File tree

1 file changed

+1
-1
lines changed
  • clang/include/clang/Sema

1 file changed

+1
-1
lines changed

clang/include/clang/Sema/Sema.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14031,7 +14031,7 @@ class Sema final : public SemaBase {
1403114031
Decl *D)
1403214032
: TmplAttr(A), Scope(S), NewDecl(D) {}
1403314033
};
14034-
typedef SmallVector<LateInstantiatedAttribute, 16> LateInstantiatedAttrVec;
14034+
typedef SmallVector<LateInstantiatedAttribute, 1> LateInstantiatedAttrVec;
1403514035

1403614036
void InstantiateAttrs(const MultiLevelTemplateArgumentList &TemplateArgs,
1403714037
const Decl *Pattern, Decl *Inst,

0 commit comments

Comments
 (0)