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]

[PATCH] Fix accounting for num_threaded_edges



tree-ssa-threadupdate.c keeps running total of the number of edges it threads. Those totals are useful debugging tools and are also examined by the testsuite.

While looking at the effects of using the FSM threader on ssa-dom-thread-2?.c I noticed the counters weren't being updated properly for FSM threads.

This patch fixes that minor goof.

Bootstrapped & regression tested on x86_64-linux-gnu. Installed on the trunk.

Jeff
commit 05dc98161472ce2e3d5f68bfcfca907deac03140
Author: Jeff Law <law@redhat.com>
Date:   Wed Oct 14 11:52:01 2015 -0600

    [PATCH] Fix accounting for num_threaded_edges
    
    	* tree-ssa-threadupdate.c (thread_through_all_blocks): Bump
    	num_threaded_edges for successful FSM threads too.

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a555d2b..7c64fa8 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2015-10-14  Jeff Law  <law@redhat.com>
+
+	* tree-ssa-threadupdate.c (thread_through_all_blocks): Bump
+	num_threaded_edges for successful FSM threads too.
+
 2015-10-14  Richard Biener  <rguenther@suse.de>
 
 	* tree-vectorizer.h (vect_is_simple_use): Remove unused parameters.
diff --git a/gcc/tree-ssa-threadupdate.c b/gcc/tree-ssa-threadupdate.c
index e426c1d..5632a88 100644
--- a/gcc/tree-ssa-threadupdate.c
+++ b/gcc/tree-ssa-threadupdate.c
@@ -2672,6 +2672,7 @@ thread_through_all_blocks (bool may_peel_loop_headers)
 	  free_dominance_info (CDI_DOMINATORS);
 	  bitmap_set_bit (threaded_blocks, entry->src->index);
 	  retval = true;
+	  thread_stats.num_threaded_edges++;
 	}
 
       delete_jump_thread_path (path);

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