node_entry_t *entry;
ir_op *op = stat_get_irn_op(node);
- int arity = get_irn_arity(node);
+ int i, arity = get_irn_arity(node);
entry = opcode_get_entry(op, graph->opcode_hash);
/* check address properties */
stat_update_address(get_Store_ptr(node), graph);
break;
+ case iro_Phi:
+ /* check for non-strict Phi nodes */
+ for (i = arity - 1; i >= 0; --i) {
+ ir_node *pred = get_Phi_pred(node, i);
+ if (is_Unknown(pred)) {
+ /* found an Unknown predecessor, graph is not strict */
+ graph->is_strict = 0;
+ break;
+ }
+ }
default:
;
} /* switch */
graph->is_leaf_call = LCS_UNKNOWN;
graph->is_recursive = 0;
graph->is_chain_call = 1;
+ graph->is_strict = 1;
/* create new block counter */
graph->block_hash = new_pset(block_cmp, 5);
graph->is_leaf_call = 0;
graph->is_recursive = 0;
graph->is_chain_call = 0;
+ graph->is_strict = 1;
graph->is_analyzed = 0;
}
STAT_LEAVE;
unsigned is_leaf_call:2; /**< set, if this irg calls only leaf functions */
unsigned is_recursive:1; /**< set, if this irg has recursive calls */
unsigned is_chain_call:1; /**< set, if this irg is a chain call */
+ unsigned is_strict:1; /**< set, if this irg represents a strict program */
unsigned is_analyzed:1; /**< helper: set, if this irg was already analysed */
} graph_entry_t;
" calls only leaf functions : %s\n"
" recursive : %s\n"
" chain call : %s\n"
+ " strict : %s\n"
" calls : %u\n"
" indirect calls : %u\n"
" external calls : %u\n",
entry->is_leaf_call == LCS_NON_LEAF_CALL ? "NO" : (entry->is_leaf_call == LCS_LEAF_CALL ? "Yes" : "Maybe"),
entry->is_recursive ? "YES" : "NO",
entry->is_chain_call ? "YES" : "NO",
+ entry->is_strict ? "YES" : "NO",
cnt_to_uint(&entry->cnt[gcnt_all_calls]),
cnt_to_uint(&entry->cnt[gcnt_indirect_calls]),
cnt_to_uint(&entry->cnt[gcnt_external_calls])