This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] Insert on edge fix
- From: Andrew MacLeod <amacleod at redhat dot com>
- To: Jeff Sturm <jsturm at one-point dot com>
- Cc: Jeff Law <law at redhat dot com>, Diego Novillo <dnovillo at redhat dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: 23 Jun 2003 10:34:55 -0400
- Subject: Re: [tree-ssa] Insert on edge fix
- References: <Pine.LNX.4.44.0306200850370.19480-100000@ops2.one-point.com>
On Fri, 2003-06-20 at 08:56, Jeff Sturm wrote:
> On Fri, 20 Jun 2003 law@redhat.com wrote:
> > I haven't looked into your problem, but it might be worth picking up
> > my fix to tree-cfg.c from earlier tonight and see if it fixes your
> > problem. It was clearly doing the wrong thing in its handling of switch
> > statements.
>
> Gotcha. There still may be two problems... the following is clearly
> inserting to the wrong location:
>
> else
> {
> fileName = file;
> goto <UL9bd0>;
> };
> <UL9bd0>:;;
> return fileName;;
> fileName = T.7
>
> plus the compile failure I reported yesterday is still there, I'll
> investigate sometime today. (My example is a bit different than yours, I
> don't actually have any switch statements! find_insert_location falls
> through to handle_switch_split in the default case, I wonder if that's
> really the right thing to do.)
>
Nope. I didnt notice this in your note the first time through. Anyway,
yeah, it isnt supose to be in the routine.
You fixed the other one right?
------------------------------------
Try this. I don't know how that call to handle_switch_split snuck into the
default case... It appears to be in one of my diffs.
Thats a big brain fart :-)
Let me know if this solves all your problems :-) Well, hopefully at least one!
Andrew
* tree-cfg.c (find_insert_location): Default case should insert after
the last stmt in the block.
Index: tree-cfg.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-cfg.c,v
retrieving revision 1.1.4.113
diff -c -p -r1.1.4.113 tree-cfg.c
*** tree-cfg.c 20 Jun 2003 08:08:35 -0000 1.1.4.113
--- tree-cfg.c 23 Jun 2003 14:12:59 -0000
*************** find_insert_location (basic_block src, b
*** 3880,3886 ****
abnormal edges. In that case, we simple create a new block
right after this one, and then fall through to the
destination block. */
! ret = handle_switch_split (new_block, dest);
*location = EDGE_INSERT_LOCATION_AFTER;
break;
}
--- 3880,3886 ----
abnormal edges. In that case, we simple create a new block
right after this one, and then fall through to the
destination block. */
! ret = src->end_tree_p;
*location = EDGE_INSERT_LOCATION_AFTER;
break;
}