This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFA: patch for usage of more accurate live information for the global and the reload.
- From: Richard Henderson <rth at redhat dot com>
- To: Vladimir Makarov <vmakarov at redhat dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 23 May 2004 11:55:29 -0700
- Subject: Re: RFA: patch for usage of more accurate live information for the global and the reload.
- References: <40A9028B.3050908@redhat.com>
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~