[Mesa-dev] [PATCH] Revert "radeon/llvm: enable unsafe math for graphics shaders"
arsenm2 at gmail.com
Wed Feb 18 02:52:07 PST 2015
> On Feb 18, 2015, at 1:15 AM, Michel Dänzer <michel at daenzer.net> wrote:
> On 18.02.2015 17:13, Michel Dänzer wrote:
>> On 18.02.2015 16:52, Grigori Goronzy wrote:
>>> What's the impact on performance with unsafe FP math disabled at this time?
>> I don't know. Correctness trumps performance.
> FWIW, I couldn't seem to measure any significant difference with Unigine
> Valley, which recently got a ~10% boost from enabling the LLVM machine
There are a couple of problems right now that mean the fast math option isn’t really doing anything. I just realized this patch is only setting the attribute, which will only effect codegen. The IR emission should be also be annotating the individual instructions with the fast math flags, which would enable the better math optimizations in the parts of the optimizer that are supposed to handle this.
Even with the fast math flags, the current graphics pass pipeline is problematic. Much of what the fast math flags accomplish is done in instcombine, which isn’t run now. It really should be, it’s the basic canonicalization and peephole pass pretty much everything else expects it to have cleaned up the IR. The standard pass pipeline runs it several times.
More information about the mesa-dev