aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-uncprop.c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2018-08-27 14:17:19 +0200
committerMartin Liska <marxin@gcc.gnu.org>2018-08-27 12:17:19 +0000
commit61ff5d6f4ed5000ee427e054ee803bc8f5535bdd (patch)
tree258d294d1bd789f941b4e62269851da44fa8a99c /gcc/tree-ssa-uncprop.c
parent78ea9abc2018243af7f7ada6135144ac90c6ad27 (diff)
downloadgcc-61ff5d6f4ed5000ee427e054ee803bc8f5535bdd.zip
gcc-61ff5d6f4ed5000ee427e054ee803bc8f5535bdd.tar.gz
gcc-61ff5d6f4ed5000ee427e054ee803bc8f5535bdd.tar.bz2
Add new gswitch related functions into tree-cfg.c.
2018-08-27 Martin Liska <mliska@suse.cz> * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass cfun argument explicitly. * gimple-pretty-print.c (dump_gimple_switch): Likewise. * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new function gimple_switch_default_bb. (convert_switch_statements): (expand_builtins): * ipa-fnsummary.c (set_switch_stmt_execution_predicate): * stmt.c (label_to_block_fn): Use label_to_block and pass cfun argument explicitly and use gimple_switch_label_bb. (expand_case): Likewise. * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass cfun argument explicitly. Likewise. (make_edges_bb): Likewise. (make_cond_expr_edges): Likewise. (get_cases_for_edge): Likewise. (make_gimple_switch_edges): Likewise. (label_to_block_fn): Likewise. (label_to_block): Likewise. (make_goto_expr_edges): Likewise. (make_gimple_asm_edges): Likewise. (main_block_label): Likewise. (group_case_labels_stmt): Likewise. (find_taken_edge_computed_goto): Likewise. (find_taken_edge_switch_expr): Likewise. (gimple_verify_flow_info): Likewise. (gimple_redirect_edge_and_branch): Likewise. (gimple_switch_label_bb): New function. (gimple_switch_default_bb): Likewise. (gimple_switch_edge): Likewise. (gimple_switch_default_edge): Likewise. * tree-cfg.h (label_to_block_fn): Remove and replace ... (label_to_block): ... with this. (gimple_switch_label_bb): New. (gimple_switch_default_bb): Likewise. (gimple_switch_edge): Likewise. (gimple_switch_default_edge): Likewise. * tree-cfgcleanup.c (convert_single_case_switch): Use new gimple functions and pass new argument to label_to_block. (cleanup_control_flow_bb): * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass cfun argument explicitly. (make_eh_edges): Likewise. (redirect_eh_dispatch_edge): Likewise. (lower_resx): Likewise. (lower_eh_dispatch): Likewise. (maybe_remove_unreachable_handlers): Likewise. (unsplit_eh): Likewise. (cleanup_empty_eh): Likewise. (verify_eh_edges): Likewise. (verify_eh_dispatch_edge): Likewise. * tree-ssa-dom.c (record_edge_info): Likewise. * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise. * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise. (thread_through_normal_block): Likewise. * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise. * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): * tree-switch-conversion.c (switch_conversion::collect): Use new gimple functions. (switch_conversion::check_final_bb): Likewise. (switch_conversion::gather_default_values): Pass new argument to label_to_block. (switch_conversion::build_constructors): Likewise. (switch_decision_tree::compute_cases_per_edge): Use new gimple_switch_edge function. (switch_decision_tree::analyze_switch_statement): Pass new argument to label_to_block. (switch_decision_tree::try_switch_expansion): Use gimple_switch_default_edge. * tree-vrp.c (find_switch_asserts): Pass new argument to label_to_block. * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise. (vr_values::simplify_switch_using_ranges): Likewise. From-SVN: r263876
Diffstat (limited to 'gcc/tree-ssa-uncprop.c')
-rw-r--r--gcc/tree-ssa-uncprop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/tree-ssa-uncprop.c b/gcc/tree-ssa-uncprop.c
index 7d863a7..98cc79e 100644
--- a/gcc/tree-ssa-uncprop.c
+++ b/gcc/tree-ssa-uncprop.c
@@ -184,7 +184,7 @@ associate_equivalences_with_edges (void)
for (i = 0; i < n_labels; i++)
{
tree label = gimple_switch_label (switch_stmt, i);
- basic_block bb = label_to_block (CASE_LABEL (label));
+ basic_block bb = label_to_block (cfun, CASE_LABEL (label));
if (CASE_HIGH (label)
|| !CASE_LOW (label)