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: PR17340 - disable accurate live analysis for now?


On Tue, Dec 14, 2004 at 11:48:04AM -0500, Vladimir Makarov wrote:
> 	* global.c (bb_info, allocate_bb_info, free_bb_info,
> 	modify_reg_pav, make_accurate_live_analysis).  Rename pavin,
> 	pavout to live_pavin, live_pavout.
> 	(modify_bb_reg_pav): Ditto.  Use live information to calculate
> 	live_pavin, live_pavout.
> 	(temp_bitmap): New variable.
> 	(calculate_reg_pav): Allocate/deallocate temp_bitmap.

Ok.

Further improvement:  Move this loop,

          FOR_EACH_EDGE (e, ei, bb->preds)
            changed_p = modify_bb_reg_pav (bb, e->src, changed_p);

>     bb_info = BB_INFO (bb);
> !   bb_live_pavin = bb_info->live_pavin;
> !   bb_live_pavout = bb_info->live_pavout;
>     if (pred->index != ENTRY_BLOCK)
> !     {
> !       bitmap_ior_into (bb_live_pavin, BB_INFO (pred)->live_pavout);
> !       bitmap_and_into (bb_live_pavin, bb->global_live_at_start);
> !     }

Into here, like so:

	FOR_EACH_EDGE (e, ei, bb->preds)
	  bitmap_ior_into (bb_live_pavin, BB_INFO (e->src)->live_pavout);
	bitmap_and_into (bb_live_pavin, bb->global_live_at_start);

> !   bitmap_ior_and_compl (temp_bitmap, bb_info->avloc,
> ! 			bb_live_pavin, bb_info->killed);
> !   bitmap_and_into (temp_bitmap, bb->global_live_at_end);
> !   if (bitmap_equal_p (temp_bitmap, bb_live_pavout))
> !     return changed_p;
> !   bitmap_copy (bb_live_pavout, temp_bitmap);

You're doing all of this extra work NEDGES-1 times too many.


r~


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