[llvm-commits] [llvm] r76198 - in /llvm/trunk: docs/LangRef.html include/llvm-c/Core.h include/llvm/Attributes.h lib/AsmParser/LLLexer.cpp lib/AsmParser/LLParser.cpp lib/AsmParser/LLToken.h lib/CodeGen/PrologEpilogInserter.cpp lib/VMCore/Attribut

Nick Lewycky nicholas at mxc.ca
Fri Jul 17 18:18:52 PDT 2009


Anton Korobeynikov wrote:
> Hello, Eli
> 
>> The verifier should verify that functions marked naked only contain a
>> single asm statement with no inputs or outputs.
> This is not true in many cases (see e.g. newlib sources).
> 
>>  Also, I think the
>> inliner needs to be aware of this because naked functions can't be
>> inlined.
> Right, I will add this.

Why can't the inliner inline naked functions? That's equivalent to 
removing the epilogue/prologue which is all naked guaranteed anyways.

If you want this semantic for some other reason (the inline asm requires 
that its instructions are executed from the same address every time for 
some reason) then it should be marked noinline as well as naked.

Nick




More information about the llvm-commits mailing list