[llvm-commits] [PATCH] Allow inline when calling returns_twice

Rafael Ávila de Espíndola rafael.espindola at gmail.com
Wed Dec 14 10:34:15 PST 2011


On 13/12/11 08:09 PM, Joerg Sonnenberger wrote:
> Hi all,
> I hit a case in NetBSD that LLVM currently doesn't allow. The RUMP
> framework basically wants to wrap vfork(2) and for that purpose, the
> wrapper naturally has to be inline to work. At the moment, this can't
> work with LLVM, since calling a returns_twice function explicitly
> disables inlining. I want to turn this off, if the function itself is
> also marked with that attribute. Reasoning is that the behavior
> discussed in the comment (volatile for local variables) is already
> needed in that case, so it doesn't change anything.
> 
> Comments?


Given that these are gcc extensions, I would says that doing what gcc
does is reasonable.

Does GCC do what you are suggesting and/or handles always_inline the
same way Duncan suggests?

On the patch itself, it would be better to keep callsSetJmp with the
current meaning and add a second varible or rename it to something like
canBeInlined.

> Joerg
> 
> 

Cheers,
Rafael



More information about the llvm-commits mailing list