[LLVMdev] Vectorization metadata

Pekka Jääskeläinen pekka.jaaskelainen at tut.fi
Wed Apr 18 23:25:16 PDT 2012


Hi Hal,

On 04/18/2012 07:54 PM, Hal Finkel wrote:
>   We might want to be able to pass along
> specific alias independence results. None of these things are really
> specific to vectorization, but will generally have an impact on it.

For what it's worth, in pocl we do something along this lines now [1].

We annotate the OpenCL C kernel instructions with the OpenCL work
item id and the "parallel region id" (region between barriers).
As you probably know, in OpenCL C the work items are fully independent
"threads of execution" between the barrier regions which is useful
information to pass along.

This metadata is used to both guide a (modified) bb-vectorizer to
perform the work group auto-vectorization (whole function vectorization,
if you will) more efficiently and to improve the alias analysis for
instruction scheduling (and other optimizations that might benefit).

The benefit of not just vectorizing directly the parallel regions is that
we can choose to wg-vectorize and/or to statically instruction parallelize
using the same input from pocl.

It would be really nice to have a set of "standard independence
metadata" in LLVM that would cover also this scenario.

[1] http://bazaar.launchpad.net/~pocl/pocl/trunk/revision/237

BR,
-- 
--Pekka



More information about the llvm-dev mailing list