Hi all, 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. Any idea ? -- Julien Henry http://www-verimag.imag.fr/~jhenry/
On 10/21/11 7:18 AM, Julien Henry wrote:> Hi all, > > 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.There an option in opt to change the inlining threshold. Do opt --help-hidden to find it. It might help. -- John T.> > Any idea ? >
On Fri 21 Oct 2011 04:34:22 PM CEST, John Criswell wrote:> On 10/21/11 7:18 AM, Julien Henry wrote: >> Hi all, >> >> 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. > > There an option in opt to change the inlining threshold. Do opt > --help-hidden to find it. It might help. >Thanks. It seems to work as expected now.> -- John T. >> >> Any idea ? >> >-- Julien Henry http://www-verimag.imag.fr/~jhenry/
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.
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 >