IRA improvements 4/4

Nathan Froyd froydnj@codesourcery.com
Wed Jul 7 19:55:00 GMT 2010


On Wed, Jul 07, 2010 at 09:31:47AM -0400, Vladimir Makarov wrote:
>   This is the last patch to speed up IRA.  The big part of the patch
> decreases allocno structure footprint (more than 2 times) improving
> data locality.  The patch also contains manual optimizations of some
> critical loops.

I am underqualified to comment on the majority of the patch, but this
pattern:

> @@ -2425,7 +2411,7 @@ copy_info_to_removed_store_destinations 
>         a != NULL;
>         a = ALLOCNO_NEXT_REGNO_ALLOCNO (a))
>      {
> -      if (a != regno_top_level_allocno_map[REGNO (ALLOCNO_REG (a))])
> +      if (a != regno_top_level_allocno_map[REGNO (ALLOCNO_EMIT_DATA (a)->reg)])

with REGNO (ALLOCNO_EMIT_DATA (a)->reg) is reasonably common.  (fgrep
says 28 occurrences.)  Is it reasonable to factor this out into:

static <mumble>
regno_for_emit_data (<mumble> a)
{
  return REGNO (ALLOCNO_EMIT_DATA (a)->reg);
}

WDYT?

-Nathan



More information about the Gcc-patches mailing list