[PATCH] D67756: [MIPS GlobalISel] VarArg argument lowering, select G_VASTART and vacopy

Petar Avramovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 19 04:45:42 PDT 2019


Petar.Avramovic created this revision.
Petar.Avramovic added reviewers: atanasyan, petarj.
Herald added subscribers: llvm-commits, jrtc27, arichardson, rovka, sdardis.
Herald added a project: LLVM.

CC_Mips doesn't accept vararg functions for O32, so we have to explicitly
use CC_Mips_FixedArg.
For lowerCall we now properly figure out whether callee function is vararg
or not, this has no effect for O32 since we always use CC_Mips_FixedArg.
For lower formal arguments we need to copy arguments in register to stack
and save pointer to start for argument list into MipsMachineFunction
object so that G_VASTART could use it during instruction select.
For vacopy we need to copy content from one vreg to another,
load and store are used for that purpose.


Repository:
  rL LLVM

https://reviews.llvm.org/D67756

Files:
  lib/Target/Mips/MipsCallLowering.cpp
  lib/Target/Mips/MipsISelLowering.cpp
  lib/Target/Mips/MipsInstructionSelector.cpp
  lib/Target/Mips/MipsLegalizerInfo.cpp
  lib/Target/Mips/MipsRegisterBankInfo.cpp
  test/CodeGen/Mips/GlobalISel/instruction-select/var_arg.mir
  test/CodeGen/Mips/GlobalISel/irtranslator/var_arg.ll
  test/CodeGen/Mips/GlobalISel/legalizer/var_arg.mir
  test/CodeGen/Mips/GlobalISel/llvm-ir/var_arg.ll
  test/CodeGen/Mips/GlobalISel/regbankselect/var_arg.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67756.220836.patch
Type: text/x-patch
Size: 30804 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190919/5dcc74de/attachment.bin>


More information about the llvm-commits mailing list