projects
/
fw
/
sdcc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
See Changelog 1.204
[fw/sdcc]
/
src
/
SDCCBBlock.c
diff --git
a/src/SDCCBBlock.c
b/src/SDCCBBlock.c
index dac9d8ec5ce3019245d2327fb0c88818da07628b..51b2cd69a0ac949946d0e7396001c807b43907d0 100644
(file)
--- a/
src/SDCCBBlock.c
+++ b/
src/SDCCBBlock.c
@@
-84,9
+84,9
@@
newEdge (eBBlock * from, eBBlock * to)
}
/*-----------------------------------------------------------------*/
}
/*-----------------------------------------------------------------*/
-/*
appendDumpFile - if not already created, create the dump file
*/
+/*
createDumpFile - create the dump file
*/
/*-----------------------------------------------------------------*/
/*-----------------------------------------------------------------*/
-FILE *
append
DumpFile (int id) {
+FILE *
create
DumpFile (int id) {
struct _dumpFiles *dumpFilesPtr=dumpFiles;
while (dumpFilesPtr->id) {
struct _dumpFiles *dumpFilesPtr=dumpFiles;
while (dumpFilesPtr->id) {
@@
-96,7
+96,7
@@
FILE *appendDumpFile (int id) {
}
if (!dumpFilesPtr->id) {
}
if (!dumpFilesPtr->id) {
- fprintf (stdout, "internal error:
append
DumpFile: unknown dump file.\n");
+ fprintf (stdout, "internal error:
create
DumpFile: unknown dump file.\n");
exit (1);
}
exit (1);
}
@@
-121,7
+121,6
@@
void closeDumpFiles() {
for (dumpFilesPtr=dumpFiles; dumpFilesPtr->id; dumpFilesPtr++) {
if (dumpFilesPtr->filePtr) {
fclose (dumpFilesPtr->filePtr);
for (dumpFilesPtr=dumpFiles; dumpFilesPtr->id; dumpFilesPtr++) {
if (dumpFilesPtr->filePtr) {
fclose (dumpFilesPtr->filePtr);
- //dprintf ("closed %s\n", dumpFilesPtr->ext);
}
}
}
}
}
}
@@
-137,7
+136,7
@@
dumpLiveRanges (int id, hTab * liveRanges)
int k;
if (id) {
int k;
if (id) {
- file=
append
DumpFile(id);
+ file=
create
DumpFile(id);
} else {
file = stdout;
}
} else {
file = stdout;
}
@@
-180,7
+179,7
@@
dumpEbbsToFileExt (int id, eBBlock ** ebbs, int count)
int i;
if (id) {
int i;
if (id) {
- of=
append
DumpFile(id);
+ of=
create
DumpFile(id);
} else {
of = stdout;
}
} else {
of = stdout;
}
@@
-188,11
+187,10
@@
dumpEbbsToFileExt (int id, eBBlock ** ebbs, int count)
for (i = 0; i < count; i++)
{
fprintf (of, "\n----------------------------------------------------------------\n");
for (i = 0; i < count; i++)
{
fprintf (of, "\n----------------------------------------------------------------\n");
- fprintf (of, "Basic Block %s : loop Depth(lSeq) = %d(%d) noPath = %d , lastinLoop = %d\n",
+ fprintf (of, "Basic Block %d %s : loop Depth = %d noPath = %d lastinLoop = %d\n",
+ ebbs[i]->dfnum,
ebbs[i]->entryLabel->name,
ebbs[i]->depth,
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 :");
ebbs[i]->noPath,
ebbs[i]->isLastInLoop);
fprintf (of, "\ndefines bitVector :");
@@
-218,14
+216,14
@@
eBBlock *
iCode2eBBlock (iCode * ic)
{
iCode *loop;
iCode2eBBlock (iCode * ic)
{
iCode *loop;
- eBBlock *ebb = neweBBlock (); /* a
llocate an entry */
+ eBBlock *ebb = neweBBlock (); /* allocate an entry */
/* put the first one unconditionally */
ebb->sch = ic;
/* if this is a label then */
if (ic->op == LABEL)
/* put the first one unconditionally */
ebb->sch = ic;
/* if this is a label then */
if (ic->op == LABEL)
- ebb->entryLabel = ic->
argLabel.
label;
+ ebb->entryLabel = ic->label;
else
{
SNPRINTF (buffer, sizeof(buffer), "_eBBlock%d", eBBNum++);
else
{
SNPRINTF (buffer, sizeof(buffer), "_eBBlock%d", eBBNum++);
@@
-565,7
+563,7
@@
replaceSymBySym (set * sset, operand * src, operand * dest)
{
bitVectUnSetBit (OP_USES (IC_COND (ic)), ic->key);
IC_COND (ic) = operandFromOperand (dest);
{
bitVectUnSetBit (OP_USES (IC_COND (ic)), ic->key);
IC_COND (ic) = operandFromOperand (dest);
- OP_USES
_SET ((dest), bitVectSetBit (OP_USES (dest), ic->key)
);
+ OP_USES
(dest)=bitVectSetBit (OP_USES (dest), ic->key
);
continue;
}
continue;
}
@@
-574,7
+572,7
@@
replaceSymBySym (set * sset, operand * src, operand * dest)
bitVectUnSetBit (OP_USES (IC_RIGHT (ic)), ic->key);
IC_RIGHT (ic) = operandFromOperand (dest);
IC_RIGHT (ic)->isaddr = 0;
bitVectUnSetBit (OP_USES (IC_RIGHT (ic)), ic->key);
IC_RIGHT (ic) = operandFromOperand (dest);
IC_RIGHT (ic)->isaddr = 0;
- OP_USES
_SET ((dest), bitVectSetBit (OP_USES (dest), ic->key)
);
+ OP_USES
(dest)=bitVectSetBit (OP_USES (dest), ic->key
);
}
if (isOperandEqual (IC_LEFT (ic), src))
}
if (isOperandEqual (IC_LEFT (ic), src))
@@
-590,7
+588,7
@@
replaceSymBySym (set * sset, operand * src, operand * dest)
IC_LEFT (ic) = operandFromOperand (dest);
IC_LEFT (ic)->isaddr = 0;
}
IC_LEFT (ic) = operandFromOperand (dest);
IC_LEFT (ic)->isaddr = 0;
}
- OP_USES
_SET ((dest), bitVectSetBit (OP_USES (dest), ic->key)
);
+ OP_USES
(dest)=bitVectSetBit (OP_USES (dest), ic->key
);
}
/* special case for pointer sets */
}
/* special case for pointer sets */
@@
-600,7
+598,7
@@
replaceSymBySym (set * sset, operand * src, operand * dest)
bitVectUnSetBit (OP_USES (IC_RESULT (ic)), ic->key);
IC_RESULT (ic) = operandFromOperand (dest);
IC_RESULT (ic)->isaddr = 1;
bitVectUnSetBit (OP_USES (IC_RESULT (ic)), ic->key);
IC_RESULT (ic) = operandFromOperand (dest);
IC_RESULT (ic)->isaddr = 1;
- OP_USES
_SET ((dest), bitVectSetBit (OP_USES (dest), ic->key)
);
+ OP_USES
(dest)=bitVectSetBit (OP_USES (dest), ic->key
);
}
}
}
}
}
}