/*-----------------------------------------------------------------*/
/* isSpiltOnStack - returns true if the spil location is on stack */
+/* or otherwise needs a pointer register */
/*-----------------------------------------------------------------*/
static bool
isSpiltOnStack (symbol * sym)
if (!sym->usl.spillLoc)
return FALSE;
+ if (sym->usl.spillLoc->onStack || sym->usl.spillLoc->iaccess)
+ return TRUE;
+
etype = getSpec (sym->usl.spillLoc->type);
if (IN_STACK (etype))
return TRUE;
selectS = liveRangesWith (lrcs, bitType, ebp, ic);
for (sym = setFirstItem (selectS); sym; sym = setNextItem (selectS))
- {
+ {
bitVectUnSetBit (lrcs, sym->key);
}
}
if (!sym->spillA || !sym->clashes || sym->remat) continue ;
+ /* if spilt in direct space the original rname is lost */
+ if (sym->usl.spillLoc && (IN_DIRSPACE (SPEC_OCLS (sym->usl.spillLoc->etype))))
+ continue;
+
/* find the liveRanges this one clashes with, that are
still assigned to registers & mark the registers as used*/
for ( i = 0 ; i < sym->clashes->size ; i ++) {
IS_SYMOP (IC_RIGHT (ic)) &&
OP_SYMBOL (IC_RIGHT (ic))->remat &&
!IS_CAST_ICODE(OP_SYMBOL (IC_RIGHT (ic))->rematiCode) &&
+ !isOperandGlobal(IC_RESULT(ic)) && /* due to bug 1618050 */
bitVectnBitsOn (OP_SYMBOL (IC_RESULT (ic))->defs) <= 1)
{
OP_SYMBOL (IC_RESULT (ic))->remat =
/* pack registers for accumulator use, when the
result of an arithmetic or bit wise operation
has only one use, that use is immediately following
- the defintion and the using iCode has only one
+ the definition and the using iCode has only one
operand or has two operands but one is literal &
the result of that operation is not on stack then
we can leave the result of this operation in acc:b