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]

[tree-ssa] Proposal for tree_make_forwarder_block


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.

Based on a erroneous ssa representation, the DCE then eliminates an 
assignment and this produces an error in the rtl expanders.

Is there another way than inserting a build_empty_stmt () in head of the 
HEADER block?  I'm not sure whether it is correct to insert a NOP_EXPR 
like I did.

Opinions?


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