This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
patch for tree-ssa-coalesce.c PR 30159
- From: Andrew MacLeod <amacleod at redhat dot com>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 12 Dec 2006 10:51:22 -0500
- Subject: patch for tree-ssa-coalesce.c PR 30159
The coalescer was trying to save a few cycles. If there was only one
ssa_name in the list of potential coalesces, it simply returned. Well,
that doesn't work if there is only one coalesce and it happens to be
with the incoming default defintion, as was the case here.
The cleanest and simplest fix is to simple let the coalescer run if
there is one or more names in the list, rather than more than one.
Verified that it bootstrapped on x86-pc-linux-gnu and fixed this
testcase. I will continue running the testsuite, but I checked it in as
the fix is pretty obvious.
Andrew
2006-12-12 Andrew Macleod <amacleod@redhat.com>
* tree-ssa-coalesce.c (coalesce_ssa_name): Process single ssa_name
functions in case a default_def coalesce is required.
Index: tree-ssa-coalesce.c
===================================================================
*** tree-ssa-coalesce.c (revision 119782)
--- tree-ssa-coalesce.c (working copy)
*************** coalesce_ssa_name (void)
*** 1284,1290 ****
partition_view_bitmap (map, used_in_copies, true);
BITMAP_FREE (used_in_copies);
! if (num_var_partitions (map) <= 1)
{
delete_coalesce_list (cl);
return map;
--- 1284,1290 ----
partition_view_bitmap (map, used_in_copies, true);
BITMAP_FREE (used_in_copies);
! if (num_var_partitions (map) < 1)
{
delete_coalesce_list (cl);
return map;