[LLVMdev] LLVM Loop Vectorizer puzzle

Cameron McInally cameron.mcinally at nyu.edu
Thu May 23 10:37:48 PDT 2013


On Thu, May 23, 2013 at 12:02 PM, Nadav Rotem <nrotem at apple.com> wrote:

>
> On May 23, 2013, at 8:52 AM, "Redmond, Paul" <paul.redmond at intel.com>
> wrote:
>
>
> !0 = metadata !{ metadata !1, metadata !2 }
> !1 = metadata !{ metadata !"llvm.loop.parallel" }
> !2 = metadata !{ metadata !"llvm.vectorization.vector_width", i32 8 }
>
> I'm not even sure you would need the llvm.loop.parallel anymore since the
> vectorizer could just look to see if the loop id on a parallel_loop_access
> matches the loop id of the loop being vectorized.
>
> Does this make any sense?
>
>
>
> Yes. It makes sense to me.
>
>
> If we decide, that
>
> #pragma ivdep
>
> should imply forced vectorization (which I am not sure it should), the
> front-end can than in addition to the llvm.loop.parallel metadata, emit
> meta data to force vectorization. But, I don’t think we should overload the
> semantics of llvm.loop.parallel.
>
>
> ivdep doesn't force vectorization. It just says if you can't prove there
> is or isn't a dependency the assume there isn't.
>
>
> I think that we should come up with a better name.  I am okay with
> providing ICC aliases, but I think that we should come up with slightly
> less cryptic names for clang.
>
>
In all fairness, I do not believe that ivdep is an ICC-specific pragma.
There are many compilers that support ivdep and lots of legacy (and modern)
codes that benefit from it. Seems silly, to me at least, to reinvent the
wheel.

If I'm not mistaken, ivdep predates ANSI C. Also if I'm not mistaken, ivdep
originated at Cray... way before vectors were cool. ;)

-Cameron
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130523/66a38c65/attachment.html>


More information about the llvm-dev mailing list