[LLVMdev] Enabling inlining

David Given dg at cowlark.com
Wed Sep 22 09:54:58 PDT 2010

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.

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100922/a0a95be8/attachment.sig>

More information about the llvm-dev mailing list