[llvm] r190936 - Prevent LoopVectorizer and SLPVectorizer running if the target has no vector registers.
Tobias Grosser
tobias at grosser.es
Wed Sep 18 06:00:51 PDT 2013
On 09/18/2013 02:43 PM, Robert Lytton wrote:
> Author: rlytton
> Date: Wed Sep 18 07:43:35 2013
> New Revision: 190936
>
> URL: http://llvm.org/viewvc/llvm-project?rev=190936&view=rev
> Log:
> Prevent LoopVectorizer and SLPVectorizer running if the target has no vector registers.
>
> XCore target: Add XCoreTargetTransformInfo
> This is where getNumberOfRegisters() resides, which in turn returns the
> number of vector registers (=0).
Hi Robert,
your patch may prevent partial loop unrolling as performed by the loop
vectorizer.
Some history:
In commit 'r189281 - LoopVectorize: Implement partial loop unrolling
when vectorization is not profitable.' Nadav implemented partial loop
unrolling as part of the Loop Vectorizer. I am unsure if partial loop
unrolling might still be useful/beneficial for targets without vector
registers. However, in case it is, your current patch prevents it on
such targets.
At the time Nadav's patch was committed there was some discussion if
doing unrolling within the vectorizer may cause misunderstandings due to
the fact that a vectorizer now does more than just vectorization. Is
your commit based on such a misunderstanding or does e.g. the XCore
target not benefit from partial loop unrolling?
Cheers,
Tobias
More information about the llvm-commits
mailing list