Early inlining in LLVM?

This question is related with an evaluation of a research work that uses LLVM as a platform.

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

Thanks,

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.