diff options
author | Jeff Law <law@redhat.com> | 2002-06-10 10:32:45 -0600 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2002-06-10 10:32:45 -0600 |
commit | bf1660a67066f9ad75d368466f5be15cc23a6ca1 (patch) | |
tree | b6731a46c8b99043d03fbda9812dc896be80aba5 /gcc/expr.c | |
parent | 8dc5848454ac4c24ce5a3fead6dd4e4ef4cb3a2f (diff) | |
download | gcc-bf1660a67066f9ad75d368466f5be15cc23a6ca1.zip gcc-bf1660a67066f9ad75d368466f5be15cc23a6ca1.tar.gz gcc-bf1660a67066f9ad75d368466f5be15cc23a6ca1.tar.bz2 |
alias.c (static_reg_base_value): New to hold RTL for items allocated once per function for the aliasing code.
* alias.c (static_reg_base_value): New to hold RTL for
items allocated once per function for the aliasing code.
(init_alias_once_per_function): Initialize static_reg_base_value.
(init_alias_analysis): Avoid throw-away allocations of RTL by
using pre-computed values in static_reg_base_value.
* function.c (prepare_function_start): Call
init_alias_once_per_function appropriately.
* rtl.h (init_alias_once_per_function): Declare.
* caller-save (init_caller_save): Restructure slightly to
avoid lots of silly RTL generation.
* expr.c (init_expr_once): Likewise.
* reload1.c (reload_cse_regs_1): Allocate throw-away register
RTL object here. Pass it into children.
(reload_cse_simplify_operands): Use passed-in register RTL
object.
(reload_cse_simplify): Pass through throw-away register
RTL object.
From-SVN: r54442
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -214,6 +214,7 @@ init_expr_once () enum machine_mode mode; int num_clobbers; rtx mem, mem1; + rtx reg; /* Try indexing by frame ptr and try by stack ptr. It is known that on the Convex the stack ptr isn't a valid index. @@ -221,6 +222,10 @@ init_expr_once () mem = gen_rtx_MEM (VOIDmode, stack_pointer_rtx); mem1 = gen_rtx_MEM (VOIDmode, frame_pointer_rtx); + /* A scratch register we can modify in-place below to avoid + useless RTL allocations. */ + reg = gen_rtx_REG (VOIDmode, -1); + insn = rtx_alloc (INSN); pat = gen_rtx_SET (0, NULL_RTX, NULL_RTX); PATTERN (insn) = pat; @@ -229,11 +234,11 @@ init_expr_once () mode = (enum machine_mode) ((int) mode + 1)) { int regno; - rtx reg; direct_load[(int) mode] = direct_store[(int) mode] = 0; PUT_MODE (mem, mode); PUT_MODE (mem1, mode); + PUT_MODE (reg, mode); /* See if there is some register that can be used in this mode and directly loaded or stored from memory. */ @@ -246,7 +251,7 @@ init_expr_once () if (! HARD_REGNO_MODE_OK (regno, mode)) continue; - reg = gen_rtx_REG (mode, regno); + REGNO (reg) = regno; SET_SRC (pat) = mem; SET_DEST (pat) = reg; |