diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-11-25 10:31:24 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-11-25 10:31:24 +0000 |
commit | 9e519b977314ee6ae132c297c1a53ea4e1b417b4 (patch) | |
tree | d0cecb570037e9dbf06589bd204c4fdd20ab6057 /gcc/reload1.c | |
parent | 6e52f034c988b687802a3bc954f619dcb6c70e5c (diff) | |
download | gcc-9e519b977314ee6ae132c297c1a53ea4e1b417b4.tar.gz |
* toplev.c (no_new_pseudos): Define.
(rest_of_compilation): Set no_new_pseudos as needed.
* emit-rtl.c (gen_reg_rtx): Abort if we try to create a new pseudo
if no_new_pseudos is set.
* rtl.h (no_new_pseudos): Declare it.
* reload1.c (reload): Update comments.
* md.texi: Corresponding changes.
* reload1.c (reg_used_in_insn): Renamed from reg_used_by_pseudo.
(choose_reload_regs): Rename it here as well. When computing it,
also merge in used hardregs.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23855 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/reload1.c')
-rw-r--r-- | gcc/reload1.c | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c index fb7e5cf5a82..e4dee18247f 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -815,7 +815,9 @@ reload (first, global, dumpfile) #endif finish_spills (global, dumpfile); - /* From now on, we need to emit any moves without making new pseudos. */ + /* From now on, we may need to generate moves differently. We may also + allow modifications of insns which cause them to not be recognized. + Any such modifications will be cleaned up during reload itself. */ reload_in_progress = 1; /* This loop scans the entire function each go-round @@ -4487,9 +4489,9 @@ static HARD_REG_SET reload_reg_used_at_all; in the group. */ static HARD_REG_SET reload_reg_used_for_inherit; -/* Records which hard regs are allocated to a pseudo during any point of the - current insn. */ -static HARD_REG_SET reg_used_by_pseudo; +/* Records which hard regs are used in any way, either as explicit use or + by being allocated to a pseudo during any point of the current insn. */ +static HARD_REG_SET reg_used_in_insn; /* Mark reg REGNO as in use for a reload of the sort spec'd by OPNUM and TYPE. MODE is used to indicate how many consecutive regs are @@ -5522,10 +5524,16 @@ choose_reload_regs (chain) CLEAR_HARD_REG_SET (reload_reg_used_in_insn); CLEAR_HARD_REG_SET (reload_reg_used_in_other_addr); - CLEAR_HARD_REG_SET (reg_used_by_pseudo); - compute_use_by_pseudos (®_used_by_pseudo, chain->live_before); - compute_use_by_pseudos (®_used_by_pseudo, chain->live_after); - + CLEAR_HARD_REG_SET (reg_used_in_insn); + { + HARD_REG_SET tmp; + REG_SET_TO_HARD_REG_SET (tmp, chain->live_before); + IOR_HARD_REG_SET (reg_used_in_insn, tmp); + REG_SET_TO_HARD_REG_SET (tmp, chain->live_after); + IOR_HARD_REG_SET (reg_used_in_insn, tmp); + compute_use_by_pseudos (®_used_in_insn, chain->live_before); + compute_use_by_pseudos (®_used_in_insn, chain->live_after); + } for (i = 0; i < reload_n_operands; i++) { CLEAR_HARD_REG_SET (reload_reg_used_in_output[i]); @@ -5838,7 +5846,7 @@ choose_reload_regs (chain) (i, reload_opnum[r], reload_when_needed[r], reload_in[r], reload_out[r], r, 1)) /* Don't use it if we'd clobber a pseudo reg. */ - || (TEST_HARD_REG_BIT (reg_used_by_pseudo, i) + || (TEST_HARD_REG_BIT (reg_used_in_insn, i) && reload_out[r] && ! TEST_HARD_REG_BIT (reg_reloaded_dead, i)) /* Don't really use the inherited spill reg |