This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, rtl-optimization]: Fix PR rtl-optimization/33638
> No, I don't think it does. Apply
>
> Index: cselib.c
> ===================================================================
> --- cselib.c (revision 129158)
> +++ cselib.c (working copy)
> @@ -1687,7 +1687,8 @@ cselib_process_insn (rtx insn)
> if (CALL_P (insn))
> {
> for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
> - if (call_used_regs[i]
> + if ((call_used_regs[i]
> + && !(ACCUMULATE_OUTGOING_ARGS && i == STACK_POINTER_REGNUM))
>
> || (REG_VALUES (i) && REG_VALUES (i)->elt
>
> && HARD_REGNO_CALL_PART_CLOBBERED (i,
> GET_MODE (REG_VALUES (i)->elt->val_rtx))))
>
> and comment out the special code in dse.c for const functions that
> invalidates all the stores into the frame.
In fact the second part is not necessary, just apply the first part or
Index: cselib.c
===================================================================
--- cselib.c (revision 129158)
+++ cselib.c (working copy)
@@ -1687,7 +1687,7 @@ cselib_process_insn (rtx insn)
if (CALL_P (insn))
{
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
- if (call_used_regs[i]
+ if (TEST_HARD_REG_BIT (regs_invalidated_by_call, i)
|| (REG_VALUES (i) && REG_VALUES (i)->elt
&& HARD_REGNO_CALL_PART_CLOBBERED (i,
GET_MODE (REG_VALUES (i)->elt->val_rtx))))
and dse.c will delete stores based on the stack pointer around const
functions.
--
Eric Botcazou