diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-10-06 20:38:40 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-10-06 20:38:40 +0000 |
commit | 0fa3405d09521e33c9639861eece580160050c42 (patch) | |
tree | 70ebcacddadf10b0f128e66b293617a18c689562 /gcc/global.c | |
parent | 0b35586f5c344b78b3316d73d48947ab14e7166f (diff) | |
download | ppe42-gcc-0fa3405d09521e33c9639861eece580160050c42.tar.gz ppe42-gcc-0fa3405d09521e33c9639861eece580160050c42.zip |
* loop.c (count_one_set): New static function, broken out of
count_loop_regs_set
(count_loop_regs_set): Call it.
* global.c (mark_reg_store): Handle clobbers here by not calling
set_preference.
(mark_reg_clobber): Just call mark_reg_store after ensuring SETTER
is in fact a clobber.
* integrate.c (process_reg_param): New function, broken out of
expand_inline_function.
(expand_inline_function): Call it.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22875 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/global.c')
-rw-r--r-- | gcc/global.c | 69 |
1 files changed, 6 insertions, 63 deletions
diff --git a/gcc/global.c b/gcc/global.c index 04a836c0003..0bacc238172 100644 --- a/gcc/global.c +++ b/gcc/global.c @@ -1323,16 +1323,13 @@ record_conflicts (allocno_vec, len) if so, we do nothing. SETTER is 0 if this register was modified by an auto-increment (i.e., - a REG_INC note was found for it). - - CLOBBERs are processed here by calling mark_reg_clobber. */ + a REG_INC note was found for it). */ static void -mark_reg_store (orig_reg, setter) - rtx orig_reg, setter; +mark_reg_store (reg, setter) + rtx reg, setter; { register int regno; - register rtx reg = orig_reg; /* WORD is which word of a multi-register group is being stored. For the case where the store is actually into a SUBREG of REG. @@ -1349,16 +1346,9 @@ mark_reg_store (orig_reg, setter) if (GET_CODE (reg) != REG) return; - if (setter && GET_CODE (setter) == CLOBBER) - { - /* A clobber of a register should be processed here too. */ - mark_reg_clobber (orig_reg, setter); - return; - } - regs_set[n_regs_set++] = reg; - if (setter) + if (setter && GET_CODE (setter) != CLOBBER) set_preference (reg, SET_SRC (setter)); regno = REGNO (reg); @@ -1396,55 +1386,8 @@ static void mark_reg_clobber (reg, setter) rtx reg, setter; { - register int regno; - - /* WORD is which word of a multi-register group is being stored. - For the case where the store is actually into a SUBREG of REG. - Except we don't use it; I believe the entire REG needs to be - made live. */ - int word = 0; - - if (GET_CODE (setter) != CLOBBER) - return; - - if (GET_CODE (reg) == SUBREG) - { - word = SUBREG_WORD (reg); - reg = SUBREG_REG (reg); - } - - if (GET_CODE (reg) != REG) - return; - - regs_set[n_regs_set++] = reg; - - regno = REGNO (reg); - - /* Either this is one of the max_allocno pseudo regs not allocated, - or it is or has a hardware reg. First handle the pseudo-regs. */ - if (regno >= FIRST_PSEUDO_REGISTER) - { - if (reg_allocno[regno] >= 0) - { - SET_ALLOCNO_LIVE (reg_allocno[regno]); - record_one_conflict (regno); - } - } - - if (reg_renumber[regno] >= 0) - regno = reg_renumber[regno] /* + word */; - - /* Handle hardware regs (and pseudos allocated to hard regs). */ - if (regno < FIRST_PSEUDO_REGISTER && ! fixed_regs[regno]) - { - register int last = regno + HARD_REGNO_NREGS (regno, GET_MODE (reg)); - while (regno < last) - { - record_one_conflict (regno); - SET_HARD_REG_BIT (hard_regs_live, regno); - regno++; - } - } + if (GET_CODE (setter) == CLOBBER) + mark_reg_store (reg, setter); } /* Record that REG has conflicts with all the regs currently live. |