[llvm] r236031 - transform fadd chains to increase parallelism

Owen Anderson resistor at mac.com
Thu Apr 30 15:27:45 PDT 2015


> On Apr 30, 2015, at 2:46 PM, Jonathan Roelofs <jonathan at codesourcery.com> wrote:
> 
> 
> 
> On 4/30/15 3:34 PM, Sanjay Patel wrote:
>> Thanks all. Between Owen's GPU description and Mehdi's test cases, I can
>> see how this patch went off the rails.
>> 
>> I'm back to wondering if we can still do this as a DAG combine with the
>> help of a target hook:
>> 
>> TLI.getReassociationLimit(Opcode, EVT)
>> 
>> For some operation on some data type, does it make sense to attempt to
>> extract some ILP? By default, we'd make this 0. For a machine that has
>> no exposed superscalar / pipelining ILP opportunities, it would always
>> return 0. If non-zero, the number would be a value that's based on the
>> number of registers and/or issue width and/or pipe stages for the given
>> operation. Something like the 'vectorization factor' or 'interleave
>> factor' used by the vectorizers?
>> 
>> unsigned CombineCount = 0;
>> while (CombineCount < TLI.getReassociationLimit(Opcode, EVT))
>>   if (tryTheCombine(Opcode, EVT)
>>     CombineCount++;
> 
> How about TLI.canReassociate(), TLI.shouldReassociate(), and TLI.doReassociate()?... then the target could make an even more educated decision than this heuristic count.

Can you illustrate how you would expect those to work?  I’m not seeing it offhand?

—Owen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150430/16699d2a/attachment.html>


More information about the llvm-commits mailing list