From: Jeff Law Date: Fri, 9 Oct 2015 21:16:16 +0000 (-0600) Subject: Re: [PATCH] Update SSA_NAME manager to use two lists X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9cf1766f2fb9f5306177d266b7047d871c3272e9;p=gcc.git Re: [PATCH] Update SSA_NAME manager to use two lists * tree-ssanames.c (flush_ssaname_freelist): Use splice and truncate rather than moving each name to the freelist individually. From-SVN: r228668 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 69743c318fb..4b81033bc60 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-10-09 Jeff Law + + * tree-ssanames.c (flush_ssaname_freelist): Use splice and truncate + rather than moving each name to the freelist individually. + 2015-10-09 Steve Ellcey * config.gcc (mips*-*-*): Add frame-header-opt.o to extra_objs. diff --git a/gcc/tree-ssanames.c b/gcc/tree-ssanames.c index 91f4ed8d7f1..82fd4a15f85 100644 --- a/gcc/tree-ssanames.c +++ b/gcc/tree-ssanames.c @@ -127,11 +127,8 @@ ssanames_print_statistics (void) void flush_ssaname_freelist (void) { - while (!vec_safe_is_empty (FREE_SSANAMES_QUEUE (cfun))) - { - tree t = FREE_SSANAMES_QUEUE (cfun)->pop (); - vec_safe_push (FREE_SSANAMES (cfun), t); - } + vec_safe_splice (FREE_SSANAMES (cfun), FREE_SSANAMES_QUEUE (cfun)); + vec_safe_truncate (FREE_SSANAMES_QUEUE (cfun), 0); } /* Return an SSA_NAME node for variable VAR defined in statement STMT