fixed output of arm_emit_shift()
[libfirm] / ir / be / beschedtrace.c
index 8ccfdeb..a6118aa 100644 (file)
@@ -1,9 +1,28 @@
+/*
+ * 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.
+ */
+
 /**
- * Implements a trace scheduler as presented in Muchnik[TM].
- * Originally implemented by Michael Beck.
- * @author Christian Wuerdig
- * @date   28.08.2006
- * @cvs-id $Id$
+ * @file
+ * @brief       Implements a trace scheduler as presented in Muchnik[TM].
+ * @author      Michael Beck
+ * @date        28.08.2006
+ * @version     $Id$
  */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -473,6 +492,7 @@ static trace_env_t *trace_init(const arch_env_t *arch_env, ir_graph *irg) {
        env->liveness   = be_liveness(irg);
        FIRM_DBG_REGISTER(env->dbg, "firm.be.sched.trace");
 
+       be_liveness_assure_chk(env->liveness);
        memset(env->sched_info, 0, nn * sizeof(*(env->sched_info)));
 
        return env;
@@ -519,6 +539,7 @@ static ir_node *muchnik_select(void *block_env, ir_nodeset_t *ready_set, ir_node
        ir_nodeset_iterator_t iter;
        sched_timestep_t max_delay = 0;
        ir_node *irn;
+       (void) live_set;
 
        /* calculate the max delay of all candidates */
        foreach_ir_nodeset(ready_set, irn, iter) {
@@ -632,7 +653,7 @@ static ir_node *heuristic_select(void *block_env, ir_nodeset_t *ns, ir_nodeset_t
                        int sign  = rdiff < 0;
                        int chg   = (rdiff < 0 ? -rdiff : rdiff) << PRIO_CHG_PRESS;
 
-                       //reg_fact = chg << cur_pressure;
+                       /* reg_fact = chg << cur_pressure; */
                        reg_fact = chg * cur_pressure;
                        if (reg_fact < chg)
                                reg_fact = INT_MAX - 2;