path: root/ir/be/begnuas.h
diff options
authorMatthias Braun <>2011-11-02 18:57:20 +0100
committerMatthias Braun <>2011-11-02 20:00:48 +0100
commit1c89dc2a2c3cccd6e29fcfbf65248496db66ab92 (patch)
tree1f9b5703506458cd6e85589d60a4e40694584d56 /ir/be/begnuas.h
parent2198e37181132ff7ab566c94970c41e8c6b273c5 (diff)
introduce Switch node
This is the new way of handling switch-jumps. The node contains a table which maps (ranges of) input values to proj numbers. Compared to a Cond-node this results in a clean consecutive sequence of Proj numbers (no searching for a free number for the default_pn anymore) and allows factoring multiple cases jumping to the same block in a single Proj (though we still need the optimisation in cfopt for that).
Diffstat (limited to 'ir/be/begnuas.h')
1 files changed, 3 insertions, 2 deletions
diff --git a/ir/be/begnuas.h b/ir/be/begnuas.h
index 45c05c2..5b5bf91 100644
--- a/ir/be/begnuas.h
+++ b/ir/be/begnuas.h
@@ -129,7 +129,8 @@ typedef ir_node* (*get_cfop_target_func)(const ir_node *cfop);
* Emits a jump table for switch operations
-void emit_jump_table(const ir_node *node, long default_pn, ir_entity *table,
- get_cfop_target_func get_cfop_target);
+void be_emit_jump_table(const ir_node *node, const ir_switch_table *table,
+ ir_entity *entity,
+ get_cfop_target_func get_cfop_target);