[PATCH] D123952: [FPEnv] Allow CompoundStmt to keep FP options
Serge Pavlov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 27 08:37:45 PDT 2022
sepavloff added inline comments.
================
Comment at: clang/lib/Sema/SemaStmt.cpp:452
+ : getCurCompoundScope().FPFeatures;
+ FPOptionsOverride FPDiff = getCurFPFeatures().diffWith(FPO);
+
----------------
rjmccall wrote:
> How cheap is this? Is this something it would be worthwhile to fast-path by maintaining a bit to check for the rare case where we have an override in a scope?
Added an optimization to `diffWith`: detect the frequent case, when FPOptions is not changed, and implement fast-path for it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123952/new/
https://reviews.llvm.org/D123952
More information about the cfe-commits
mailing list