From 948f2c7c5179a6aeff9286cb4fbdf9ebc55e16b8 Mon Sep 17 00:00:00 2001 From: epetrich Date: Fri, 26 Sep 2003 08:03:12 +0000 Subject: [PATCH] * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746 * src/asm.c (printILine): Fixed bug #811015 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2908 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- ChangeLog | 5 +++++ src/SDCCdflow.c | 16 ++++++++++++---- src/asm.c | 5 ++++- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3e85cc2d..161e0ede 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-09-26 Erik Petrich + + * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746 + * src/asm.c (printILine): Fixed bug #811015 + 2003-09-22 Jesus Calvino-Fraga *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and diff --git a/src/SDCCdflow.c b/src/SDCCdflow.c index 4c298fe4..b76055e5 100644 --- a/src/SDCCdflow.c +++ b/src/SDCCdflow.c @@ -151,6 +151,7 @@ DEFSETFUNC (mergeInDefs) } + /*-----------------------------------------------------------------*/ /* computeDataFlow - does computations for data flow accross blocks */ /*-----------------------------------------------------------------*/ @@ -170,7 +171,8 @@ computeDataFlow (eBBlock ** ebbs, int count) { set *pred; - set *oldOut; + set *oldOutExprs = NULL; + bitVect *oldOutDefs = NULL; int firstTime; eBBlock *pBlock; @@ -182,9 +184,12 @@ computeDataFlow (eBBlock ** ebbs, int count) /* get blocks that can come to this block */ pred = edgesTo (ebbs[i]); - /* make a copy of the outExpressions : to be */ + /* make a copy of the outExpressions or outDefs : to be */ /* used for iteration */ - oldOut = setFromSet (ebbs[i]->outExprs); + if (optimize.global_cse) + oldOutExprs = setFromSet (ebbs[i]->outExprs); + else + oldOutDefs = bitVectCopy (ebbs[i]->outDefs); setToNull ((void **) &ebbs[i]->inDefs); /* indefitions are easy just merge them by union */ @@ -226,7 +231,10 @@ computeDataFlow (eBBlock ** ebbs, int count) cseBBlock (ebbs[i], TRUE, ebbs, count); /* if it change we will need to iterate */ - change += !isSetsEqualWith (ebbs[i]->outExprs, oldOut, isCseDefEqual); + if (optimize.global_cse) + change += !isSetsEqualWith (ebbs[i]->outExprs, oldOutExprs, isCseDefEqual); + else + change += !bitVectEqual (ebbs[i]->outDefs, oldOutDefs); } if (!change) /* iterate till no change */ diff --git a/src/asm.c b/src/asm.c index 1ab5c527..d4860c28 100644 --- a/src/asm.c +++ b/src/asm.c @@ -280,7 +280,10 @@ char *printILine (iCode *ic) { // stuff the pipe with the readable icode pipeStream=fdopen(filedes[1],"w"); - icTab->iCodePrint(pipeStream, ic, icTab->printName); + if (ic->op != INLINEASM) + icTab->iCodePrint(pipeStream, ic, icTab->printName); + else + fprintf(pipeStream, "inline\n"); // it really needs an extra push fflush(pipeStream); // now swallow it -- 2.30.2