+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
}
}
+ 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;
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
if (scc.length () > 1)
sort_scc (scc);
- if (dump_file && (dump_flags & TDF_DETAILS))
- print_scc (dump_file, scc);
-
process_scc (scc);
return true;
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;
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:
{
val = gimple_goto_dest (stmt);
break;
default:
- val = NULL_TREE;
- break;
+ gcc_unreachable ();
}
if (!val)
return;
{
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. */