Commit adee59ae by Anatoly Sokolov Committed by Anatoly Sokolov

hard-reg-set.h (call_fixed_regs): Remove.

	* hard-reg-set.h (call_fixed_regs): Remove.
	* reginfo.c (call_fixed_regs): Remove.
	(init_reg_sets_1): Remove initialization of call_fixed_regs.
	(globalize_reg): Don't use call_fixed_regs.
	* caller-save.c (init_caller_save): Use call_fixed_reg_set instead of
	call_fixed_regs.

From-SVN: r151353
parent 6330e1d9
2009-09-02 Anatoly Sokolov <aesok@post.ru>
* hard-reg-set.h (call_fixed_regs): Remove.
* reginfo.c (call_fixed_regs): Remove.
(init_reg_sets_1): Remove initialization of call_fixed_regs.
(globalize_reg): Don't use call_fixed_regs.
* caller-save.c (init_caller_save): Use call_fixed_reg_set instead of
call_fixed_regs.
2009-09-01 Michael Matz <matz@suse.de> 2009-09-01 Michael Matz <matz@suse.de>
* expr.h (emit_storent_insn, expand_expr_real_1, * expr.h (emit_storent_insn, expand_expr_real_1,
......
...@@ -215,7 +215,8 @@ init_caller_save (void) ...@@ -215,7 +215,8 @@ init_caller_save (void)
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
{ {
if (call_used_regs[i] && ! call_fixed_regs[i]) if (call_used_regs[i]
&& !TEST_HARD_REG_BIT (call_fixed_reg_set, i))
{ {
for (j = 1; j <= MOVE_MAX_WORDS; j++) for (j = 1; j <= MOVE_MAX_WORDS; j++)
{ {
...@@ -223,7 +224,6 @@ init_caller_save (void) ...@@ -223,7 +224,6 @@ init_caller_save (void)
VOIDmode); VOIDmode);
if (regno_save_mode[i][j] == VOIDmode && j == 1) if (regno_save_mode[i][j] == VOIDmode && j == 1)
{ {
call_fixed_regs[i] = 1;
SET_HARD_REG_BIT (call_fixed_reg_set, i); SET_HARD_REG_BIT (call_fixed_reg_set, i);
} }
} }
...@@ -291,7 +291,6 @@ init_caller_save (void) ...@@ -291,7 +291,6 @@ init_caller_save (void)
regno_save_mode[i][j] = VOIDmode; regno_save_mode[i][j] = VOIDmode;
if (j == 1) if (j == 1)
{ {
call_fixed_regs[i] = 1;
SET_HARD_REG_BIT (call_fixed_reg_set, i); SET_HARD_REG_BIT (call_fixed_reg_set, i);
if (call_used_regs[i]) if (call_used_regs[i])
SET_HARD_REG_BIT (no_caller_save_reg_set, i); SET_HARD_REG_BIT (no_caller_save_reg_set, i);
......
...@@ -600,16 +600,11 @@ extern char call_really_used_regs[]; ...@@ -600,16 +600,11 @@ extern char call_really_used_regs[];
/* The same info as a HARD_REG_SET. */ /* The same info as a HARD_REG_SET. */
extern HARD_REG_SET call_used_reg_set; extern HARD_REG_SET call_used_reg_set;
/* Indexed by hard register number, contains 1 for registers that are
fixed use -- i.e. in fixed_regs -- or a function value return register
or TARGET_STRUCT_VALUE_RTX or STATIC_CHAIN_REGNUM. These are the
registers that cannot hold quantities across calls even if we are
willing to save and restore them. */
extern char call_fixed_regs[FIRST_PSEUDO_REGISTER];
/* The same info as a HARD_REG_SET. */ /* Contains registers that are fixed use -- i.e. in fixed_reg_set -- or
a function value return register or TARGET_STRUCT_VALUE_RTX or
STATIC_CHAIN_REGNUM. These are the registers that cannot hold quantities
across calls even if we are willing to save and restore them. */
extern HARD_REG_SET call_fixed_reg_set; extern HARD_REG_SET call_fixed_reg_set;
......
...@@ -101,13 +101,11 @@ char call_really_used_regs[] = CALL_REALLY_USED_REGISTERS; ...@@ -101,13 +101,11 @@ char call_really_used_regs[] = CALL_REALLY_USED_REGISTERS;
#endif #endif
/* Indexed by hard register number, contains 1 for registers that are /* Contains registers that are fixed use -- i.e. in fixed_reg_set -- or
fixed use or call used registers that cannot hold quantities across a function value return register or TARGET_STRUCT_VALUE_RTX or
calls even if we are willing to save and restore them. call fixed STATIC_CHAIN_REGNUM. These are the registers that cannot hold quantities
registers are a subset of call used registers. */ across calls even if we are willing to save and restore them. */
char call_fixed_regs[FIRST_PSEUDO_REGISTER];
/* The same info as a HARD_REG_SET. */
HARD_REG_SET call_fixed_reg_set; HARD_REG_SET call_fixed_reg_set;
/* Indexed by hard register number, contains 1 for registers /* Indexed by hard register number, contains 1 for registers
...@@ -515,8 +513,6 @@ init_reg_sets_1 (void) ...@@ -515,8 +513,6 @@ init_reg_sets_1 (void)
else else
CLEAR_REG_SET (regs_invalidated_by_call_regset); CLEAR_REG_SET (regs_invalidated_by_call_regset);
memcpy (call_fixed_regs, fixed_regs, sizeof call_fixed_regs);
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
{ {
/* call_used_regs must include fixed_regs. */ /* call_used_regs must include fixed_regs. */
...@@ -531,8 +527,6 @@ init_reg_sets_1 (void) ...@@ -531,8 +527,6 @@ init_reg_sets_1 (void)
if (call_used_regs[i]) if (call_used_regs[i])
SET_HARD_REG_BIT (call_used_reg_set, i); SET_HARD_REG_BIT (call_used_reg_set, i);
if (call_fixed_regs[i])
SET_HARD_REG_BIT (call_fixed_reg_set, i);
/* There are a couple of fixed registers that we know are safe to /* There are a couple of fixed registers that we know are safe to
exclude from being clobbered by calls: exclude from being clobbered by calls:
...@@ -571,12 +565,14 @@ init_reg_sets_1 (void) ...@@ -571,12 +565,14 @@ init_reg_sets_1 (void)
} }
} }
COPY_HARD_REG_SET(call_fixed_reg_set, fixed_reg_set);
/* Preserve global registers if called more than once. */ /* Preserve global registers if called more than once. */
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
{ {
if (global_regs[i]) if (global_regs[i])
{ {
fixed_regs[i] = call_used_regs[i] = call_fixed_regs[i] = 1; fixed_regs[i] = call_used_regs[i] = 1;
SET_HARD_REG_BIT (fixed_reg_set, i); SET_HARD_REG_BIT (fixed_reg_set, i);
SET_HARD_REG_BIT (call_used_reg_set, i); SET_HARD_REG_BIT (call_used_reg_set, i);
SET_HARD_REG_BIT (call_fixed_reg_set, i); SET_HARD_REG_BIT (call_fixed_reg_set, i);
...@@ -870,7 +866,7 @@ globalize_reg (int i) ...@@ -870,7 +866,7 @@ globalize_reg (int i)
if (fixed_regs[i]) if (fixed_regs[i])
return; return;
fixed_regs[i] = call_used_regs[i] = call_fixed_regs[i] = 1; fixed_regs[i] = call_used_regs[i] = 1;
#ifdef CALL_REALLY_USED_REGISTERS #ifdef CALL_REALLY_USED_REGISTERS
call_really_used_regs[i] = 1; call_really_used_regs[i] = 1;
#endif #endif
......
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