X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbecopyopt.c;h=ca32b86b779e7ee16bb16c762e4ac13c14c5eb61;hb=bb9f2e36362333c6635b89f5258171b06c786608;hp=9ee05e6f91e50e6a688eb8c8ee8bd4e22c88195e;hpb=8cd2221a4b9f6636f627c3d6e9df131bf01d5abc;p=libfirm diff --git a/ir/be/becopyopt.c b/ir/be/becopyopt.c index 9ee05e6f9..ca32b86b7 100644 --- a/ir/be/becopyopt.c +++ b/ir/be/becopyopt.c @@ -29,9 +29,7 @@ * - Register-constrained nodes * - Two-address code instructions */ -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include "execfreq.h" #include "xmalloc.h" @@ -215,10 +213,14 @@ void free_copy_opt(copy_opt_t *co) { free(co); } -int co_is_optimizable_root(const copy_opt_t *co, ir_node *irn) { +/** + * Checks if a node is optimizable, viz. has something to do with coalescing + * @param irn The irn to check + */ +static int co_is_optimizable_root(ir_node *irn) +{ const arch_register_req_t *req; const arch_register_t *reg; - (void)co; // TODO remove parameter if (arch_irn_is(irn, ignore)) return 0; @@ -380,7 +382,7 @@ static void co_collect_units(ir_node *irn, void *env) { if (!is_curr_reg_class(co, irn)) return; - if (!co_is_optimizable_root(co, irn)) + if (!co_is_optimizable_root(irn)) return; /* Init a new unit */ @@ -759,7 +761,7 @@ static void add_edge(copy_opt_t *co, ir_node *n1, ir_node *n2, int costs) { nbr->costs += costs; } -static INLINE void add_edges(copy_opt_t *co, ir_node *n1, ir_node *n2, int costs) { +static inline void add_edges(copy_opt_t *co, ir_node *n1, ir_node *n2, int costs) { if (! be_ifg_connected(co->cenv->ifg, n1, n2)) { add_edge(co, n1, n2, costs); add_edge(co, n2, n1, costs);