remove irsimpletype stuff (unused/broken)
[libfirm] / ir / be / bespillutil.c
index 1aeb1a1..7d30f0c 100644 (file)
@@ -21,7 +21,7 @@
  * @file
  * @brief       implementation of the spill/reload placement abstraction layer
  * @author      Daniel Grund, Sebastian Hack, Matthias Braun
- * @date               29.09.2005
+ * @date        29.09.2005
  * @version     $Id$
  */
 #include "config.h"
@@ -152,7 +152,7 @@ spill_env_t *be_new_spill_env(ir_graph *irg)
        const arch_env_t *arch_env = be_get_irg_arch_env(irg);
 
        spill_env_t *env = XMALLOC(spill_env_t);
-       env->spills                     = new_set(cmp_spillinfo, 1024);
+       env->spills         = new_set(cmp_spillinfo, 1024);
        env->irg            = irg;
        env->arch_env       = arch_env;
        ir_nodeset_init(&env->mem_phis);
@@ -358,7 +358,7 @@ void be_add_reload_at_end(spill_env_t *env, ir_node *to_spill,
 }
 
 void be_add_reload_on_edge(spill_env_t *env, ir_node *to_spill, ir_node *block,
-                           int pos,    const arch_register_class_t *reload_cls,
+                           int pos, const arch_register_class_t *reload_cls,
                            int allow_remat)
 {
        ir_node *before = get_block_insertion_point(block, pos);
@@ -427,7 +427,8 @@ static void spill_irn(spill_env_t *env, spill_info_t *spillinfo)
         * and simply always available. */
        if (!sched_is_scheduled(insn)) {
                /* override spillinfos or create a new one */
-               spillinfo->spills->spill = new_NoMem();
+               ir_graph *irg = get_irn_irg(to_spill);
+               spillinfo->spills->spill = new_r_NoMem(irg);
                DB((dbg, LEVEL_1, "don't spill %+F use NoMem\n", to_spill));
                return;
        }
@@ -549,7 +550,7 @@ static void spill_node(spill_env_t *env, spill_info_t *spillinfo)
 static int is_value_available(spill_env_t *env, const ir_node *arg,
                               const ir_node *reloader)
 {
-       if (is_Unknown(arg) || arg == new_NoMem())
+       if (is_Unknown(arg) || is_NoMem(arg))
                return 1;
 
        if (be_is_Spill(skip_Proj_const(arg)))
@@ -569,7 +570,7 @@ static int is_value_available(spill_env_t *env, const ir_node *arg,
        if (arch_irn_is_ignore(arg))
                return 1;
 
-       return 0;
+       return 0;
 }
 
 /**
@@ -773,11 +774,12 @@ static void determine_spill_costs(spill_env_t *env, spill_info_t *spillinfo)
         * predecessor (of a PhiM) but this test might match other things too...
         */
        if (!sched_is_scheduled(insn)) {
+               ir_graph *irg = get_irn_irg(to_spill);
                /* override spillinfos or create a new one */
                spill_t *spill = OALLOC(&env->obst, spill_t);
                spill->after = NULL;
                spill->next  = NULL;
-               spill->spill = new_NoMem();
+               spill->spill = new_r_NoMem(irg);
 
                spillinfo->spills      = spill;
                spillinfo->spill_costs = 0;