[PATCH] [AArch64] Combine multiple FDIVs with the same divisor

Hao Liu Hao.Liu at arm.com
Thu Nov 20 19:35:13 PST 2014


>>! In D6334#7, @hfinkel wrote:
> Can you please put this in DAGCombine, and let the target optionally enable it. The target can customize this:
> 
>     // Skip if there is less than three FDIVs.
>     // FIXME: Different subtargets may behave differently. This can be
>     // controlled depending on subtargets.
>     if (Users.size() < 3)
> 
> I think that adding something like:
> 
>   virtual bool combineRepeatedFPDivisors(unsigned &MinUsers) {
>     return false;
>   }
> 
> added in TargetLowering.h right around the existing division functions would work well (I'm not attached to the name, feel free to propose some other name). I'd like to use this for PPC too.

Hi Hale,

That's a good idea.

I've attached a new patch moving the logic into DAGCombiner.

Thanks,
-hao

http://reviews.llvm.org/D6334






More information about the llvm-commits mailing list