[LLVMdev] Parallel Loop Metadata

Redmond, Paul paul.redmond at intel.com
Thu Feb 21 12:12:29 PST 2013


I've attached some IR which shows what I'm asking about. If you run this through opt "inner" will be inlined and both loops in "outer" will have the same loop id metadata..

paul



On 2013-02-21, at 2:07 PM, Hal Finkel wrote:

> ----- Original Message -----
>> From: "Paul Redmond" <paul.redmond at intel.com>
>> To: "Pekka Jääskeläinen" <pekka.jaaskelainen at tut.fi>
>> Cc: "llvmdev at cs.uiuc.edu Dev" <llvmdev at cs.uiuc.edu>
>> Sent: Thursday, February 21, 2013 12:36:50 PM
>> Subject: Re: [LLVMdev] Parallel Loop Metadata
>>
>> The documentation isn't clear about the uniqueness of loop identifier
>> metadata. Should every loop have a unique loop id metadata? I think
>> the answer is yes but I'm not sure how this can be enforced.
>>
>> A particular case I'm thinking of is something like:
>>
>> void foo() {
>>  for (...) {
>>  }
>> }
>>
>> void bar() {
>>  for (...) {
>>    foo();
>>  }
>> }
>>
>> If the loops in foo and bar have the same loop id metadata and foo is
>> inlined then you have two loops with the same id.
>
> Is that what really happens? I thought the self-referential metadata design prevented this problem?
>
> -Hal
>
>>
>> paul
>>
>> On 2013-02-13, at 1:13 PM, Pekka Jääskeläinen wrote:
>>
>>> On 02/12/2013 11:59 PM, Nadav Rotem wrote:
>>>> LGTM. Please commit.
>>>
>>> Committed in r175060. Thanks all for the feedback.
>>>
>>> Yes, let's see what evolves as the best way to keep the metadata
>>> updated after "non-serializing optimizations".
>>>
>>> This metadata is produced by pocl for the "work-item loops" in
>>> the work group functions. Perhaps the #pragma ivdep support in
>>> Clang is
>>> going to be the next producer.
>>>
>>> --
>>> --Pekka
>>>
>>> _______________________________________________
>>> LLVM Developers mailing list
>>> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>>
>>
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo2.ll
Type: application/octet-stream
Size: 1460 bytes
Desc: foo2.ll
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130221/9e9299a1/attachment.obj>


More information about the llvm-dev mailing list