On Fri, Oct 5, 2012 at 1:12 PM, Jason Merrill <ja...@redhat.com> wrote:
> On 10/05/2012 03:46 PM, Xinliang David Li wrote:
>>
>> 1) As mentioned in this thread -- when the wrapper is inlined, the
>> pure attribute will be lost. It will give compiler hard time to
>> optimize away the guard code
>
>
> The wrapper doesn't actually check the guard; that happens in the init
> function, which is not inline.
>

So init () will be unconditionally called on entry to the wrapper?

In that case, you should probably go to the other extreme -- mark the
wrapper as noinline and expanded as if they are builtins -- but run
into the tricky issues of 'attributes' as discussed here.

David


> Jason
>

Reply via email to