From 9cf1766f2fb9f5306177d266b7047d871c3272e9 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Fri, 9 Oct 2015 15:16:16 -0600 Subject: [PATCH] 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 --- gcc/ChangeLog | 5 +++++ gcc/tree-ssanames.c | 7 ++----- 2 files changed, 7 insertions(+), 5 deletions(-) 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 -- 2.30.2