Author: Haojian Wu Date: 2025-06-05T15:14:25+02:00 New Revision: 702e228249906d43687952d9a2f3d2f90d8024c6
URL: https://github.com/llvm/llvm-project/commit/702e228249906d43687952d9a2f3d2f90d8024c6 DIFF: https://github.com/llvm/llvm-project/commit/702e228249906d43687952d9a2f3d2f90d8024c6.diff LOG: [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 Added: Modified: clang/include/clang/Sema/Sema.h Removed: ################################################################################ diff --git a/clang/include/clang/Sema/Sema.h b/clang/include/clang/Sema/Sema.h index 65c84c0c40f60..f9a086b6966d9 100644 --- a/clang/include/clang/Sema/Sema.h +++ b/clang/include/clang/Sema/Sema.h @@ -14031,7 +14031,7 @@ class Sema final : public SemaBase { Decl *D) : TmplAttr(A), Scope(S), NewDecl(D) {} }; - typedef SmallVector<LateInstantiatedAttribute, 16> LateInstantiatedAttrVec; + typedef SmallVector<LateInstantiatedAttribute, 1> LateInstantiatedAttrVec; void InstantiateAttrs(const MultiLevelTemplateArgumentList &TemplateArgs, const Decl *Pattern, Decl *Inst, _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits