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: Change initialization order in sel-sched


On Wed, 11 Apr 2012, Richard Guenther wrote:

> On Wed, Apr 11, 2012 at 4:16 PM, Bernd Schmidt <bernds@codesourcery.com> wrote:
> > The order of calls to sched_rgn_init and sched_init differs between
> > sched-rgn and sel-sched. This caused a scheduler patch I was working on
> > to segfault once sel-sched was enabled. The following patch swaps the
> > two function calls.
> >
> > Bootstrapped & tested on i686-linux. Ok?
> 
> Ok.
> 
> Thanks,
> Richard.

Actually, this causes miscompilations with selective scheduler when
-fsel-sched-pipelining is enabled (as it is with -O3 on ia64).  The reason is,
with that flag we build custom regions that consist of a loop body and its
preheader in sel_find_rgns, which is called from sched_rgn_init.  We require
that sched_init is called afterwards, so that DF data is computed for any new
blocks that might have been created (i.e. preheaders); it's possible that DF
is not the only thing that forces this order.

Bernd, could you elaborate on the segfault you had seen?  Perhaps we could
offer some advice on fixing it then.

In the meanwhile, could you revert your patch?  I'm sorry to point out this
problem after the patch had been committed, but it's not immediately obvious :)
Andrey or I will add an explanatory comment in sel-sched afterwards.

Alexander


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