1
0
mirror of https://github.com/cc65/cc65.git synced 2024-07-05 21:29:03 +00:00

Fixed an optimizer problem: A branch into a list of at least two branches

pointing to themselves caused the optimizer to loop forever.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3907 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz 2009-01-12 19:48:28 +00:00
parent 8c8e0b131f
commit df341b6551

View File

@ -406,17 +406,12 @@ unsigned OptJumpCascades (CodeSeg* S)
/* Remember, we had changes */
++Changes;
/* Done */
continue;
}
/* Check if both are conditional branches, and the condition of
* the second is the inverse of that of the first. In this case,
* the second branch will never be taken, and we may jump directly
* to the instruction behind this one.
*/
if ((E->Info & OF_CBRA) != 0 && (N->Info & OF_CBRA) != 0) {
} else if ((E->Info & OF_CBRA) != 0 && (N->Info & OF_CBRA) != 0) {
CodeEntry* X; /* Instruction behind N */
CodeLabel* LX; /* Label attached to X */
@ -447,10 +442,6 @@ unsigned OptJumpCascades (CodeSeg* S)
/* Remember, we had changes */
++Changes;
/* Done */
continue;
}
}