This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 3/3] Loop flattening on loop-SSA.
On Wed, Nov 03, 2010 at 10:52:26AM -0500, Sebastian Pop wrote:
> --- /dev/null
> +++ b/gcc/tree-loop-flattening.c
> +static void
> +add_missing_phi_nodes_1 (loop_p loop, gimple def_stmt)
> + phis = VEC_alloc (gimple, heap, n_basic_blocks);
> + for (i = 0; i < n_basic_blocks; i++)
> + VEC_quick_push (gimple, phis, NULL);
Why not just use VEC_safe_grow_cleared here?
> + for (i = 0; i < n_basic_blocks; i++)
> + {
> + gimple phi = VEC_index (gimple, phis, i);
I think you could use FOR_EACH_VEC_ELT.
-Nathan