if (!dumpFilesPtr->filePtr) {
// not used before, create it
- strcpy (scratchFileName, srcFileName);
- strcat (scratchFileName, dumpFilesPtr->ext);
+ strncpyz (scratchFileName, dstFileName, PATH_MAX);
+ strncatz (scratchFileName, dumpFilesPtr->ext, PATH_MAX);
if (!(dumpFilesPtr->filePtr = fopen (scratchFileName, "w"))) {
werror (E_FILE_OPEN_ERR, scratchFileName);
exit (1);
for (i = 0; i < count; i++)
{
fprintf (of, "\n----------------------------------------------------------------\n");
- fprintf (of, "Basic Block %s : loop Depth = %d noPath = %d , lastinLoop = %d\n",
+ fprintf (of, "Basic Block %s : loop Depth(lSeq) = %d(%d) noPath = %d , lastinLoop = %d\n",
ebbs[i]->entryLabel->name,
ebbs[i]->depth,
+ (0 /* for now */ &
+ ebbs[i]->depth) ? findLoopEndSeq(ebbs[i]->partOfLoop) : 0,
ebbs[i]->noPath,
ebbs[i]->isLastInLoop);
fprintf (of, "\ndefines bitVector :");
ebb->entryLabel = ic->argLabel.label;
else
{
- sprintf (buffer, "_eBBlock%d", eBBNum++);
+ SNPRINTF (buffer, sizeof(buffer), "_eBBlock%d", eBBNum++);
ebb->entryLabel = newSymbol (buffer, 1);
ebb->entryLabel->key = labelKey++;
}
void
remiCodeFromeBBlock (eBBlock * ebb, iCode * ic)
{
+ wassert (ic->seq>=ebb->fSeq && ic->seq<=ebb->lSeq);
if (ic->prev)
ic->prev->next = ic->next;
else
{
bitVectUnSetBit (OP_USES (IC_COND (ic)), ic->key);
IC_COND (ic) = operandFromOperand (dest);
- OP_USES (dest) = bitVectSetBit (OP_USES (dest), ic->key);
+ OP_USES_SET ((dest), bitVectSetBit (OP_USES (dest), ic->key));
continue;
}
bitVectUnSetBit (OP_USES (IC_RIGHT (ic)), ic->key);
IC_RIGHT (ic) = operandFromOperand (dest);
IC_RIGHT (ic)->isaddr = 0;
- OP_USES (dest) = bitVectSetBit (OP_USES (dest), ic->key);
+ OP_USES_SET ((dest), bitVectSetBit (OP_USES (dest), ic->key));
}
if (isOperandEqual (IC_LEFT (ic), src))
IC_LEFT (ic) = operandFromOperand (dest);
IC_LEFT (ic)->isaddr = 0;
}
- OP_USES (dest) = bitVectSetBit (OP_USES (dest), ic->key);
+ OP_USES_SET ((dest), bitVectSetBit (OP_USES (dest), ic->key));
}
/* special case for pointer sets */
bitVectUnSetBit (OP_USES (IC_RESULT (ic)), ic->key);
IC_RESULT (ic) = operandFromOperand (dest);
IC_RESULT (ic)->isaddr = 1;
- OP_USES (dest) = bitVectSetBit (OP_USES (dest), ic->key);
+ OP_USES_SET ((dest), bitVectSetBit (OP_USES (dest), ic->key));
}
}
}