This is the mail archive of the gcc@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: Java segfault in predict.c


Hello.

> > ! 	  FOR_BB_BETWEEN (bb, BASIC_BLOCK (sbitmap_first_set_bit (loop->nodes)),
> > ! 		ENTRY_BLOCK_PTR, prev_bb)
> > ! 	    if (TEST_BIT (loop->nodes, bb->index))
> > ! 	      loop->first = bb;
> > ! 	  FOR_BB_BETWEEN (bb, BASIC_BLOCK (sbitmap_last_set_bit (loop->nodes)),
> > ! 		EXIT_BLOCK_PTR, next_bb)
> > ! 	    if (TEST_BIT (loop->nodes, bb->index))
> > ! 	      loop->last = bb;
> 
> Seems like
> 
> 	FOR_ALL_BB (bb)
> 	  if (TEST_BIT (loop->nodes, bb->index))
> 	    break;
> 	loop->first = bb;
> 
> 	FOR_ALL_BB_REVERSE (bb)
> 	  if (TEST_BIT (loop->nodes, bb->index))
> 	    break;
> 	loop->last = bb;
> 
> actually searches fewer blocks, and is clearer.

OK.

> Again, this seems like a real opportunity to want to rely on
> monotonicly increasing indicies...

Why?

Zdenek


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