This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch to fix unintentional(?) pessimisation in dbr_schedule
- From: Richard Sandiford <rsandifo at redhat dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 05 Apr 2004 22:02:02 +0100
- Subject: Re: Patch to fix unintentional(?) pessimisation in dbr_schedule
- References: <87vfkpp8hy.fsf@redhat.com> <20040405182901.GA27188@redhat.com>
Richard Henderson <rth@redhat.com> writes:
> On Sun, Mar 28, 2004 at 11:32:25AM +0100, Richard Sandiford wrote:
>> --> IOR_HARD_REG_SET (res->regs, new_resources.regs);
>
> With additional thought, IOR is correct. This is because the
> search-forward method of liveness is remarkable weak. Consider
>
> if (always_true ())
> x = foo();
> else
> eventually_abort_but_not_marked_noreturn ();
> blah(x);
>
> Is x live at blah? Of course. It's never set along the else
> path though, so using AND wouldn't see that. Another example
> would be
>
> if (global)
> x = frob();
> dont_modify_global();
> if (global)
> unfrob(x);
>
> where the variable is legitmately conditionally set.
I don't see how this relates to the code though. The search-forward
method is only used for unconditional branches, but the branches above
all look conditional.
Richard