(reg_equiv_replacement): New variable.
(memref_referenced_p, case REG): Check for reg_equiv_replacement. (update_equiv_regs): reg_equiv_replacement now file-scope. From-SVN: r10930
This commit is contained in:
parent
54630035ff
commit
c25a4c251b
@ -1,5 +1,5 @@
|
||||
/* Allocate registers within a basic block, for GNU compiler.
|
||||
Copyright (C) 1987, 88, 91, 93, 94, 1995 Free Software Foundation, Inc.
|
||||
Copyright (C) 1987, 88, 91, 93, 94, 95, 1996 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
@ -235,6 +235,10 @@ static int scratch_index;
|
||||
static int this_insn_number;
|
||||
static rtx this_insn;
|
||||
|
||||
/* Used to communicate changes made by update_equiv_regs to
|
||||
memref_referenced_p. */
|
||||
static rtx *reg_equiv_replacement;
|
||||
|
||||
static void alloc_qty PROTO((int, enum machine_mode, int, int));
|
||||
static void alloc_qty_for_scratch PROTO((rtx, int, rtx, int, int));
|
||||
static void validate_equiv_mem_from_store PROTO((rtx, rtx));
|
||||
@ -609,7 +613,6 @@ memref_referenced_p (memref, x)
|
||||
|
||||
switch (code)
|
||||
{
|
||||
case REG:
|
||||
case CONST_INT:
|
||||
case CONST:
|
||||
case LABEL_REF:
|
||||
@ -621,6 +624,11 @@ memref_referenced_p (memref, x)
|
||||
case LO_SUM:
|
||||
return 0;
|
||||
|
||||
case REG:
|
||||
return (reg_equiv_replacement[REGNO (x)] == 0
|
||||
|| memref_referenced_p (memref,
|
||||
reg_equiv_replacement[REGNO (x)]));
|
||||
|
||||
case MEM:
|
||||
if (true_dependence (memref, x))
|
||||
return 1;
|
||||
@ -941,9 +949,10 @@ static void
|
||||
update_equiv_regs ()
|
||||
{
|
||||
rtx *reg_equiv_init_insn = (rtx *) alloca (max_regno * sizeof (rtx *));
|
||||
rtx *reg_equiv_replacement = (rtx *) alloca (max_regno * sizeof (rtx *));
|
||||
rtx insn;
|
||||
|
||||
reg_equiv_replacement = (rtx *) alloca (max_regno * sizeof (rtx *));
|
||||
|
||||
bzero ((char *) reg_equiv_init_insn, max_regno * sizeof (rtx *));
|
||||
bzero ((char *) reg_equiv_replacement, max_regno * sizeof (rtx *));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user