[llvm] r225984 - Override the TLI callback enableAggressiveFMAFusion and return true. Indeed, fmul, fmadd and fadd nodes cost the same number of cycles, so we can enable more combining heuristics to produce more fmadd nodes.

Hal Finkel hfinkel at anl.gov
Wed Jan 14 07:02:11 PST 2015


Hi Olivier,

Please also commit a regression test (adapting them from the PPC tests is obviously fine).

 -Hal

----- Original Message -----
> From: "Olivier Sallenave" <ohsallen at us.ibm.com>
> To: llvm-commits at cs.uiuc.edu
> Sent: Wednesday, January 14, 2015 8:47:24 AM
> Subject: [llvm] r225984 - Override the TLI callback enableAggressiveFMAFusion	and return true. Indeed, fmul,	fmadd
> and fadd nodes cost the same number of cycles,	so we can enable more combining heuristics to produce more fmadd
> nodes.
> 
> Author: ohsallen
> Date: Wed Jan 14 08:47:24 2015
> New Revision: 225984
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=225984&view=rev
> Log:
> Override the TLI callback enableAggressiveFMAFusion and return true.
> Indeed, fmul, fmadd and fadd nodes cost the same number of cycles,
> so we can enable more combining heuristics to produce more fmadd
> nodes.
> 
> Modified:
>     llvm/trunk/lib/Target/NVPTX/NVPTXISelLowering.h
> 
> Modified: llvm/trunk/lib/Target/NVPTX/NVPTXISelLowering.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/NVPTX/NVPTXISelLowering.h?rev=225984&r1=225983&r2=225984&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/NVPTX/NVPTXISelLowering.h (original)
> +++ llvm/trunk/lib/Target/NVPTX/NVPTXISelLowering.h Wed Jan 14
> 08:47:24 2015
> @@ -507,6 +507,8 @@ public:
>  
>    bool isFMAFasterThanFMulAndFAdd(EVT) const override { return true;
>    }
>  
> +  bool enableAggressiveFMAFusion(EVT VT) const override { return
> true; }
> +
>  private:
>    const NVPTXSubtarget &nvptxSubtarget; // cache the subtarget here
>  
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> 

-- 
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory



More information about the llvm-commits mailing list