]> git.ipfire.org Git - thirdparty/gcc.git/commit
[PR117248][LRA]: Rewriting reg notes update and fix calculation of conflict hard...
authorVladimir N. Makarov <vmakarov@redhat.com>
Fri, 6 Dec 2024 21:16:28 +0000 (16:16 -0500)
committerVladimir N. Makarov <vmakarov@redhat.com>
Fri, 6 Dec 2024 21:19:39 +0000 (16:19 -0500)
commit75e7d1600f47859df40b2ac0feff5a71e0dbb040
tree01c424ec2807b9c6efcf41297182d42aa9830f70
parent42d84ba5db65f6cf8e2bd5e8bfd8ca8c8240734b
[PR117248][LRA]: Rewriting reg notes update and fix calculation of conflict hard regs of pseudo.

  LRA updates conflict hard regs of pseudo when some hard reg dies.  A
complicated PA div/mod insns reference for clobbered explicit hard regs and
hard reg as operands.  It prevents some hard reg dying although they
still conflict with pseudos living through.  Although on such insns LRA
updates wrongly reg notes (REG_DEAD, REG_UNUSED) which are used later in
rematerialization subpass.  The patch fixes the problems.

gcc/ChangeLog:

PR rtl-optimization/117248
* lra-lives.cc (start_living, start_dying): Remove.
(insn_regnos, out_insn_regnos, insn_regnos_live_after): New.
(sparseset_contains_pseudos_p): Remove.
(make_hard_regno_live, make_hard_regno_dead): Return true if
something in liveness is changed.
(mark_pseudo_live,  mark_pseudo_dead): Ditto.
(mark_regno_live, mark_regno_dead): Ditto.
(clear_sparseset_regnos, regnos_in_sparseset_p): Use set instead
of dead_set.
(process_bb_lives): Rewrite dealing with reg notes.  Update
conflict hard regs even when clobber hard reg is not marked as
dead.
(lra_create_live_ranges_1): Add initialization/finalization of
insn_regnos, out_insn_regnos, insn_regnos_live_after.
gcc/lra-lives.cc