[clang] [Clang] Add TimeTraceScope to Sema::CheckConstraintSatisfaction (PR #170264)
Younan Zhang via cfe-commits
cfe-commits at lists.llvm.org
Sun Dec 7 21:36:50 PST 2025
================
@@ -1182,6 +1183,10 @@ bool Sema::CheckConstraintSatisfaction(
const MultiLevelTemplateArgumentList &TemplateArgsLists,
SourceRange TemplateIDRange, ConstraintSatisfaction &OutSatisfaction,
const ConceptReference *TopLevelConceptId, Expr **ConvertedExpr) {
+ llvm::TimeTraceScope TimeScope(
+ "CheckConstraintSatisfaction", [TemplateIDRange, this] {
+ return TemplateIDRange.printToString(getSourceManager());
+ });
----------------
zyn0217 wrote:
I think I like the idea of adding time trace scopes for concept checking; Corentin and I are also exploring this locally to understand our concept performance issues.
however I think it would be much more useful to have fine-grained statistics - for example, identifying which concepts (and optionally, with which template arguments) are the most time-consuming.
That said, this is a good start, and I am not opposed to going with it as is.
https://github.com/llvm/llvm-project/pull/170264
More information about the cfe-commits
mailing list