In function assign_hard_reg, checking the bit of conflict_a in 
consideration_allocno_bitmap is unneccesary, because when retry_p is 
false, conflicting objects are always inside of the same loop_node
(this is ensured in function process_bb_node_lives which marks the
living objects to death near the end of that function).

   

Bootstrap and regtest scheduled on x86_64 GNU/Linux
Signed-off-by: Zhouyi Zhou <yizhouz...@ict.ac.cn>
---
 gcc/ChangeLog   | 4 ++++
 gcc/ira-color.c | 6 ++----
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d1f82b2..07605ae 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2015-06-24  Zhouyi Zhou  <yizhouz...@ict.ac.cn>
+
+       * ira-color.c (assign_hard_reg): save a bitmap check
+       
 2015-06-24  Andreas Krebbel  <kreb...@linux.vnet.ibm.com>
 
        PR rtl-optimization/66306
diff --git a/gcc/ira-color.c b/gcc/ira-color.c
index 6c53507..d7776d6 100644
--- a/gcc/ira-color.c
+++ b/gcc/ira-color.c
@@ -1733,14 +1733,12 @@ assign_hard_reg (ira_allocno_t a, bool retry_p)
          /* Reload can give another class so we need to check all
             allocnos.  */
          if (!retry_p
-             && (!bitmap_bit_p (consideration_allocno_bitmap,
-                                ALLOCNO_NUM (conflict_a))
-                 || ((!ALLOCNO_ASSIGNED_P (conflict_a)
+             && ((!ALLOCNO_ASSIGNED_P (conflict_a)
                       || ALLOCNO_HARD_REGNO (conflict_a) < 0)
                      && !(hard_reg_set_intersect_p
                           (profitable_hard_regs,
                            ALLOCNO_COLOR_DATA
-                           (conflict_a)->profitable_hard_regs)))))
+                           (conflict_a)->profitable_hard_regs))))
            continue;
          conflict_aclass = ALLOCNO_CLASS (conflict_a);
          ira_assert (ira_reg_classes_intersect_p
-- 
1.9.1









Reply via email to