[cfg-branch] bb-reorder: preconnecting traces

Josef Zlomek zlomj9am@artax.karlin.mff.cuni.cz
Tue May 28 05:28:00 GMT 2002


> Hi,
> 
> this patch performs "preconnecting" of traces. It means that
> while we are finding traces and find out that
> best_edge->dest is the start of some trace, these two traces are
> preconnected.
> 
> This patch should order the basic block better in this case:
> 
> > exit1:
> > pop_st0
> > pop_st0
> > exit2:
> > pop_st0
> > exit3:
> > pop_st0
> > pop_st0
> > pop_st0
> > pop_st0
> > return
> 
> when Prob(exit3) > Prob(exit2) > Prob(exit1).
> 
> Without this patch, the ordering would be (including duplications):
> exit3;  exit2, exit3;  exit1, exit2, exit3
> 
> With this patch, the ordering will be:
> exit1, exit2, exit3
> which is saving some duplications.
> 
> I can't find code where this occurs so I can't test whether it works as
> described, but it should.

Finally (thank Honza for the testcase), I tested it and it works as described.

Joe



More information about the Gcc-patches mailing list