[LLVMdev] Proposal for ""llvm.mem.vectorize.safelen"

Roel Jordans r.jordans at tue.nl
Wed Aug 13 03:57:15 PDT 2014


>
> WHY CURRENT METADATA DOES NOT SUFFICE
> -------------------------------------
>
> There are currently two pieces of metadata that come close, but miss the
> desired semantics.
>
> * llvm.loop.vectorize.width - hints at what vectorization width to use
>    *if* the loop is safe to vectorize.  It does not specify that the
>    loop is safe to vectorize.
>
> * llvm.mem.parallel_loop_access - indicates that accesses do not
>    have a loop-carried dependence between them.  That's too broad a
>    brush, as it precludes loops that do have dependences (e.g. "forward
>    lexical dependences") that are nonetheless vectorizable.
>

How does this relate to the recent additions by Hal on invariants using 
llvm.assume? [0]

Can we translate llvm.mem.vectorize.safelen into an invariant on k 
similarly as to what you're proposing that the programmer should ensure?

Cheers,
  Roel

[0] http://comments.gmane.org/gmane.comp.compilers.llvm.devel/74941



More information about the llvm-dev mailing list