On Tue, Mar 06, 2012 at 08:04:12AM -0800, Richard Henderson wrote:
> On 03/06/12 07:55, Aldy Hernandez wrote:
> > + bb_regions = VEC_alloc (tm_region_p, heap, last_basic_block);
> > + VEC_reserve (tm_region_p, heap, bb_regions, last_basic_block);
> > + for (i = 0; i < last_basic_block; ++i)
> > + VEC_quick_insert (tm_region_p, bb_regions, i, NULL);
> The reserve is redundant, since you already did that in the alloc.
> You're looking for VEC_safe_grow_cleared here instead of that loop.
> Otherwise ok.
And VEC_safe_grow_cleared will do even the VEC_alloc if bb_regions is
NULL before this or you just set it to NULL before VEC_safe_grow_cleared.