From 4b363c6a4e0584ce755b5f82fc3d7a9dc38658b2 Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Mon, 17 Aug 2009 21:53:48 +0000 Subject: [PATCH] - moved pass constructors from irtools to irpass - add an irg_verify_pass() [r26374] --- include/libfirm/irconsconfirm.h | 8 +-- include/libfirm/iroptimize.h | 2 - include/libfirm/irpass.h | 54 +++++++++++++++++++ include/libfirm/irvrfy.h | 27 +++++++--- ir/ana/irconsconfirm.c | 1 + ir/common/irtools.c | 77 --------------------------- ir/common/irtools.h | 39 -------------- ir/ir/irpass.c | 94 +++++++++++++++++++++++++++++++++ ir/ir/irvrfy.c | 25 +++++++++ ir/lower/lower_hl.c | 11 +--- ir/opt/boolopt.c | 2 +- ir/opt/cfopt.c | 2 +- ir/opt/code_placement.c | 2 +- ir/opt/combo.c | 2 +- ir/opt/convopt.c | 2 +- ir/opt/gvn_pre.c | 2 +- ir/opt/ifconv.c | 13 ++--- ir/opt/ircgopt.c | 1 + ir/opt/jumpthreading.c | 2 +- ir/opt/ldst2.c | 2 +- ir/opt/ldstopt.c | 2 +- ir/opt/opt_frame.c | 2 +- ir/opt/opt_ldst.c | 2 +- ir/opt/opt_osr.c | 13 ++--- ir/opt/reassoc.c | 2 +- ir/opt/return.c | 2 +- ir/opt/scalar_replace.c | 1 + ir/opt/tailrec.c | 2 +- 28 files changed, 220 insertions(+), 174 deletions(-) diff --git a/include/libfirm/irconsconfirm.h b/include/libfirm/irconsconfirm.h index cd7950a05..4e8381735 100644 --- a/include/libfirm/irconsconfirm.h +++ b/include/libfirm/irconsconfirm.h @@ -55,12 +55,10 @@ void construct_confirms(ir_graph *irg); * Creates an ir_graph pass for construct_confirms(). * * @param name the name of this pass or NULL - * @param verify should this pass be verified? - * @param dump should this pass result be dumped? * * @return the newly created ir_graph pass */ -ir_graph_pass_t *construct_confirms_pass(const char *name, int verify, int dump); +ir_graph_pass_t *construct_confirms_pass(const char *name); /** * Remove all Confirm nodes from a graph. @@ -74,11 +72,9 @@ void remove_confirms(ir_graph *irg); * Creates an ir_graph pass for remove_confirms(). * * @param name the name of this pass or NULL - * @param verify should this pass be verified? - * @param dump should this pass result be dumped? * * @return the newly created ir_graph pass */ -ir_graph_pass_t *remove_confirms_pass(const char *name, int verify, int dump); +ir_graph_pass_t *remove_confirms_pass(const char *name); #endif diff --git a/include/libfirm/iroptimize.h b/include/libfirm/iroptimize.h index c5e1a143b..c150b1ba1 100644 --- a/include/libfirm/iroptimize.h +++ b/include/libfirm/iroptimize.h @@ -48,8 +48,6 @@ void optimize_cf(ir_graph *irg); * Creates an ir_graph pass for optimize_cf(). * * @param name the name of this pass or NULL - * @param verify should this pass be verified? - * @param dump should this pass result be dumped? * * @return the newly created ir_graph pass */ diff --git a/include/libfirm/irpass.h b/include/libfirm/irpass.h index dabfac629..8ab844de0 100644 --- a/include/libfirm/irpass.h +++ b/include/libfirm/irpass.h @@ -118,4 +118,58 @@ int ir_prog_pass_mgr_run(ir_prog_pass_manager_t *mgr); */ void term_prog_pass_mgr(ir_prog_pass_manager_t *mgr); +/** + * Creates an ir_graph pass for running void function(ir_graph *irg). + * Uses the default verifier and dumper. + * The pass returns always 0. + * + * @param name the name of this pass + * @param function the function to run + * + * @return the newly created ir_graph pass + */ +ir_graph_pass_t *def_graph_pass( + const char *name, void (*function)(ir_graph *irg)); + +/** + * Creates an ir_graph pass for running int function(ir_graph *irg). + * Uses the default verifier and dumper. + * The pass returns the return value of function. + * + * @param name the name of this pass + * @param function the function to run + * + * @return the newly created ir_graph pass + */ +ir_graph_pass_t *def_graph_pass_ret( + const char *name, int (*function)(ir_graph *irg)); + +/** + * Creates an ir_graph pass for running int function(ir_graph *irg). + * Uses the default verifier and dumper. + * The pass returns the return value of function. + * + * @param memory if non-NULL, an already allocated ir_graph_pass_t + * @param name the name of this pass + * @param function the function to run + * + * @return the newly created ir_graph pass + */ +ir_graph_pass_t *def_graph_pass_constructor( + ir_graph_pass_t *memory, + const char *name, int (*function)(ir_graph *irg, void *context)); + +/** + * Creates an ir_prog pass for running void function(). + * Uses the default verifier and dumper. + * The pass returns always 0. + * + * @param name the name of this pass + * @param function the function to run + * + * @return the newly created ir_graph pass + */ +ir_prog_pass_t *def_prog_pass( + const char *name, void (*function)(void)); + #endif diff --git a/include/libfirm/irvrfy.h b/include/libfirm/irvrfy.h index e3fde12c3..a7cbfecaf 100644 --- a/include/libfirm/irvrfy.h +++ b/include/libfirm/irvrfy.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved. + * Copyright (C) 1995-2009 University of Karlsruhe. All right reserved. * * This file is part of libFirm. * @@ -58,14 +58,17 @@ int irn_vrfy_irg_dump(ir_node *checknode, ir_graph *irg, const char **bad_string * Flags for irg_verify(). */ typedef enum _irg_verify_flags_t { - VRFY_NORMAL = 0, /**< check SSA property only if dominance information is available */ - VRFY_ENFORCE_SSA = 1 /**< check SSA property by enforcing the dominance information recalculation */ + VRFY_NORMAL = 0, /**< check SSA property only if dominance information is available */ + VRFY_ENFORCE_SSA = 1 /**< check SSA property by enforcing the dominance information recalculation */ } irg_verify_flags_t; /** * Calls irn_vrfy() for each node in irg. * Graph must be in state "op_pin_state_pinned". * + * @param irg the IR-graph t check + * @param flags one of irg_verify_flags_t + * * @return * NON-zero on success. */ @@ -76,14 +79,24 @@ int irg_verify(ir_graph *irg, unsigned flags); */ #define irg_vrfy(irg) irg_verify(irg, 0) +/** + * Creates an ir_graph pass for irg_verify(). + * + * @param name the name of this pass or NULL + * @param flags one of irg_verify_flags_t + * + * @return the newly created ir_graph pass + */ +ir_graph_pass_t *irg_verify_pass(const char *name, unsigned flags); + /** * Possible flags for irg_vrfy_bads(). */ enum verify_bad_flags_t { - BAD_CF = 1, /**< Bad nodes are allowed as predecessors of Blocks and Phis. */ - BAD_DF = 2, /**< Bad nodes are allowed as dataflow predecessors. */ - BAD_BLOCK = 4, /**< Bad nodes are allowed as Block input. */ - TUPLE = 8 /**< Tuple nodes are allowed. */ + BAD_CF = 1, /**< Bad nodes are allowed as predecessors of Blocks and Phis. */ + BAD_DF = 2, /**< Bad nodes are allowed as dataflow predecessors. */ + BAD_BLOCK = 4, /**< Bad nodes are allowed as Block input. */ + TUPLE = 8 /**< Tuple nodes are allowed. */ }; /** diff --git a/ir/ana/irconsconfirm.c b/ir/ana/irconsconfirm.c index 54689d7c9..1198034fc 100644 --- a/ir/ana/irconsconfirm.c +++ b/ir/ana/irconsconfirm.c @@ -35,6 +35,7 @@ #include "irgwalk.h" #include "irprintf.h" #include "irgopt.h" +#include "irpass.h" #include "irtools.h" #include "array_t.h" #include "debug.h" diff --git a/ir/common/irtools.c b/ir/common/irtools.c index bfd53797b..d5f52237a 100644 --- a/ir/common/irtools.c +++ b/ir/common/irtools.c @@ -166,80 +166,3 @@ void firm_pset_dump(pset *set) { ir_fprintf(stderr, "%+F\n", obj); } } - -/** - * Wrapper for running void function(ir_graph *irg) as an ir_graph pass. - */ -static int void_graph_wrapper(ir_graph *irg, void *context) { - void (*function)(ir_graph *irg) = context; - function(irg); - return 0; -} /* void_graph_wrapper */ - -/* Creates an ir_graph pass for running void function(ir_graph *irg). */ -ir_graph_pass_t *def_graph_pass( - const char *name, void (*function)(ir_graph *irg)) -{ - struct ir_graph_pass_t *pass = XMALLOCZ(ir_graph_pass_t); - - pass->kind = k_ir_graph_pass; - pass->run_on_irg = void_graph_wrapper; - pass->context = function; - pass->name = name; - - INIT_LIST_HEAD(&pass->list); - - return pass; -} /* def_graph_pass */ - -/** - * Wrapper for running void function(ir_graph *irg) as an ir_graph pass. - */ -static int int_graph_wrapper(ir_graph *irg, void *context) { - int (*function)(ir_graph *irg) = context; - return function(irg); -} /* int_graph_wrapper */ - -/* Creates an ir_graph pass for running void function(ir_graph *irg). */ -ir_graph_pass_t *def_graph_pass_ret( - const char *name, int (*function)(ir_graph *irg)) -{ - struct ir_graph_pass_t *pass = XMALLOCZ(ir_graph_pass_t); - - pass->kind = k_ir_graph_pass; - pass->run_on_irg = int_graph_wrapper; - pass->context = function; - pass->name = name; - - INIT_LIST_HEAD(&pass->list); - - return pass; -} /* def_graph_pass_ret */ - -/** - * Wrapper for running void function(void) as an ir_prog pass. - */ -static int void_prog_wrapper(ir_prog *irp, void *context) { - void (*function)(void) = context; - - (void)irp; - function(); - return 0; -} /* void_graph_wrapper */ - -/* Creates an ir_prog pass for running void function(void). */ -ir_prog_pass_t *def_prog_pass( - const char *name, - void (*function)(void)) -{ - struct ir_prog_pass_t *pass = XMALLOCZ(ir_prog_pass_t); - - pass->kind = k_ir_prog_pass; - pass->run_on_irprog = void_prog_wrapper; - pass->context = function; - pass->name = name; - - INIT_LIST_HEAD(&pass->list); - - return pass; -} /* def_prog_pass */ diff --git a/ir/common/irtools.h b/ir/common/irtools.h index f9072860b..ae9ba1152 100644 --- a/ir/common/irtools.h +++ b/ir/common/irtools.h @@ -105,43 +105,4 @@ void copy_irn_to_irg(ir_node *n, ir_graph *irg); */ ir_node *exact_copy(const ir_node *n); -/** - * Creates an ir_graph pass for running void function(ir_graph *irg). - * Uses the default verifier and dumper. - * The pass returns always 0. - * - * @param name the name of this pass - * @param function the function to run - * - * @return the newly created ir_graph pass - */ -ir_graph_pass_t *def_graph_pass( - const char *name, void (*function)(ir_graph *irg)); - -/** - * Creates an ir_graph pass for running int function(ir_graph *irg). - * Uses the default verifier and dumper. - * The pass returns the return value of function. - * - * @param name the name of this pass - * @param function the function to run - * - * @return the newly created ir_graph pass - */ -ir_graph_pass_t *def_graph_pass_ret( - const char *name, int (*function)(ir_graph *irg)); - -/** - * Creates an ir_prog pass for running void function(). - * Uses the default verifier and dumper. - * The pass returns always 0. - * - * @param name the name of this pass - * @param function the function to run - * - * @return the newly created ir_graph pass - */ -ir_prog_pass_t *def_prog_pass( - const char *name, void (*function)(void)); - #endif diff --git a/ir/ir/irpass.c b/ir/ir/irpass.c index 0d982e1c5..067391824 100644 --- a/ir/ir/irpass.c +++ b/ir/ir/irpass.c @@ -339,3 +339,97 @@ void ir_prog_pass_manager_set_run_idx( { mgr->run_idx = run_idx; } + +/** + * Wrapper for running void function(ir_graph *irg) as an ir_graph pass. + */ +static int void_graph_wrapper(ir_graph *irg, void *context) { + void (*function)(ir_graph *irg) = context; + function(irg); + return 0; +} /* void_graph_wrapper */ + +/* Creates an ir_graph pass for running void function(ir_graph *irg). */ +ir_graph_pass_t *def_graph_pass( + const char *name, void (*function)(ir_graph *irg)) +{ + struct ir_graph_pass_t *pass = XMALLOCZ(ir_graph_pass_t); + + pass->kind = k_ir_graph_pass; + pass->run_on_irg = void_graph_wrapper; + pass->context = function; + pass->name = name; + + INIT_LIST_HEAD(&pass->list); + + return pass; +} /* def_graph_pass */ + +/** + * Wrapper for running void function(ir_graph *irg) as an ir_graph pass. + */ +static int int_graph_wrapper(ir_graph *irg, void *context) { + int (*function)(ir_graph *irg) = context; + return function(irg); +} /* int_graph_wrapper */ + +/* Creates an ir_graph pass for running void function(ir_graph *irg). */ +ir_graph_pass_t *def_graph_pass_ret( + const char *name, int (*function)(ir_graph *irg)) +{ + struct ir_graph_pass_t *pass = XMALLOCZ(ir_graph_pass_t); + + pass->kind = k_ir_graph_pass; + pass->run_on_irg = int_graph_wrapper; + pass->context = function; + pass->name = name; + + INIT_LIST_HEAD(&pass->list); + + return pass; +} /* def_graph_pass_ret */ + +/* constructor for a default graph pass */ +ir_graph_pass_t *def_graph_pass_constructor( + ir_graph_pass_t *pass, + const char *name, int (*function)(ir_graph *irg, void *context)) { + if (pass == NULL) + pass = XMALLOCZ(ir_graph_pass_t); + pass->kind = k_ir_graph_pass; + pass->run_on_irg = function; + pass->context = pass; + pass->name = name; + + INIT_LIST_HEAD(&pass->list); + + return pass; +} /* def_graph_pass_constructor */ + + +/** + * Wrapper for running void function(void) as an ir_prog pass. + */ +static int void_prog_wrapper(ir_prog *irp, void *context) { + void (*function)(void) = context; + + (void)irp; + function(); + return 0; +} /* void_graph_wrapper */ + +/* Creates an ir_prog pass for running void function(void). */ +ir_prog_pass_t *def_prog_pass( + const char *name, + void (*function)(void)) +{ + struct ir_prog_pass_t *pass = XMALLOCZ(ir_prog_pass_t); + + pass->kind = k_ir_prog_pass; + pass->run_on_irprog = void_prog_wrapper; + pass->context = function; + pass->name = name; + + INIT_LIST_HEAD(&pass->list); + + return pass; +} /* def_prog_pass */ diff --git a/ir/ir/irvrfy.c b/ir/ir/irvrfy.c index 6333bfb74..99cd42085 100644 --- a/ir/ir/irvrfy.c +++ b/ir/ir/irvrfy.c @@ -36,6 +36,7 @@ #include "irprintf.h" #include "irouts.h" #include "irflag_t.h" +#include "irpass_t.h" /** if this flag is set, verify entity types in Load & Store nodes */ static int vrfy_entities = 0; @@ -2064,6 +2065,30 @@ int irg_verify(ir_graph *irg, unsigned flags) { return res; } +struct pass_t { + ir_graph_pass_t pass; + unsigned flags; +}; + +/** + * Wrapper to irg_verify to be run as an ir_graph pass. + */ +static int irg_verify_wrapper(ir_graph *irg, void *context) { + struct pass_t *pass = context; + irg_verify(irg, pass->flags); + /* do NOT rerun the pass if verify is ok :-) */ + return 0; +} + +/* Creates an ir_graph pass for irg_verify(). */ +ir_graph_pass_t *irg_verify_pass(const char *name, unsigned flags) { + struct pass_t *pass = XMALLOCZ(struct pass_t); + + pass->flags = flags; + return def_graph_pass_constructor( + &pass->pass, name ? name : "irg_verify", irg_verify_wrapper); +} + int irn_vrfy_irg_dump(ir_node *n, ir_graph *irg, const char **bad_string) { int res; firm_verification_t old = get_node_verification_mode(); diff --git a/ir/lower/lower_hl.c b/ir/lower/lower_hl.c index 946b72407..7614216b5 100644 --- a/ir/lower/lower_hl.c +++ b/ir/lower/lower_hl.c @@ -596,16 +596,9 @@ static int lower_highlevel_graph_wrapper(ir_graph *irg, void *context) { ir_graph_pass_t *lower_highlevel_graph_pass(const char *name, int lower_bitfields) { struct pass_t *pass = XMALLOCZ(struct pass_t); - pass->pass.kind = k_ir_graph_pass; - pass->pass.run_on_irg = lower_highlevel_graph_wrapper; - pass->pass.context = pass; - pass->pass.name = name; - - INIT_LIST_HEAD(&pass->pass.list); - pass->lower_bitfields = lower_bitfields; - - return &pass->pass; + return def_graph_pass_constructor( + &pass->pass, name ? name : "lower_hl", lower_highlevel_graph_wrapper); } /* lower_highlevel_graph_pass */ /* diff --git a/ir/opt/boolopt.c b/ir/opt/boolopt.c index 8279fd612..eb80d5ac2 100644 --- a/ir/opt/boolopt.c +++ b/ir/opt/boolopt.c @@ -35,7 +35,7 @@ #include "irprintf.h" #include "irnode_t.h" #include "tv.h" -#include "irtools.h" +#include "irpass.h" typedef struct cond_pair { ir_node *cmp_lo; diff --git a/ir/opt/cfopt.c b/ir/opt/cfopt.c index e04ffe71e..76160e58d 100644 --- a/ir/opt/cfopt.c +++ b/ir/opt/cfopt.c @@ -50,7 +50,7 @@ #include "irflag_t.h" #include "firmstat.h" -#include "irtools.h" +#include "irpass.h" #include "iropt_dbg.h" diff --git a/ir/opt/code_placement.c b/ir/opt/code_placement.c index 302707ea6..20ee73f4f 100644 --- a/ir/opt/code_placement.c +++ b/ir/opt/code_placement.c @@ -31,7 +31,7 @@ #include "irnode_t.h" #include "irouts.h" #include "irgopt.h" -#include "irtools.h" +#include "irpass.h" /** * Returns non-zero, is a block is not reachable from Start. diff --git a/ir/opt/combo.c b/ir/opt/combo.c index 7cdaa6ec2..6e9a39072 100644 --- a/ir/opt/combo.c +++ b/ir/opt/combo.c @@ -81,7 +81,7 @@ #include "array_t.h" #include "error.h" #include "irnodeset.h" -#include "irtools.h" +#include "irpass.h" #include "tv_t.h" #include "irprintf.h" diff --git a/ir/opt/convopt.c b/ir/opt/convopt.c index 4d0667905..a7f481c8e 100644 --- a/ir/opt/convopt.c +++ b/ir/opt/convopt.c @@ -49,7 +49,7 @@ #include "iredges_t.h" #include "irgwalk.h" #include "irprintf.h" -#include "irtools.h" +#include "irpass.h" DEBUG_ONLY(static firm_dbg_module_t *dbg); diff --git a/ir/opt/gvn_pre.c b/ir/opt/gvn_pre.c index ee164600e..129b1e15e 100644 --- a/ir/opt/gvn_pre.c +++ b/ir/opt/gvn_pre.c @@ -40,11 +40,11 @@ #include "iredges.h" #include "iropt_dbg.h" #include "debug.h" +#include "irpass.h" #include "irgraph_t.h" #include "irnode_t.h" #include "iropt_t.h" -#include "irtools.h" /** Additional info we need for every block. */ typedef struct block_info { diff --git a/ir/opt/ifconv.c b/ir/opt/ifconv.c index 0634cc0ad..db6a992fb 100644 --- a/ir/opt/ifconv.c +++ b/ir/opt/ifconv.c @@ -517,16 +517,9 @@ static int pass_wrapper(ir_graph *irg, void *context) { ir_graph_pass_t *opt_if_conv_pass( const char *name, const ir_settings_if_conv_t *params) { - struct pass_t *pass = xmalloc(sizeof(*pass)); - - pass->pass.kind = k_ir_prog_pass; - pass->pass.run_on_irg = pass_wrapper; - pass->pass.context = pass; - pass->pass.name = name ? name : "if_conv"; - + struct pass_t *pass = XMALLOCZ(struct pass_t); pass->params = params; - INIT_LIST_HEAD(&pass->pass.list); - - return &pass->pass; + return def_graph_pass_constructor( + &pass->pass, name ? name : "ifconv", pass_wrapper); } diff --git a/ir/opt/ircgopt.c b/ir/opt/ircgopt.c index 27940ab15..2b28f563f 100644 --- a/ir/opt/ircgopt.c +++ b/ir/opt/ircgopt.c @@ -43,6 +43,7 @@ #include "ircons.h" #include "cgana.h" #include "irtools.h" +#include "irpass.h" DEBUG_ONLY(static firm_dbg_module_t *dbg); diff --git a/ir/opt/jumpthreading.c b/ir/opt/jumpthreading.c index 57b53acd5..02ca3bf9f 100644 --- a/ir/opt/jumpthreading.c +++ b/ir/opt/jumpthreading.c @@ -44,7 +44,7 @@ #include "tv.h" #include "opt_confirms.h" #include "iropt_dbg.h" -#include "irtools.h" +#include "irpass.h" #undef AVOID_PHIB diff --git a/ir/opt/ldst2.c b/ir/opt/ldst2.c index c05b33063..d73a8f76a 100644 --- a/ir/opt/ldst2.c +++ b/ir/opt/ldst2.c @@ -41,7 +41,7 @@ #include "irdump.h" #include "irflag_t.h" #include "irprintf.h" -#include "irtools.h" +#include "irpass.h" #if +0 #define OPTIMISE_LOAD_AFTER_LOAD diff --git a/ir/opt/ldstopt.c b/ir/opt/ldstopt.c index f8e33df59..3cf50abba 100644 --- a/ir/opt/ldstopt.c +++ b/ir/opt/ldstopt.c @@ -43,7 +43,7 @@ #include "array_t.h" #include "irhooks.h" #include "iredges.h" -#include "irtools.h" +#include "irpass.h" #include "opt_polymorphy.h" #include "irmemory.h" #include "irphase_t.h" diff --git a/ir/opt/opt_frame.c b/ir/opt/opt_frame.c index 5c4217ec6..9aed1e296 100644 --- a/ir/opt/opt_frame.c +++ b/ir/opt/opt_frame.c @@ -33,7 +33,7 @@ #include "type_t.h" #include "irouts.h" #include "iredges.h" -#include "irtools.h" +#include "irpass.h" /* * Optimize the frame type of an irg by removing diff --git a/ir/opt/opt_ldst.c b/ir/opt/opt_ldst.c index 203541924..80cb8186d 100644 --- a/ir/opt/opt_ldst.c +++ b/ir/opt/opt_ldst.c @@ -42,7 +42,7 @@ #include "raw_bitset.h" #include "debug.h" #include "error.h" -#include "irtools.h" +#include "irpass.h" /* maximum number of output Proj's */ #define MAX_PROJ (pn_Load_max > pn_Store_max ? pn_Load_max : pn_Store_max) diff --git a/ir/opt/opt_osr.c b/ir/opt/opt_osr.c index 135e58f3b..8569b9943 100644 --- a/ir/opt/opt_osr.c +++ b/ir/opt/opt_osr.c @@ -1475,16 +1475,9 @@ static int pass_wrapper(ir_graph *irg, void *context) { ir_graph_pass_t *opt_osr_pass(const char *name, unsigned flags) { - struct pass_t *pass = xmalloc(sizeof(*pass)); - - pass->pass.kind = k_ir_prog_pass; - pass->pass.run_on_irg = pass_wrapper; - pass->pass.context = pass; - pass->pass.name = name ? name : "osr"; + struct pass_t *pass = XMALLOCZ(struct pass_t); pass->flags = flags; - - INIT_LIST_HEAD(&pass->pass.list); - - return &pass->pass; + return def_graph_pass_constructor( + &pass->pass, name ? name : "osr", pass_wrapper); } /* opt_osr_pass */ diff --git a/ir/opt/reassoc.c b/ir/opt/reassoc.c index 5c13a7b6b..1f02100c4 100644 --- a/ir/opt/reassoc.c +++ b/ir/opt/reassoc.c @@ -40,7 +40,7 @@ #include "irloop.h" #include "pdeq.h" #include "debug.h" -#include "irtools.h" +#include "irpass.h" //#define NEW_REASSOC diff --git a/ir/opt/return.c b/ir/opt/return.c index 7ffd2b27a..55bde8a9a 100644 --- a/ir/opt/return.c +++ b/ir/opt/return.c @@ -30,7 +30,7 @@ #include "ircons_t.h" #include "irnode_t.h" #include "irgmod.h" -#include "irtools.h" +#include "irpass.h" #define set_bit(n) (returns[(n) >> 3] |= 1 << ((n) & 7)) #define get_bit(n) (returns[(n) >> 3] & (1 << ((n) & 7))) diff --git a/ir/opt/scalar_replace.c b/ir/opt/scalar_replace.c index 072508647..59588da8b 100644 --- a/ir/opt/scalar_replace.c +++ b/ir/opt/scalar_replace.c @@ -40,6 +40,7 @@ #include "irgwalk.h" #include "irgmod.h" #include "irnode_t.h" +#include "irpass.h" #include "irtools.h" #include "xmalloc.h" #include "debug.h" diff --git a/ir/opt/tailrec.c b/ir/opt/tailrec.c index 0117e0af4..26d4c1f7c 100644 --- a/ir/opt/tailrec.c +++ b/ir/opt/tailrec.c @@ -45,7 +45,7 @@ #include "irouts.h" #include "irhooks.h" #include "ircons_t.h" -#include "irtools.h" +#include "irpass.h" DEBUG_ONLY(static firm_dbg_module_t *dbg); -- 2.20.1