This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: redirect_edge_and_branch questions
On Fri, 2004-10-01 at 17:49, Zdenek Dvorak wrote:
> Hello,
>
> > Perhaps it would make sense to have function that takes list of
> > incomming edges to given basic block and create empty basic block before
> > redirecting the selected edges into it. This operatinon should be
> > usefull at least for creating loop preheaders.
>
> and its name is "make_forwarder_block" :-)
So I have converted over to make_forwarder_block, but I have a different
problem now.
make_forwarder_block eventually calls ssa_redirect_edge(). Ive removed
all the PHI nodes, so the PHI_NODE code doesnt do anything, but the
function has the annoying side effect of clearing the PENDING_STMT list
in that case. (it returns the arguemnts of the PHI in the stmt list I
guess. No PHIs, no stmts)
So what happens is that I redirect a bunch of edges to the new forwarder
block, and any edges which aren't redirected get their PENDING_STMT list
cleared. I might be able to work around this, but it is a tad annoying.
When do we tell the cfg routines that we are not in SSA mode any more?
Do they differentiate between SSA and trees at all?
Andrew