[LLVMdev] Is it possible to inline Functions without using LLVM JIT Framework?

Jim Grosbach grosbach at apple.com
Thu Sep 1 09:41:49 PDT 2011


To do it manually, llvm-ld your modules to get a single module with both, then run opt on the result to optimize it. From source code, you can just use -O4 to the compiler on a system with a suitable linker (standard ld on OSX; binutils+gold plugin on Linux, for example).

-Jim

On Sep 1, 2011, at 9:27 AM, Mian M. Hamayun wrote:

> Hi Everyone,
> 
> Hopefully this question is not too absurd.
> 
> Actually I created an example in LLVM, where I generate two modules, one containing the function definition and the other module calling this function.
> (Question related to this was posted on this mailing list recently)
> 
> Now I want to know, whether it is possible to "inline" the definition of this function in the caller module, using some optimization pass etc?
> 
> I have previously experimented with LLVM's JIT Framework, and we can do something similar over there. But now I am interested in doing this without JIT Framework.
> 
> Any ideas/suggestions/comments on how could we accomplish this?
> 
> Thanks in advance,
> Mian M. Hamayun
> Grenoble, France.
> 
> 
> _______________________________________________
> 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