In case of macro expansion, insertion happens on pre-processing stage.
But in case of inline at what compilation stage does the compiler decide whether to insert it or to call as a normal function itself.
At what stage does it insert if chosen for an insertion.
"Compiler stages" is not really a standardized term. The C language only specifies something called translation phases, which in detail specify the various pre-processor stages, but is very vague about all the work that goes on after pre-processing. It is summarized by the standard as the final translation phase:
All external object and function references are resolved. Library components are linked to satisfy external references to functions and objects not defined in the current translation. All such translator output is collected into a program image which contains information needed for execution in its execution environment.
This includes optimization and anything else that needs to be done before producing the executable binary. All the details of how and when this is done, is left to the compiler implementation to decide as they see fit.