[LLVMdev] inline functions

Dmitry N. Mikushin maemarcus at gmail.com
Sat Oct 29 15:29:22 PDT 2011


const AttrListPtr attr = func->getAttributes();
const AttrListPtr attr_new = attr.addAttr(~0U, Attribute::AlwaysInline);
func->setAttributes(attr_new);

2011/10/21 Duncan Sands <baldrick at free.fr>:
> Hi Julien,
>
>> I have an LLVM bitcode file, with several functions in it.
>> I'm trying to inline these functions as much as possible, so that I can
>> obtain a big single function.
>> There is opt -inline, but it is not sufficient.
>
> mark your functions with the alwaysinline attribute.
>
> Ciao, Duncan.
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>




More information about the llvm-dev mailing list