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",
110 attr_struct = "irg_attr",
114 res->attr.irg.irg = irg;
126 attr_struct = "block_attr",
127 java_noconstr = True,
130 /* macroblock header */
133 res->attr.block.is_dead = 0;
134 res->attr.block.is_mb_head = 1;
135 res->attr.block.irg.irg = irg;
136 res->attr.block.backedge = new_backedge_arr(irg->obst, arity);
137 res->attr.block.in_cg = NULL;
138 res->attr.block.cg_backedge = NULL;
139 res->attr.block.extblk = NULL;
140 res->attr.block.mb_depth = 0;
141 res->attr.block.entity = NULL;
143 set_Block_matured(res, 1);
144 set_Block_block_visited(res, 0);
153 /* Create and initialize array for Phi-node construction. */
154 if (get_irg_phase_state(current_ir_graph) == phase_building) {
155 res->attr.block.graph_arr = NEW_ARR_D(ir_node *, current_ir_graph->obst,
156 current_ir_graph->n_loc);
157 memset(res->attr.block.graph_arr, 0, sizeof(ir_node *)*current_ir_graph->n_loc);
160 for (i = arity - 1; i >= 0; i--)
161 if (is_Unknown(in[i])) {
166 if (!has_unknown) res = optimize_node(res);
168 current_ir_graph->current_block = res;
170 IRN_VRFY_IRG(res, current_ir_graph);
174 public void addPred(Node node) {
175 binding_cons.add_immBlock_pred(ptr, node.ptr);
178 public void mature() {
179 binding_cons.mature_immBlock(ptr);
183 public Block getBlock() {
187 public boolean blockVisited() {
188 return 0 != binding.Block_block_visited(ptr);
191 public void markBlockVisited() {
192 binding.mark_Block_block_visited(ptr);
195 public boolean isBad() {
196 return binding.is_Bad(ptr) != 0;
207 ins = [ "mem", "index", "lower", "upper" ],
208 outs = [ "M", "X_regular", "X_except", "res" ],
209 flags = "fragile, highlevel",
210 pinned = "exception",
211 pinned_init = "op_pin_state_pinned",
212 attr_struct = "bound_attr",
214 #if PRECISE_EXC_CONTEXT
215 firm_alloc_frag_arr(res, op_Bound, &res->attr.bound.exc.frag_arr);
229 outs = [ "M_regular", "X_regular", "X_except", "T_result", "M_except", "P_value_res_base" ],
230 flags = "uses_memory",
233 type = "ir_builtin_kind",
242 pinned_init = "op_pin_state_pinned",
243 attr_struct = "builtin_attr",
245 assert((get_unknown_type() == type) || is_Method_type(type));
248 # TODO: No firm_alloc_frag_arr??
252 ins = [ "mem", "ptr" ],
254 outs = [ "M_regular", "X_regular", "X_except", "T_result", "M_except", "P_value_res_base" ],
255 flags = "fragile, uses_memory",
262 attr_struct = "call_attr",
264 pinned_init = "op_pin_state_pinned",
266 assert((get_unknown_type() == type) || is_Method_type(type));
269 #if PRECISE_EXC_CONTEXT
270 firm_alloc_frag_arr(res, op_Call, &res->attr.call.exc.frag_arr);
277 outs = [ "" ], # TODO
278 flags = "cfopcode, ip_cfopcode",
280 # TODO: attribute with call...
281 attr_struct = "callbegin_attr",
288 java_noconstr = True,
293 flags = "commutative",
298 mode = "get_irn_mode(irn_op)",
307 attr_struct = "cast_attr",
308 init = "assert(is_atomic_type(type));"
313 outs = [ "False", "Eq", "Lt", "Le", "Gt", "Ge", "Lg", "Leg", "Uo", "Ue", "Ul", "Ule", "Ug", "Uge", "Ne", "True" ],
318 ins = [ "selector" ],
319 outs = [ "false", "true" ],
320 flags = "cfopcode, forking",
329 name = "default_proj",
335 type = "cond_jmp_predicate",
336 init = "COND_JMP_PRED_NONE"
339 attr_struct = "cond_attr"
343 ins = [ "value", "bound" ],
344 mode = "get_irn_mode(irn_value)",
353 attr_struct = "confirm_attr",
358 flags = "constlike, start_block",
368 attr_struct = "const_attr",
385 attr_struct = "conv_attr",
389 ins = [ "mem", "dst", "src" ],
390 outs = [ "M", "X_regular", "X_except" ],
391 flags = "fragile, highlevel, uses_memory",
398 attr_struct = "copyb_attr",
400 pinned_init = "op_pin_state_pinned",
402 #if PRECISE_EXC_CONTEXT
403 firm_alloc_frag_arr(res, op_CopyB, &res->attr.copyb.exc.frag_arr);
409 ins = [ "mem", "left", "right" ],
410 outs = [ "M", "X_regular", "X_except", "res" ],
411 flags = "fragile, uses_memory",
412 attrs_name = "divmod",
419 name = "no_remainder",
428 attr_struct = "divmod_attr",
429 pinned = "exception",
431 arity_override = "oparity_binary",
433 #if PRECISE_EXC_CONTEXT
434 firm_alloc_frag_arr(res, op_Div, &res->attr.except.frag_arr);
440 ins = [ "mem", "left", "right" ],
441 outs = [ "M", "X_regular", "X_except", "res_div", "res_mod" ],
442 flags = "fragile, uses_memory",
443 attrs_name = "divmod",
450 attr_struct = "divmod_attr",
451 pinned = "exception",
453 arity_override = "oparity_binary",
455 #if PRECISE_EXC_CONTEXT
456 firm_alloc_frag_arr(res, op_DivMod, &res->attr.except.frag_arr);
463 flags = "cfopcode, fragile, start_block, constlike, dump_noblock",
466 block = "get_irg_start_block(irg)",
481 flags = "cfopcode, ip_cfopcode",
489 flags = "cfopcode, ip_cfopcode",
495 flags = "commutative",
508 attr_struct = "filter_attr",
511 # TODO: Broken asserts in original:
512 # assert(get_Proj_pred(res));
513 # assert(get_nodes_block(get_Proj_pred(res)));
517 ins = [ "mem", "ptr", "size" ],
519 flags = "uses_memory",
528 type = "ir_where_alloc"
531 attr_struct = "free_attr",
544 flags = "cfopcode, forking, keep",
548 ins = [ "store", "obj" ],
549 outs = [ "M", "X_regular", "X_except", "res", "M_except" ],
557 attr_struct = "io_attr",
559 pinned_init = "op_pin_state_floats",
570 ins = [ "mem", "ptr" ],
571 outs = [ "M", "X_regular", "X_except", "res" ],
572 flags = "fragile, uses_memory",
573 pinned = "exception",
574 pinned_init = "flags & cons_floats ? op_pin_state_floats : op_pin_state_pinned",
579 java_name = "load_mode"
582 attr_struct = "load_attr",
585 type = "ir_cons_flags",
590 #if PRECISE_EXC_CONTEXT
591 firm_alloc_frag_arr(res, op_Load, &res->attr.load.exc.frag_arr);
602 ins = [ "mem", "left", "right" ],
603 outs = [ "M", "X_regular", "X_except", "res" ],
604 flags = "fragile, uses_memory",
605 attrs_name = "divmod",
612 attr_struct = "divmod_attr",
613 pinned = "exception",
615 arity_override = "oparity_binary",
617 #if PRECISE_EXC_CONTEXT
618 firm_alloc_frag_arr(res, op_Mod, &res->attr.except.frag_arr);
625 flags = "commutative",
630 flags = "commutative",
634 ins = [ "sel", "false", "true" ],
641 flags = "dump_noblock, dump_noinput",
654 flags = "commutative",
661 attr_struct = "phi_attr",
663 java_noconstr = True,
666 /* Memory Phis in endless loops must be kept alive.
667 As we can't distinguish these easily we keep all of them alive. */
668 if (is_Phi(res) && mode == mode_M)
669 add_End_keepalive(get_irg_end(irg), res);
675 mode = "get_irn_mode(irn_op)",
691 attr_struct = "long",
696 ins = [ "mem", "left", "right" ],
697 outs = [ "M", "X_regular", "X_except", "res" ],
698 flags = "fragile, uses_memory",
699 attrs_name = "divmod",
706 attr_struct = "divmod_attr",
707 pinned = "exception",
709 arity_override = "oparity_binary",
711 #if PRECISE_EXC_CONTEXT
712 firm_alloc_frag_arr(res, op_Quot, &res->attr.except.frag_arr);
718 ins = [ "mem", "exo_ptr" ],
720 flags = "highlevel, cfopcode",
738 ins = [ "mem", "ptr" ],
741 mode = "is_Method_type(get_entity_type(entity)) ? mode_P_code : mode_P_data",
749 attr_struct = "sel_attr",
775 ins = [ "mem", "ptr", "value" ],
776 outs = [ "M", "X_regular", "X_except" ],
777 flags = "fragile, uses_memory",
778 pinned = "exception",
779 attr_struct = "store_attr",
780 pinned_init = "flags & cons_floats ? op_pin_state_floats : op_pin_state_pinned",
783 type = "ir_cons_flags",
788 #if PRECISE_EXC_CONTEXT
789 firm_alloc_frag_arr(res, op_Store, &res->attr.store.exc.frag_arr);
801 flags = "constlike, start_block",
810 attr_struct = "symconst_attr",
811 java_noconstr = True,
833 block = "get_irg_start_block(irg)",
834 flags = "cfopcode, fragile, start_block, constlike, dump_noblock",