summaryrefslogtreecommitdiffhomepage
path: root/ir/opt
diff options
context:
space:
mode:
authorElias Aebi <elias.aebi@student.kit.edu>2018-03-27 11:37:02 +0200
committerJohannes Bucher <johannes.bucher2@student.kit.edu>2019-01-24 17:42:00 +0100
commit46b8c2a88a4b7f7ac05e633511a7ad1bf1fe3744 (patch)
treeecc613757a1b60a8aa20f5a9a42b6e987560a5dc /ir/opt
parentd7b926a71206b327c687d09a9e9d5112724f5818 (diff)
link the new block to the original block
Diffstat (limited to 'ir/opt')
-rw-r--r--ir/opt/loop2.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ir/opt/loop2.c b/ir/opt/loop2.c
index 9ac2983..c26264f 100644
--- a/ir/opt/loop2.c
+++ b/ir/opt/loop2.c
@@ -5,7 +5,7 @@
static void duplicate_node(ir_node *const node, ir_node *const new_block)
{
- ir_printf("duplicate node %n (%d)\n", node, get_irn_node_nr(node));
+ //ir_printf("duplicate node %n (%d)\n", node, get_irn_node_nr(node));
//int const opt = get_optimize();
//set_optimize(0);
ir_node *const new_node = exact_copy(node);
@@ -13,7 +13,7 @@ static void duplicate_node(ir_node *const node, ir_node *const new_block)
set_nodes_block(new_node, new_block);
set_irn_link(node, new_node);
set_irn_link(new_node, node);
- printf("new node %ld\n", get_irn_node_nr(new_node));
+ //printf("new node %ld\n", get_irn_node_nr(new_node));
}
static void rewire_node(ir_node *const node)
@@ -99,6 +99,7 @@ static void duplicate_block(ir_node *const block)
{
ir_node *const new_block = exact_copy(block);
set_irn_link(block, new_block);
+ set_irn_link(new_block, block);
unsigned int const n_outs = get_irn_n_outs(block);
for (unsigned int i = 0; i < n_outs; ++i) {
ir_node *const node = get_irn_out(block, i);
@@ -124,7 +125,7 @@ static void rewire_block(ir_node *const block)
static void duplicate_loop(ir_loop *const loop)
{
- printf("duplicating loop\n");
+ //printf("duplicating loop\n");
size_t const n_elements = get_loop_n_elements(loop);
// step 1: duplicate blocks
for (size_t i = 0; i < n_elements; ++i) {