This patch fix PR24235.
When thunk function is being generated with a call to the original adjusted function, the thunk function will appear in the call stack of the debugger.
To solve this issue, the thunk function should try replace the call instruction with a jump instruction.
This patch mark the call function with tail attribute, when it is applicable, to allow the backend to replace the call with a jump.
Notice that marking the call with a tail might be safer, however, it is not good enough to remove the call in all cases, e.g. when the calling convention is not fastcc.
I think it would better to improve code in lines 252-262 rather than setting musttail attribute manually.