[LLVMdev] Enable changing UnsafeFPMath on a per-function basis

Chandler Carruth chandlerc at google.com
Tue Jan 13 13:09:48 PST 2015


On Mon, Jan 12, 2015 at 1:18 PM, Hal Finkel <hfinkel at anl.gov> wrote:

> > Whatever happened to tracking the safe-or-fast-ness of FP math on
> > instructions? Is tracking this property at a function granularity
> > correct? I seem to recall nobody wanted to thread this through the
> > SDAG.
>
> No, I think we did want to do that, just no one has yet done it. We now
> have NSW/NUW in SDAG, so it should not be too much different for the FP
> flags.


FWIW, I think it is a mistake to pursue the per-function modeling of this
given how close we are to having proper per-instruction tracking of this. I
would much rather see work going toward that if we think that is the right
long-term thing for LLVM...

If this is super simple to do for per-function granularity, cool. But if it
is adding lots of complexity (which I'm worried about with Chris B's
comments below) I think it makes more sense to focus on doing per-DAG-node
fast math flags.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150113/0795cad6/attachment.html>


More information about the llvm-dev mailing list