[LLVMdev] Enabling inlining

Jim Grosbach grosbach at apple.com
Wed Sep 22 10:07:27 PDT 2010


On Sep 22, 2010, at 9:54 AM, David Given wrote:

> My language is producing a lot of very short functions, typically two or
> three instructions long. These should be ideal candidates for inlining,
> but it isn't happening.
> 
> My compiler is producing one big bitcode file, and all the functions are
> marked as 'internal'. I'm then doing the optimisation and translation
> manually using llc -O3 into a .s file, and then linking this against the
> runtime using gcc.
> 

Are you running 'opt' on your bitcode or otherwise manually running those passes?

> I see that llvm-ld supports an inlining pass; is this the *only* place
> it happens? i.e. do I need to run llvm-ld on my bitcode file before
> translation? If not, is there anything specifically I need to do in the
> compiler to make inlining happen?
> 
> -- 
> ┌─── dg@cowlark.com ───── http://www.cowlark.com ─────
>> │ life←{ ↑1 ⍵∨.^3 4=+/,¯1 0 1∘.⊖¯1 0 1∘.⌽⊂⍵ }
> │ --- Conway's Game Of Life, in one line of APL
> 
> _______________________________________________
> 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