+2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
+
+ * src/SDCCloop.c (basicInduction): fixed bug with loop induction
+ in loops with multiple exits (reported as incorrect registers
+ used by Martin Helmling in Sdcc-user list)
+
2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
* src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
if (!exit)
return NULL;
-
+
succVect = bitVectCopy (exit->succVect);
for (exit = setNextItem (lexits); exit;
if (nexits == 1)
{
eBBlock *exit = setFirstItem (loopReg->exits);
-
/* if it is the same block then there is no
need to move it about */
if (exit != lBlock)
if (bitVectBitValue (loopSuccs, i))
{
- eBBlock *eblock = ebbs[i];
+ eBBlock *eblock = NULL;
+ int j;
+
+ /* Need to search for bbnum == i since ebbs is */
+ /* sorted by dfnum; a direct index won't do. */
+ for (j=0; j<count; j++)
+ if (ebbs[j]->bbnum == i)
+ {
+ eblock = ebbs[j];
+ break;
+ }
+ assert(eblock);
/* if the successor does not belong to the loop
and will be executed after the loop : then