Commit a87ef323 by David S. Miller Committed by David S. Miller

jump.c (jump_optimize): If after_regscan and our transformations generate new REGs, rerun reg_scan.

	* jump.c (jump_optimize): If after_regscan and our transformations
	generate new REGs, rerun reg_scan.

From-SVN: r21052
parent 3410b2f3
Fri Jul 10 12:53:58 1998 David S. Miller <davem@pierdol.cobaltmicro.com>
* jump.c (jump_optimize): If after_regscan and our transformations
generate new REGs, rerun reg_scan.
Fri Jul 10 11:50:43 EDT 1998 Andrew MacLeod <amacleod@cygnus.com> Fri Jul 10 11:50:43 EDT 1998 Andrew MacLeod <amacleod@cygnus.com>
* config/i960/i960.c (i960_address_cost): MEMA operands with * config/i960/i960.c (i960_address_cost): MEMA operands with
......
...@@ -151,6 +151,7 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan) ...@@ -151,6 +151,7 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan)
{ {
register rtx insn, next, note; register rtx insn, next, note;
int changed; int changed;
int old_max_reg;
int first = 1; int first = 1;
int max_uid = 0; int max_uid = 0;
rtx last_insn; rtx last_insn;
...@@ -591,6 +592,7 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan) ...@@ -591,6 +592,7 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan)
/* Now iterate optimizing jumps until nothing changes over one pass. */ /* Now iterate optimizing jumps until nothing changes over one pass. */
changed = 1; changed = 1;
old_max_reg = max_reg_num ();
while (changed) while (changed)
{ {
changed = 0; changed = 0;
...@@ -602,6 +604,16 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan) ...@@ -602,6 +604,16 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan)
rtx nlabel; rtx nlabel;
int this_is_simplejump, this_is_condjump, reversep = 0; int this_is_simplejump, this_is_condjump, reversep = 0;
int this_is_condjump_in_parallel; int this_is_condjump_in_parallel;
/* If one of our transformations has created more REGs we
must rerun reg_scan or else we risk missed optimizations,
erroneous optimizations, or even worse a crash. */
if (after_regscan &&
old_max_reg < max_reg_num ())
{
reg_scan (f, max_reg_num (), 0);
old_max_reg = max_reg_num ();
}
#if 0 #if 0
/* If NOT the first iteration, if this is the last jump pass /* If NOT the first iteration, if this is the last jump pass
(just before final), do the special peephole optimizations. (just before final), do the special peephole optimizations.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment