llvm-project/llvm/test/CodeGen/ARM/GlobalISel
Amara Emerson 8bde5e58c0 Delay outgoing register assignments to last.
The delayed stack protector feature which is currently used for SDAG (and thus
allows for more commonly generating tail calls) depends on being able to extract
the tail call into a separate return block. To do this it also has to extract
the vreg->physreg copies that set up the call's arguments, since if it doesn't
then the call inst ends up using undefined physregs in it's new spliced block.

SelectionDAG implementations can do this because they delay emitting register
copies until  *after* the stack arguments are set up. GISel however just
processes and emits the arguments in IR order, so stack arguments always end up
last, and thus this breaks the code that looks for any register arg copies that
precede the call instruction.

This patch adds a thunk argument to the assignValueToReg() and custom assignment
hooks. For outgoing arguments, register assignments use this return param to
return a thunk that does the actual generating of the copies. We collect these
until all the outgoing stack assignments have been done and then execute them,
so that the copies (and perhaps some artifacts like G_SEXTs) are placed after
any stores.

Differential Revision: https://reviews.llvm.org/D110610
2021-10-04 12:33:20 -07:00
..
arm-call-lowering.ll
arm-instruction-select-cmp.mir
arm-instruction-select-combos.mir
arm-instruction-select.mir GlobalISel: Use LLT in memory legality queries 2021-06-30 17:44:13 -04:00
arm-irtranslator.ll GlobalISel: Track argument pointeriness with arg flags 2021-07-15 19:11:40 -04:00
arm-isel-divmod.ll
arm-isel-fp.ll
arm-isel-globals-pic.ll
arm-isel-globals-ropi-rwpi.ll
arm-isel-globals-static.ll
arm-isel.ll
arm-legalize-binops-neon.mir
arm-legalize-binops.mir
arm-legalize-bitcounts.mir [GlobalISel] Avoid creating COPY in LegalizationArtifactCombiner 2021-08-24 11:09:56 +02:00
arm-legalize-casts.mir [GlobalISel] Avoid creating COPY in LegalizationArtifactCombiner 2021-08-24 11:09:56 +02:00
arm-legalize-cmp.mir
arm-legalize-consts.mir GlobalISel: Use LLT in memory legality queries 2021-06-30 17:44:13 -04:00
arm-legalize-control-flow.mir [GlobalISel] Avoid creating COPY in LegalizationArtifactCombiner 2021-08-24 11:09:56 +02:00
arm-legalize-divmod.mir [GlobalISel] Avoid creating COPY in LegalizationArtifactCombiner 2021-08-24 11:09:56 +02:00
arm-legalize-exts.mir [GlobalISel] Avoid creating COPY in LegalizationArtifactCombiner 2021-08-24 11:09:56 +02:00
arm-legalize-fp.mir [GlobalISel] Improve elimination of dead instructions in legalizer 2021-09-20 13:00:58 +02:00
arm-legalize-globals.mir
arm-legalize-load-store.mir [GlobalISel] Avoid creating COPY in LegalizationArtifactCombiner 2021-08-24 11:09:56 +02:00
arm-legalize-select.mir
arm-legalize-vfp4.mir Delay outgoing register assignments to last. 2021-10-04 12:33:20 -07:00
arm-legalizer.mir
arm-param-lowering.ll Delay outgoing register assignments to last. 2021-10-04 12:33:20 -07:00
arm-regbankselect.mir GlobalISel: Use LLT in memory legality queries 2021-06-30 17:44:13 -04:00
arm-select-copy_to_regclass-of-fptosi.mir
arm-select-globals-pic.mir
arm-select-globals-ropi-rwpi.mir
arm-select-globals-static.mir
arm-unsupported.ll
irtranslator-varargs-lowering.ll Delay outgoing register assignments to last. 2021-10-04 12:33:20 -07:00
pr35375.ll
select-clz.mir
select-dbg.mir
select-fp-const.mir
select-fp.mir
select-neon.mir
select-pkhbt.mir
select-pr35926.mir
select-revsh.mir
thumb-instruction-select-cmp.mir
thumb-isel-globals-pic.ll
thumb-isel-globals-ropi-rwpi.ll
thumb-isel-globals-static.ll
thumb-select-arithmetic-ops.mir
thumb-select-br.mir
thumb-select-casts.mir
thumb-select-exts.mir
thumb-select-globals-pic.mir
thumb-select-globals-ropi-rwpi.mir
thumb-select-globals-static.mir
thumb-select-imm.mir
thumb-select-load-store.mir GlobalISel: Use LLT in memory legality queries 2021-06-30 17:44:13 -04:00
thumb-select-logical-ops.mir
thumb-select-phi.mir
thumb-select-select.mir
thumb-select-shifts.mir