This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH 1/1] gcc/ira-build.c: save a conflict obj compare in ira_flattening
- From: Zhouyi Zhou <zhouzhouyi at gmail dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Zhouyi Zhou <yizhouzhou at ict dot ac dot cn>
- Date: Mon, 22 Dec 2014 14:34:15 +0800
- Subject: [PATCH 1/1] gcc/ira-build.c: save a conflict obj compare in ira_flattening
- Authentication-results: sourceware.org; auth=none
In function ira_flattening, conflict relationship will be rebuilt in case
of any new pseudo register has been created during ira_emit.
By adding the current object to OBJECTS_LIVE after traversing OBJECTS_LIVE, a conflict
obj compare can be saved.
Bootstraped and regtested in x86_64 Linux
Signed-off-by: Zhouyi Zhou <yizhouzhou@ict.ac.cn>
---
gcc/ChangeLog | 5 +++++
gcc/ira-build.c | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e5d16f9..c0ce758 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2014-12-22 Zhouyi Zhou <yizhouzhou@ict.ac.cn>
+
+ * ira-build.c (ira_flattening): Add the current
+ object to OBJECTS_LIVE after traversing OBJECTS_LIVE.
+
2014-12-17 Oleg Endo <olegendo@gcc.gnu.org>
PR target/55212
diff --git a/gcc/ira-build.c b/gcc/ira-build.c
index af82b71..66318096 100644
--- a/gcc/ira-build.c
+++ b/gcc/ira-build.c
@@ -3252,7 +3252,6 @@ ira_flattening (int max_regno_before_emit, int ira_max_point_before_emit)
continue;
aclass = ALLOCNO_CLASS (a);
- sparseset_set_bit (objects_live, OBJECT_CONFLICT_ID (obj));
EXECUTE_IF_SET_IN_SPARSESET (objects_live, n)
{
ira_object_t live_obj = ira_object_id_map[n];
@@ -3264,6 +3263,7 @@ ira_flattening (int max_regno_before_emit, int ira_max_point_before_emit)
&& live_a != a)
ira_add_conflict (obj, live_obj);
}
+ sparseset_set_bit (objects_live, OBJECT_CONFLICT_ID (obj));
}
for (r = ira_finish_point_ranges[i]; r != NULL; r = r->finish_next)
--
1.7.10.4