diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2019-09-30 16:20:37 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2019-09-30 16:20:37 +0000 |
commit | 1849569621d13c9c070c555f9463ad289afb8416 (patch) | |
tree | 5d1f7bacf357435319a43803e2c16d274ce6ac77 /gcc/function.c | |
parent | 559c1ae100489da76a0283750361ace146fdeb77 (diff) | |
download | gcc-1849569621d13c9c070c555f9463ad289afb8416.zip gcc-1849569621d13c9c070c555f9463ad289afb8416.tar.gz gcc-1849569621d13c9c070c555f9463ad289afb8416.tar.bz2 |
Remove global call sets: early-remat.c
This pass previously excluded rematerialisation candidates if they
clobbered a call-preserved register, on the basis that it then
wouldn't be safe to add new instances of the candidate instruction
after a call. This patch instead makes the decision on a call-by-call
basis.
The second emit_remat_insns_for_block hunk probably isn't needed,
but it seems safer and more consistent to have it, so that every call
to emit_remat_insns is preceded by a check for invalid clobbers.
2019-09-30 Richard Sandiford <richard.sandiford@arm.com>
gcc/
* early-remat.c: Include regs.h and function-abi.h.
(early_remat::maybe_add_candidate): Don't check for call-clobbered
registers here.
(early_remat::restrict_remat_for_unavail_regs): New function.
(early_remat::restrict_remat_for_call): Likewise.
(early_remat::process_block): Before calling emit_remat_insns
for a previous call in the block, invalidate any candidates
that would clobber call-preserved registers.
(early_remat::emit_remat_insns_for_block): Likewise for the
final call in a block. Do the same thing for live-in registers
when calling emit_remat_insns at the head of a block.
From-SVN: r276321
Diffstat (limited to 'gcc/function.c')
0 files changed, 0 insertions, 0 deletions