This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch to fix unintentional(?) pessimisation in dbr_schedule


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]