[LLVMdev] Aggressive FMA fusion for NVPTX

Justin Holewinski justin.holewinski at gmail.com
Tue Jan 13 17:57:47 PST 2015


Looks good to me!  Thanks!

On Tue, Jan 13, 2015 at 5:14 PM, Olivier H Sallenave <ohsallen at us.ibm.com>
wrote:

> Hi,
>
> I propose to override the TLI callback enableAggressiveFMAFusion for the
> NVPTX backend and return true instead of false. The reason is the same as
> for PPC: fmul, fmadd and fadd nodes cost the same number of cycles (see
> http://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#arithmetic-instructions
> ), so we can enable more combining heuristics to produce more FMAs. For
> instance, this pattern would be considered:
>
> // fold (fadd (fma x, y, (fmul u, v)), z) -> (fma x, y (fma u, v, z))
>
> cf. commits:
> http://llvm.org/viewvc/llvm-project?view=revision&revision=218120
> http://llvm.org/viewvc/llvm-project?view=revision&revision=225380
>
> Please tell me what you think.
>
> Olivier
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>


-- 

Thanks,

Justin Holewinski
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150113/c73b60bd/attachment.html>


More information about the llvm-dev mailing list