diff mbox

Do slightly less work in jump threader

Message ID 535E59D4.9040607@redhat.com
State New
Headers show

Commit Message

Jeff Law April 28, 2014, 1:38 p.m. UTC
Per Richi's request, don't iterate over virtual outputs when invaliding 
outputs of statements which do not produce useful outputs for jump 
threading.  Related to 60902.

Bootstrapped and regression tested on x86_64-unknown-linux-gnu. 
Installed on the trunk.
diff mbox

Patch

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 61fd558..89930b0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@ 
+2014-04-28  Jeff Law  <law@redhat.com>
+
+	PR tree-optimization/60902
+	* tree-ssa-threadedge.c
+	(record_temporary_equivalences_from_stmts_at_dest): Only iterate
+	over real defs when invalidating outputs from statements that do not
+	produce useful outputs for threading.
+
 2014-04-28  Richard Biener  <rguenther@suse.de>
 
 	PR tree-optimization/60979
diff --git a/gcc/tree-ssa-threadedge.c b/gcc/tree-ssa-threadedge.c
index 8a0103b..7621348 100644
--- a/gcc/tree-ssa-threadedge.c
+++ b/gcc/tree-ssa-threadedge.c
@@ -398,7 +398,7 @@  record_temporary_equivalences_from_stmts_at_dest (edge e,
 	  ssa_op_iter iter;
 
 	  if (backedge_seen)
-	    FOR_EACH_SSA_TREE_OPERAND (op, stmt, iter, SSA_OP_ALL_DEFS)
+	    FOR_EACH_SSA_TREE_OPERAND (op, stmt, iter, SSA_OP_DEF)
 	      {
 		/* This call only invalidates equivalences created by
 		   PHI nodes.  This is by design to keep the cost of