[LLVMdev] Stack Management in LLVM

Eli Friedman eli.friedman at gmail.com
Thu Jul 23 17:03:23 PDT 2009

On Thu, Jul 23, 2009 at 4:06 PM, Joshua
Moore-Oliva<llvm-dev at chatgris.com> wrote:
> If I could reduce my requirements to the ability to the following:
>    * Ability to know how much stack space a function requires
>    * Move the stack pointer arbitrarily (the ability to write my own function
> prologue and epilogue, would need to be able to insert assembly/low level
> code here) before and after a method call
> could LLVM do that for me, using the system stack, (not continuations with
> malloc)?  Or am I barking up the wrong tree with this tool?

Messing with the prologue and epilogue should be feasible, although
you'll have to modify the code, and it's very platform-specific; see
X86RegisterInfo::emitPrologue in lib/Target/X86/X86RegisterInfo.cpp in
the source tree.


More information about the llvm-dev mailing list