#include "iredges.h"
#include "irgwalk.h"
+#include "irnode_t.h"
#include "irgraph_t.h"
#include "irloop.h"
#include "irprintf.h"
+#include "execfreq.h"
#include "irdump_t.h"
#include "irtools.h"
#include "debug.h"
#ifndef FIRM_BE_BEBLOCKSCHED_H
#define FIRM_BE_BEBLOCKSCHED_H
-#include "execfreq.h"
-#include "irnode.h"
-#include "irgraph.h"
+#include "firm_types.h"
ir_node **be_create_block_schedule(ir_graph *irg, ir_exec_freq *execfreqs);
#ifndef FIRM_BE_BECHORDAL_T_H
#define FIRM_BE_BECHORDAL_T_H
+#include "firm_types.h"
#include "list.h"
#include "pmap.h"
-#include "irnode.h"
#include "bitset.h"
#include "obst.h"
#include "debug.h"
#define FIRM_BE_BECOPYILP_T_H
#include "firm_config.h"
-
-#include "irnode.h"
+#include "firm_types.h"
#include "pset.h"
#include "becopyopt_t.h"
#include "debug.h"
#include "pmap.h"
#include "raw_bitset.h"
+#include "irnode.h"
#include "irgraph.h"
#include "irgwalk.h"
#include "irprog.h"
#include <stdio.h>
-#include "irnode.h"
+#include "firm_types.h"
#include "bechordal.h"
/**
snprintf(buf, sizeof(buf), "%s__%s", get_irp_prog_name(), get_entity_name(get_irg_entity(irg)));
buf[sizeof(buf) - 1] = '\0';
- out = ffopen(buf, "stat", "wt");
+ out = be_ffopen(buf, "stat", "wt");
fprintf(out, "%d\n", ASIZE);
for (i = 0; i < ASIZE; i++) {
snprintf(buf, sizeof(buf), "%s__%s", get_irp_prog_name(), get_entity_name(get_irg_entity(irg)));
buf[sizeof(buf) - 1] = '\0';
- out = ffopen(buf, "pstat", "wt");
+ out = be_ffopen(buf, "pstat", "wt");
fprintf(out, "Nodes %4d\n", curr_vals[I_ALL_NODES]);
fprintf(out, "Blocks %4d\n", curr_vals[I_BLOCKS]);
#define FIRM_BE_BECOPYSTAT_H
#include "firm_config.h"
-#include "irgraph.h"
+#include "firm_types.h"
#include "bearch_t.h"
#include "bechordal_t.h"
#ifndef FIRM_BE_BEDOMFRONT_H
#define FIRM_BE_BEDOMFRONT_H
-#include "irnode.h"
-#include "irgraph.h"
+#include "firm_types.h"
/*
* Forward type declaration.
#include <stdio.h>
#include <stdarg.h>
+#include "firm_types.h"
#include "obst.h"
-#include "ident.h"
-#include "irnode.h"
#include "be.h"
/* framework for emitting data (usually the final assembly code) */
#ifndef FIRM_BE_BEINSN_T_H
#define FIRM_BE_BEINSN_T_H
-#include "irnode.h"
+#include "firm_types.h"
#include "bitset.h"
#include "obst.h"
#ifndef FIRM_BE_BEIRG_H
#define FIRM_BE_BEIRG_H
-#include "execfreq.h"
#include "belive.h"
#include "bedomfront.h"
#ifndef FIRM_BE_BEIRGMOD_H
#define FIRM_BE_BEIRGMOD_H
-#include "irnode.h"
+#include "firm_types.h"
#include "beirg.h"
/**
#ifndef FIRM_BE_BELISTSCHED_H
#define FIRM_BE_BELISTSCHED_H
-#include "irgraph.h"
-#include "irnode.h"
+#include "firm_types.h"
#include "irnodeset.h"
#include "be.h"
#include <stdio.h>
+#include "firm_types.h"
#include "pset.h"
-#include "irnode.h"
-#include "irgraph.h"
#include "bearch.h"
perm_type_t type; /**< type (CHAIN or CYCLE) */
} perm_cycle_t;
+//
/* Compare the two operands */
static int cmp_op_copy_assoc(const void *a, const void *b) {
const op_copy_assoc_t *op1 = a;
#ifndef FIRM_BE_BEMACHNODES_H
#define FIRM_BE_BEMACHNODES_H
-#include "irnode.h"
+#include "firm_types.h"
/*
* Machine nodes can have machine operands as inputs.
#ifndef FIRM_BE_BESPILL_H
#define FIRM_BE_BESPILL_H
-#include "irnode.h"
+#include "firm_types.h"
#include "debug.h"
#include "bearch.h"
#ifndef FIRM_BE_BESSACONSTR_H
#define FIRM_BE_BESSACONSTR_H
-#include <stdlib.h>
+#include "firm_types.h"
#include "bedomfront.h"
-#include "irnode.h"
#include "irnodeset.h"
#include "belive.h"
#include "beirg.h"
#include "irprintf.h"
#include "irgwalk.h"
#include "irhooks.h"
+#include "execfreq.h"
#include "dbginfo_t.h"
#include "firmstat_t.h"
#include "irtools.h"
#include "firm_config.h"
-#include "irnode.h"
-#include "irgraph.h"
+#include "firm_types.h"
#include "irnodeset.h"
-#include "execfreq.h"
#include "beirg.h"
#include "bestatevent.h"
#ifndef FIRM_BE_BESTATE_H
#define FIRM_BE_BESTATE_H
-#include "irnode.h"
+#include "firm_types.h"
#include "beirg.h"
#include "bearch_t.h"
#ifndef FIRM_BE_BEUSES_H
#define FIRM_BE_BEUSES_H
-#include "irgraph.h"
-#include "irnode.h"
-
+#include "firm_types.h"
#include "belive.h"
typedef struct _be_next_use_t {
return NULL;
}
+
+FILE *be_ffopen(const char *base, const char *ext, const char *mode) {
+ FILE *out;
+ char buf[1024];
+
+ snprintf(buf, sizeof(buf), "%s.%s", base, ext);
+ buf[sizeof(buf) - 1] = '\0';
+ if (! (out = fopen(buf, mode))) {
+ fprintf(stderr, "Cannot open file %s in mode %s\n", buf, mode);
+ return NULL;
+ }
+ return out;
+}
#include <stdio.h>
+#include "firm_types.h"
#include "pset.h"
-#include "irgraph.h"
-#include "irnode.h"
-#include "irmode.h"
#include "bearch_t.h"
void be_clear_links(ir_graph *irg);
-static INLINE FILE *ffopen(const char *base, const char *ext, const char *mode) {
- FILE *out;
- char buf[1024];
-
- snprintf(buf, sizeof(buf), "%s.%s", base, ext);
- buf[sizeof(buf) - 1] = '\0';
- if (! (out = fopen(buf, mode))) {
- fprintf(stderr, "Cannot open file %s in mode %s\n", buf, mode);
- return NULL;
- }
- return out;
-}
-
/**
* Dump a graph with schedule edges.
* @param irg The graph.
*/
ir_node *be_get_Proj_for_pn(const ir_node *irn, long pn);
+/**
+ * Opens a file named base.ext with the mode mode.
+ */
+FILE *be_ffopen(const char *base, const char *ext, const char *mode);
+
#endif /* FIRM_BE_BEUTIL_H */