diff options
author | Richard Stallman <rms@gnu.org> | 1993-05-26 05:10:41 +0000 |
---|---|---|
committer | Richard Stallman <rms@gnu.org> | 1993-05-26 05:10:41 +0000 |
commit | 208dffa5cd4aa058d79e55b5bd83e49a76ae97f6 (patch) | |
tree | ed2233c27c425c51affe80b293eb732a3c44d722 /gcc | |
parent | 9bb30354733b427e658ea2541d6494cce80b8b71 (diff) | |
download | gcc-208dffa5cd4aa058d79e55b5bd83e49a76ae97f6.zip gcc-208dffa5cd4aa058d79e55b5bd83e49a76ae97f6.tar.gz gcc-208dffa5cd4aa058d79e55b5bd83e49a76ae97f6.tar.bz2 |
(delete_output_reload): Don't delete output reload if cannot_omit_stores is set for that pseudo.
(delete_output_reload): Don't delete output reload
if cannot_omit_stores is set for that pseudo.
(reload): Init and clear cannot_omit_stores.
(eliminate_regs): Set cannot_omit_stores.
From-SVN: r4574
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/reload1.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c index d6c361d..8d3dd85 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -190,6 +190,12 @@ static HARD_REG_SET counted_for_groups; as part of a group, even if it seems to be otherwise ok. */ static HARD_REG_SET counted_for_nongroups; +/* Indexed by pseudo reg number N, + says may not delete stores into the real (memory) home of pseudo N. + This is set if we already substituted a memory equivalent in some uses, + which happens when we have to eliminate the fp from it. */ +static char *cannot_omit_stores; + /* Nonzero if indirect addressing is supported on the machine; this means that spilling (REG n) does not require reloading it into a register in order to do (MEM (REG n)) or (MEM (PLUS (REG n) (CONST_INT c))). The @@ -511,6 +517,8 @@ reload (first, global, dumpfile) bzero (reg_equiv_address, max_regno * sizeof (rtx)); reg_max_ref_width = (int *) alloca (max_regno * sizeof (int)); bzero (reg_max_ref_width, max_regno * sizeof (int)); + cannot_omit_stores = (char *) alloca (max_regno); + bzero (cannot_omit_stores, max_regno); /* Look for REG_EQUIV notes; record what each pseudo is equivalent to. Also find all paradoxical subregs @@ -2601,7 +2609,10 @@ eliminate_regs (x, mem_mode, insn) new = eliminate_regs (reg_equiv_memory_loc[regno], mem_mode, NULL_RTX); if (new != reg_equiv_memory_loc[regno]) - return copy_rtx (new); + { + cannot_omit_stores[regno] = 1; + return copy_rtx (new); + } } return x; @@ -6465,6 +6476,9 @@ delete_output_reload (insn, j, output_reload_insn) return; } + if (cannot_omit_stores[REGNO (reg)]) + return; + /* If this insn will store in the pseudo again, the previous store can be removed. */ if (reload_out[j] == reload_in[j]) |