This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] Insert on edge comment
- From: Andrew MacLeod <amacleod at redhat dot com>
- To: Michael Matz <matz at suse dot de>
- Cc: gcc mailing list <gcc at gcc dot gnu dot org>
- Date: 30 May 2003 19:27:35 -0400
- Subject: Re: [tree-ssa] Insert on edge comment
- References: <Pine.LNX.4.44.0305310041130.27582-100000@wotan.suse.de>
On Fri, 2003-05-30 at 18:44, Michael Matz wrote:
> Hi,
>
> On 30 May 2003, Andrew MacLeod wrote:
>
> > edge feeding the phi will have to be updated. My new switch edge
> > manipulation will be a real ugly one to update.. brrr.
> >
> > There may be other structures which need to be fixed, etc.
>
> Forgive me my ignorance (I never looked at tree-ssa carefully), but why is
> edge splitting in your infrastructure so hard? It's a totally trivial
> operation for the usual IRs. If this doesn't hold for tree-ssa it just
> doesn't sound quite "right". Could you explain in simple words? ;-)
>
Splitting the edge isn't terribly difficult. The hard part is keeping
all the data structures which might make use of it up to date without
rebuilding them. For instance, a live range bitvector over the basic
blocks.. all of a sudden there is one more basic block, so none of the
bitvectors are large enough... I beleive some of our dominator stuff has
an array of basic blocks too...
Now, thats the more complex case, and you throw them away and rebuild
:-). For the most part right now, it hasn't been a big deal. The one
thing I know we need to do is update PHI nodes in the DEST block.. They
all have an incoming edge, and that edge has now changed for one element
in each PHI. The switch node issue I have is causing the creation of 2
basic blocks, and it will require additional manipulations.
So the actual splitting isnt hard, it was just a warning that I dont
know if we are going to have any more issues or not, and that I am not
updating PHI nodes right now. Updating them in the out of SSA pass can
cause me grief, but I havent thought about it too hard. I just throw
them away when Im done.
Andrew