From: Bernd Schmidt Date: Fri, 29 Dec 2000 17:48:08 +0000 (+0000) Subject: Compute REG_N_SETS for ORIGINAL_REGNOs. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6152c64aab1bd96c75fae7697f8b91f9237310da;p=gcc.git Compute REG_N_SETS for ORIGINAL_REGNOs. From-SVN: r38547 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7adec343830..52759c5a053 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2000-12-29 Bernd Schmidt + * flow.c (PROP_POSTRELOAD): New macro. + (update_life_info): Add it to prop_flags. + (mark_set_1): If it is set, compute REG_N_SETS for the original + register number of a hard reg. + * emit-rtl.c (gen_raw_REG): New function. (gen_rtx_REG, gen_reg_rtx, init_emit_once): Use it instead of gen_rtx_raw_REG. diff --git a/gcc/flow.c b/gcc/flow.c index 61371177437..26b985d9c82 100644 --- a/gcc/flow.c +++ b/gcc/flow.c @@ -168,6 +168,10 @@ Boston, MA 02111-1307, USA. */ #define EPILOGUE_USES(REGNO) 0 #endif +/* Not in basic-block.h, since it is private to this file. When set, it + causes us to keep REG_N_SETS uptodate for original pseudo registers. */ +#define PROP_POSTRELOAD 64 + /* The obstack on which the flow graph components are allocated. */ struct obstack flow_obstack; @@ -2975,6 +2979,9 @@ update_life_info (blocks, extent, prop_flags) tmp = INITIALIZE_REG_SET (tmp_head); + if (reload_completed) + prop_flags |= PROP_POSTRELOAD; + /* For a global update, we go through the relaxation process again. */ if (extent != UPDATE_LIFE_LOCAL) { @@ -4549,6 +4556,7 @@ mark_set_1 (pbi, code, reg, cond, insn, flags) rtx reg, cond, insn; int flags; { + int orig_regno = -1; int regno_first = -1, regno_last = -1; int not_dead = 0; int i; @@ -4586,6 +4594,7 @@ mark_set_1 (pbi, code, reg, cond, insn, flags) /* Fall through. */ case REG: + orig_regno = ORIGINAL_REGNO (reg); regno_last = regno_first = REGNO (reg); if (regno_first < FIRST_PSEUDO_REGISTER) regno_last += HARD_REGNO_NREGS (regno_first, GET_MODE (reg)) - 1; @@ -4730,7 +4739,7 @@ mark_set_1 (pbi, code, reg, cond, insn, flags) /* Additional data to record if this is the final pass. */ if (flags & (PROP_LOG_LINKS | PROP_REG_INFO - | PROP_DEATH_NOTES | PROP_AUTOINC)) + | PROP_DEATH_NOTES | PROP_AUTOINC | PROP_POSTRELOAD)) { register rtx y; register int blocknum = pbi->bb->index; @@ -4745,6 +4754,11 @@ mark_set_1 (pbi, code, reg, cond, insn, flags) pbi->reg_next_use[i] = 0; } + /* After reload has completed, try to keep REG_N_SETS uptodate for + the original pseudos. */ + if ((flags & PROP_POSTRELOAD) && orig_regno >= FIRST_PSEUDO_REGISTER) + REG_N_SETS (orig_regno) += 1; + if (flags & PROP_REG_INFO) { for (i = regno_first; i <= regno_last; ++i)