This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH IRA] save a bitmap check
- From: "Zhouyi Zhou" <yizhouzhou at ict dot ac dot cn>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 24 Jun 2015 17:54:33 +0800 (GMT+08:00)
- Subject: [PATCH IRA] save a bitmap check
- Authentication-results: sourceware.org; auth=none
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 <yizhouzhou@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 <yizhouzhou@ict.ac.cn>
+
+ * ira-color.c (assign_hard_reg): save a bitmap check
+
2015-06-24 Andreas Krebbel <krebbel@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