Hello everyone,
I am currently struggling with one problem while developing a customized compiler with LLVM for my current project, and I wonder whether there is someone who can offer a piece of advice.
I am trying to reserve a fixed size (16 bytes) of space in an X86 stack frame at a fixed offset.
(I found a similar discussion here: https://groups.google.com/g/llvm-dev/c/_fQMdoS9KIY).
Initially, I tried to allocate a stack object using MachineFrameInfo::CreateFixedObject() and MachineFrameInfo::CreateFixedSpillStackObject() in MachineFunctionPass that is pipelined in addPreRegAlloc() in llvm/lib/Target/X86/X86TargetMachine.cpp.
It worked fine for a very simple application, but I found that it does not reserve the stack space when there are spilled general-purpose registers in the stack. I need to reserve a stack space before the spilled registers. Is there any good way of doing this?
I would appreciate any pointer, hint, or tip.
Thank you so much,
Inho Cho