[LLVMdev] [RFC] "noclone" function attribute

Krzysztof Parzyszek kparzysz at codeaurora.org
Sat Dec 1 08:58:06 PST 2012


On 12/1/2012 10:51 AM, Krzysztof Parzyszek wrote:
>
> Here's another thing.  Imagine this code:
>
>     if (x > 0) {
>       barrier();
>       ...
>     } else {
>       barrier();
>       ...
>     }
>
> Even though "barrier" may have side-effects, normally, it would be
> possible to pull such a call out of the if-the-else statements.  This
> cannot happen with barriers, so the attribute would also mean
> "don't-collapse" (as in "don't collapse multiple calls into one).

On the second thought, this "commoning out" of barriers will most likely 
be ok.

-Krzysztof


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



More information about the llvm-dev mailing list