Commit 213c4983 by J"orn Rennecke Committed by Jeff Law

rtl.h (recompute_reg_usage): Add second argument.

	* rtl.h (recompute_reg_usage): Add second argument.
	* flow.c (recompute_reg_usage): Likewise.
	* toplev.c (rest_of_compilation): Supply second argument to
	recompute_reg_usage.

From-SVN: r24291
parent 867cbbbe
...@@ -4,6 +4,11 @@ ...@@ -4,6 +4,11 @@
Sun Dec 13 00:24:14 1998 J"orn Rennecke <amylaar@cygnus.co.uk> Sun Dec 13 00:24:14 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
* rtl.h (recompute_reg_usage): Add second argument.
* flow.c (recompute_reg_usage): Likewise.
* toplev.c (rest_of_compilation): Supply second argument to
recompute_reg_usage.
* reload1.c (compute_use_by_pseudos): Allow reg_renumber[regno] < 0 * reload1.c (compute_use_by_pseudos): Allow reg_renumber[regno] < 0
after reload. after reload.
......
...@@ -4267,12 +4267,18 @@ count_reg_references (x) ...@@ -4267,12 +4267,18 @@ count_reg_references (x)
register allocators to prioritize pseudos for allocation to hard regs. register allocators to prioritize pseudos for allocation to hard regs.
More accurate reference counts generally lead to better register allocation. More accurate reference counts generally lead to better register allocation.
F is the first insn to be scanned.
LOOP_STEP denotes how much loop_depth should be incremented per
loop nesting level in order to increase the ref count more for references
in a loop.
It might be worthwhile to update REG_LIVE_LENGTH, REG_BASIC_BLOCK and It might be worthwhile to update REG_LIVE_LENGTH, REG_BASIC_BLOCK and
possibly other information which is used by the register allocators. */ possibly other information which is used by the register allocators. */
void void
recompute_reg_usage (f) recompute_reg_usage (f, loop_step)
rtx f; rtx f;
int loop_step;
{ {
rtx insn; rtx insn;
int i, max_reg; int i, max_reg;
...@@ -4295,9 +4301,9 @@ recompute_reg_usage (f) ...@@ -4295,9 +4301,9 @@ recompute_reg_usage (f)
{ {
/* Look for loop boundaries. */ /* Look for loop boundaries. */
if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_END) if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_END)
loop_depth--; loop_depth -= loop_step;
else if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_BEG) else if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_BEG)
loop_depth++; loop_depth += loop_step;
/* If we have LOOP_DEPTH == 0, there has been a bookkeeping error. /* If we have LOOP_DEPTH == 0, there has been a bookkeeping error.
Abort now rather than setting register status incorrectly. */ Abort now rather than setting register status incorrectly. */
......
...@@ -1394,7 +1394,7 @@ extern void stupid_life_analysis PROTO ((rtx, int, FILE *)); ...@@ -1394,7 +1394,7 @@ extern void stupid_life_analysis PROTO ((rtx, int, FILE *));
/* In flow.c */ /* In flow.c */
extern void allocate_for_life_analysis PROTO ((void)); extern void allocate_for_life_analysis PROTO ((void));
extern void recompute_reg_usage PROTO ((rtx)); extern void recompute_reg_usage PROTO ((rtx, int));
#ifdef BUFSIZ #ifdef BUFSIZ
extern void dump_flow_info PROTO ((FILE *)); extern void dump_flow_info PROTO ((FILE *));
#endif #endif
......
...@@ -3929,7 +3929,7 @@ rest_of_compilation (decl) ...@@ -3929,7 +3929,7 @@ rest_of_compilation (decl)
if (!obey_regdecls) if (!obey_regdecls)
TIMEVAR (local_alloc_time, TIMEVAR (local_alloc_time,
{ {
recompute_reg_usage (insns); recompute_reg_usage (insns, ! optimize_size);
regclass (insns, max_reg_num ()); regclass (insns, max_reg_num ());
local_alloc (); local_alloc ();
}); });
......
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