From 7f24367410c6bbe8660a1a8b58782d0cbe22a1fc Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Thu, 13 Jun 2002 06:24:00 -0600 Subject: [PATCH] alias.c (argument_registers): Remove. * alias.c (argument_registers): Remove. (init_alias_once): Initialize static_reg_base_value here. Remove initialization of argument_registers. (init_alias_once_per_function): Remove. (init_alias_analysis): Copy all the entries from static_reg_base_value into new_reg_base_value all at once. * rtl.h (init_alias_once_per_function): Remove declaration. * function.c (prepare_function_start): Do not call init_alias_once_per_function. * caller-save.c (init_caller_save): Use gen_rtx_INSN instead of starting a sequence and emitting an INSN. From-SVN: r54582 --- gcc/ChangeLog | 15 +++++++++++++++ gcc/alias.c | 46 ++++------------------------------------------ gcc/caller-save.c | 8 ++------ gcc/function.c | 3 --- gcc/rtl.h | 1 - 5 files changed, 21 insertions(+), 52 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2804059..dfca31f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,18 @@ +2002-06-13 Jeffrey Law + + * alias.c (argument_registers): Remove. + (init_alias_once): Initialize static_reg_base_value here. Remove + initialization of argument_registers. + (init_alias_once_per_function): Remove. + (init_alias_analysis): Copy all the entries from static_reg_base_value + into new_reg_base_value all at once. + * rtl.h (init_alias_once_per_function): Remove declaration. + * function.c (prepare_function_start): Do not call + init_alias_once_per_function. + + * caller-save.c (init_caller_save): Use gen_rtx_INSN instead of + starting a sequence and emitting an INSN. + 2002-06-13 Richard Sandiford * config/mips/r3900.h (MIPS_CPU_STRING_DEFAULT): Make lower case. diff --git a/gcc/alias.c b/gcc/alias.c index 4969aa6..d892926 100644 --- a/gcc/alias.c +++ b/gcc/alias.c @@ -2621,8 +2621,6 @@ mark_constant_function () } -static HARD_REG_SET argument_registers; - void init_alias_once () { @@ -2637,36 +2635,9 @@ init_alias_once () numbers, so translate if necessary due to register windows. */ if (FUNCTION_ARG_REGNO_P (OUTGOING_REGNO (i)) && HARD_REGNO_MODE_OK (i, Pmode)) - SET_HARD_REG_BIT (argument_registers, i); - - alias_sets = splay_tree_new (splay_tree_compare_ints, 0, 0); -} - -/* Per-function initializer for the aliasing code. - - Allocate RTL for argument and other special use registers once - per function here intead of multiple times per function in - init_alias_analysis. */ - -void -init_alias_once_per_function () -{ - int i; - - /* Generate and mark all hard registers which may contain an address. - The stack, frame and argument pointers may contain an address. - An argument register which can hold a Pmode value may contain - an address even if it is not in BASE_REGS. - - The address expression is VOIDmode for an argument and - Pmode for other registers. */ - - for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) - if (TEST_HARD_REG_BIT (argument_registers, i)) static_reg_base_value[i] = gen_rtx_ADDRESS (VOIDmode, gen_rtx_REG (Pmode, i)); - static_reg_base_value[STACK_POINTER_REGNUM] = gen_rtx_ADDRESS (Pmode, stack_pointer_rtx); static_reg_base_value[ARG_POINTER_REGNUM] @@ -2677,6 +2648,8 @@ init_alias_once_per_function () static_reg_base_value[HARD_FRAME_POINTER_REGNUM] = gen_rtx_ADDRESS (Pmode, hard_frame_pointer_rtx); #endif + + alias_sets = splay_tree_new (splay_tree_compare_ints, 0, 0); } /* Initialize the aliasing machinery. Initialize the REG_KNOWN_VALUE @@ -2764,20 +2737,9 @@ init_alias_analysis () The address expression is VOIDmode for an argument and Pmode for other registers. */ - for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) - if (TEST_HARD_REG_BIT (argument_registers, i)) - new_reg_base_value[i] = static_reg_base_value[i]; + memcpy (new_reg_base_value, static_reg_base_value, + FIRST_PSEUDO_REGISTER * sizeof (rtx)); - new_reg_base_value[STACK_POINTER_REGNUM] - = static_reg_base_value[STACK_POINTER_REGNUM]; - new_reg_base_value[ARG_POINTER_REGNUM] - = static_reg_base_value[ARG_POINTER_REGNUM]; - new_reg_base_value[FRAME_POINTER_REGNUM] - = static_reg_base_value[FRAME_POINTER_REGNUM]; -#if HARD_FRAME_POINTER_REGNUM != FRAME_POINTER_REGNUM - new_reg_base_value[HARD_FRAME_POINTER_REGNUM] - = static_reg_base_value[HARD_FRAME_POINTER_REGNUM]; -#endif /* Walk the insns adding values to the new_reg_base_value array. */ for (insn = get_insns (); insn; insn = NEXT_INSN (insn)) { diff --git a/gcc/caller-save.c b/gcc/caller-save.c index bc42c3a..b7e3cea 100644 --- a/gcc/caller-save.c +++ b/gcc/caller-save.c @@ -192,10 +192,8 @@ init_caller_save () savepat = gen_rtx_SET (VOIDmode, test_mem, test_reg); restpat = gen_rtx_SET (VOIDmode, test_reg, test_mem); - start_sequence (); - - saveinsn = emit_insn (savepat); - restinsn = emit_insn (restpat); + saveinsn = gen_rtx_INSN (VOIDmode, 0, 0, 0, 0, 0, savepat, -1, 0, 0); + restinsn = gen_rtx_INSN (VOIDmode, 0, 0, 0, 0, 0, restpat, -1, 0, 0); for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) for (mode = 0 ; mode < MAX_MACHINE_MODE; mode++) @@ -251,8 +249,6 @@ init_caller_save () SET_HARD_REG_BIT (call_fixed_reg_set, i); } } - - end_sequence (); } /* Initialize save areas by showing that we haven't allocated any yet. */ diff --git a/gcc/function.c b/gcc/function.c index 56c66c6..9530677 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -6210,9 +6210,6 @@ prepare_function_start () /* Initialize the RTL mechanism. */ init_emit (); - /* Do per-function initialization of the alias analyzer. */ - init_alias_once_per_function (); - /* Initialize the queue of pending postincrement and postdecrements, and some other info in expr.c. */ init_expr (); diff --git a/gcc/rtl.h b/gcc/rtl.h index 8e05066..57a0be4 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -2160,7 +2160,6 @@ extern int anti_dependence PARAMS ((rtx, rtx)); extern int output_dependence PARAMS ((rtx, rtx)); extern void mark_constant_function PARAMS ((void)); extern void init_alias_once PARAMS ((void)); -extern void init_alias_once_per_function PARAMS ((void)); extern void init_alias_analysis PARAMS ((void)); extern void end_alias_analysis PARAMS ((void)); extern rtx addr_side_effect_eval PARAMS ((rtx, int, int)); -- 2.7.4