#include "irdump.h"
#include "dags.h"
#include "irtools.h"
+#include "ircons.h"
enum dag_counting_options_t {
FIRMSTAT_COPY_CONSTANTS = 0x00000001, /**< if set, constants will be treated as they are in
block = get_nodes_block(node);
/* ignore start end end blocks */
- if (block == get_irg_start_block(current_ir_graph) ||
- block == get_irg_end_block(current_ir_graph)) {
+ ir_graph *const irg = get_Block_irg(block);
+ if (block == get_irg_start_block(irg) || block == get_irg_end_block(irg))
return;
- } /* if */
/* Phi nodes always references nodes from "other" block */
if (is_Phi(node)) {
block = get_nodes_block(node);
/* ignore start end end blocks */
- if (block == get_irg_start_block(current_ir_graph) ||
- block == get_irg_end_block(current_ir_graph)) {
+ ir_graph *const irg = get_Block_irg(block);
+ if (block == get_irg_start_block(irg) || block == get_irg_end_block(irg))
return;
- } /* if */
/* ignore Phi nodes */
if (is_Phi(node))
/* do not count Bad / NoMem */
if (l) {
- ir_op *op = get_irn_op(l);
-
- if (op == op_NoMem || op == op_Bad)
+ if (is_NoMem(l) || is_Bad(l))
return DEFAULT_RET;
/* check for additional options */
- op = get_irn_op(n);
-
- if (mark_options & FIRMSTAT_LOAD_IS_LEAVE && op == op_Load)
+ if (mark_options & FIRMSTAT_LOAD_IS_LEAVE && is_Load(n))
return DEFAULT_RET;
- if (mark_options & FIRMSTAT_CALL_IS_LEAVE && op == op_Call)
+ if (mark_options & FIRMSTAT_CALL_IS_LEAVE && is_Call(n))
return DEFAULT_RET;
} /* if */