This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] Proposal for tree_make_forwarder_block
- From: Diego Novillo <dnovillo at redhat dot com>
- To: Pop Sébastian <pop at gauvain dot u-strasbg dot fr>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: 31 Jul 2003 08:15:04 -0400
- Subject: Re: [tree-ssa] Proposal for tree_make_forwarder_block
- Organization: Red Hat Canada
- References: <20030730222230.GD10639@gauvain.u-strasbg.fr>
On Wed, 2003-07-30 at 18:22, Pop Sébastian wrote:
> Basically, the tree_make_forwarder_block has to transform the CFG:
>
> | | ___
> V V V |
> HEADER |
> | |
> . latch_edge
> . |
> . |
> |____|
>
> into:
>
> | |
> V V
> PREHEADER
> |
> fallthru_edge
> | ___
> V V |
> HEADER |
> | |
> . latch_edge
> . |
> . |
> |____|
>
>
> For this purpose I insert a NOP_EXPR in front of the HEADER block, then
> I call the split_basic_block on that position. The problem is that the
> SSA rewriter is screwed up by this transformation, ie. the block
> PREHEADER ends up with a single NOP_EXPR, while the block HEADER is the
> same, but we're now able to redirect the edges comming from outside the
> loop to the PREHEADER.
>
Can you show an example of how SSA gets messed up? You did update the
PHI nodes at the HEADER block, right? Their arguments now have to be
receiving their arguments from the new PREHEADER block.
Diego.