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: RFA: patch for usage of more accurate live information for the global and the reload.


On Mon, May 17, 2004 at 02:20:59PM -0400, Vladimir Makarov wrote:
> +   FOR_EACH_BB (bb)
> +     {
> +       bb->aux = bb_info = xmalloc (sizeof (struct bb_info));

Consider using alloc_aux_for_block(s).

> +       for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
> + 	{
> + 	  bitmap_set_bit (bb_info->pavin, i);
> + 	  bitmap_set_bit (bb_info->pavout, i);
> + 	}

You're computing the same set for each block.  Consider filling in
the bits just once and copying the set for each instance.

> + static void
> + forward_propagate_solution (bool (*eq) (basic_block, basic_block, bool))

This is called once; why pass the eq function?

> +   VARRAY_BB_INIT (new_bbs, 1000, "basic blocks for the next iter.");
> +   FOR_EACH_BB (bb)
> +     {
> +       VARRAY_PUSH_BB (bbs, bb);
> +     }

Inefficient when number of basic blocks > 1000.  You know exactly
how many blocks there are to begin.

All the actual algorithm bits look good.


r~


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