Let's take an example :
(declaim (inline myinlinefunc))
(defun myinlinefunc (a)
(* a 2))
(defun myglobalfunc (z)
(+ (myinlinefunc z) 3))
CL-USER> (trace myinlinefunc myglobalfunc)
(MYINLINEFUNC MYGLOBALFUNC)
CL-USER> (myglobalfunc 2)
0: (MYGLOBALFUNC 2)
0: MYGLOBALFUNC returned 7
7 (3 bits, #x7, #o7, #b111)
Is tracing the only way to be sure the compiler has inlined the function myinlinefunc into myglobalfunc ?
Is there a way to see the "expanded" myglobalfunc showing inline function calls effectively replaced by there definition, like a macroexpand ?
I would expect that the compiler might show you that. Typically an optimizing file compiler.
Example of a compiler note about code inlining using SBCL:
Take SBCL and compile the file with the right settings (speed = 3, ...). SBCL then prints a huge amount of compilation information. Among the huge amounts of output the compiler says:
This probably tells us about the expansion it uses.