set_irn_n(node, -1, block);
}
+/* this works for all except Block */
+ir_node *
+get_nodes_MacroBlock(const ir_node *node) {
+ assert(node->op != op_Block);
+ return get_Block_MacroBlock(get_irn_n(node, -1));
+}
+
/* Test whether arbitrary node is frame pointer, i.e. Proj(pn_Start_P_frame_base)
* from Start. If so returns frame type, else Null. */
ir_type *is_frame_pointer(ir_node *n) {
node->attr.block.graph_arr[pos+1] = value;
}
+#ifdef INTERPROCEDURAL_VIEW
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) {
assert(node->op == op_Block);
node->attr.block.in_cg = NULL;
}
+#endif
ir_node *(set_Block_dead)(ir_node *block) {
return _set_Block_dead(block);
/* returns the macro block header of a block. */
ir_node *get_Block_MacroBlock(const ir_node *block) {
+ ir_node *mbh;
assert(is_Block(block));
- return get_irn_n(block, -1);
+ mbh = get_irn_n(block, -1);
+ /* once macro block header is respected by all optimizations,
+ this assert can be removed */
+ assert(mbh != NULL);
+ return mbh;
}
/* returns the graph of a Block. */