-------------------------------------------------------------------------*/
#include "common.h"
-#include "newalloc.h"
int eBBNum = 0;
set *graphEdges = NULL; /* list of edges in this flow graph */
{
eBBlock *ebb;
- ebb = Safe_calloc (1, sizeof (eBBlock));
+ ebb = Safe_alloc (sizeof (eBBlock));
return ebb;
}
{
edge *ep;
- ep = Safe_calloc (1, sizeof (edge));
+ ep = Safe_alloc (sizeof (edge));
ep->from = from;
ep->to = to;
if (!dumpFilesPtr->filePtr) {
// not used before, create it
- strcpy (buffer, srcFileName);
- strcat (buffer, dumpFilesPtr->ext);
- if (!(dumpFilesPtr->filePtr = fopen (buffer, "w"))) {
- werror (E_FILE_OPEN_ERR, buffer);
+ strcpy (scratchFileName, srcFileName);
+ strcat (scratchFileName, dumpFilesPtr->ext);
+ if (!(dumpFilesPtr->filePtr = fopen (scratchFileName, "w"))) {
+ werror (E_FILE_OPEN_ERR, scratchFileName);
exit (1);
}
- //dprintf ("created: %s\n", buffer);
- } else {
- //dprintf ("appended: %s%s\n", srcFileName, dumpFilesPtr->ext);
- }
+ }
return dumpFilesPtr->filePtr;
}
} else {
file = stdout;
}
-
+
+ if (currFunc)
+ fprintf(file,"------------- Func %s -------------\n",currFunc->name);
for (sym = hTabFirstItem (liveRanges, &k); sym;
sym = hTabNextItem (liveRanges, &k))
{
{
fprintf (file, "}{ sir@ %s", sym->usl.spillLoc->rname);
}
- fprintf (file, "}");
-
- /* if assigned to registers */
- if (sym->nRegs)
- {
- if (sym->isspilt)
- {
- if (!sym->remat)
- if (sym->usl.spillLoc)
- fprintf (file, "[%s]", (sym->usl.spillLoc->rname[0] ?
- sym->usl.spillLoc->rname :
- sym->usl.spillLoc->name));
- else
- fprintf (file, "[err]");
- else
- fprintf (file, "[remat]");
- }
- else
- {
- int i;
- fprintf (file, "[");
- for (i = 0; i < sym->nRegs; i++)
- fprintf (file, "%s ", port->getRegName (sym->regs[i]));
- fprintf (file, "]");
- }
- }
+ fprintf (file, "} clashes with ");
+ bitVectDebugOn(sym->clashes,file);
fprintf (file, "\n");
}
bitVectDebugOn (ebbs[i]->ldefs, of);
fprintf (of, "\npointers Set bitvector :");
bitVectDebugOn (ebbs[i]->ptrsSet, of);
+ if (ebbs[i]->isLastInLoop) {
+ fprintf (of, "\nInductions Set bitvector :");
+ bitVectDebugOn (ebbs[i]->linds, of);
+ }
fprintf (of, "\n----------------------------------------------------------------\n");
printiCChain (ebbs[i]->sch, of);
}
{
ebb->hasFcall = 1;
if (currFunc)
- currFunc->hasFcall = 1;
+ FUNC_HASFCALL(currFunc->type) = 1;
}
/* if the next one is a label */
/* allocate for the first entry */
- ebbs = Safe_calloc (1, sizeof (eBBlock **));
+ ebbs = Safe_alloc (sizeof (eBBlock **));
while (loop)
{