[sel-sched] Rescheduling of pipelined code and improved bookkeeping.

Dmitry Zhurikhin zhur@ispras.ru
Thu Mar 29 17:08:00 GMT 2007


Hi! These are two patches for sel-sched branch.

First patch makes scheduler create bookkeeping instructions at the end
of existing basic block if it can do so, instead of always creating
new basic block for bookkeeping instructions.  This solves a problem
with label alignment: alignment is stored in association with label
and is computed before scheduler pass; when pipelining, splitting of
basic block moves old block (with its label) for bookkeeping out of
loop, so making label (loop) alignment in wrong place.  This patch
prevents such behaviour.

Also, first patch resolves bug with pipelining, when
find_best_rhs_and_reg_that_fits is going to choose from av set,
containing only one instruction, it will decrement ready.n_ready to
zero, so sched_reorder hook has no choice, but to say that nothing can
be scheduled on this cycle.

Second patch contains some cleanups for first patch.  Also it contains
changes for generation of bookkeeping instructions: allowing of
generation of bookkeeping instructions at scheduling boundary, but
generating new basic block for them when scheduling something at this
boundary.  Also it contains minor bugfixes concerning debug output.

The main purpose of second patch is allowing rescheduling of pipelined
code without pipelinig.  This resolves a performance bug, when
pipelining instructions from the beginning of loop: pipelining of some
instructions from the beginnig of loop removes them from their source
places and leaves all other instructions from beginning of loop at
their old places; this way, "bubbles" from removed instructions could
be created, increasing execution time of loop.

Also, the second patch contains a fix to sched-deps.c, which replaces
generation of true dependencies with generation of anti dependencies
for jumps, followed by barrier.

Both patches committed by Andrey Belevantsev to sel-sched branch.



More information about the Gcc-patches mailing list