[llvm-dev] Intercepting lowering of stack adjustments
Martin J. O'Riordan via llvm-dev
llvm-dev at lists.llvm.org
Mon Jan 30 06:18:54 PST 2017
For a long time we have had code for custom lowering of adjustments to the
stack pointer. But until recently we did not realise that we were handling
only places that provided a fixed-value for such adjustments, and the ISD
nodes 'ADJCALLSTACKDOWN' and 'ADJCALLSTACKUP' are only described in our
TableGen descriptions for immediates. This hasn't previous mattered as LLVM
produces valid instruction sequences for variable adjustments anyway using
an intermediate register.
However, we have a recent requirement to also perform custom handling of
stack adjustments for non-immediate values, for instance those that reserve
stack for VLAs and 'alloca'. I would like to be able to intercept lowering
for these where a computed value is used, and to be able to differentiate
between when stack is being reserved and when it is being released.
Where should I best handle this? All of the targets that use the
'ADJCALLSTACK' nodes appear to do so only for immediate values, so I haven't
been able to learn by example.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev