[PATCH] D150038: [Clang] Improve compile times when forming a DeclRef outside of a capturing scope.

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 8 05:43:01 PDT 2023


aaron.ballman added a comment.

Do you have some performance measurement numbers for how much benefit we get from the changes?



================
Comment at: clang/lib/Sema/SemaExpr.cpp:19195
+
+  // tryCaptureVariable is called ever ytime a DeclRef is formed,
+  // it can therefore have non-negigible impact on performances.
----------------



================
Comment at: clang/lib/Sema/SemaExpr.cpp:19199
+  // we can bailout early.
+  if(CapturingFunctionScopes == 0 && (!BuildAndDiagnose || VarDC == DC))
+    return true;
----------------



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150038/new/

https://reviews.llvm.org/D150038



More information about the cfe-commits mailing list