mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-08 10:57:12 +08:00
regclass.c (loop_depth): Remove
* regclass.c (loop_depth): Remove (scan_one_insn): Do not handle LOOP_NOTE insns. (regclass): Go through basic blocks and set loop_cost From-SVN: r30976
This commit is contained in:
parent
5ba280dae8
commit
954d8e993c
@ -1,3 +1,9 @@
|
||||
Thu Dec 16 11:33:57 MET 1999 Jan Hubicka <hubicka@freesoft.cz>
|
||||
|
||||
* regclass.c (loop_depth): Remove
|
||||
(scan_one_insn): Do not handle LOOP_NOTE insns.
|
||||
(regclass): Go through basic blocks and set loop_cost
|
||||
|
||||
Thu Dec 16 02:56:25 1999 Zack Weinberg <zack@bitmover.com>
|
||||
|
||||
* tree.h (DECL_FROM_INLINE): Check DECL_ABSTRACT_ORIGIN too.
|
||||
|
@ -716,10 +716,6 @@ static struct reg_pref *reg_pref;
|
||||
|
||||
static struct reg_pref *reg_pref_buffer;
|
||||
|
||||
/* Record the depth of loops that we are in. */
|
||||
|
||||
static int loop_depth;
|
||||
|
||||
/* Account for the fact that insns within a loop are executed very commonly,
|
||||
but don't keep doing this as loops go too deep. */
|
||||
|
||||
@ -821,26 +817,6 @@ scan_one_insn (insn, pass)
|
||||
rtx set, note;
|
||||
int i, j;
|
||||
|
||||
/* 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 (code == NOTE)
|
||||
{
|
||||
if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_BEG)
|
||||
loop_depth++;
|
||||
else if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_END)
|
||||
loop_depth--;
|
||||
|
||||
if (optimize_size)
|
||||
loop_cost = 1;
|
||||
else
|
||||
loop_cost = 1 << (2 * MIN (loop_depth, 5));
|
||||
|
||||
return insn;
|
||||
}
|
||||
|
||||
if (GET_RTX_CLASS (code) != 'i')
|
||||
return insn;
|
||||
|
||||
@ -1085,6 +1061,7 @@ regclass (f, nregs, dump)
|
||||
|
||||
for (pass = 0; pass <= flag_expensive_optimizations; pass++)
|
||||
{
|
||||
int index;
|
||||
/* Zero out our accumulation of the cost of each class for each reg. */
|
||||
|
||||
bzero ((char *) costs, nregs * sizeof (struct costs));
|
||||
@ -1093,14 +1070,29 @@ regclass (f, nregs, dump)
|
||||
bzero (in_inc_dec, nregs);
|
||||
#endif
|
||||
|
||||
loop_depth = 0, loop_cost = 1;
|
||||
loop_cost = 1;
|
||||
|
||||
/* Scan the instructions and record each time it would
|
||||
save code to put a certain register in a certain class. */
|
||||
|
||||
for (insn = f; insn; insn = NEXT_INSN (insn))
|
||||
for (index = 0; index < n_basic_blocks; index++)
|
||||
{
|
||||
insn = scan_one_insn (insn, pass);
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user