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.
node->attr.block.graph_arr[pos+1] = value;
}
-/* handler handling for Blocks * /
-void
-set_Block_handler (ir_node *block, ir_node *handler) {
- assert ((block->op == op_Block));
- assert ((handler->op == op_Block));
- block->attr.block.handler_entry = handler;
-}
-
-ir_node *
-get_Block_handler (ir_node *block) {
- assert ((block->op == op_Block));
- return (block->attr.block.handler_entry);
-}
-
-/ * handler handling for Nodes * /
-void
-set_Node_handler (ir_node *node, ir_node *handler) {
- set_Block_handler (get_nodes_block (node), handler);
-}
-
-ir_node *
-get_Node_handler (ir_node *node) {
- return (get_Block_handler (get_nodes_block (node)));
-}
-
-/ * exc_t handling for Blocks * /
-void set_Block_exc (ir_node *block, exc_t exc) {
- assert ((block->op == op_Block));
- block->attr.block.exc = exc;
-}
-
-exc_t get_Block_exc (ir_node *block) {
- assert ((block->op == op_Block));
- return (block->attr.block.exc);
-}
-
-/ * exc_t handling for Nodes * /
-void set_Node_exc (ir_node *node, exc_t exc) {
- set_Block_exc (get_nodes_block (node), exc);
-}
-
-exc_t get_Node_exc (ir_node *node) {
- return (get_Block_exc (get_nodes_block (node)));
-}
-*/
-
void set_Block_cg_cfgpred_arr(ir_node * node, int arity, ir_node ** in) {
assert(node->op == op_Block);
if (node->attr.block.in_cg == NULL || arity != ARR_LEN(node->attr.block.in_cg) - 1) {
}
int Call_has_callees(ir_node *node) {
-
+ assert(node && node->op == op_Call);
return ((get_irg_callee_info_state(get_irn_irg(node)) != irg_callee_info_none) &&
- (node->attr.call.callee_arr != NULL));
+ (node->attr.call.callee_arr != NULL));
}
int get_Call_n_callees(ir_node * node) {
- assert(node->op == op_Call && node->attr.call.callee_arr);
+ assert(node && node->op == op_Call && node->attr.call.callee_arr);
return ARR_LEN(node->attr.call.callee_arr);
}
entity * get_Call_callee(ir_node * node, int pos) {
- assert(node->op == op_Call && node->attr.call.callee_arr);
+ assert(pos >= 0 && pos < get_Call_n_callees(node));
return node->attr.call.callee_arr[pos];
}
-void set_Call_callee_arr(ir_node * node, int n, entity ** arr) {
+void set_Call_callee_arr(ir_node * node, const int n, entity ** arr) {
assert(node->op == op_Call);
if (node->attr.call.callee_arr == NULL || get_Call_n_callees(node) != n) {
node->attr.call.callee_arr = NEW_ARR_D(entity *, current_ir_graph->obst, n);
int FuncCall_has_callees(ir_node *node) {
return ((get_irg_callee_info_state(get_irn_irg(node)) != irg_callee_info_none) &&
- (node->attr.call.callee_arr != NULL));
+ (node->attr.call.callee_arr != NULL));
}
int get_FuncCall_n_callees(ir_node * node) {
set_irn_n(node, 1, ptr);
}
-ent_volatility
-get_Load_volatility (ir_node *node) {
+ir_mode *
+get_Load_mode (ir_node *node) {
assert (node->op == op_Load);
- return node->attr.load.volatility;
+ return node->attr.load.load_mode;
}
void
-set_Load_volatility (ir_node *node, ent_volatility volatility) {
+set_Load_mode (ir_node *node, ir_mode *mode) {
assert (node->op == op_Load);
- node->attr.load.volatility = volatility;
+ node->attr.load.load_mode = mode;
}
-ir_mode *
-get_Load_mode (ir_node *node) {
+ent_volatility
+get_Load_volatility (ir_node *node) {
assert (node->op == op_Load);
- return node->attr.load.load_mode;
+ return node->attr.load.volatility;
}
void
-set_Load_mode (ir_node *node, ir_mode *mode) {
+set_Load_volatility (ir_node *node, ent_volatility volatility) {
assert (node->op == op_Load);
- node->attr.load.load_mode = mode;
+ node->attr.load.volatility = volatility;
}
}
}
+/* 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);