return __get_irn_inter_arity(node);
}
+int (*__get_irn_arity)(const ir_node *node) = __get_irn_intra_arity;
+
int
(get_irn_arity)(const ir_node *node) {
return __get_irn_arity(node);
ir_node **
get_irn_in (const ir_node *node) {
assert(node);
- if (interprocedural_view) { /* handle Filter and Block specially */
+ if (get_interprocedural_view()) { /* handle Filter and Block specially */
if (get_irn_opcode(node) == iro_Filter) {
assert(node->attr.filter.in_cg);
return node->attr.filter.in_cg;
set_irn_in (ir_node *node, int arity, ir_node **in) {
ir_node *** arr;
assert(node);
- if (interprocedural_view) { /* handle Filter and Block specially */
+ if (get_interprocedural_view()) { /* handle Filter and Block specially */
if (get_irn_opcode(node) == iro_Filter) {
assert(node->attr.filter.in_cg);
arr = &node->attr.filter.in_cg;
return __get_irn_inter_n (node, n);
}
+ir_node *(*__get_irn_n)(ir_node *node, int n) = __get_irn_intra_n;
+
ir_node *
(get_irn_n)(ir_node *node, int n) {
- return __get_irn_n (node, n);
+ return __get_irn_n(node, n);
}
void
node->attr.filter.in_cg[n + 1] = in;
return;
}
- if (interprocedural_view) { /* handle Filter and Block specially */
+ if (get_interprocedural_view()) { /* handle Filter and Block specially */
if (get_irn_opcode(node) == iro_Filter) {
assert(node->attr.filter.in_cg);
node->attr.filter.in_cg[n + 1] = in;
return __get_irn_link(node);
}
+op_pin_state
+(get_irn_pinned)(const ir_node *node) {
+ return __get_irn_pinned(node);
+}
+
+void set_irn_pinned(ir_node *node, op_pin_state state) {
+ /* due to optimization an opt may be turned into a Tuple */
+ if (get_irn_op(node) == op_Tuple)
+ return;
+
+ assert(node && get_op_pinned(get_irn_op(node)) == op_pin_state_exc_pinned);
+ assert(state == op_pin_state_pinned || state == op_pin_state_floats);
+
+ node->attr.except.pin_state = state;
+}
#ifdef DO_HEAPANALYSIS
/* Access the abstract interpretation information of a node.
{
/* Fix backedge array. fix_backedges operates depending on
interprocedural_view. */
- bool ipv = interprocedural_view;
- interprocedural_view = true;
+ int ipv = get_interprocedural_view();
+ set_interprocedural_view(true);
fix_backedges(current_ir_graph->obst, node);
- interprocedural_view = ipv;
+ set_interprocedural_view(ipv);
}
}
memcpy(node->attr.block.in_cg + 1, in, sizeof(ir_node *) * arity);
assert (get_type_mode(tp) == get_irn_mode(node));
}
+ if ((get_irn_node_nr(node) == 259216) && (tp == unknown_type))
+ assert(0);
+
+
node->attr.con.tp = tp;
}
node->attr.i.sym.entity_p = ent;
}
-
union symconst_symbol
get_SymConst_symbol (ir_node *node) {
assert (node->op == op_SymConst);
node->attr.i.sym = sym;
}
+type *
+get_SymConst_value_type (ir_node *node) {
+ assert (node->op == op_SymConst);
+ return node->attr.i.tp = skip_tid(node->attr.i.tp);
+}
+
+void
+set_SymConst_value_type (ir_node *node, type *tp) {
+ assert (node->op == op_SymConst);
+ node->attr.i.tp = tp;
+}
+
ir_node *
get_Sel_mem (ir_node *node) {
assert (node->op == op_Sel);
void
set_Call_type (ir_node *node, type *tp) {
assert (node->op == op_Call);
- assert (is_method_type(tp));
+ assert ((get_unknown_type() == tp) || is_method_type(tp));
node->attr.call.cld_tp = tp;
}
assert(n);
op = get_irn_op(n);
- if (op == op_Filter) return interprocedural_view;
+ if (op == op_Filter) return get_interprocedural_view();
if (op == op_Phi)
return ((get_irg_phase_state(get_irn_irg(n)) != phase_building) ||
is_Proj (const ir_node *node) {
assert(node);
return node->op == op_Proj
- || (!interprocedural_view && node->op == op_Filter);
+ || (!get_interprocedural_view() && node->op == op_Filter);
}
/* Returns true if the operation manipulates control flow. */
}
}
+/* Returns true if the operation is a forking control flow operation. */
+int
+is_forking_op(ir_node *node) {
+ return is_op_forking(get_irn_op(node));
+}
+
#ifdef DEBUG_libfirm
void dump_irn (ir_node *n) {
int i, arity = get_irn_arity(n);