[PATCH] D14066: [FPEnv Core 01/14] Add flags and command-line switches for FPEnv
Steve Canon via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 26 08:06:25 PDT 2015
scanon added inline comments.
================
Comment at: include/llvm/CodeGen/CommandFlags.h:134
@@ +133,3 @@
+cl::opt<bool>
+EnableFPEnvAccessFPMath("enable-fpenv-access-fp-math",
+ cl::desc("Disable FP math optimizations that affect FP environment access"),
----------------
Maybe "fenv-access" instead of "fpenv-access" to mirror the pragma spelling? I think the description could be improved somewhat. Perhaps "Disable optimizations that assume the default floating-point environment or might change observable floating-point exceptions."
================
Comment at: include/llvm/CodeGen/CommandFlags.h:145
@@ +144,3 @@
+EnableRoundAccessFPMath("enable-round-access-fp-math",
+ cl::desc("Disable FP math optimizations that affect FP rounding"),
+ cl::init(false));
----------------
I believe that you really want to say "disable optimizations that assume default floating-point rounding", rather than "optimizations that affect FP rounding" (the latter sounds like it licenses re-association, which I don't think you want).
More generally, this should probably include other non-default settings in the floating-point environment (DAZ, FTZ, default nan bits, etc). From a machine model perspective, the two settings are to "FP exceptions may be observed" and "FP control may be non-default". How about something like:
"enable-control-access-fp-math"
"Disable optimizations that assume the default floating-point environment, including rounding-mode"
Repository:
rL LLVM
http://reviews.llvm.org/D14066
More information about the llvm-commits
mailing list