diff options
author | Richard Biener <rguenther@suse.de> | 2014-06-06 07:38:07 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2014-06-06 07:38:07 +0000 |
commit | 726338f44ec906a894236b5cee6dcc7ab32fc30c (patch) | |
tree | 20e556c7d8b7c03079833b61519c222ba819f783 /gcc | |
parent | ffa4602f4d54c80b978b3f6c8c376fbf75b72277 (diff) | |
download | gcc-726338f44ec906a894236b5cee6dcc7ab32fc30c.tar.gz |
cfgexpand.c (expand_gimple_cond): Remove check for current_loops.
2014-06-06 Richard Biener <rguenther@suse.de>
* cfgexpand.c (expand_gimple_cond): Remove check for current_loops.
(construct_init_block): Likewise.
(construct_exit_block): Likewise.
(pass_expand::execute): Likewise.
* graphite.c (graphite_transforms): Replace check for current_loops
with a check for > 1 loops.
(pass_graphite_transforms::execute): Adjust.
* ipa-split.c (split_function): Remove check for current_loops.
* omp-low.c (expand_parallel_call): Likewise.
(expand_omp_for_init_counts): Likewise.
(extract_omp_for_update_vars): Likewise.
(expand_omp_for_generic): Likewise.
(expand_omp_sections): Likewise.
(expand_omp_target): Likewise.
* tracer.c (tail_duplicate): Likewise.
(pass_tracer::execute): Likewise.
* trans-mem.c (expand_transaction): Likewise.
* tree-complex.c (expand_complex_div_wide): Likewise.
* tree-eh.c (lower_resx): Likewise.
(cleanup_empty_eh_merge_phis): Likewise.
* tree-predcom.c (run_tree_predictive_commoning): Replace check for
current_loops with a check for > 1 loops.
(pass_predcom::execute): Adjust.
* tree-scalar-evolution.c (scev_reset): Remove check for current_loops.
* tree-ssa-copy.c (copy_prop_visit_phi_node): Likewise.
* tree-ssa-dom.c (pass_phi_only_cprop::execute): Likewise.
* tree-ssa-tail-merge.c (tail_merge_optimize): Likewise.
* tree-ssa-threadupdate.c (thread_through_all_blocks): Likewise.
* tree-switch-conversion.c (process_switch): Likewise.
* tree-tailcall.c (tree_optimize_tail_calls_1): Likewise.
* tree-vrp.c (vrp_visit_phi_node): Likewise.
(execute_vrp): Likewise.
* ubsan.c (ubsan_expand_null_ifn): Likewise.
From-SVN: r211306
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 36 | ||||
-rw-r--r-- | gcc/cfgexpand.c | 12 | ||||
-rw-r--r-- | gcc/graphite.c | 6 | ||||
-rw-r--r-- | gcc/ipa-split.c | 3 | ||||
-rw-r--r-- | gcc/omp-low.c | 26 | ||||
-rw-r--r-- | gcc/tracer.c | 6 | ||||
-rw-r--r-- | gcc/trans-mem.c | 18 | ||||
-rw-r--r-- | gcc/tree-complex.c | 7 | ||||
-rw-r--r-- | gcc/tree-eh.c | 6 | ||||
-rw-r--r-- | gcc/tree-predcom.c | 8 | ||||
-rw-r--r-- | gcc/tree-scalar-evolution.c | 3 | ||||
-rw-r--r-- | gcc/tree-ssa-copy.c | 3 | ||||
-rw-r--r-- | gcc/tree-ssa-dom.c | 3 | ||||
-rw-r--r-- | gcc/tree-ssa-tail-merge.c | 13 | ||||
-rw-r--r-- | gcc/tree-ssa-threadupdate.c | 3 | ||||
-rw-r--r-- | gcc/tree-switch-conversion.c | 3 | ||||
-rw-r--r-- | gcc/tree-tailcall.c | 3 | ||||
-rw-r--r-- | gcc/tree-vrp.c | 4 | ||||
-rw-r--r-- | gcc/ubsan.c | 7 |
19 files changed, 76 insertions, 94 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 77ac4164278..71179f5f546 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,39 @@ +2014-06-06 Richard Biener <rguenther@suse.de> + + * cfgexpand.c (expand_gimple_cond): Remove check for current_loops. + (construct_init_block): Likewise. + (construct_exit_block): Likewise. + (pass_expand::execute): Likewise. + * graphite.c (graphite_transforms): Replace check for current_loops + with a check for > 1 loops. + (pass_graphite_transforms::execute): Adjust. + * ipa-split.c (split_function): Remove check for current_loops. + * omp-low.c (expand_parallel_call): Likewise. + (expand_omp_for_init_counts): Likewise. + (extract_omp_for_update_vars): Likewise. + (expand_omp_for_generic): Likewise. + (expand_omp_sections): Likewise. + (expand_omp_target): Likewise. + * tracer.c (tail_duplicate): Likewise. + (pass_tracer::execute): Likewise. + * trans-mem.c (expand_transaction): Likewise. + * tree-complex.c (expand_complex_div_wide): Likewise. + * tree-eh.c (lower_resx): Likewise. + (cleanup_empty_eh_merge_phis): Likewise. + * tree-predcom.c (run_tree_predictive_commoning): Replace check for + current_loops with a check for > 1 loops. + (pass_predcom::execute): Adjust. + * tree-scalar-evolution.c (scev_reset): Remove check for current_loops. + * tree-ssa-copy.c (copy_prop_visit_phi_node): Likewise. + * tree-ssa-dom.c (pass_phi_only_cprop::execute): Likewise. + * tree-ssa-tail-merge.c (tail_merge_optimize): Likewise. + * tree-ssa-threadupdate.c (thread_through_all_blocks): Likewise. + * tree-switch-conversion.c (process_switch): Likewise. + * tree-tailcall.c (tree_optimize_tail_calls_1): Likewise. + * tree-vrp.c (vrp_visit_phi_node): Likewise. + (execute_vrp): Likewise. + * ubsan.c (ubsan_expand_null_ifn): Likewise. + 2014-06-06 Eric Botcazou <ebotcazou@adacore.com> * rtl.h (insn_location): Declare. diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index e161cb76f2e..e8cd87f1c47 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -2170,8 +2170,7 @@ expand_gimple_cond (basic_block bb, gimple stmt) false_edge->flags |= EDGE_FALLTHRU; new_bb->count = false_edge->count; new_bb->frequency = EDGE_FREQUENCY (false_edge); - if (current_loops && bb->loop_father) - add_bb_to_loop (new_bb, bb->loop_father); + add_bb_to_loop (new_bb, bb->loop_father); new_edge = make_edge (new_bb, dest, 0); new_edge->probability = REG_BR_PROB_BASE; new_edge->count = new_bb->count; @@ -5273,8 +5272,7 @@ construct_init_block (void) ENTRY_BLOCK_PTR_FOR_FN (cfun)); init_block->frequency = ENTRY_BLOCK_PTR_FOR_FN (cfun)->frequency; init_block->count = ENTRY_BLOCK_PTR_FOR_FN (cfun)->count; - if (current_loops && ENTRY_BLOCK_PTR_FOR_FN (cfun)->loop_father) - add_bb_to_loop (init_block, ENTRY_BLOCK_PTR_FOR_FN (cfun)->loop_father); + add_bb_to_loop (init_block, ENTRY_BLOCK_PTR_FOR_FN (cfun)->loop_father); if (e) { first_block = e->dest; @@ -5352,8 +5350,7 @@ construct_exit_block (void) exit_block = create_basic_block (NEXT_INSN (head), end, prev_bb); exit_block->frequency = EXIT_BLOCK_PTR_FOR_FN (cfun)->frequency; exit_block->count = EXIT_BLOCK_PTR_FOR_FN (cfun)->count; - if (current_loops && EXIT_BLOCK_PTR_FOR_FN (cfun)->loop_father) - add_bb_to_loop (exit_block, EXIT_BLOCK_PTR_FOR_FN (cfun)->loop_father); + add_bb_to_loop (exit_block, EXIT_BLOCK_PTR_FOR_FN (cfun)->loop_father); ix = 0; while (ix < EDGE_COUNT (EXIT_BLOCK_PTR_FOR_FN (cfun)->preds)) @@ -5815,8 +5812,7 @@ pass_expand::execute (function *fun) timevar_push (TV_POST_EXPAND); /* We are no longer in SSA form. */ fun->gimple_df->in_ssa_p = false; - if (current_loops) - loops_state_clear (LOOP_CLOSED_SSA); + loops_state_clear (LOOP_CLOSED_SSA); /* Expansion is used by optimization passes too, set maybe_hot_insn_p conservatively to true until they are all profile aware. */ diff --git a/gcc/graphite.c b/gcc/graphite.c index 2e1f439ef9e..eedda4cf1d3 100644 --- a/gcc/graphite.c +++ b/gcc/graphite.c @@ -324,9 +324,9 @@ graphite_transform_loops (void) static unsigned int -graphite_transforms (void) +graphite_transforms (struct function *fun) { - if (!current_loops) + if (number_of_loops (fun) <= 1) return 0; graphite_transform_loops (); @@ -411,7 +411,7 @@ public: /* opt_pass methods: */ virtual bool gate (function *) { return gate_graphite_transforms (); } - virtual unsigned int execute (function *) { return graphite_transforms (); } + virtual unsigned int execute (function *fun) { return graphite_transforms (fun); } }; // class pass_graphite_transforms diff --git a/gcc/ipa-split.c b/gcc/ipa-split.c index bd1c08624f9..bfcd43e496e 100644 --- a/gcc/ipa-split.c +++ b/gcc/ipa-split.c @@ -1177,8 +1177,7 @@ split_function (struct split_point *split_point) e = make_edge (new_return_bb, EXIT_BLOCK_PTR_FOR_FN (cfun), 0); e->probability = REG_BR_PROB_BASE; e->count = new_return_bb->count; - if (current_loops) - add_bb_to_loop (new_return_bb, current_loops->tree_root); + add_bb_to_loop (new_return_bb, current_loops->tree_root); bitmap_set_bit (split_point->split_bbs, new_return_bb->index); } /* When we pass around the value, use existing return block. */ diff --git a/gcc/omp-low.c b/gcc/omp-low.c index 129d513d12c..0f400b0e3af 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -4297,11 +4297,8 @@ expand_parallel_call (struct omp_region *region, basic_block bb, make_edge (cond_bb, then_bb, EDGE_TRUE_VALUE); make_edge (cond_bb, else_bb, EDGE_FALSE_VALUE); - if (current_loops) - { - add_bb_to_loop (then_bb, cond_bb->loop_father); - add_bb_to_loop (else_bb, cond_bb->loop_father); - } + add_bb_to_loop (then_bb, cond_bb->loop_father); + add_bb_to_loop (else_bb, cond_bb->loop_father); e_then = make_edge (then_bb, bb, EDGE_FALLTHRU); e_else = make_edge (else_bb, bb, EDGE_FALLTHRU); @@ -5021,8 +5018,7 @@ expand_omp_for_init_counts (struct omp_for_data *fd, gimple_stmt_iterator *gsi, { first_zero_iter = i; zero_iter_bb = create_empty_bb (entry_bb); - if (current_loops) - add_bb_to_loop (zero_iter_bb, entry_bb->loop_father); + add_bb_to_loop (zero_iter_bb, entry_bb->loop_father); *gsi = gsi_after_labels (zero_iter_bb); stmt = gimple_build_assign (fd->loop.n2, build_zero_cst (type)); @@ -5205,8 +5201,7 @@ extract_omp_for_update_vars (struct omp_for_data *fd, basic_block cont_bb, tree vtype = TREE_TYPE (fd->loops[i].v); bb = create_empty_bb (last_bb); - if (current_loops) - add_bb_to_loop (bb, last_bb->loop_father); + add_bb_to_loop (bb, last_bb->loop_father); gsi = gsi_start_bb (bb); if (i < fd->collapse - 1) @@ -5693,8 +5688,7 @@ expand_omp_for_generic (struct omp_region *region, remove_edge (e); make_edge (cont_bb, l2_bb, EDGE_FALSE_VALUE); - if (current_loops) - add_bb_to_loop (l2_bb, cont_bb->loop_father); + add_bb_to_loop (l2_bb, cont_bb->loop_father); e = find_edge (cont_bb, l1_bb); if (gimple_omp_for_combined_p (fd->for_stmt)) { @@ -7139,8 +7133,7 @@ expand_omp_sections (struct omp_region *region) t = gimple_block_label (default_bb); u = build_case_label (NULL, NULL, t); make_edge (l0_bb, default_bb, 0); - if (current_loops) - add_bb_to_loop (default_bb, current_loops->tree_root); + add_bb_to_loop (default_bb, current_loops->tree_root); stmt = gimple_build_switch (vmain, u, label_vec); gsi_insert_after (&switch_si, stmt, GSI_SAME_STMT); @@ -8084,11 +8077,8 @@ expand_omp_target (struct omp_region *region) make_edge (cond_bb, then_bb, EDGE_TRUE_VALUE); make_edge (cond_bb, else_bb, EDGE_FALSE_VALUE); - if (current_loops) - { - add_bb_to_loop (then_bb, cond_bb->loop_father); - add_bb_to_loop (else_bb, cond_bb->loop_father); - } + add_bb_to_loop (then_bb, cond_bb->loop_father); + add_bb_to_loop (else_bb, cond_bb->loop_father); make_edge (then_bb, new_bb, EDGE_FALLTHRU); make_edge (else_bb, new_bb, EDGE_FALLTHRU); diff --git a/gcc/tracer.c b/gcc/tracer.c index 16c6949dd1d..ae05879e9f8 100644 --- a/gcc/tracer.c +++ b/gcc/tracer.c @@ -316,8 +316,7 @@ tail_duplicate (void) of all do { } while loops. Do not do that - it is not profitable and it might create a loop with multiple entries or at least rotate the loop. */ - && (!current_loops - || bb2->loop_father->header != bb2)) + && bb2->loop_father->header != bb2) { edge e; basic_block copy; @@ -419,8 +418,7 @@ pass_tracer::execute (function *fun) { free_dominance_info (CDI_DOMINATORS); /* If we changed the CFG schedule loops for fixup by cleanup_cfg. */ - if (current_loops) - loops_state_set (LOOPS_NEED_FIXUP); + loops_state_set (LOOPS_NEED_FIXUP); } if (dump_file) diff --git a/gcc/trans-mem.c b/gcc/trans-mem.c index 7c9f163e7df..b728d743d6e 100644 --- a/gcc/trans-mem.c +++ b/gcc/trans-mem.c @@ -2745,12 +2745,9 @@ expand_transaction (struct tm_region *region, void *data ATTRIBUTE_UNUSED) basic_block test_bb = create_empty_bb (transaction_bb); basic_block code_bb = create_empty_bb (test_bb); basic_block join_bb = create_empty_bb (code_bb); - if (current_loops && transaction_bb->loop_father) - { - add_bb_to_loop (test_bb, transaction_bb->loop_father); - add_bb_to_loop (code_bb, transaction_bb->loop_father); - add_bb_to_loop (join_bb, transaction_bb->loop_father); - } + add_bb_to_loop (test_bb, transaction_bb->loop_father); + add_bb_to_loop (code_bb, transaction_bb->loop_father); + add_bb_to_loop (join_bb, transaction_bb->loop_father); if (region->restart_block == region->entry_block) region->restart_block = test_bb; @@ -2791,8 +2788,7 @@ expand_transaction (struct tm_region *region, void *data ATTRIBUTE_UNUSED) if (abort_edge) { basic_block test_bb = create_empty_bb (transaction_bb); - if (current_loops && transaction_bb->loop_father) - add_bb_to_loop (test_bb, transaction_bb->loop_father); + add_bb_to_loop (test_bb, transaction_bb->loop_father); if (region->restart_block == region->entry_block) region->restart_block = test_bb; @@ -2834,8 +2830,7 @@ expand_transaction (struct tm_region *region, void *data ATTRIBUTE_UNUSED) if (inst_edge && uninst_edge) { basic_block test_bb = create_empty_bb (transaction_bb); - if (current_loops && transaction_bb->loop_father) - add_bb_to_loop (test_bb, transaction_bb->loop_father); + add_bb_to_loop (test_bb, transaction_bb->loop_father); if (region->restart_block == region->entry_block) region->restart_block = test_bb; @@ -2886,8 +2881,7 @@ expand_transaction (struct tm_region *region, void *data ATTRIBUTE_UNUSED) { basic_block empty_bb = create_empty_bb (transaction_bb); region->restart_block = empty_bb; - if (current_loops && transaction_bb->loop_father) - add_bb_to_loop (empty_bb, transaction_bb->loop_father); + add_bb_to_loop (empty_bb, transaction_bb->loop_father); redirect_edge_pred (fallthru_edge, empty_bb); make_edge (transaction_bb, empty_bb, EDGE_FALLTHRU); diff --git a/gcc/tree-complex.c b/gcc/tree-complex.c index cf542fd230c..eefb952d5bb 100644 --- a/gcc/tree-complex.c +++ b/gcc/tree-complex.c @@ -1162,11 +1162,8 @@ expand_complex_div_wide (gimple_stmt_iterator *gsi, tree inner_type, make_edge (bb_cond, bb_false, EDGE_FALSE_VALUE); make_edge (bb_true, bb_join, EDGE_FALLTHRU); make_edge (bb_false, bb_join, EDGE_FALLTHRU); - if (current_loops) - { - add_bb_to_loop (bb_true, bb_cond->loop_father); - add_bb_to_loop (bb_false, bb_cond->loop_father); - } + add_bb_to_loop (bb_true, bb_cond->loop_father); + add_bb_to_loop (bb_false, bb_cond->loop_father); /* Update dominance info. Note that bb_join's data was updated by split_block. */ diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c index db02cbdb1b5..9f8408d71d3 100644 --- a/gcc/tree-eh.c +++ b/gcc/tree-eh.c @@ -3212,8 +3212,7 @@ lower_resx (basic_block bb, gimple stmt, struct pointer_map_t *mnt_map) gimple_stmt_iterator gsi2; new_bb = create_empty_bb (bb); - if (current_loops) - add_bb_to_loop (new_bb, bb->loop_father); + add_bb_to_loop (new_bb, bb->loop_father); lab = gimple_block_label (new_bb); gsi2 = gsi_start_bb (new_bb); @@ -4210,8 +4209,7 @@ cleanup_empty_eh_merge_phis (basic_block new_bb, basic_block old_bb, we may have created a loop with multiple latches. All of this isn't easily fixed thus cancel the affected loop and mark the other loop as possibly having multiple latches. */ - if (current_loops - && e->dest == e->dest->loop_father->header) + if (e->dest == e->dest->loop_father->header) { e->dest->loop_father->header = NULL; e->dest->loop_father->latch = NULL; diff --git a/gcc/tree-predcom.c b/gcc/tree-predcom.c index 2cb47db4e51..a9a004e3f7e 100644 --- a/gcc/tree-predcom.c +++ b/gcc/tree-predcom.c @@ -2565,9 +2565,9 @@ tree_predictive_commoning (void) /* Predictive commoning Pass. */ static unsigned -run_tree_predictive_commoning (void) +run_tree_predictive_commoning (struct function *fun) { - if (!current_loops) + if (number_of_loops (fun) <= 1) return 0; return tree_predictive_commoning (); @@ -2598,9 +2598,9 @@ public: /* opt_pass methods: */ virtual bool gate (function *) { return flag_predictive_commoning != 0; } - virtual unsigned int execute (function *) + virtual unsigned int execute (function *fun) { - return run_tree_predictive_commoning (); + return run_tree_predictive_commoning (fun); } }; // class pass_predcom diff --git a/gcc/tree-scalar-evolution.c b/gcc/tree-scalar-evolution.c index 44758556f9b..3890f958aac 100644 --- a/gcc/tree-scalar-evolution.c +++ b/gcc/tree-scalar-evolution.c @@ -3197,9 +3197,6 @@ scev_reset (void) scev_reset_htab (); - if (!current_loops) - return; - FOR_EACH_LOOP (loop, 0) { loop->nb_iterations = NULL_TREE; diff --git a/gcc/tree-ssa-copy.c b/gcc/tree-ssa-copy.c index 0c1421666bb..e0ed63f0a44 100644 --- a/gcc/tree-ssa-copy.c +++ b/gcc/tree-ssa-copy.c @@ -406,8 +406,7 @@ copy_prop_visit_phi_node (gimple phi) ??? The value will be always loop invariant. In loop-closed SSA form do not copy-propagate through PHI nodes in blocks with a loop exit edge predecessor. */ - if (current_loops - && TREE_CODE (arg_value) == SSA_NAME + if (TREE_CODE (arg_value) == SSA_NAME && (loop_depth_of_name (arg_value) > loop_depth_of_name (lhs) || (loops_state_satisfies_p (LOOP_CLOSED_SSA) && loop_exit_edge_p (e->src->loop_father, e)))) diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c index c980dfd85e6..b7ec05b624c 100644 --- a/gcc/tree-ssa-dom.c +++ b/gcc/tree-ssa-dom.c @@ -3128,8 +3128,7 @@ pass_phi_only_cprop::execute (function *fun) { free_dominance_info (CDI_DOMINATORS); /* If we changed the CFG schedule loops for fixup by cfgcleanup. */ - if (current_loops) - loops_state_set (LOOPS_NEED_FIXUP); + loops_state_set (LOOPS_NEED_FIXUP); } /* Propagation of const and copies may make some EH edges dead. Purge diff --git a/gcc/tree-ssa-tail-merge.c b/gcc/tree-ssa-tail-merge.c index f879871c7f0..20fbebf35d0 100644 --- a/gcc/tree-ssa-tail-merge.c +++ b/gcc/tree-ssa-tail-merge.c @@ -1656,18 +1656,7 @@ tail_merge_optimize (unsigned int todo) int max_iterations = PARAM_VALUE (PARAM_MAX_TAIL_MERGE_ITERATIONS); if (!flag_tree_tail_merge - || max_iterations == 0 - /* We try to be conservative with respect to loop structure, since: - - the cases where tail-merging could both affect loop structure and be - beneficial are rare, - - it prevents us from having to fixup the loops using - loops_state_set (LOOPS_NEED_FIXUP), and - - keeping loop structure may allow us to simplify the pass. - In order to be conservative, we need loop information. In rare cases - (about 7 test-cases in the g++ testsuite) there is none (because - loop_optimizer_finalize has been called before tail-merge, and - PROP_loops is not set), so we bail out. */ - || current_loops == NULL) + || max_iterations == 0) return 0; timevar_push (TV_TREE_TAIL_MERGE); diff --git a/gcc/tree-ssa-threadupdate.c b/gcc/tree-ssa-threadupdate.c index 0a24a5cc0ec..fa31613d1ad 100644 --- a/gcc/tree-ssa-threadupdate.c +++ b/gcc/tree-ssa-threadupdate.c @@ -1707,9 +1707,6 @@ thread_through_all_blocks (bool may_peel_loop_headers) bitmap threaded_blocks; struct loop *loop; - /* We must know about loops in order to preserve them. */ - gcc_assert (current_loops != NULL); - if (!paths.exists ()) return false; diff --git a/gcc/tree-switch-conversion.c b/gcc/tree-switch-conversion.c index 3651120d0e1..9789b619ee2 100644 --- a/gcc/tree-switch-conversion.c +++ b/gcc/tree-switch-conversion.c @@ -1370,8 +1370,7 @@ process_switch (gimple swtch) fputs (" expanding as bit test is preferable\n", dump_file); emit_case_bit_tests (swtch, info.index_expr, info.range_min, info.range_size); - if (current_loops) - loops_state_set (LOOPS_NEED_FIXUP); + loops_state_set (LOOPS_NEED_FIXUP); return NULL; } diff --git a/gcc/tree-tailcall.c b/gcc/tree-tailcall.c index f7beaefd76d..6f6c758c356 100644 --- a/gcc/tree-tailcall.c +++ b/gcc/tree-tailcall.c @@ -1059,8 +1059,7 @@ tree_optimize_tail_calls_1 (bool opt_tailcalls) if (changed) { /* We may have created new loops. Make them magically appear. */ - if (current_loops) - loops_state_set (LOOPS_NEED_FIXUP); + loops_state_set (LOOPS_NEED_FIXUP); free_dominance_info (CDI_DOMINATORS); } diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index 034fa0720d2..428e622a217 100644 --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -8383,7 +8383,6 @@ vrp_visit_phi_node (gimple phi) PHI node SCEV may known more about its value-range. */ if ((cmp_min > 0 || cmp_min < 0 || cmp_max < 0 || cmp_max > 0) - && current_loops && (l = loop_containing_stmt (phi)) && l->header == gimple_bb (phi)) adjust_range_with_scev (&vr_result, l, phi, lhs); @@ -9784,8 +9783,7 @@ execute_vrp (void) if (to_remove_edges.length () > 0) { free_dominance_info (CDI_DOMINATORS); - if (current_loops) - loops_state_set (LOOPS_NEED_FIXUP); + loops_state_set (LOOPS_NEED_FIXUP); } to_remove_edges.release (); diff --git a/gcc/ubsan.c b/gcc/ubsan.c index 4de6d6e8ae3..5a8a4479404 100644 --- a/gcc/ubsan.c +++ b/gcc/ubsan.c @@ -571,11 +571,8 @@ ubsan_expand_null_ifn (gimple_stmt_iterator gsi) basic_block cond_bb = e->src; basic_block fallthru_bb = e->dest; basic_block then_bb = create_empty_bb (cond_bb); - if (current_loops) - { - add_bb_to_loop (then_bb, cond_bb->loop_father); - loops_state_set (LOOPS_NEED_FIXUP); - } + add_bb_to_loop (then_bb, cond_bb->loop_father); + loops_state_set (LOOPS_NEED_FIXUP); /* Make an edge coming from the 'cond block' into the 'then block'; this edge is unlikely taken, so set up the probability accordingly. */ |