not really partof a loop , but live ranges used in these blocks should
be live thru the entire loop, so set partOfLoop but don't add them to
loop region
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1945
4a8a32a2-be11-0410-ad9d-
d568d2c75423
/* all blocks that have dfnumbers between dfMin & dfMax are also
part of loop */
for (i = 0 ; i < count ; i++) {
- if (ebbs[i]->dfnum > dfMin && ebbs[i]->dfnum < dfMax) {
- loopInsert(&aloop->regBlocks,ebbs[i]);
+ if (ebbs[i]->dfnum > dfMin &&
+ ebbs[i]->dfnum < dfMax &&
+ !isinSet(aloop->regBlocks,ebbs[i])) {
+ if (!ebbs[i]->partOfLoop) ebbs[i]->partOfLoop = aloop;
}
}
+
/* now add it to the set */
addSetHead (allRegion, aloop);
return 0;