X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fopt%2Fgvn_pre.c;h=eca77db2680f08630572b7a8c2c01fe394ad7949;hb=fa9649a9766ace19d23acf80c0ef6791390b0dea;hp=17a9cc4bdc6c8715764230ae6e6d9a535ad29a48;hpb=024ea3b2531862266f13ccaea5a92d3d07f29e09;p=libfirm diff --git a/ir/opt/gvn_pre.c b/ir/opt/gvn_pre.c index 17a9cc4bd..eca77db26 100644 --- a/ir/opt/gvn_pre.c +++ b/ir/opt/gvn_pre.c @@ -1,3 +1,22 @@ +/* + * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved. + * + * This file is part of libFirm. + * + * This file may be distributed and/or modified under the terms of the + * GNU General Public License version 2 as published by the Free Software + * Foundation and appearing in the file LICENSE.GPL included in the + * packaging of this file. + * + * Licensees holding valid libFirm Professional Edition licenses may use + * this file in accordance with the libFirm Commercial License. + * Agreement provided with the Software. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE. + */ + /* * Project: libFIRM * File name: ir/opt/gvn_pre.c @@ -7,20 +26,12 @@ * Created: * CVS-ID: $Id$ * Copyright: (c) 1998-2006 Universität Karlsruhe - * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif -#ifdef HAVE_MALLOC_H -# include -#endif -#ifdef HAVE_ALLOCA_H -# include -#endif - #include #include "irgraph_t.h" @@ -37,9 +48,10 @@ #include "irgmod.h" #include "debug.h" #include "gvn_pre.h" +#include "xmalloc.h" /** The debug module handle. */ -static firm_dbg_module_t *dbg; +DEBUG_ONLY(static firm_dbg_module_t *dbg;) /** A value set. */ @@ -130,13 +142,16 @@ static int node_set_count(node_set *set) { return pset_count(set); } +#if 0 /** computes dst = dst \/ src for node sets */ static void node_union(node_set *dst, node_set *src) { ir_node *entry; - node_set_foreach(entry, src) + node_set_foreach(entry, src) { node_add(dst, entry); + } } +#endif /** * Lookup a node in a node set. @@ -438,6 +453,7 @@ static ir_node *translate(ir_node *node, ir_node *block, int pos, pre_env *env) return node; } +#if 0 /** * Implements phi_translate. */ @@ -459,6 +475,7 @@ static ir_node *deep_phi_translate(ir_node *node, ir_node *block, int pos, pre_e return res; } /* phi_translate */ +#endif /** * Implements phi_translate. @@ -468,8 +485,6 @@ static ir_node *phi_translate(ir_node *node, ir_node *block, int pos, pre_env *e ir_node *nn, *res; int i, arity; struct obstack *old; - ir_node *pred_block = get_Block_cfgpred_block(block, pos); - block_info *pred_info = get_block_info(pred_block); if (is_Phi(node)) { if (get_irn_intra_n(node, -1) == block) @@ -696,6 +711,7 @@ static void compute_antic(ir_node *block, void *ctx) } // clean_node_set(info->antic_in, block); + (void) clean_node_set; dump_node_set(info->antic_in, "Antic_in", block); if (size != node_set_count(info->antic_in)) {