[LLVMdev] (no subject)
Evan Cheng
evan.cheng at apple.com
Tue Apr 24 16:09:25 PDT 2007
Hi,
During isel lowering, the backend insertes CALLSEQ_START /
CALLSEQ_END target independent nodes to the DAG. These are then
selected to X86 specific instructions ADJCALLSTACKDOWN /
ADJCALLSTACKUP. At these point, they have a constant arguments which
corresponds to the fixed frame size for argument passing. But the
size of the stack frame isn't finalized until frame layout has been
completed, these are not translated into stack dec / inc until very
late (see X86RegisterInfo.cpp::eliminateCallFramePseudoInstr).
May I ask why are you adding a command line option to control stack
frame size? If you must do it, it should be separate from the general
mechanism. You can add a couple of special instructions that are
"flagged" to the CALLSEQ nodes that will be emitted as stack inc /
dec code.
Evan
On Apr 24, 2007, at 12:59 PM, Babak Salamat wrote:
>
> Hello,
>
> I am trying to add an instruction before each function call to add/
> subtract the stack pointer by a value specified at the command line.
> I wonder if I can do that during lowering. For example, in
> X86TargetLowering::LowerCALL. I appreciate it if you give me some
> hints how and where I can do that.
>
> Thank you,
> Babak
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
More information about the llvm-dev
mailing list