Commit d3563449 authored by Moritz Kroll's avatar Moritz Kroll
Browse files

Added gen_ir.py support for Break and Filter

[r25775]
parent fbb75759
......@@ -722,6 +722,7 @@ new_bd_EndExcept(dbg_info *db, ir_node *block) {
return res;
} /* new_bd_EndExcept */
#ifdef USE_ORIGINAL
static ir_node *
new_bd_Break(dbg_info *db, ir_node *block) {
ir_node *res;
......@@ -753,7 +754,6 @@ new_bd_Filter(dbg_info *db, ir_node *block, ir_node *arg, ir_mode *mode,
return res;
} /* new_bd_Filter */
#ifdef USE_ORIGINAL
static ir_node *
new_bd_Mux(dbg_info *db, ir_node *block,
ir_node *sel, ir_node *ir_false, ir_node *ir_true, ir_mode *mode) {
......@@ -1390,6 +1390,7 @@ new_rd_EndExcept(dbg_info *db, ir_graph *irg, ir_node *block) {
return res;
} /* new_rd_EndExcept */
#ifdef USE_ORIGINAL
ir_node *
new_rd_Break(dbg_info *db, ir_graph *irg, ir_node *block) {
ir_node *res;
......@@ -1415,7 +1416,6 @@ new_rd_Filter(dbg_info *db, ir_graph *irg, ir_node *block, ir_node *arg, ir_mode
return res;
} /* new_rd_Filter */
#ifdef USE_ORIGINAL
ir_node *
new_rd_Mux(dbg_info *db, ir_graph *irg, ir_node *block,
ir_node *sel, ir_node *ir_false, ir_node *ir_true, ir_mode *mode) {
......@@ -1729,6 +1729,7 @@ ir_node *new_r_EndReg(ir_graph *irg, ir_node *block) {
ir_node *new_r_EndExcept(ir_graph *irg, ir_node *block) {
return new_rd_EndExcept(NULL, irg, block);
}
#ifdef USE_ORIGINAL
ir_node *new_r_Break(ir_graph *irg, ir_node *block) {
return new_rd_Break(NULL, irg, block);
}
......@@ -1736,6 +1737,7 @@ ir_node *new_r_Filter(ir_graph *irg, ir_node *block, ir_node *arg,
ir_mode *mode, long proj) {
return new_rd_Filter(NULL, irg, block, arg, mode, proj);
}
#endif
ir_node *new_r_NoMem(ir_graph *irg) {
return get_irg_no_mem(irg);
}
......@@ -2678,6 +2680,7 @@ new_d_EndExcept(dbg_info *db) {
return new_bd_EndExcept(db, current_ir_graph->current_block);
} /* new_d_EndExcept */
#ifdef USE_ORIGINAL
ir_node *
new_d_Break(dbg_info *db) {
return new_bd_Break(db, current_ir_graph->current_block);
......@@ -2689,7 +2692,6 @@ new_d_Filter(dbg_info *db, ir_node *arg, ir_mode *mode, long proj) {
arg, mode, proj);
} /* new_d_Filter */
#ifdef USE_ORIGINAL
ir_node *
new_d_Mux(dbg_info *db, ir_node *sel, ir_node *ir_false,
ir_node *ir_true, ir_mode *mode) {
......@@ -3157,12 +3159,14 @@ ir_node *new_EndReg(void) {
ir_node *new_EndExcept(void) {
return new_d_EndExcept(NULL);
}
#ifdef USE_ORIGINAL
ir_node *new_Break(void) {
return new_d_Break(NULL);
}
ir_node *new_Filter(ir_node *arg, ir_mode *mode, long proj) {
return new_d_Filter(NULL, arg, mode, proj);
}
#endif
ir_node *new_NoMem(void) {
return get_irg_no_mem(current_ir_graph);
}
......
......@@ -284,10 +284,10 @@ def main(argv):
gendir = argv[2]
# List of TODOs
niymap = ["Anchor", "ASM", "Bad", "Bound", "Break",
niymap = ["Anchor", "ASM", "Bad", "Bound",
"CallBegin", "Const", "Const_type", "Const_long", "CopyB",
"defaultProj", "Dummy", "EndReg", "EndExcept",
"Filter", "InstOf", "NoMem", "Phi", "Raise",
"InstOf", "NoMem", "Phi", "Raise",
"simpleSel", "SymConst", "SymConst_type", "Sync"]
file = open(gendir + "/gen_ir_cons.c.inl", "w")
......
......@@ -149,6 +149,10 @@ Borrow = dict(
is_a = "binop"
),
Break = dict(
mode = "mode_X"
),
Builtin = dict(
ins = [ "mem" ],
arity = "variable",
......@@ -287,6 +291,12 @@ CopyB = dict(
ins = [ "mem", "dst", "src" ],
outs = [ "M", "X_regular", "X_except" ],
attrs = [
dict(
name = "state",
type = "op_pin_state",
initname = ".exc.pin_state",
init = "op_pin_state_pinned"
),
dict(
name = "type",
type = "ir_type*"
......@@ -360,6 +370,20 @@ Eor = dict(
is_a = "binop"
),
Filter = dict(
ins = [ "pred" ],
attrs = [
dict(
name = "proj",
type = "long"
)
]
# TODO: Broken asserts in original:
# assert(get_Proj_pred(res));
# assert(get_nodes_block(get_Proj_pred(res)));
),
Free = dict(
ins = [ "mem", "ptr", "size" ],
mode = "mode_M",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment