This is the mail archive of the gcc-help@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: Question about first scheduling pass


Bradley Lucier <lucier@math.purdue.edu> writes:

> So, pre-register-allocation takes about 1/2 the CPU time of the entire
> compile.

I believe you, but I find that surprising.

> I've been trying to figure out why the first scheduling pass takes so
> much longer than the second.

It's presumably because the first scheduling pass is done before
register allocation, and therefore has much more flexibility in
rearranging instructions.  The second scheduling pass is done after
register allocation, which means that it can't rearrange instructions
that use the same register, even the instructions use them for
different values.  So the second scheduling pass has much less
freedom.

> What I'd like to know is whether there's a way to modify the first
> scheduling pass to be more like the second and then see whether I get
> similar speedups to what I'm getting now.

I don't know.

> As a hack, could I just change
>
>       NEXT_PASS (pass_sched);
>
> in passes.c to
>
>       NEXT_PASS (pass_sched2);

No.

> Or should I change the definitions of pass_sched and pass_sched2 in
> sched-rgn.c?

You would have to change the code itself.

> Also, there are a number of sched*.c files; are there types of
> scheduling other than basic-block scheduling and inter-block scheduling
> that I could try?

There is -fselective-scheduling and -fselective-scheduling2.

Ian


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