lra-remat.c (cand_transf_func): Process regno for rematerialization too.
authorVladimir Makarov <vmakarov@redhat.com>
Sun, 16 Nov 2014 05:00:30 +0000 (05:00 +0000)
committerVladimir Makarov <vmakarov@gcc.gnu.org>
Sun, 16 Nov 2014 05:00:30 +0000 (05:00 +0000)
2014-11-15  Vladimir Makarov  <vmakarov@redhat.com>

* lra-remat.c (cand_transf_func): Process regno for
rematerialization too.
* lra.c (lra): Switch on rematerialization pass.

From-SVN: r217624

gcc/ChangeLog
gcc/lra-remat.c
gcc/lra.c

index b50fd1865b78bd24cd921c06c98dc42e5c2f65d2..758c3adbaf34784624095c50796750af2541bf0f 100644 (file)
@@ -1,3 +1,9 @@
+2014-11-15  Vladimir Makarov  <vmakarov@redhat.com>
+
+       * lra-remat.c (cand_transf_func): Process regno for
+       rematerialization too.
+       * lra.c (lra): Switch on rematerialization pass.
+
 2014-11-15  Vladimir Makarov  <vmakarov@redhat.com>
 
        * lra.c (lra): Switch off rematerialization pass.
index f638a1d87407d284b74c3724568054ba14ff0229..fcb1b6f60979c5b4f92eb7c15441a88a9b2b3db0 100644 (file)
@@ -860,6 +860,10 @@ cand_trans_fun (int bb_index, bitmap bb_in, bitmap bb_out)
            bitmap_set_bit (&temp_bitmap, cid);
            break;
          }
+      /* Check regno for rematerialization.  */
+      if (bitmap_bit_p (bb_changed_regs, cand->regno)
+         || bitmap_bit_p (bb_dead_regs, cand->regno))
+       bitmap_set_bit (&temp_bitmap, cid);
     }
   return bitmap_ior_and_compl (bb_out,
                               &bb_info->gen_cands, bb_in, &temp_bitmap);
index 661a384270705eee9360e817fca61aa4d828e6bf..9309d5e44c2c7658c598892ab65f44aef3143a8f 100644 (file)
--- a/gcc/lra.c
+++ b/gcc/lra.c
@@ -2354,7 +2354,7 @@ lra (FILE *f)
        break;
       /* Now we know what pseudos should be spilled.  Try to
         rematerialize them first.  */
-      if (0&&lra_remat ())
+      if (lra_remat ())
        {
          /* We need full live info -- see the comment above.  */
          lra_create_live_ranges (lra_reg_spill_p, true);