[llvm-commits] [llvm] r141001 - in /llvm/trunk: docs/LangRef.html include/llvm/Attributes.h lib/AsmParser/LLLexer.cpp lib/AsmParser/LLParser.cpp lib/AsmParser/LLToken.h lib/Target/CppBackend/CPPBackend.cpp lib/VMCore/Attributes.cpp test/Transforms/Mem2Reg/2007-08-27-VolatileLoadsStores.ll test/Transforms/TailCallElim/setjmp.ll

Török Edwin edwintorok at gmail.com
Mon Oct 3 08:04:13 PDT 2011


On 10/03/2011 05:45 PM, Rafael Espindola wrote:
> Author: rafael
> Date: Mon Oct  3 09:45:37 2011
> New Revision: 141001
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=141001&view=rev
> Log:
> Add the returns_twice attribute to LLVM.
> 
> Modified:
>     llvm/trunk/docs/LangRef.html
>     llvm/trunk/include/llvm/Attributes.h
>     llvm/trunk/lib/AsmParser/LLLexer.cpp
>     llvm/trunk/lib/AsmParser/LLParser.cpp
>     llvm/trunk/lib/AsmParser/LLToken.h
>     llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp
>     llvm/trunk/lib/VMCore/Attributes.cpp
>     llvm/trunk/test/Transforms/Mem2Reg/2007-08-27-VolatileLoadsStores.ll
>     llvm/trunk/test/Transforms/TailCallElim/setjmp.ll
> 
> Modified: llvm/trunk/docs/LangRef.html
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.html?rev=141001&r1=141000&r2=141001&view=diff
> ==============================================================================
> --- llvm/trunk/docs/LangRef.html (original)
> +++ llvm/trunk/docs/LangRef.html Mon Oct  3 09:45:37 2011
> @@ -1262,6 +1262,11 @@
>        the ELF x86-64 abi, but it can be disabled for some compilation
>        units.</dd>
>  
> +  <dt><tt><b><a name="returns_twice">returns_twice</a></b></tt></dt>
> +  <dd>This attribute indicates that this function can return
> +  twice. The C <code>setjmp</code> is an example of such a function.
> +  The compiler disables some optimizations (like tail calls) in the caller of
> +  these functions.</dd>
>  </dl>
>  
>  </div>
> 
> Modified: llvm/trunk/include/llvm/Attributes.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Attributes.h?rev=141001&r1=141000&r2=141001&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/Attributes.h (original)
> +++ llvm/trunk/include/llvm/Attributes.h Mon Oct  3 09:45:37 2011
> @@ -65,8 +65,7 @@
>                                            ///of alignment with +1 bias
>                                            ///0 means unaligned (different from
>                                            ///alignstack(1))
> -const Attributes Hotpatch    = 1<<29;     ///< Function should have special
> -                                          ///'hotpatch' sequence in prologue
> +const Attributes ReturnsTwice    = 1<<29; ///< Function can return twice

LangRef still refers to the hotpatch attribute, if you intend to drop it
you should probably remove it from there as well.
Did we run out of bits for attributes?

Best regards,
--Edwin



More information about the llvm-commits mailing list