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: [cfg-branch] bb-reorder: preconnecting traces


> 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


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