Proposing an clang option to control afn flag.
This change is proposed as a support for: https://reviews.llvm.org/D101759
Differential D106191
[clang] Option control afn flag masoud.ataei on Jul 16 2021, 2:14 PM. Authored by
Details Proposing an clang option to control afn flag. This change is proposed as a support for: https://reviews.llvm.org/D101759
Diff Detail
Event TimelineComment Actions Making a new option mapped to another float op flag looks reasonable, but is there any clearer motivation for this? (such as the need for -Ofast -fno-approx-func)
Comment Actions This patch https://reviews.llvm.org/D101759 is the real motivation for option controlling afn flag. We want to have a way to distinguishes getting _finite or non-finite version of MASS functions. Only with afn flag (on O3), we want to get non-finite version of MASS functions. (finite version need extra fast-math flags.)
Comment Actions Sorry that it took me so long to reply reviews. Thank you for reviewing this patch.
Comment Actions Added @jansvoboda11 to the review as it appears he was the one that added the original option. Comment Actions Looks reasonable to me.
Comment Actions At least from the CFE's side I think this is complete as far as I can see. I agree we need to have the description. I would also like to see a Driver test on this as well. Comment Actions Agreed on the request for description and driver test coverage. I'm also wondering if there should be a release note and documentation because it's lifting a private flag to be a public one. e.g., should we update https://clang.llvm.org/docs/UsersManual.html#controlling-floating-point-behavior ?
Comment Actions 1 small 'english' question, hopefully Aaron can answer, otherwise LGTM.
Comment Actions LGTM
|
So this option already exists and seems to behave the way we want it to. Does anyone know why it was made NoDriverOption?
Could we just expose it as a supported option and call it done. ie make it more like fhonor_nans below but without introducing a new function attribute:
so that instead of having -Xclang -fapprox-func in the command above we could just have -fapprox-func ?