BugFix: the spillslot coalescer need the ProjM nodes ...
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Wed, 14 May 2008 12:37:44 +0000 (12:37 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Wed, 14 May 2008 12:37:44 +0000 (12:37 +0000)
[r19612]

ir/be/bespillslots.c

index 43149be..f9cb3da 100644 (file)
@@ -127,12 +127,7 @@ static spill_t *collect_spill(be_fec_env_t *env, ir_node *node,
                                      const ir_mode *mode, int align)
 {
        spill_t spill, *res;
-       int     hash;
-
-       /* beware: although untypical there might be store nodes WITH Proj's,
-          vfisttp in ia32 for instance */
-       node = skip_Proj(node);
-       hash = hash_irn(node);
+       int     hash = hash_irn(node);
 
        /* insert into set of spills if not already there */
        spill.spill = node;
@@ -573,6 +568,8 @@ static void assign_spill_entity(const arch_env_t *arch_env, ir_node *node,
                return;
        }
 
+       /* beware: we might have Stores with Memory Proj's, ia32 fisttp for instance */
+       node = skip_Proj(node);
        assert(arch_get_frame_entity(arch_env, node) == NULL);
        arch_set_frame_entity(arch_env, node, entity);
 }
@@ -668,7 +665,7 @@ static void assign_spillslots(be_fec_env_t *env)
 
        for(i = 0; i < ARR_LEN(env->reloads); ++i) {
                ir_node            *reload    = env->reloads[i];
-               ir_node            *spillnode = skip_Proj(get_memory_edge(reload));
+               ir_node            *spillnode = get_memory_edge(reload);
                spill_t            *spill     = get_spill(env, spillnode);
                const spill_slot_t *slot      = & spillslots[spill->spillslot];