flags = ["commutative"]
class Alloc(Op):
- ins = [ "mem", "size" ]
+ ins = [ "mem", "count" ]
outs = [ "M", "X_regular", "X_except", "res" ]
flags = [ "fragile", "uses_memory" ]
attrs = [
mode = "mode_T"
arity = "variable"
flags = [ "keep", "uses_memory" ]
- attr_struct = "asm_attr"
pinned = "memory"
pinned_init = "op_pin_state_pinned"
+ attr_struct = "asm_attr"
+ attrs_name = "assem"
attrs = [
dict(
name = "input_constraints",
dict(
name = "n_output_constraints",
type = "int",
+ noprop = True,
),
dict(
name = "output_constraints",
dict(
name = "n_clobbers",
type = "int",
+ noprop = True,
),
dict(
name = "clobbers",
set_Block_matured(res, 1);
set_Block_block_visited(res, 0);
- '''
- d_pre = '''
- int i;
- int has_unknown = 0;
- '''
-
- d_post = '''
/* Create and initialize array for Phi-node construction. */
- if (get_irg_phase_state(current_ir_graph) == phase_building) {
- res->attr.block.graph_arr = NEW_ARR_D(ir_node *, current_ir_graph->obst,
- current_ir_graph->n_loc);
- memset(res->attr.block.graph_arr, 0, sizeof(ir_node *)*current_ir_graph->n_loc);
+ if (get_irg_phase_state(irg) == phase_building) {
+ res->attr.block.graph_arr = NEW_ARR_D(ir_node *, irg->obst, irg->n_loc);
+ memset(res->attr.block.graph_arr, 0, irg->n_loc * sizeof(ir_node*));
}
-
- for (i = arity - 1; i >= 0; i--)
- if (is_Unknown(in[i])) {
- has_unknown = 1;
- break;
- }
-
- if (!has_unknown) res = optimize_node(res);
-
- current_ir_graph->current_block = res;
-
- IRN_VRFY_IRG(res, current_ir_graph);
'''
java_add = '''
pinned = "exception"
pinned_init = "op_pin_state_pinned"
attr_struct = "bound_attr"
+ attrs_name = "bound"
d_post = '''
firm_alloc_frag_arr(res, op_Bound, &res->attr.bound.exc.frag_arr);
'''
-class Break(Op):
- mode = "mode_X"
- flags = [ "cfopcode" ]
- pinned = "yes"
-
class Builtin(Op):
ins = [ "mem" ]
arity = "variable"
firm_alloc_frag_arr(res, op_Call, &res->attr.call.exc.frag_arr);
'''
-class CallBegin(Op):
- ins = [ "ptr" ]
- outs = [ "" ] # TODO
- flags = [ "cfopcode", "ip_cfopcode" ]
- pinned = "yes"
- # TODO: attribute with call...
- attr_struct = "callbegin_attr"
- attrs = [
- dict(
- type = "ir_node*",
- name = "call"
- )
- ]
- java_noconstr = True
-
class Carry(Binop):
flags = [ "commutative" ]
init = "assert(is_atomic_type(type));"
class Cmp(Binop):
- outs = [ "False", "Eq", "Lt", "Le", "Gt", "Ge", "Lg", "Leg", "Uo", "Ue", "Ul", "Ule", "Ug", "Uge", "Ne", "True" ]
+ outs = [
+ ("False", "always false"),
+ ("Eq", "equal"),
+ ("Lt", "less"),
+ ("Le", "less or equal"),
+ ("Gt", "greater"),
+ ("Ge", "greater or equal"),
+ ("Lg", "less or greater"),
+ ("Leg", "less, equal or greater ('not equal' for integer numbers)"),
+ ("Uo", "unordered"),
+ ("Ue", "unordered or equal"),
+ ("Ul", "unordered or less"),
+ ("Ule", "unordered, less or equal"),
+ ("Ug", "unordered or greater"),
+ ("Uge", "onordered, greater or equal"),
+ ("Ne", "unordered, less, greater or equal ('not equal' for floatingpoint numbers)"),
+ ("True", "always true"),
+ ]
flags = []
class Cond(Op):
flags = [ "cfopcode", "forking" ]
pinned = "yes"
attrs = [
- dict(
- name = "kind",
- type = "cond_kind",
- init = "dense"
- ),
dict(
name = "default_proj",
type = "long",
),
]
attr_struct = "confirm_attr"
+ attrs_name = "confirm"
class Const(Op):
mode = ""
)
]
attr_struct = "conv_attr"
+ attrs_name = "conv"
class CopyB(Op):
ins = [ "mem", "dst", "src" ]
)
]
attr_struct = "copyb_attr"
+ attrs_name = "copyb"
pinned = "memory"
pinned_init = "op_pin_state_pinned"
d_post = '''
flags = [ "cfopcode" ]
singleton = True
-class EndExcept(Op):
- mode = "mode_X"
- pinned = "yes"
- arity = "dynamic"
- flags = [ "cfopcode", "ip_cfopcode" ]
- singleton = True
-
-class EndReg(Op):
- mode = "mode_X"
- pinned = "yes"
- arity = "dynamic"
- flags = [ "cfopcode", "ip_cfopcode" ]
- singleton = True
-
class Eor(Binop):
flags = [ "commutative" ]
-class Filter(Op):
- ins = [ "pred" ]
- flags = []
- attrs = [
- dict(
- name = "proj",
- type = "long"
- )
- ]
- pinned = "yes"
- attr_struct = "filter_attr"
- java_noconstr = True
-
class Free(Op):
ins = [ "mem", "ptr", "size" ]
mode = "mode_M"
flags = [ "commutative" ]
class Phi(Op):
- pinned = "yes"
- arity = "variable"
- flags = []
- attr_struct = "phi_attr"
- custom_is = True
+ pinned = "yes"
+ arity = "variable"
+ flags = []
+ attr_struct = "phi_attr"
java_noconstr = True
init = '''
/* Memory Phis in endless loops must be kept alive.
pinned = "yes"
class Proj(Op):
- ins = [ "pred" ]
- flags = []
- pinned = "no"
- attrs = [
+ ins = [ "pred" ]
+ flags = []
+ pinned = "no"
+ knownBlock = True
+ knownGraph = True
+ block = "get_nodes_block(irn_pred)"
+ graph = "get_irn_irg(irn_pred)"
+ attrs = [
dict(
type = "long",
name = "proj",
- initname = ""
+ initname = "",
+ noprop = False,
)
]
attr_struct = "long"
- custom_is = True
class Quot(Op):
ins = [ "mem", "left", "right" ]
attrs = [
dict(
type = "ir_entity*",
- name = "entity"
+ name = "entity",
+ noprop = True
)
]
attr_struct = "symconst_attr"