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: [patch] Reenable LOOP_HEADER prediction


Hello,

> > > the predictor telling that the copied condition for the first iteration
> > > of loop is usually true became unused when loop header copying on
> > > rtl was removed.  This patch makes tree level header copying to use
> > > it instead.
> > 
> > Perhaps it would make more sense to reorder branch prediction and header
> > copying in order to allow it to take profile into account (and restrict
> > duplication in cold regilapons). 
> 
> I was going to point out (sometime soon :P) that we completely funkify
> the cfg doing header copying at times.
> I've got some nice .dot files that show we turned a simple nested loop
> into something we have significant trouble doing anything useful with
> because -ch changed it in a way that significantly changed the dominance
> structure in bad ways, 

this should not happen. Currently, we only copy the && type chains of
conditions, so you will not get anything more complicated then
(equivalent of)

if (cond1 && cond2 && ... && condk)
  {
    do
      {
      }
      while (cond1 && ... && condk);
  }

> I was going to suggest we possibly move tree ch to sometime after high
> level loop opts,

I would suggest rather moving the high level loop opts sometime earlier
in the compilation.

Zdenek


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