This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [tree-ssa] Proposal for tree_make_forwarder_block


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]