fehler64 (emit a 0 if none of the addressmode things is set)
[libfirm] / ir / be / beschedrss.c
index 5ccf8d6..633e897 100644 (file)
@@ -1,12 +1,32 @@
+/*
+ * 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.
+ */
+
 /**
+ * @file
+ * @brief       Implementation of a register saturating list scheduler.
+ * @author      Christian Wuerdig
+ * @date        29.08.2006
+ * @version     $Id$
+ *
  * Implementation of a register saturating list scheduler
  * as described in: Sid-Ahmed-Ali Touati
  * Register Saturation in Superscalar and VLIW Codes
- *
- * @license This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
- * @author  Christian Wuerdig
- * @date    29.08.2006
- * @cvs-id  $Id$
  */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -137,7 +157,7 @@ typedef struct _rss {
        unsigned         max_height;      /**< maximum height in the current block */
        rss_opts_t       *opts;           /**< The options */
        be_lv_t          *liveness;       /**< The liveness information for this irg */
-       pset             *live_block;     /**< Values alive at end of block */
+       ir_nodeset_t      live_block;     /**< Values alive at end of block */
        const arch_register_class_t *cls; /**< The current register class */
        DEBUG_ONLY(firm_dbg_module_t *dbg);
 } rss_t;
@@ -198,7 +218,7 @@ static lc_opt_enum_int_var_t dump_var = {
 
 static const lc_opt_table_entry_t rss_option_table[] = {
        LC_OPT_ENT_ENUM_MASK("dump", "dump phases", &dump_var),
-       { NULL }
+       LC_OPT_LAST
 };
 
 /******************************************************************************
@@ -753,6 +773,7 @@ static int is_potential_killer(rss_t *rss, rss_irn_t *v, rss_irn_t *u) {
        plist_t *list;
        ir_node **arr;
        plist_element_t *el;
+       (void) rss;
 
        assert(is_Sink(v->irn) || ((plist_count(v->descendant_list) > 0 && v->descendants) || 1));
        assert(is_Sink(u->irn) || ((plist_count(u->consumer_list)   > 0 && u->consumer)    || 1));
@@ -2047,8 +2068,8 @@ static void process_block(ir_node *block, void *env) {
                DBG((rss->dbg, LEVEL_1, "register class %s\n", arch_register_class_name(cls)));
 
                /* Get all live value at end of Block having current register class */
-               rss->live_block = pset_new_ptr(10);
-               be_liveness_end_of_block(rss->liveness, rss->arch_env, rss->cls, rss->block, rss->live_block);
+               ir_nodeset_init(&rss->live_block);
+               be_liveness_end_of_block(rss->liveness, rss->arch_env, rss->cls, rss->block, &rss->live_block);
 
                /* reset the list of interesting nodes */
                plist_clear(rss->nodes);
@@ -2105,7 +2126,7 @@ static void process_block(ir_node *block, void *env) {
                */
                perform_value_serialization_heuristic(rss);
 
-               del_pset(rss->live_block);
+               ir_nodeset_destroy(&rss->live_block);
        }
 
        phase_free(&rss->ph);