[llvm-commits] Vectors of Pointers and Vector-GEP

Hal Finkel hfinkel at anl.gov
Wed Nov 23 05:20:36 PST 2011

On Wed, 2011-11-23 at 11:18 +0200, Rotem, Nadav wrote:
> Hi, 
> Following the discussion in last week’s LLVM developers conference I
> started working on support for vectors-of-pointers.  Vectors of
> pointers are needed for supporting scatter/gather operations and are
> the first step in the direction of supporting predicated
> architectures.  

This is also important for vanilla (auto-)vectorization. At least in the
context of my basic-block autovectorizer, the fact that there is no
vector GEP results in a lot of missed vectorization opportunities.


> In the attached patch, I change the LLVM-IR in order to support
> vectors-of-pointers and added basic support for vector-gep.  In
> following patches I plan to extend the vector-gep support to more
> indices and add scatter/gather intrinsics. 
> I started by implementing vector-gep support for a simple case where
> there is a single index.  The reason for this limitation, as noted by
> Dan Gohman, is that pointers may point to structs, and vectors of
> indices may point to different members in the struct. I am aware of
> the fact that supporting multiple indices is an important feature and
> I do intend to add support for multiple indices in the future.
> Please review the attached patch. 
> Thanks,
> Nadav
> ---------------------------------------------------------------------
> Intel Israel (74) Limited
> This e-mail and any attachments may contain confidential material for
> the sole use of the intended recipient(s). Any review or distribution
> by others is strictly prohibited. If you are not the intended
> recipient, please contact the sender and delete all copies.
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Hal Finkel
Postdoctoral Appointee
Leadership Computing Facility
Argonne National Laboratory

More information about the llvm-commits mailing list