This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RFA: patch to solve PR37884
- From: Vladimir Makarov <vmakarov at redhat dot com>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Cc: Jeff Law <law at redhat dot com>
- Date: Sat, 25 Oct 2008 19:13:37 -0400
- Subject: RFA: patch to solve PR37884
The following patch solves PR37884. The details of the problem can be
found on
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37884
The patch was successfully bootstrapped and tested on x86, x86_64,
ppc64, itanium.
2008-10-24 Vladimir Makarov <vmakarov@redhat.com>
PR middle-end/37884
* ira-build.c (copy_live_ranges_to_removed_store_destinations):
Rename to copy_info_to_removed_store_destinations. Propagate
conflict hard regs and register stack attribute.
Index: ira-build.c
===================================================================
--- ira-build.c (revision 141159)
+++ ira-build.c (working copy)
@@ -2042,11 +2042,12 @@ create_caps (void)
static ira_allocno_t *regno_top_level_allocno_map;
/* Process all allocnos originated from pseudo REGNO and copy live
- ranges from low level allocnos to final allocnos which are
- destinations of removed stores at a loop exit. Return true if we
- copied live ranges. */
+ ranges, hard reg conflicts, and allocno stack reg attributes from
+ low level allocnos to final allocnos which are destinations of
+ removed stores at a loop exit. Return true if we copied live
+ ranges. */
static bool
-copy_live_ranges_to_removed_store_destinations (int regno)
+copy_info_to_removed_store_destinations (int regno)
{
ira_allocno_t a, parent_a;
ira_loop_tree_node_t parent;
@@ -2087,6 +2088,12 @@ copy_live_ranges_to_removed_store_destin
change_allocno_in_range_list (r, parent_a);
ALLOCNO_LIVE_RANGES (parent_a)
= merge_ranges (r, ALLOCNO_LIVE_RANGES (parent_a));
+ IOR_HARD_REG_SET (ALLOCNO_TOTAL_CONFLICT_HARD_REGS (parent_a),
+ ALLOCNO_TOTAL_CONFLICT_HARD_REGS (a));
+#ifdef STACK_REGS
+ if (ALLOCNO_TOTAL_NO_STACK_REG_P (a))
+ ALLOCNO_TOTAL_NO_STACK_REG_P (parent_a) = true;
+#endif
merged_p = true;
}
return merged_p;
@@ -2235,7 +2242,7 @@ ira_flattening (int max_regno_before_emi
ALLOCNO_COPIES (a) = NULL;
regno_top_level_allocno_map[REGNO (ALLOCNO_REG (a))] = a;
}
- if (mem_dest_p && copy_live_ranges_to_removed_store_destinations (i))
+ if (mem_dest_p && copy_info_to_removed_store_destinations (i))
merged_p = true;
}
ira_assert (new_pseudos_p || ira_max_point_before_emit == ira_max_point);