Commit 1f01879e by Jan Hubicka Committed by Jan Hubicka

* regclass.c (regclass): Do not use flowgraph when not optimizing.

From-SVN: r30993
parent 833fc3ad
Fri Dec 17 12:08:11 MET 1999 Jan Hubicka <hubicka@freesoftr.cz> Fri Dec 17 12:08:11 MET 1999 Jan Hubicka <hubicka@freesoftr.cz>
* regclass.c (regclass): Do not use flowgraph when not optimizing.
* gcse.c (try_replace_reg): Do replacements in REG_EQUAL/REG_EQUIV * gcse.c (try_replace_reg): Do replacements in REG_EQUAL/REG_EQUIV
notes too, create one when replacement failed, attempt to simplify notes too, create one when replacement failed, attempt to simplify
resulting notes. resulting notes.
......
...@@ -1070,30 +1070,35 @@ regclass (f, nregs, dump) ...@@ -1070,30 +1070,35 @@ regclass (f, nregs, dump)
bzero (in_inc_dec, nregs); bzero (in_inc_dec, nregs);
#endif #endif
loop_cost = 1;
/* Scan the instructions and record each time it would /* Scan the instructions and record each time it would
save code to put a certain register in a certain class. */ save code to put a certain register in a certain class. */
for (index = 0; index < n_basic_blocks; index++) if (!optimize)
{ {
basic_block bb = BASIC_BLOCK (index); loop_cost = 1;
for (insn = f; insn; insn = NEXT_INSN (insn))
/* Show that an insn inside a loop is likely to be executed three insn = scan_one_insn (insn, pass);
times more than insns outside a loop. This is much more aggressive
than the assumptions made elsewhere and is being tried as an
experiment. */
if (optimize_size)
loop_cost = 1;
else
loop_cost = 1 << (2 * MIN (bb->loop_depth - 1, 5));
for (insn = bb->head; ; insn = NEXT_INSN (insn))
{
insn = scan_one_insn (insn, pass);
if (insn == bb->end)
break;
}
} }
else
for (index = 0; index < n_basic_blocks; index++)
{
basic_block bb = BASIC_BLOCK (index);
/* Show that an insn inside a loop is likely to be executed three
times more than insns outside a loop. This is much more aggressive
than the assumptions made elsewhere and is being tried as an
experiment. */
if (optimize_size)
loop_cost = 1;
else
loop_cost = 1 << (2 * MIN (bb->loop_depth - 1, 5));
for (insn = bb->head; ; insn = NEXT_INSN (insn))
{
insn = scan_one_insn (insn, pass);
if (insn == bb->end)
break;
}
}
/* Now for each register look at how desirable each class is /* Now for each register look at how desirable each class is
and find which class is preferred. Store that in and find which class is preferred. Store that in
......
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