summaryrefslogtreecommitdiffhomepage
path: root/ir/ana
diff options
context:
space:
mode:
authorManuel Mohr <manuel.mohr@kit.edu>2016-10-20 14:23:46 +0200
committerManuel Mohr <manuel.mohr@kit.edu>2016-10-20 15:45:07 +0200
commit578e5d662384b2cf92c08f51faecac442bf87d6f (patch)
treec9883f84798007e83cfb0002224a501fb916b21f /ir/ana
parentebf9c3078c6fa03661c4cdbe5fccca641d40e3a9 (diff)
Remove tuples before determining entity usage.
Some optimizations, e.g., inlining, can create tuples with tuples as operands. The current code in determine_entity_usage cannot deal with this situation and computes wrong usage information. For now, we just remove tuples before analysis.
Diffstat (limited to 'ir/ana')
-rw-r--r--ir/ana/irmemory.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/ir/ana/irmemory.c b/ir/ana/irmemory.c
index 1233f78..054112f 100644
--- a/ir/ana/irmemory.c
+++ b/ir/ana/irmemory.c
@@ -612,16 +612,6 @@ static ir_entity_usage determine_entity_usage(const ir_node *irn,
}
break;
- /* skip tuples */
- case iro_Tuple:
- foreach_irn_out_r(succ, k, proj) {
- if (is_Proj(proj) && get_Proj_num(proj) == (unsigned)succ_pos) {
- res |= determine_entity_usage(proj, entity);
- break;
- }
- }
- break;
-
case iro_Builtin: {
ir_builtin_kind kind = get_Builtin_kind(succ);
/* the parameters of the may_alias builtin do not lead to
@@ -846,7 +836,7 @@ static void analyse_irp_globals_entity_usage(void)
}
foreach_irp_irg(i, irg) {
- assure_irg_properties(irg, IR_GRAPH_PROPERTY_CONSISTENT_OUTS);
+ assure_irg_properties(irg, IR_GRAPH_PROPERTY_CONSISTENT_OUTS | IR_GRAPH_PROPERTY_NO_TUPLES);
irg_walk_graph(irg, NULL, check_global_address, NULL);
}