From a4c3ddd83ae219749907c77f23787ffe085ed8c4 Mon Sep 17 00:00:00 2001 From: Bernd Schmidt Date: Tue, 6 Oct 1998 14:38:40 -0600 Subject: loop.c (count_one_set): New static function, broken out of count_loop_regs_set * 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. From-SVN: r22875 --- gcc/global.c | 69 ++++++------------------------------------------------------ 1 file changed, 6 insertions(+), 63 deletions(-) (limited to 'gcc/global.c') diff --git a/gcc/global.c b/gcc/global.c index 04a836c..0bacc23 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. -- cgit v1.1