X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbedomfront.c;h=79aad6e05a622c330934722bd5d745f710f2a225;hb=1872920c09708b361d06c0dc9f4c1fd0a03544f5;hp=c5fbf601fc01a8bc04e2cdf896813e9421cb5aa8;hpb=4d5c3365a58cba59993045a9e08e686d8ae079a7;p=libfirm diff --git a/ir/be/bedomfront.c b/ir/be/bedomfront.c index c5fbf601f..79aad6e05 100644 --- a/ir/be/bedomfront.c +++ b/ir/be/bedomfront.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved. + * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved. * * This file is part of libFirm. * @@ -19,18 +19,15 @@ /** * @file + * @brief Algorithms for computing normal and iterated dominance frontiers. * @author Sebastian Hack, Daniel Grund - * @date: 04.05.2005 + * @date 04.05.2005 * @version $Id$ - * Copyright: (c) Universitaet Karlsruhe - * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif -#include "bedomfront.h" - #include "obst.h" #include "pmap.h" #include "pdeq.h" @@ -38,6 +35,9 @@ #include "array.h" #include "irgraph.h" #include "iredges_t.h" +#include "irnodeset.h" + +#include "bedomfront.h" /** * The dominance frontier for a graph. @@ -140,6 +140,7 @@ ir_node **be_get_dominance_frontier(const be_dom_front_info_t *info, return pmap_get(info->df_map, block); } +#if 0 /** * Calculates the iterated dominance frontier of a set of blocks. * Also clears the link field of the returned blocks as a side effect @@ -155,20 +156,19 @@ void be_get_iterated_dominance_frontiers(const be_dom_front_info_t *domfronts, waitq_put(worklist, block); } - while(!pdeq_empty(worklist)) { - int i; - ir_node *block = waitq_get(worklist); - ir_node **domfront = be_get_dominance_frontier(domfronts, block); - int domfront_len = ARR_LEN(domfront); + while(! waitq_empty(worklist)) { + int i; + ir_node *block = waitq_get(worklist); + ir_node **domfront = be_get_dominance_frontier(domfronts, block); + int domfront_len = ARR_LEN(domfront); for (i = 0; i < domfront_len; ++i) { ir_node *y = domfront[i]; - if(!ir_nodeset_insert(blocks, y)) - continue; - - waitq_put(worklist, y); + if (ir_nodeset_insert(blocks, y)) + waitq_put(worklist, y); } } del_waitq(worklist); } +#endif