[LLVMdev] parallel loop metadata simplification
Tobias Grosser
tobias at grosser.es
Sun Mar 3 04:34:25 PST 2013
On 03/02/2013 07:44 PM, Tobias Grosser wrote:
> On 03/01/2013 10:05 PM, Redmond, Paul wrote:
> [...]
>> I have discovered that you can provide a custom inserter to IRBuilder
>> (who knew!). This has basically solved all my problems and allowed me
>> to generate the proper metadata with minimal changes to clang codegen.
>> Currently it adds the metadata to all loads and stores but I don't
>> think this is a problem and can be refined later if necessary.
>
> Great that you found a good solution. I have one example, which we may
> want to have a look into:
>
> Given the following input (test.c):
>
> #pragma ivdep
> for (long i = 0; i < 100; i++) {
> long t = i + 2;
> A[i] = t;
> }
I attached three more examples. All are vectorized by icc without
multi-versioning if pragma ivdep is given.
From my point of view, we should only add metadata to loads and stores
that are inserted due to memory accesses in the source code. Meaning
they are due to an array or pointer access.
Cheers,
Tobi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ivdep_t_private.c
Type: text/x-csrc
Size: 131 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130303/add42a0a/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ivdep_t_non-private.c
Type: text/x-csrc
Size: 130 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130303/add42a0a/attachment-0001.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ivdep_pointer.c
Type: text/x-csrc
Size: 160 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130303/add42a0a/attachment-0002.c>
More information about the llvm-dev
mailing list