re PR target/80148 (operand has impossible constraints)
authorVladimir Makarov <vmakarov@redhat.com>
Fri, 24 Mar 2017 18:47:38 +0000 (18:47 +0000)
committerVladimir Makarov <vmakarov@gcc.gnu.org>
Fri, 24 Mar 2017 18:47:38 +0000 (18:47 +0000)
2017-03-24  Vladimir Makarov  <vmakarov@redhat.com>

PR target/80148
* lra-assigns.c (assign_by_spills): Add spilled non-reload pseudos
to consider in curr_insn_transform.

From-SVN: r246467

gcc/ChangeLog
gcc/lra-assigns.c

index f82afbe9ab4a609791b7d8ba06050e265a8bd07b..adf3791dfd96e0f00a21e0c0720bd6a525f3e74b 100644 (file)
@@ -1,3 +1,9 @@
+2017-03-24  Vladimir Makarov  <vmakarov@redhat.com>
+
+       PR target/80148
+       * lra-assigns.c (assign_by_spills): Add spilled non-reload pseudos
+       to consider in curr_insn_transform.
+
 2017-03-24  Jakub Jelinek  <jakub@redhat.com>
 
        * genrecog.c (validate_pattern): Add VEC_SELECT validation.
index 226601bf2e61cc1700e358adc348bce8ab37d97b..75bb630dca7f7169cbcd8bfa714c67bf6a62c180 100644 (file)
@@ -1507,6 +1507,14 @@ assign_by_spills (void)
              sorted_pseudos[nfails++] = conflict_regno;
              former_reload_pseudo_spill_p = true;
            }
+         else
+           /* It is better to do reloads before spilling as after the
+              spill-subpass we will reload memory instead of pseudos
+              and this will make reusing reload pseudos more
+              complicated.  Going directly to the spill pass in such
+              case might result in worse code performance or even LRA
+              cycling if we have few registers.  */
+           bitmap_set_bit (&all_spilled_pseudos, conflict_regno);
          if (lra_dump_file != NULL)
            fprintf (lra_dump_file, "     Spill %s r%d(hr=%d, freq=%d)\n",
                     pseudo_prefix_title (conflict_regno), conflict_regno,