On 7/12/23 12:22, Richard Sandiford wrote:
Vladimir Makarov <vmaka...@redhat.com> writes:
On 7/12/23 06:07, Richard Sandiford wrote:
Vladimir Makarov via Gcc-patches <gcc-patches@gcc.gnu.org> writes:
diff --git a/gcc/lra-assigns.cc b/gcc/lra-assigns.cc
index 73fbef29912..2f95121df06 100644
--- a/gcc/lra-assigns.cc
+++ b/gcc/lra-assigns.cc
@@ -1443,10 +1443,11 @@ assign_by_spills (void)
                 pass.  Indicate that it is no longer spilled.  */
              bitmap_clear_bit (&all_spilled_pseudos, regno);
              assign_hard_regno (hard_regno, regno);
-             if (! reload_p)
-               /* As non-reload pseudo assignment is changed we
-                  should reconsider insns referring for the
-                  pseudo.  */
+             if (! reload_p || regno_allocno_class_array[regno] == ALL_REGS)
Is this test meaningful on all targets?  We have some for which
GENERAL_REGS == ALL_REGS (e.g. nios2 and nvptx), so ALL_REGS can
be a valid allocation class.

Richard, thank you for the question.

As I remember nvptx does not use IRA/LRA.

I don't think it is a problem.  For targets with GENERAL_REGS ==
ALL_REGS, it only results in one more insn processing on the next
constraint sub-pass.
Ah, ok, thanks.  If there's no risk of cycling then I agree it
doesn't matter.
No. There is no additional risk of cycling as insn processing only starts after assigning hard reg to the reload pseudo and it can happens only once for the reload pseudo before spilling sub-pass.

Reply via email to