This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [cfg-branch] bb-reorder: preconnecting traces
- From: Josef Zlomek <zlomj9am at artax dot karlin dot mff dot cuni dot cz>
- To: Jan Hubicka <jh at suse dot cz>
- Cc: gcc-pdo at atrey dot karlin dot mff dot cuni dot cz, gcc-patches at gcc dot gnu dot org
- Date: Tue, 28 May 2002 13:03:27 +0200
- Subject: Re: [cfg-branch] bb-reorder: preconnecting traces
- References: <20020515090621.GW4292@atrey.karlin.mff.cuni.cz> <20020528105750.GA20816@artax.karlin.mff.cuni.cz>
> 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