2014-11-15 Vladimir Makarov <vmakarov@redhat.com>
authorvmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 16 Nov 2014 05:00:30 +0000 (05:00 +0000)
committervmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 16 Nov 2014 05:00:30 +0000 (05:00 +0000)
* lra-remat.c (cand_transf_func): Process regno for
rematerialization too.
* lra.c (lra): Switch on rematerialization pass.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217624 138bc75d-0d04-0410-961f-82ee72b054a4

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

index b50fd18..758c3ad 100644 (file)
@@ -1,5 +1,11 @@
 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.
 
 2014-11-15  Marc Glisse  <marc.glisse@inria.fr>
index f638a1d..fcb1b6f 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 661a384..9309d5e 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);