This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Updating the CFG on the fly?
Richard Henderson writes:
> You mean redirect an edge to a different existing block? No.
> But it would take about 10 lines to write a redirect_edge function.
OK, I've quickly knocked one up that seems to work. I'd assumed that
that the equivalent functionality must have been hiding somewhere
under another guise.
The next problem is that I need to create a new basic block that I
redirect the edges to. I used split_edge and then tried inserting a
label on the new edge. However, I noticed that split_edge renumbers
all the basic blocks after the new block. What is the philosophy
behind this since it appears that I'll have to recreate all the
dominator information every tme I do this?
Michael.