[llvm-commits] [LLVMdev] [RFC] "noclone" function attribute

Krzysztof Parzyszek kparzysz at codeaurora.org
Thu Dec 6 07:38:55 PST 2012


On 12/6/2012 5:04 AM, James Molloy wrote:
> Hi Michael,
> [...]
> In your example code:
>
>> void f(int foo) {
>>      if (foo)
>>          b();
>>      else
>>          b();
>> }
>>
>> void b() {
>>      barrier();
>> }
>>
>
> After talking with others, I now see that the spirit of the spec is that
> the barrier() as reached through the True condition is not the same as
> the barrier as reached through the False condition, even though it is
> the same statement as written in CL-C.

It also happens to be the exact same instruction (in terms of where it's 
located in memory).  Wouldn't this invalidate the PC-based approach for 
disambiguating barriers?

What begins to worry me a bit here, is that I'm no longer sure what 
"same barrier" means.  Do we have a certainty exactly what problem we 
are trying to solve?  Is a barrier "the same" only if it has been 
reached through the same call chain from the moment the threads were 
created?

-Krzysztof

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, 
hosted by The Linux Foundation



More information about the llvm-commits mailing list