diff options
Diffstat (limited to 'gcc/tree-cfgcleanup.c')
-rw-r--r-- | gcc/tree-cfgcleanup.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/tree-cfgcleanup.c b/gcc/tree-cfgcleanup.c index e864eed94f8..4e5adc28a06 100644 --- a/gcc/tree-cfgcleanup.c +++ b/gcc/tree-cfgcleanup.c @@ -36,8 +36,10 @@ along with GCC; see the file COPYING3. If not see #include "tree-cfg.h" #include "tree-phinodes.h" #include "ssa-iterators.h" +#include "stringpool.h" #include "tree-ssanames.h" #include "tree-ssa-loop-manip.h" +#include "expr.h" #include "tree-dfa.h" #include "tree-ssa.h" #include "tree-pass.h" @@ -249,14 +251,14 @@ tree_forwarder_block_p (basic_block bb, bool phi_wanted) Otherwise, BB must have PHI nodes. */ || gimple_seq_empty_p (phi_nodes (bb)) == phi_wanted /* BB may not be a predecessor of EXIT_BLOCK_PTR. */ - || single_succ (bb) == EXIT_BLOCK_PTR + || single_succ (bb) == EXIT_BLOCK_PTR_FOR_FN (cfun) /* Nor should this be an infinite loop. */ || single_succ (bb) == bb /* BB may not have an abnormal outgoing edge. */ || (single_succ_edge (bb)->flags & EDGE_ABNORMAL)) return false; - gcc_checking_assert (bb != ENTRY_BLOCK_PTR); + gcc_checking_assert (bb != ENTRY_BLOCK_PTR_FOR_FN (cfun)); locus = single_succ_edge (bb)->goto_locus; @@ -266,7 +268,7 @@ tree_forwarder_block_p (basic_block bb, bool phi_wanted) edge e; FOR_EACH_EDGE (e, ei, bb->preds) - if (e->src == ENTRY_BLOCK_PTR || (e->flags & EDGE_EH)) + if (e->src == ENTRY_BLOCK_PTR_FOR_FN (cfun) || (e->flags & EDGE_EH)) return false; /* If goto_locus of any of the edges differs, prevent removing the forwarder block for -O0. */ @@ -905,7 +907,7 @@ remove_forwarder_block_with_phi (basic_block bb) static unsigned int merge_phi_nodes (void) { - basic_block *worklist = XNEWVEC (basic_block, n_basic_blocks); + basic_block *worklist = XNEWVEC (basic_block, n_basic_blocks_for_fn (cfun)); basic_block *current = worklist; basic_block bb; |