[LLVMdev] Early inlining in LLVM?

Duncan Sands baldrick at free.fr
Sat Oct 23 05:38:37 PDT 2010


Hi Nelson,

> Does LLVM implement an early inlining strategy? Does this early inlining
> strategy inlines all functions that are called only once in the program?

like all other LLVM passes you can run the inliner as often as you like,
whenever you like.  (I'm not sure if there is a convenient way to vary the
inlining threshold between different runs of the inliner though).  Currently
most front-ends (clang, llvm-gcc, opt) only run the inliner once.  But perhaps
you meant high level inlining in (eg) clang before the AST is lowered to LLVM
IR?

Ciao,

Duncan.



More information about the llvm-dev mailing list