[clang] [clang] Factor out OpenACC part of `Sema` (PR #84184)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 7 06:49:33 PST 2024
================
@@ -1162,6 +1162,11 @@ class Sema final {
/// CurContext - This is the current declaration context of parsing.
DeclContext *CurContext;
+ SemaOpenACC &OpenACC() {
+ assert(OpenACCPtr);
----------------
erichkeane wrote:
I don't buy the 'noticeable impact on assertion build' here. The very next line is loading the same variable, so even the smallest amount of inliner action makes this at best a non-taken 'jne' type instruction.
While this MIGHT have a slight impact, it is near-zero, and of the order of 'i used a pair of if/else instead of a switch'.
https://github.com/llvm/llvm-project/pull/84184
More information about the cfe-commits
mailing list