I have a function declared static.
This function is called only once in my compilation unit (in an ISR). It compiles to 16 words of machine code.
My compiler (IAR C/C++ Compiler for MSP430 5.10.6 [Kickstart LMS] (5.10.6.40180)) is set to the highest level of optimization (size or speed show no difference in that matter).
The optimizer does not inline the function automatically. Using the inline keyword has the desired effect, though.
Is there any reason why the optimizer would not inline the function automatically? Besides saving some instructions for the call and return, it saves some slots on the stack.