[LLVMdev] How to allocate redundant stack slot?

Tim Northover t.p.northover at gmail.com
Wed Nov 5 19:59:04 PST 2014


Hi Ray,

> Sorry to bother those not interested. I am a newbie to LLVM.
> I have a problem on allocating additional stack slot for checkpointing.
> However, I have no idea on how to allocate redundant stack slot in llvm.

It's a little difficult to tell what you're trying to do. Do you want
functions to allocate some space on the stack for an external routine
to use, but that'll be otherwise completely ignored by LLVM?

If so, it's probably a matter for XYZFrameLowering to handle (unused
allocas in the IR can be removed at will, and I can't think of a
better place to put it). The key function to call is probably
"CreateStackObject", probably from
"processFunctionBeforeCalleeSavedScan".

If you want LLVM code to actually interact with this stack slot, the
answer may or may not change, of course. But I don't think anyone can
answer properly without knowing more details.

Cheers.

Tim.



More information about the llvm-dev mailing list