[PATCH] D72841: Add support for pragma float_control, to control precision and exception behavior at the source level

Melanie Blower via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 11 05:52:25 PDT 2020


mibintc marked 2 inline comments as done.
mibintc added a comment.

Some inline replies/comments to @rjmccall and @plotfi



================
Comment at: clang/lib/Frontend/CompilerInvocation.cpp:3185
   Opts.FiniteMathOnly = Args.hasArg(OPT_ffinite_math_only) ||
       Args.hasArg(OPT_cl_finite_math_only) ||
       Args.hasArg(OPT_cl_fast_relaxed_math);
----------------
@rjmccall @plotfi These earlier patches are also deriving the value of LangOpts from the settings of CG opts


================
Comment at: clang/lib/Frontend/CompilerInvocation.cpp:3187
       Args.hasArg(OPT_cl_fast_relaxed_math);
   Opts.UnsafeFPMath = Args.hasArg(OPT_menable_unsafe_fp_math) ||
                       Args.hasArg(OPT_cl_unsafe_math_optimizations) ||
----------------
@rjmccall @plotfi here the codegen args are evaluated first.  Perhaps we could have a "reconcile codegen and lang args" function which would resolve the floating point settings into a final setting? so that codegen or lang could be parsed in either order? 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72841





More information about the cfe-commits mailing list