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",
279 java_noconstr = True,
281 res->attr.callbegin.call = call;
287 flags = "commutative",
292 mode = "get_irn_mode(irn_op)",
301 attr_struct = "cast_attr",
302 init = "assert(is_atomic_type(type));"
307 outs = [ "False", "Eq", "Lt", "Le", "Gt", "Ge", "Lg", "Leg", "Uo", "Ue", "Ul", "Ule", "Ug", "Uge", "Ne", "True" ],
312 ins = [ "selector" ],
313 outs = [ "false", "true" ],
314 flags = "cfopcode, forking",
323 name = "default_proj",
329 type = "cond_jmp_predicate",
330 init = "COND_JMP_PRED_NONE"
333 attr_struct = "cond_attr"
337 ins = [ "value", "bound" ],
338 mode = "get_irn_mode(irn_value)",
347 attr_struct = "confirm_attr",
352 flags = "constlike, start_block",
362 attr_struct = "const_attr",
379 attr_struct = "conv_attr",
383 ins = [ "mem", "dst", "src" ],
384 outs = [ "M", "X_regular", "X_except" ],
385 flags = "fragile, highlevel, uses_memory",
392 attr_struct = "copyb_attr",
394 pinned_init = "op_pin_state_pinned",
396 #if PRECISE_EXC_CONTEXT
397 firm_alloc_frag_arr(res, op_CopyB, &res->attr.copyb.exc.frag_arr);
403 ins = [ "mem", "left", "right" ],
404 outs = [ "M", "X_regular", "X_except", "res" ],
405 flags = "fragile, uses_memory",
406 attrs_name = "divmod",
413 name = "no_remainder",
422 attr_struct = "divmod_attr",
423 pinned = "exception",
425 arity_override = "oparity_binary",
427 #if PRECISE_EXC_CONTEXT
428 firm_alloc_frag_arr(res, op_Div, &res->attr.except.frag_arr);
434 ins = [ "mem", "left", "right" ],
435 outs = [ "M", "X_regular", "X_except", "res_div", "res_mod" ],
436 flags = "fragile, uses_memory",
437 attrs_name = "divmod",
444 attr_struct = "divmod_attr",
445 pinned = "exception",
447 arity_override = "oparity_binary",
449 #if PRECISE_EXC_CONTEXT
450 firm_alloc_frag_arr(res, op_DivMod, &res->attr.except.frag_arr);
457 flags = "cfopcode, fragile, start_block, constlike, dump_noblock",
460 block = "get_irg_start_block(irg)",
475 flags = "cfopcode, ip_cfopcode",
483 flags = "cfopcode, ip_cfopcode",
489 flags = "commutative",
502 attr_struct = "filter_attr",
505 # TODO: Broken asserts in original:
506 # assert(get_Proj_pred(res));
507 # assert(get_nodes_block(get_Proj_pred(res)));
511 ins = [ "mem", "ptr", "size" ],
513 flags = "uses_memory",
522 type = "ir_where_alloc"
525 attr_struct = "free_attr",
538 flags = "cfopcode, forking, keep",
542 ins = [ "store", "obj" ],
543 outs = [ "M", "X_regular", "X_except", "res", "M_except" ],
551 attr_struct = "io_attr",
553 pinned_init = "op_pin_state_floats",
564 ins = [ "mem", "ptr" ],
565 outs = [ "M", "X_regular", "X_except", "res" ],
566 flags = "fragile, uses_memory",
567 pinned = "exception",
568 pinned_init = "flags & cons_floats ? op_pin_state_floats : op_pin_state_pinned",
573 java_name = "load_mode"
576 attr_struct = "load_attr",
579 type = "ir_cons_flags",
584 #if PRECISE_EXC_CONTEXT
585 firm_alloc_frag_arr(res, op_Load, &res->attr.load.exc.frag_arr);
596 ins = [ "mem", "left", "right" ],
597 outs = [ "M", "X_regular", "X_except", "res" ],
598 flags = "fragile, uses_memory",
599 attrs_name = "divmod",
606 attr_struct = "divmod_attr",
607 pinned = "exception",
609 arity_override = "oparity_binary",
611 #if PRECISE_EXC_CONTEXT
612 firm_alloc_frag_arr(res, op_Mod, &res->attr.except.frag_arr);
619 flags = "commutative",
624 flags = "commutative",
628 ins = [ "sel", "false", "true" ],
635 flags = "dump_noblock, dump_noinput",
648 flags = "commutative",
655 attr_struct = "phi_attr",
657 java_noconstr = True,
662 mode = "get_irn_mode(irn_op)",
678 attr_struct = "long",
683 ins = [ "mem", "left", "right" ],
684 outs = [ "M", "X_regular", "X_except", "res" ],
685 flags = "fragile, uses_memory",
686 attrs_name = "divmod",
693 attr_struct = "divmod_attr",
694 pinned = "exception",
696 arity_override = "oparity_binary",
698 #if PRECISE_EXC_CONTEXT
699 firm_alloc_frag_arr(res, op_Quot, &res->attr.except.frag_arr);
705 ins = [ "mem", "exo_ptr" ],
707 flags = "highlevel, cfopcode",
725 ins = [ "mem", "ptr" ],
728 mode = "is_Method_type(get_entity_type(entity)) ? mode_P_code : mode_P_data",
736 attr_struct = "sel_attr",
762 ins = [ "mem", "ptr", "value" ],
763 outs = [ "M", "X_regular", "X_except" ],
764 flags = "fragile, uses_memory",
765 pinned = "exception",
766 attr_struct = "store_attr",
767 pinned_init = "flags & cons_floats ? op_pin_state_floats : op_pin_state_pinned",
770 type = "ir_cons_flags",
775 #if PRECISE_EXC_CONTEXT
776 firm_alloc_frag_arr(res, op_Store, &res->attr.store.exc.frag_arr);
788 flags = "constlike, start_block",
797 attr_struct = "symconst_attr",
798 java_noconstr = True,
820 block = "get_irg_start_block(irg)",
821 flags = "cfopcode, fragile, start_block, constlike, dump_noblock",