[PATCH] D93769: RFC [clang] Add support for option -ffp-eval-method and extend #pragma float_control similarly
Melanie Blower via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 23 09:50:42 PST 2020
mibintc created this revision.
mibintc added reviewers: kpn, sepavloff, andrew.w.kaylor, rjmccall.
Herald added subscribers: dexonsmith, dang.
mibintc requested review of this revision.
Herald added a project: clang.
The Intel compiler supports the option -fp-model={source|double|extended} which causes the compiler to use a wider type for intermediate floating point calculations. Also supported is a way to embed this effect in the source program with #pragma float_control(source|double|extended). This patch proposes to extend pragma float_control syntax, and also to support a new floating point option via -ffp-eval-method={source|double|extended}
Note that the C floating point working group has proposed nearly identical pragma semantics in http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1974.pdf like this
#pragma STDC FENV_FLT_EVAL_METHOD width
I would like to add support for this also, but it's not in this patch.
I'm going to add an inline question about how to redefine __FLT_EVAL_METHOD__ macro
The ICL option with description of semantics is at this url, https://software.intel.com/content/www/us/en/develop/documentation/cpp-compiler-developer-guide-and-reference/top/compiler-reference/compiler-options/compiler-option-details/floating-point-options/fp-model-fp.html
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D93769
Files:
clang/docs/LanguageExtensions.rst
clang/docs/UsersManual.rst
clang/include/clang/Basic/FPOptions.def
clang/include/clang/Basic/LangOptions.def
clang/include/clang/Basic/LangOptions.h
clang/include/clang/Basic/PragmaKinds.h
clang/include/clang/Driver/Options.td
clang/lib/Driver/ToolChains/Clang.cpp
clang/lib/Frontend/CompilerInvocation.cpp
clang/lib/Parse/ParsePragma.cpp
clang/lib/Sema/SemaAttr.cpp
clang/lib/Sema/SemaExpr.cpp
clang/test/CodeGen/fp-floatcontrol-pragma.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93769.313567.patch
Type: text/x-patch
Size: 16225 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201223/104fa7ff/attachment-0001.bin>
More information about the cfe-commits
mailing list