[LLVMdev] Pointer Context Metadata (was: Parallel Loop Metadata)

Pekka Jääskeläinen pekka.jaaskelainen at tut.fi
Tue Feb 19 00:27:09 PST 2013


Hi,

On 02/19/2013 02:31 AM, Nadav Rotem wrote:
> vectorization.  However, I don't completely understand something.  If we
> already have the information that consecutive iterations of the loops are
> independent, then the loop vectorizer should already vectorize the loop.

Yes, the loop vectorizer should be a better match for the parallel
(inner)loops.

That's why I've been pushing the parallel loop metadata: to go towards
using the generic loop vectorizer instead of the hacked bbvectorizer for
work-group autovectorization in pocl. Unfortunately, it needs some more work
still to be efficient for this purpose (like discussed), but a step towards it
has been now made and it can vectorize some work-group functions with pocl.
That's good.

BTW, there's at least one thing the bbvectorizer handles better now:
intra-kernel/function vector datatypes. IIRC, it doesn't choke when it sees
vectors already present in the input, but calmly tries to combine multiple
vector instructions to a larger one. Thus, it might be useful in the case
where the loop at hand is not nicely and cleanly vectorizable (e.g., nasty
memory access patterns) to still provide some level of vector ISA utilization.

Hal, this OpenCL WG autovectorization work, unfortunately, is not my first
priority task at work currently (more like a pet project), so I cannot make any
promises on when I might find time to work on it again. So, if you want to
see the parallel loop iteration MD happen sooner, I'd recommend you dig into
it. I think we'd like to start from the scratch for the bbvectorizer utilization
in pocl anyways, that is, would add the metadata support first and then use it
in a fresh bbvectorizer version. The current hacked version in pocl seems not
to be upstreamable easily as it has lagged behind some LLVM versions and is
rather dirty.

BR,
-- 
--Pekka




More information about the llvm-dev mailing list