15 ins = [ "left", "right" ],
30 flags = "commutative",
34 ins = [ "mem", "size" ],
35 outs = [ "M", "X_regular", "X_except", "res" ],
36 flags = "fragile, uses_memory",
44 type = "ir_where_alloc"
48 attr_struct = "alloc_attr",
50 #if PRECISE_EXC_CONTEXT
51 firm_alloc_frag_arr(res, op_Alloc, &res->attr.alloc.exc.frag_arr);
59 flags = "dump_noblock",
67 flags = "commutative",
73 flags = "keep, uses_memory",
74 attr_struct = "asm_attr",
76 pinned_init = "op_pin_state_pinned",
79 name = "input_constraints",
80 type = "ir_asm_constraint*",
83 name = "n_output_constraints",
87 name = "output_constraints",
88 type = "ir_asm_constraint*",
103 java_noconstr = True,
108 flags = "cfopcode, fragile, start_block, dump_noblock",
122 attr_struct = "block_attr",
123 java_noconstr = True,
126 /* macroblock header */
129 res->attr.block.is_dead = 0;
130 res->attr.block.is_mb_head = 1;
131 res->attr.block.has_label = 0;
132 res->attr.block.irg = irg;
133 res->attr.block.backedge = new_backedge_arr(irg->obst, arity);
134 res->attr.block.in_cg = NULL;
135 res->attr.block.cg_backedge = NULL;
136 res->attr.block.extblk = NULL;
137 res->attr.block.mb_depth = 0;
138 res->attr.block.label = 0;
140 set_Block_matured(res, 1);
141 set_Block_block_visited(res, 0);
150 /* Create and initialize array for Phi-node construction. */
151 if (get_irg_phase_state(current_ir_graph) == phase_building) {
152 res->attr.block.graph_arr = NEW_ARR_D(ir_node *, current_ir_graph->obst,
153 current_ir_graph->n_loc);
154 memset(res->attr.block.graph_arr, 0, sizeof(ir_node *)*current_ir_graph->n_loc);
157 for (i = arity - 1; i >= 0; i--)
158 if (is_Unknown(in[i])) {
163 if (!has_unknown) res = optimize_node(res);
165 current_ir_graph->current_block = res;
167 IRN_VRFY_IRG(res, current_ir_graph);
171 public void addPred(Node node) {
172 binding_cons.add_immBlock_pred(ptr, node.ptr);
175 public void mature() {
176 binding_cons.mature_immBlock(ptr);
180 public Block getBlock() {
184 public boolean blockVisited() {
185 return 0 != binding.Block_block_visited(ptr);
188 public void markBlockVisited() {
189 binding.mark_Block_block_visited(ptr);
192 public boolean isBad() {
193 return binding.is_Bad(ptr) != 0;
204 ins = [ "mem", "index", "lower", "upper" ],
205 outs = [ "M", "X_regular", "X_except", "res" ],
206 flags = "fragile, highlevel",
207 pinned = "exception",
208 pinned_init = "op_pin_state_pinned",
209 attr_struct = "bound_attr",
211 #if PRECISE_EXC_CONTEXT
212 firm_alloc_frag_arr(res, op_Bound, &res->attr.bound.exc.frag_arr);
226 outs = [ "M_regular", "X_regular", "X_except", "T_result", "M_except", "P_value_res_base" ],
227 flags = "uses_memory",
230 type = "ir_builtin_kind",
239 pinned_init = "op_pin_state_pinned",
240 attr_struct = "builtin_attr",
242 assert((get_unknown_type() == type) || is_Method_type(type));
245 # TODO: No firm_alloc_frag_arr??
249 ins = [ "mem", "ptr" ],
251 outs = [ "M_regular", "X_regular", "X_except", "T_result", "M_except", "P_value_res_base" ],
252 flags = "fragile, uses_memory",
259 attr_struct = "call_attr",
261 pinned_init = "op_pin_state_pinned",
263 assert((get_unknown_type() == type) || is_Method_type(type));
266 #if PRECISE_EXC_CONTEXT
267 firm_alloc_frag_arr(res, op_Call, &res->attr.call.exc.frag_arr);
274 outs = [ "" ], # TODO
275 flags = "cfopcode, ip_cfopcode",
277 # TODO: attribute with call...
278 attr_struct = "callbegin_attr",
285 java_noconstr = True,
290 flags = "commutative",
295 mode = "get_irn_mode(irn_op)",
304 attr_struct = "cast_attr",
305 init = "assert(is_atomic_type(type));"
310 outs = [ "False", "Eq", "Lt", "Le", "Gt", "Ge", "Lg", "Leg", "Uo", "Ue", "Ul", "Ule", "Ug", "Uge", "Ne", "True" ],
315 ins = [ "selector" ],
316 outs = [ "false", "true" ],
317 flags = "cfopcode, forking",
326 name = "default_proj",
332 type = "cond_jmp_predicate",
333 init = "COND_JMP_PRED_NONE"
336 attr_struct = "cond_attr"
340 ins = [ "value", "bound" ],
341 mode = "get_irn_mode(irn_value)",
350 attr_struct = "confirm_attr",
355 flags = "constlike, start_block",
365 attr_struct = "const_attr",
382 attr_struct = "conv_attr",
386 ins = [ "mem", "dst", "src" ],
387 outs = [ "M", "X_regular", "X_except" ],
388 flags = "fragile, highlevel, uses_memory",
395 attr_struct = "copyb_attr",
397 pinned_init = "op_pin_state_pinned",
399 #if PRECISE_EXC_CONTEXT
400 firm_alloc_frag_arr(res, op_CopyB, &res->attr.copyb.exc.frag_arr);
406 ins = [ "mem", "left", "right" ],
407 outs = [ "M", "X_regular", "X_except", "res" ],
408 flags = "fragile, uses_memory",
409 attrs_name = "divmod",
416 name = "no_remainder",
425 attr_struct = "divmod_attr",
426 pinned = "exception",
428 arity_override = "oparity_binary",
430 #if PRECISE_EXC_CONTEXT
431 firm_alloc_frag_arr(res, op_Div, &res->attr.except.frag_arr);
437 ins = [ "mem", "left", "right" ],
438 outs = [ "M", "X_regular", "X_except", "res_div", "res_mod" ],
439 flags = "fragile, uses_memory",
440 attrs_name = "divmod",
447 attr_struct = "divmod_attr",
448 pinned = "exception",
450 arity_override = "oparity_binary",
452 #if PRECISE_EXC_CONTEXT
453 firm_alloc_frag_arr(res, op_DivMod, &res->attr.except.frag_arr);
460 flags = "cfopcode, fragile, start_block, constlike, dump_noblock",
463 block = "get_irg_start_block(irg)",
478 flags = "cfopcode, ip_cfopcode",
486 flags = "cfopcode, ip_cfopcode",
492 flags = "commutative",
505 attr_struct = "filter_attr",
508 # TODO: Broken asserts in original:
509 # assert(get_Proj_pred(res));
510 # assert(get_nodes_block(get_Proj_pred(res)));
514 ins = [ "mem", "ptr", "size" ],
516 flags = "uses_memory",
525 type = "ir_where_alloc"
528 attr_struct = "free_attr",
541 flags = "cfopcode, forking, keep",
545 ins = [ "store", "obj" ],
546 outs = [ "M", "X_regular", "X_except", "res", "M_except" ],
554 attr_struct = "io_attr",
556 pinned_init = "op_pin_state_floats",
567 ins = [ "mem", "ptr" ],
568 outs = [ "M", "X_regular", "X_except", "res" ],
569 flags = "fragile, uses_memory",
570 pinned = "exception",
571 pinned_init = "flags & cons_floats ? op_pin_state_floats : op_pin_state_pinned",
576 java_name = "load_mode"
579 attr_struct = "load_attr",
582 type = "ir_cons_flags",
587 #if PRECISE_EXC_CONTEXT
588 firm_alloc_frag_arr(res, op_Load, &res->attr.load.exc.frag_arr);
599 ins = [ "mem", "left", "right" ],
600 outs = [ "M", "X_regular", "X_except", "res" ],
601 flags = "fragile, uses_memory",
602 attrs_name = "divmod",
609 attr_struct = "divmod_attr",
610 pinned = "exception",
612 arity_override = "oparity_binary",
614 #if PRECISE_EXC_CONTEXT
615 firm_alloc_frag_arr(res, op_Mod, &res->attr.except.frag_arr);
622 flags = "commutative",
627 flags = "commutative",
631 ins = [ "sel", "false", "true" ],
638 flags = "dump_noblock, dump_noinput",
651 flags = "commutative",
658 attr_struct = "phi_attr",
660 java_noconstr = True,
665 mode = "get_irn_mode(irn_op)",
681 attr_struct = "long",
686 ins = [ "mem", "left", "right" ],
687 outs = [ "M", "X_regular", "X_except", "res" ],
688 flags = "fragile, uses_memory",
689 attrs_name = "divmod",
696 attr_struct = "divmod_attr",
697 pinned = "exception",
699 arity_override = "oparity_binary",
701 #if PRECISE_EXC_CONTEXT
702 firm_alloc_frag_arr(res, op_Quot, &res->attr.except.frag_arr);
708 ins = [ "mem", "exo_ptr" ],
710 flags = "highlevel, cfopcode",
728 ins = [ "mem", "ptr" ],
731 mode = "is_Method_type(get_entity_type(entity)) ? mode_P_code : mode_P_data",
739 attr_struct = "sel_attr",
765 ins = [ "mem", "ptr", "value" ],
766 outs = [ "M", "X_regular", "X_except" ],
767 flags = "fragile, uses_memory",
768 pinned = "exception",
769 attr_struct = "store_attr",
770 pinned_init = "flags & cons_floats ? op_pin_state_floats : op_pin_state_pinned",
773 type = "ir_cons_flags",
778 #if PRECISE_EXC_CONTEXT
779 firm_alloc_frag_arr(res, op_Store, &res->attr.store.exc.frag_arr);
791 flags = "constlike, start_block",
800 attr_struct = "symconst_attr",
801 java_noconstr = True,
823 block = "get_irg_start_block(irg)",
824 flags = "cfopcode, fragile, start_block, constlike, dump_noblock",