This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[tree-ssa] Proposal for tree_make_forwarder_block
- From: Pop Sébastian <pop at gauvain dot u-strasbg dot fr>
- To: gcc-patches at gcc dot gnu dot org
- Cc: dnovillo at redhat dot com
- Date: Thu, 31 Jul 2003 00:22:30 +0200
- Subject: [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?