summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-uninit.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-ssa-uninit.c')
-rw-r--r--gcc/tree-ssa-uninit.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/gcc/tree-ssa-uninit.c b/gcc/tree-ssa-uninit.c
index a15e37c5151..3b8d1df9c85 100644
--- a/gcc/tree-ssa-uninit.c
+++ b/gcc/tree-ssa-uninit.c
@@ -175,7 +175,7 @@ warn_uninitialized_vars (bool warn_possibly_uninitialized)
FOR_EACH_BB (bb)
{
bool always_executed = dominated_by_p (CDI_POST_DOMINATORS,
- single_succ (ENTRY_BLOCK_PTR), bb);
+ single_succ (ENTRY_BLOCK_PTR_FOR_FN (cfun)), bb);
for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
{
gimple stmt = gsi_stmt (gsi);
@@ -315,14 +315,14 @@ compute_uninit_opnds_pos (gimple phi)
static inline basic_block
find_pdom (basic_block block)
{
- if (block == EXIT_BLOCK_PTR)
- return EXIT_BLOCK_PTR;
+ if (block == EXIT_BLOCK_PTR_FOR_FN (cfun))
+ return EXIT_BLOCK_PTR_FOR_FN (cfun);
else
{
basic_block bb
= get_immediate_dominator (CDI_POST_DOMINATORS, block);
if (! bb)
- return EXIT_BLOCK_PTR;
+ return EXIT_BLOCK_PTR_FOR_FN (cfun);
return bb;
}
}
@@ -333,13 +333,13 @@ find_pdom (basic_block block)
static inline basic_block
find_dom (basic_block block)
{
- if (block == ENTRY_BLOCK_PTR)
- return ENTRY_BLOCK_PTR;
+ if (block == ENTRY_BLOCK_PTR_FOR_FN (cfun))
+ return ENTRY_BLOCK_PTR_FOR_FN (cfun);
else
{
basic_block bb = get_immediate_dominator (CDI_DOMINATORS, block);
if (! bb)
- return ENTRY_BLOCK_PTR;
+ return ENTRY_BLOCK_PTR_FOR_FN (cfun);
return bb;
}
}
@@ -454,7 +454,8 @@ compute_control_dep_chain (basic_block bb, basic_block dep_bb,
cd_bb = find_pdom (cd_bb);
post_dom_check++;
- if (cd_bb == EXIT_BLOCK_PTR || post_dom_check > MAX_POSTDOM_CHECK)
+ if (cd_bb == EXIT_BLOCK_PTR_FOR_FN (cfun) || post_dom_check >
+ MAX_POSTDOM_CHECK)
break;
}
cur_cd_chain->pop ();