12 /** Undefine this to disable debugging mode. */
16 * Check, if a node produces or consumes a data value.
17 * If it does, it is significant for scheduling and register allocation.
18 * A node produces/consumes a data value, if one of its operands is of
19 * mode datab, or his retuning mode is of mode datab.
20 * @param irn The node to check for.
21 * @return 1, if the node is a data node, 0 if not.
23 static INLINE int is_data_node(const ir_node *irn)
27 /* If the node produces a data value, return immediately. */
28 if(mode_is_datab(get_irn_mode(irn)))
31 /* else check, if it takes a data value, if that is so, return */
32 for(i = 0, n = get_irn_arity(irn); i < n; ++i) {
33 ir_node *op = get_irn_n(irn, i);
34 if(mode_is_datab(get_irn_mode(op)))
38 /* Else the node does not produce/consume a data value */
43 * Make each constant local to its use.
44 * This duplicates all constants in order to simulate a realistic
46 * @param irg The graph.
48 void localize_consts(ir_graph *irg);
51 * Dump a vcg graph containing the controlflow graph, the schedule and
52 * allocated registers.
53 * @param irg The irg. Note that scheduling, register allocation must
54 * have been performed.
56 void dump_allocated_irg(arch_env_t *env, ir_graph *irg, char *suffix);
60 static INLINE FILE *ffopen(const char *base, const char *ext, const char *mode) {
64 snprintf(buf, sizeof(buf), "%s.%s", base, ext);
65 if (! (out = fopen(buf, mode))) {
66 fprintf(stderr, "Cannot open file %s in mode %s\n", buf, mode);