[LLVMdev] Controlling the stack layout

Anton Korobeynikov anton at korobeynikov.info
Mon Dec 29 00:27:42 PST 2008


Hi, Nicolas

> Yes, I do :) There are some alternatives, but this looks like the most
> efficient. What I'm facing is engineering issues, since adding a new
> information in the stack frame is similar to adding the frame-pointer
> information.
I don't see any huge problems with writing such pass: just create
stack frame objects at fixed offsets inside your MF pass - and you'll
done. The only problem is that you need to do this early - before
prologue / epilogue inserter code runs, since afterwards stack frame
layout is almostly finalized (at "high level") and you'd deal with
much low-level and target-specific stuff.

I believe you can even use on of prologue-epilogue inserter hooks in
order to do this...

-- 
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University



More information about the llvm-dev mailing list