[PATCH] Flag to enable IEEE-754 friendly FP optimizations

Sergey Dmitrouk sdmitrouk at accesssoftek.com
Mon Jan 12 00:21:32 PST 2015


On Mon, Dec 22, 2014 at 11:36:10AM +0200, Sergey Dmitrouk wrote:
> Hello Hal,
> it took me some time to change the way it works, but now new changes also
> cover some cases missed in the previous version.
> After thinking a bit more I introduced two separate flags for exceptions
> and rounding, as you suggested.  At the moment rounding flag just
> disables folding, I'm not sure how to actually check that result of
> operation doesn't depend on rounding mode.  This prevents early
> optimization for something like "1.0 + 2.0", so might need adjustments
> if there is a way to check whether rounding is important for particular
> operation.
> Using fast-math flags instead of function attributes didn't remove that
> much flags as they are not used in code related to constant expression
> folding.  In fact, I had to add one more "Strict" argument to be able to
> prevent conversion to constant expressions, which results in losing
> fast-math flags.
> Please find updated set of patches in the attachment.
> Thanks,
> Sergey

More information about the llvm-commits mailing list