<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, May 19, 2016 at 6:11 PM, Justin Lebar via cfe-commits <span dir="ltr"><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">jlebar created this revision.<br>
jlebar added a reviewer: rsmith.<br>
jlebar added a subscriber: cfe-commits.<br>
<br>
<a href="http://reviews.llvm.org/D20457" rel="noreferrer" target="_blank">http://reviews.llvm.org/D20457</a><br>
<br>
Files:<br>
  include/clang/Basic/LangOptions.def<br>
  include/clang/Driver/Options.td<br>
<br>
Index: include/clang/Driver/Options.td<br>
===================================================================<br>
--- include/clang/Driver/Options.td<br>
+++ include/clang/Driver/Options.td<br>
@@ -592,9 +592,13 @@<br>
 def : Flag<["-"], "fno-extended-identifiers">, Group<f_Group>, Flags<[Unsupported]>;<br>
 def fhosted : Flag<["-"], "fhosted">, Group<f_Group>;<br>
 def ffast_math : Flag<["-"], "ffast-math">, Group<f_Group>, Flags<[CC1Option]>,<br>
-  HelpText<"Enable the *frontend*'s 'fast-math' mode. This has no effect on "<br>
-           "optimizations, but provides a preprocessor macro __FAST_MATH__ the "<br>
-           "same as GCC's -ffast-math flag">;<br>
+  HelpText<"Enable fast-math mode. This defines the __FAST_MATH__ preprocessor "<br>
+           "macro, and lets the compiler make aggressive, potentially unsafe "<br>
+           "assumptions about floating-point math.  These include: "<br>
+           "Floating-point math obeys regular algebraic rules for real "<br>
+           "numbers (e.g. + and * are associative, and x/y == x * (1/y)), "<br>
+           "operands to fp operations are not equal to NaN and Inf, and +0 "<br>
+           "and -0 are interchangeable.">;<br></blockquote><div><br></div><div>This is significantly too long for HelpText. The current help text for this flag is already too long:</div><div><br></div><div>$ clang --help</div><div>[...]</div><div><div>  -fembed-bitcode         Embed LLVM IR bitcode as data</div><div>  -femit-all-decls        Emit all declarations, even if unused</div><div>  -femulated-tls          Use emutls functions to access thread_local variables</div><div>  -fexceptions            Enable support for exception handling</div><div>  -ffast-math             Enable the *frontend*'s 'fast-math' mode. This has no effect on optimizations, but provides a preprocessor macro __FAST_MATH__ the same as GCC's -ffast-math flag</div><div>  -ffixed-r9              Reserve the r9 register (ARM only)</div><div>  -ffixed-x18             Reserve the x18 register (AArch64 only)</div></div><div>[...]</div><div><br></div><div>Can you move this to UsersManual.rst instead, and put something short here instead, like "Allow aggressive, lossy floating-point optimizations"?</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
 def fno_fast_math : Flag<["-"], "fno-fast-math">, Group<f_Group>;<br>
 def fmath_errno : Flag<["-"], "fmath-errno">, Group<f_Group>, Flags<[CC1Option]>,<br>
   HelpText<"Require math functions to indicate errors by setting errno">;<br>
Index: include/clang/Basic/LangOptions.def<br>
===================================================================<br>
--- include/clang/Basic/LangOptions.def<br>
+++ include/clang/Basic/LangOptions.def<br>
@@ -162,7 +162,7 @@<br>
 COMPATIBLE_LANGOPT(GNUInline         , 1, 0, "GNU inline semantics")<br>
 COMPATIBLE_LANGOPT(NoInlineDefine    , 1, 0, "__NO_INLINE__ predefined macro")<br>
 COMPATIBLE_LANGOPT(Deprecated        , 1, 0, "__DEPRECATED predefined macro")<br>
-COMPATIBLE_LANGOPT(FastMath          , 1, 0, "__FAST_MATH__ predefined macro")<br>
+COMPATIBLE_LANGOPT(FastMath          , 1, 0, "Fast fp math optimizations, and __FAST_MATH__ predefined macro")<br></blockquote><div><br></div><div>Something like "fast FP math [...]" would fit better into the diagnostics where this appears.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
 COMPATIBLE_LANGOPT(FiniteMathOnly    , 1, 0, "__FINITE_MATH_ONLY__ predefined macro")<br>
 COMPATIBLE_LANGOPT(UnsafeFPMath      , 1, 0, "Unsafe Floating Point Math")<br>
<br>
<br>
<br>
<br>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br></div></div>