int iCodeSeq = 0;
hTab *liveRanges = NULL;
hTab *iCodehTab = NULL;
+hTab *iCodeSeqhTab = NULL;
/*-----------------------------------------------------------------*/
/* sequenceiCode - creates a sequence number for the iCode & add */
ic->seq = ++iCodeSeq;
ic->depth = ebbs[i]->depth;
hTabAddItem (&iCodehTab, ic->key, ic);
+ hTabAddItem (&iCodeSeqhTab, ic->seq, ic);
}
ebbs[i]->lSeq = iCodeSeq;
}
if (lic->op == CALL || lic->op == PCALL) break;
}
/* found it : mark */
- if (lic) torange = lic->seq;
+ if (lic) torange = lic->prev->seq;
}
/* if this is the last use then if this block belongs
to a loop & some definition comes into the loop
ic->rlive = bitVectSetBit (ic->rlive, lrange->key);
}
}
+#if 0
/* overlapping live ranges should be eliminated */
if (ASSIGN_ITEMP_TO_ITEMP (ic)) {
if (SPIL_LOC(IC_RIGHT(ic)) == SPIL_LOC(IC_RESULT(ic)) && /* left & right share the same spil location */
SPIL_LOC(IC_RIGHT(ic)) = NULL; /* then cannot share */
}
}
+#endif
}
}
}
iCodeSeq = 0;
setToNull ((void **) &iCodehTab);
iCodehTab = newHashTable (iCodeKey);
+ setToNull ((void **) &iCodeSeqhTab);
+ iCodeSeqhTab = newHashTable (iCodeKey);
sequenceiCode (ebbs, count);
/* call routine to mark the from & to live ranges for