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] PR/7344, O(n^2) branch prediction


Hello,

> > > I tried to make bootstrap, but it didn't finish due to unrelated issues.
> > > Would appreciate if you could run it.
> > 
> > OK, it's in progress.  Results in a few hours.
> > 
> > Brad
> > 
> 
> Also, it would be good if someone more familiar with branch prediction
> checked the patch, and make sure I'm testing for the right condition...

!   for (e = BASIC_BLOCK (y)->succ, count = 0; e; e = e->succ_next)
!     {
!       if (++count >= 2)
!         break;
!       if (e->dest->index >= 0
!           && dominated_by_p (post_dominators, e->dest, bb))
!         predict_edge_def (e, pred, taken);
!     }

I believe there should be "if (count++ >= 2)"; the way it is here it
will break too soon.

Zdenek Dvorak


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