[clang] [clang] Factor out OpenACC part of `Sema` (PR #84184)

Vlad Serebrennikov via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 7 13:28:17 PST 2024


================
@@ -1162,6 +1162,11 @@ class Sema final {
   /// CurContext - This is the current declaration context of parsing.
   DeclContext *CurContext;
 
+  SemaOpenACC &OpenACC() {
+    assert(OpenACCPtr);
----------------
Endilll wrote:

Given that moving a hot path getter to out-of-line definition doesn't regress compile-time performance even with LTO disabled, I'm skeptical additional assert on an effectively constant pointer would make a difference. I expect branch target predictors in CPUs to beat this easily.

https://github.com/llvm/llvm-project/pull/84184


More information about the cfe-commits mailing list