Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
d65e657f
Commit
d65e657f
authored
Mar 14, 2014
by
Matthias Braun
Browse files
remove_tuples: add missing confirm_irg_properties() call
parent
a3aaea42
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/ir/rm_tuples.c
View file @
d65e657f
...
...
@@ -22,6 +22,7 @@
*/
static
void
exchange_tuple_projs
(
ir_node
*
node
,
void
*
env
)
{
bool
*
changed
=
(
bool
*
)
env
;
if
(
!
is_Proj
(
node
))
return
;
...
...
@@ -35,19 +36,27 @@ static void exchange_tuple_projs(ir_node *node, void *env)
int
pn
=
get_Proj_proj
(
node
);
ir_node
*
tuple_pred
=
get_Tuple_pred
(
pred
,
pn
);
exchange
(
node
,
tuple_pred
);
*
changed
=
true
;
}
void
remove_tuples
(
ir_graph
*
irg
)
{
irg_walk_graph
(
irg
,
exchange_tuple_projs
,
NULL
,
NULL
);
bool
changed
=
false
;
irg_walk_graph
(
irg
,
exchange_tuple_projs
,
NULL
,
&
changed
);
/* remove Tuples only held by keep-alive edges */
ir_node
*
end
=
get_irg_end
(
irg
);
for
(
int
i
=
get_End_n_keepalives
(
end
);
i
--
>
0
;
)
{
ir_node
*
irn
=
get_End_keepalive
(
end
,
i
);
if
(
is_Tuple
(
irn
))
if
(
is_Tuple
(
irn
))
{
remove_End_n
(
end
,
i
);
changed
=
true
;
}
}
confirm_irg_properties
(
irg
,
changed
?
IR_GRAPH_PROPERTIES_CONTROL_FLOW
|
IR_GRAPH_PROPERTY_ONE_RETURN
|
IR_GRAPH_PROPERTY_MANY_RETURNS
|
IR_GRAPH_PROPERTY_NO_BADS
:
IR_GRAPH_PROPERTIES_ALL
);
add_irg_properties
(
irg
,
IR_GRAPH_PROPERTY_NO_TUPLES
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment