You can start with experimenting with:
clang -mllvm -inline-threshold=n
The greater the parameter n, the more agressive the inlining will be.
Default is 225 so set it to something bigger. Expect big code size and
long compilation times with very agressive inlining. When you hit the
point of diminishing returns you can try profiling the code and looking
for frequently called but uninlined functions and try marking them with
attribute((always_inline)) for even more inlining.
If you have functions marked "inline", you can also experiment with
-inlinehint-threshold bigger than -inline-threshold and see whether this
changes anything.
Also, are you compiling with link-time optimizations? Without them
inlining is limited to individual compilation units.
**taken from groups.google.com forum
static inline
? i guess in that way you'll get the link error in clang(as its default behavior is c99) – Kolinsky