aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2014-05-20 13:54:06 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2014-05-20 13:54:06 +0000
commitb2b222b31138eb3772cfd648ff2cf31be27ee30b (patch)
tree173bc51873496f0c9dd1827d9f390d07b2fcd19e /gcc
parentbdb5a9a30cf2074db776dc282ebdb135f25c36f0 (diff)
downloadgcc-b2b222b31138eb3772cfd648ff2cf31be27ee30b.zip
gcc-b2b222b31138eb3772cfd648ff2cf31be27ee30b.tar.gz
gcc-b2b222b31138eb3772cfd648ff2cf31be27ee30b.tar.bz2
tree-ssa-sccvn.c (process_scc): Dump SCC here, when iterating,
2014-05-20 Richard Biener <rguenther@suse.de> * tree-ssa-sccvn.c (process_scc): Dump SCC here, when iterating, (extract_and_process_scc_for_name): not here. (cond_dom_walker::before_dom_children): Only process stmts that end the BB in interesting ways. (run_scc_vn): Mark param uses as visited. From-SVN: r210643
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/tree-ssa-sccvn.c31
2 files changed, 33 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 58f93d1..f0aecbd 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,12 @@
+2014-05-20 Richard Biener <rguenther@suse.de>
+
+ * tree-ssa-sccvn.c (process_scc): Dump SCC here, when
+ iterating,
+ (extract_and_process_scc_for_name): not here.
+ (cond_dom_walker::before_dom_children): Only process
+ stmts that end the BB in interesting ways.
+ (run_scc_vn): Mark param uses as visited.
+
2014-05-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/arm/arm.md (arith_shiftsi): Do not predicate for
diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c
index 73362f8..b45dc14 100644
--- a/gcc/tree-ssa-sccvn.c
+++ b/gcc/tree-ssa-sccvn.c
@@ -3833,6 +3833,9 @@ process_scc (vec<tree> scc)
}
}
+ if (dump_file && (dump_flags & TDF_DETAILS))
+ print_scc (dump_file, scc);
+
/* Iterate over the SCC with the optimistic table until it stops
changing. */
current_info = optimistic_info;
@@ -3858,6 +3861,8 @@ process_scc (vec<tree> scc)
changed |= visit_use (var);
}
+ if (dump_file && (dump_flags & TDF_DETAILS))
+ fprintf (dump_file, "Processing SCC needed %d iterations\n", iterations);
statistics_histogram_event (cfun, "SCC iterations", iterations);
/* Finally, copy the contents of the no longer used optimistic
@@ -3909,9 +3914,6 @@ extract_and_process_scc_for_name (tree name)
if (scc.length () > 1)
sort_scc (scc);
- if (dump_file && (dump_flags & TDF_DETAILS))
- print_scc (dump_file, scc);
-
process_scc (scc);
return true;
@@ -4221,6 +4223,19 @@ cond_dom_walker::before_dom_children (basic_block bb)
if (!stmt)
return;
+ enum gimple_code code = gimple_code (stmt);
+ if (code != GIMPLE_COND
+ && code != GIMPLE_SWITCH
+ && code != GIMPLE_GOTO)
+ return;
+
+ if (dump_file && (dump_flags & TDF_DETAILS))
+ {
+ fprintf (dump_file, "Value-numbering operands of stmt ending BB %d: ",
+ bb->index);
+ print_gimple_stmt (dump_file, stmt, 0, 0);
+ }
+
/* Value-number the last stmts SSA uses. */
ssa_op_iter i;
tree op;
@@ -4236,7 +4251,7 @@ cond_dom_walker::before_dom_children (basic_block bb)
if value-numbering can prove they are not reachable. Handling
computed gotos is also possible. */
tree val;
- switch (gimple_code (stmt))
+ switch (code)
{
case GIMPLE_COND:
{
@@ -4259,8 +4274,7 @@ cond_dom_walker::before_dom_children (basic_block bb)
val = gimple_goto_dest (stmt);
break;
default:
- val = NULL_TREE;
- break;
+ gcc_unreachable ();
}
if (!val)
return;
@@ -4300,7 +4314,10 @@ run_scc_vn (vn_lookup_kind default_vn_walk_kind_)
{
tree def = ssa_default_def (cfun, param);
if (def)
- VN_INFO (def)->valnum = def;
+ {
+ VN_INFO (def)->visited = true;
+ VN_INFO (def)->valnum = def;
+ }
}
/* Mark all edges as possibly executable. */