This is an archive of the discontinued LLVM Phabricator instance.

[MIPS GlobalISel] VarArg argument lowering, select G_VASTART and vacopy
ClosedPublic

Authored by Petar.Avramovic on Sep 19 2019, 4:42 AM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

atanasyan accepted this revision.Sep 21 2019, 2:05 PM

LGTM wit a few nits

lib/Target/Mips/MipsInstructionSelector.cpp
798 ↗(On Diff #220836)

The break is redundant after return.

lib/Target/Mips/MipsLegalizerInfo.cpp
269 ↗(On Diff #220836)

ditto

This revision is now accepted and ready to land.Sep 21 2019, 2:05 PM
This revision was automatically updated to reflect the committed changes.