From d1de7107f847963fbce099597e6c42c2371b053c Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Tue, 1 May 2007 22:49:43 +0000 Subject: [PATCH] removed useless includes [r13572] --- ir/be/beblocksched.c | 2 ++ ir/be/beblocksched.h | 4 +--- ir/be/bechordal_t.h | 2 +- ir/be/becopyilp_t.h | 3 +-- ir/be/becopyopt.c | 1 + ir/be/becopyopt.h | 2 +- ir/be/becopystat.c | 4 ++-- ir/be/becopystat.h | 2 +- ir/be/bedomfront.h | 3 +-- ir/be/beemitter.h | 3 +-- ir/be/beinsn_t.h | 2 +- ir/be/beirg.h | 1 - ir/be/beirgmod.h | 2 +- ir/be/belistsched.h | 3 +-- ir/be/belive.h | 3 +-- ir/be/belower.c | 1 + ir/be/bemachnode.h | 2 +- ir/be/bespill.h | 2 +- ir/be/bessaconstr.h | 3 +-- ir/be/bestat.c | 1 + ir/be/bestat.h | 4 +--- ir/be/bestate.h | 2 +- ir/be/beuses.h | 4 +--- ir/be/beutil.c | 13 +++++++++++++ ir/be/beutil.h | 22 ++++++---------------- 25 files changed, 43 insertions(+), 48 deletions(-) diff --git a/ir/be/beblocksched.c b/ir/be/beblocksched.c index b936c609c..74187b74b 100644 --- a/ir/be/beblocksched.c +++ b/ir/be/beblocksched.c @@ -37,9 +37,11 @@ #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" diff --git a/ir/be/beblocksched.h b/ir/be/beblocksched.h index 998488c79..d5df0d046 100644 --- a/ir/be/beblocksched.h +++ b/ir/be/beblocksched.h @@ -27,9 +27,7 @@ #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); diff --git a/ir/be/bechordal_t.h b/ir/be/bechordal_t.h index 1dfd6653d..b566cecd0 100644 --- a/ir/be/bechordal_t.h +++ b/ir/be/bechordal_t.h @@ -27,9 +27,9 @@ #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" diff --git a/ir/be/becopyilp_t.h b/ir/be/becopyilp_t.h index 0bd2894d7..1212fb659 100644 --- a/ir/be/becopyilp_t.h +++ b/ir/be/becopyilp_t.h @@ -28,8 +28,7 @@ #define FIRM_BE_BECOPYILP_T_H #include "firm_config.h" - -#include "irnode.h" +#include "firm_types.h" #include "pset.h" #include "becopyopt_t.h" diff --git a/ir/be/becopyopt.c b/ir/be/becopyopt.c index 8464541ab..76031dc9e 100644 --- a/ir/be/becopyopt.c +++ b/ir/be/becopyopt.c @@ -38,6 +38,7 @@ #include "debug.h" #include "pmap.h" #include "raw_bitset.h" +#include "irnode.h" #include "irgraph.h" #include "irgwalk.h" #include "irprog.h" diff --git a/ir/be/becopyopt.h b/ir/be/becopyopt.h index fb2b05546..79b9924e7 100644 --- a/ir/be/becopyopt.h +++ b/ir/be/becopyopt.h @@ -34,7 +34,7 @@ #include -#include "irnode.h" +#include "firm_types.h" #include "bechordal.h" /** diff --git a/ir/be/becopystat.c b/ir/be/becopystat.c index 1f7f657d4..f63541e68 100644 --- a/ir/be/becopystat.c +++ b/ir/be/becopystat.c @@ -372,7 +372,7 @@ void copystat_dump(ir_graph *irg) { 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++) { @@ -396,7 +396,7 @@ void copystat_dump_pretty(ir_graph *irg) { 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]); diff --git a/ir/be/becopystat.h b/ir/be/becopystat.h index 09a612712..35b2bd794 100644 --- a/ir/be/becopystat.h +++ b/ir/be/becopystat.h @@ -28,7 +28,7 @@ #define FIRM_BE_BECOPYSTAT_H #include "firm_config.h" -#include "irgraph.h" +#include "firm_types.h" #include "bearch_t.h" #include "bechordal_t.h" diff --git a/ir/be/bedomfront.h b/ir/be/bedomfront.h index b012c960d..eaa08f535 100644 --- a/ir/be/bedomfront.h +++ b/ir/be/bedomfront.h @@ -27,8 +27,7 @@ #ifndef FIRM_BE_BEDOMFRONT_H #define FIRM_BE_BEDOMFRONT_H -#include "irnode.h" -#include "irgraph.h" +#include "firm_types.h" /* * Forward type declaration. diff --git a/ir/be/beemitter.h b/ir/be/beemitter.h index 963278fdd..be964dea6 100644 --- a/ir/be/beemitter.h +++ b/ir/be/beemitter.h @@ -29,9 +29,8 @@ #include #include +#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) */ diff --git a/ir/be/beinsn_t.h b/ir/be/beinsn_t.h index a2493b8dc..8fd828c61 100644 --- a/ir/be/beinsn_t.h +++ b/ir/be/beinsn_t.h @@ -26,7 +26,7 @@ #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" diff --git a/ir/be/beirg.h b/ir/be/beirg.h index d9759ed12..b9813f0b7 100644 --- a/ir/be/beirg.h +++ b/ir/be/beirg.h @@ -27,7 +27,6 @@ #ifndef FIRM_BE_BEIRG_H #define FIRM_BE_BEIRG_H -#include "execfreq.h" #include "belive.h" #include "bedomfront.h" diff --git a/ir/be/beirgmod.h b/ir/be/beirgmod.h index bf1575e80..54ccb463d 100644 --- a/ir/be/beirgmod.h +++ b/ir/be/beirgmod.h @@ -32,7 +32,7 @@ #ifndef FIRM_BE_BEIRGMOD_H #define FIRM_BE_BEIRGMOD_H -#include "irnode.h" +#include "firm_types.h" #include "beirg.h" /** diff --git a/ir/be/belistsched.h b/ir/be/belistsched.h index 564251a65..496ff7740 100644 --- a/ir/be/belistsched.h +++ b/ir/be/belistsched.h @@ -27,8 +27,7 @@ #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" diff --git a/ir/be/belive.h b/ir/be/belive.h index 5ec205ea0..39f0a7fb5 100644 --- a/ir/be/belive.h +++ b/ir/be/belive.h @@ -29,9 +29,8 @@ #include +#include "firm_types.h" #include "pset.h" -#include "irnode.h" -#include "irgraph.h" #include "bearch.h" diff --git a/ir/be/belower.c b/ir/be/belower.c index 34984197c..a02a73ce4 100644 --- a/ir/be/belower.c +++ b/ir/be/belower.c @@ -97,6 +97,7 @@ typedef struct _perm_cycle_t { 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; diff --git a/ir/be/bemachnode.h b/ir/be/bemachnode.h index fed9c226c..9fb202cf8 100644 --- a/ir/be/bemachnode.h +++ b/ir/be/bemachnode.h @@ -26,7 +26,7 @@ #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. diff --git a/ir/be/bespill.h b/ir/be/bespill.h index 486c474f6..89aec7203 100644 --- a/ir/be/bespill.h +++ b/ir/be/bespill.h @@ -27,7 +27,7 @@ #ifndef FIRM_BE_BESPILL_H #define FIRM_BE_BESPILL_H -#include "irnode.h" +#include "firm_types.h" #include "debug.h" #include "bearch.h" diff --git a/ir/be/bessaconstr.h b/ir/be/bessaconstr.h index 745dc70ca..c8d77f317 100644 --- a/ir/be/bessaconstr.h +++ b/ir/be/bessaconstr.h @@ -49,9 +49,8 @@ #ifndef FIRM_BE_BESSACONSTR_H #define FIRM_BE_BESSACONSTR_H -#include +#include "firm_types.h" #include "bedomfront.h" -#include "irnode.h" #include "irnodeset.h" #include "belive.h" #include "beirg.h" diff --git a/ir/be/bestat.c b/ir/be/bestat.c index 1e67fad3c..213f91d87 100644 --- a/ir/be/bestat.c +++ b/ir/be/bestat.c @@ -33,6 +33,7 @@ #include "irprintf.h" #include "irgwalk.h" #include "irhooks.h" +#include "execfreq.h" #include "dbginfo_t.h" #include "firmstat_t.h" #include "irtools.h" diff --git a/ir/be/bestat.h b/ir/be/bestat.h index a329a85d7..f7b9064f3 100644 --- a/ir/be/bestat.h +++ b/ir/be/bestat.h @@ -28,10 +28,8 @@ #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" diff --git a/ir/be/bestate.h b/ir/be/bestate.h index 4faf5bf78..a1c30c1da 100644 --- a/ir/be/bestate.h +++ b/ir/be/bestate.h @@ -28,7 +28,7 @@ #ifndef FIRM_BE_BESTATE_H #define FIRM_BE_BESTATE_H -#include "irnode.h" +#include "firm_types.h" #include "beirg.h" #include "bearch_t.h" diff --git a/ir/be/beuses.h b/ir/be/beuses.h index dac174f41..637b419c4 100644 --- a/ir/be/beuses.h +++ b/ir/be/beuses.h @@ -27,9 +27,7 @@ #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 { diff --git a/ir/be/beutil.c b/ir/be/beutil.c index ef9ce6dba..ee4506ce8 100644 --- a/ir/be/beutil.c +++ b/ir/be/beutil.c @@ -269,3 +269,16 @@ ir_node *be_get_Proj_for_pn(const ir_node *irn, long pn) { 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; +} diff --git a/ir/be/beutil.h b/ir/be/beutil.h index a0248f4be..d25f2e4f9 100644 --- a/ir/be/beutil.h +++ b/ir/be/beutil.h @@ -30,10 +30,8 @@ #include +#include "firm_types.h" #include "pset.h" -#include "irgraph.h" -#include "irnode.h" -#include "irmode.h" #include "bearch_t.h" @@ -103,19 +101,6 @@ void dump_allocated_irg(arch_env_t *env, ir_graph *irg, char *suffix); 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. @@ -163,4 +148,9 @@ ir_node *dom_up_search(pset *accept, ir_node *start_point_exclusive); */ 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 */ -- 2.20.1