[llvm-commits] [ARM] Extra frame for non-VA byval parameter

Stepan Dyatkovskiy stpworld at narod.ru
Mon Oct 8 08:15:38 PDT 2012


ping.
Stepan Dyatkovskiy wrote:
> Hi all.
> Perhaps it is not a mistake. But.. ARMISelLowering may produce two fixed
> stack objects for byval argument. It happens in case if we have free
> core registers and it is possible to allocate them as byval registers.
>
> Please, look at ARMTargetLowering::LowerFormalArguments, code fragment
> started from string "if (Flags.isByVal())".
> This branch allocates frame for byval registers ("regs-frame") and then
> it allocates frame for remained part of byval parameter
> ("remainder-frame"). "refs-frame" is created within
> VarArgStyleRegisters, the "remainder-frame" created explicitly on the
> top level of branch.
> Ideally, "regs-frame" should be connected to the "remainder-frame"
> afterall. That allows to use it as solid part then. But no dependencies
> added between regs-frame and remainder-frame. So scheduler may insert
> first byval argument usage before the baval regs will saved into stack
> area.
>
> Please find fix in attachment.
> Thanks!
>
> -Stepan.




More information about the llvm-commits mailing list