[PATCH] Make dataflow analyzer mark defs for call_fixed_regs
Daniel Berlin
dan@cgsoftware.com
Sun Jul 15 15:58:00 GMT 2001
Richard Henderson <rth@redhat.com> writes:
> On Sat, Jul 14, 2001 at 01:13:39AM -0400, Daniel Berlin wrote:
>> - if (call_used_regs[i]
>> + if ((call_used_regs[i]
>> && ! global_regs[i]
>> && ! fixed_regs[i]
>> && ! df_insn_regno_def_p (df, bb, insn, i))
>> + || call_fixed_regs[i])
>
> I don't think checking call_fixed_regs is necessary. Seems
> to me that the df_insn_regno_def_p is probably incorrect.
> The only call_used registers that can be live after a call
> are FUNCTION_VALUE_REGNO_P.
Okeydokey.
>
> Also, I think excluding global_regs is incorrect here, since
> the call can assign these registers a new value.
Okey.
>
> In fact, excluding fixed_regs is also generally wrong --
> we don't let the target provide this information. There are
> only a couple that we know are safe. The test should be
>
> if ((fixed_regs[i]
> && i != STACK_POINTER_REGNUM
> && i != FRAME_POINTER_REGNUM
> && i != HARD_FRAME_POINTER_REGNUM
> #ifndef PIC_OFFSET_TABLE_REG_CALL_CLOBBERED
> && i != PIC_OFFSET_TABLE_REGNUM
> #endif
> && i != ARG_POINTER_REGNUM)
> || (! fixed_regs[i]
> && (call_used_regs[i] || global_regs[i])))
> {
> // clobber the register
> }
>
> Curiously, I see flow.c has not got this quite right either.
> I guess global registers and odd fixed registers don't get
> tested as much as they ought...
Probably.
I spent hours starting at dumps before I realized something simplfy hadn't
been marked clobbered by the analyzer. I thought we were just
computing one of the store vectors wrong still.
>
>
> r~
--
"I saw a bank that said "24 Hour Banking", but I don't have that
much time.
"-Steven Wright
More information about the Gcc-patches
mailing list