llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Haojian Wu (hokein)

<details>
<summary>Changes</summary>

This increases clang's template instantiation depths.

I can see 7% increase (1510 -&gt; 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&amp;to=05c2403b0f784325f5b88760ef43a15b6aaf4181&amp;stat=instructions:u


---
Full diff: https://github.com/llvm/llvm-project/pull/142840.diff


1 Files Affected:

- (modified) clang/include/clang/Sema/Sema.h (+1-1) 


``````````diff
diff --git a/clang/include/clang/Sema/Sema.h b/clang/include/clang/Sema/Sema.h
index 84d30561fecde..25246374a3c36 100644
--- a/clang/include/clang/Sema/Sema.h
+++ b/clang/include/clang/Sema/Sema.h
@@ -14015,7 +14015,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,

``````````

</details>


https://github.com/llvm/llvm-project/pull/142840
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to