[PATCH] Optimise chains when splitting vector loads & stores

Duncan Sands duncan.sands at gmail.com
Fri Jul 12 02:54:18 PDT 2013


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.

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
>




More information about the llvm-commits mailing list