[PATCH] D31276: Add #pragma clang fast_math
Hal Finkel via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 23 10:36:06 PDT 2017
hfinkel added a comment.
High-level comment ;)
#pragma clang fast_math contract_fast(on)
This seems a bit unfortunate because 'fast' appears twice? How are we planning on naming the other fast-math flags? Maybe we should just name it:
#pragma clang math constract_fast(on)
or
#pragma clang math contract(fast) // we could also accept off/on here for consistency and compatibility with the standard pragma
or maybe fp_math or floating_point_math or floating_point or fp instead of math.
I think that I prefer this last form (because it does not repeat 'fast' and also makes our extension a pure superset of the standard pragma).
What do you want to name the other flags? I'd prefer if they're grammatically consistent. Maybe we should stick closely to the command-line options, and have:
fp_contract(on/off/fast)
unsafe_optimizations(on/off)
finite_only(on/off)
What do you think?
https://reviews.llvm.org/D31276
More information about the cfe-commits
mailing list