How to modify the calling convention

I’m trying to implement something similar to this: in LLVM.

What I’m hoping to do is to be able to inject the following code (in x86 asm, callee clean-up calling convention):

for each function call:
lea %foo_return, %eax
mov %eax, [%esp - calleestackframesize]
push arg1
push arg2
push …
jmp foo

The problem I have is how to force the LLVM to generates the previous code. How could I modify the calling sequence?

Any suggestions are appreciated.