[PATCH] Optimise chains when splitting vector loads & stores

Duncan Sands duncan.sands at gmail.com
Fri Jul 19 08:38:58 PDT 2013


Hi Richard,

On 15/07/13 13:21, Richard Sandiford wrote:
> Duncan Sands <duncan.sands at gmail.com> writes:
>> Hi Richard, I think this would be better off as a general DAG combine,
>> in which case it would have to handle the elements of the TokenFactor
>> perhaps being permuted from what you would like.
>
> OK, I suppose that's what the -combiner-alias-analysis thing I mentioned is.

dunno, I always imagined that that was doing something more complicated.

> What would it take to enable that by default?  (Preferably
> -combiner-global-alias-analysis too.)

I don't know.  If it still has issues, maybe you should implement a simpler
version that just does the equivalent of your original patch.

Ciao, Duncan.

>
> Thanks,
> Richard
>
>> Ciao, Duncan.
>>
>> On 28/06/13 12:14, Richard Sandiford wrote:
>>> When vector loads and stores are split into two, the original chain
>>> is replaced with a TokenFactor of the two new loads or stores.
>>> This means that if the chain for a vector store (say) is a load
>>> from the same address X, we end up with:
>>>
>>>     load from Xlo  load from Xhi
>>>            \           /
>>>             TokenFactor
>>>            /           \
>>>     store to Xlo    store to Xhi
>>>            \           /
>>>             TokenFactor
>>>
>>> In cases like these we can just use:
>>>
>>>     load from Xlo  load from Xhi
>>>            |            |
>>>     store to Xlo    store to Xhi
>>>            \           /
>>>             TokenFactor
>>>
>>> This optimisation overlaps with -combiner-alias-analysis, but it seems
>>> like a simple and obvious case that is hopefully less controversial than
>>> turning -c-a-a on by default.  (But it's because of -c-a-a that isAccessTo()
>>> is so restricted.  It isn't trying to be a general alias check.)
>>>
>>> The motivation for doing this is that natural conditional vector stores
>>> become natural conditional scalar stores, which helps improve the llvmpipe
>>> code for SystemZ.
>>>
>>> Thanks,
>>> Richard
>>>
>>>
>>>
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>




More information about the llvm-commits mailing list