From 61183076f1dfbea5ac4fb6799aab9bc6e9aa8de5 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Tue, 27 Oct 2015 08:56:03 +0000 Subject: cfg.c (free_edge): Add function argument and use it instead of cfun. 2015-10-27 Richard Biener * cfg.c (free_edge): Add function argument and use it instead of cfun. (clear_edges): Likewise. * cfg.h (clear_edges): Adjust prototype. * cfgexpand.c (pass_expand::execute): Adjust. * cfgloop.c (release_recorded_exits): Add function argument and use it instead of cfun. * cfgloop.h (release_recorded_exits): Adjust prototype. (loops_state_satisfies_p): Add overload with function argument. (loops_state_set): Likewise. (loops_state_clear): Likewise. (struct loop_iterator): Add function argument to constructor and iterator and use it instead of cfun. (FOR_EACH_LOOP_FN): New macro. (loop_optimizer_finalize): Add overload with function argument. * loop-init.c (loop_optimizer_init): Adjust. (fix_loop_structure): Likewise. (loop_optimizer_finaliz): Add function argument and use it instead of cfun. * tree-cfg.c (delete_tree_cfg_annotations): Likewise. * tree-cfg.h (delete_tree_cfg_annotations): Adjust prototype. * cgraph.c (release_function_body): Do not push/pop cfun. * final.c (rest_of_clean_state): Adjust. * graphite.c (graphite_finalize): Likewise. * tree-ssa-copy.c (fini_copy_prop): Likewise. * tree-ssa-dce.c (perform_tree_ssa_dce): Likewise. * tree-ssa-loop-ivcanon.c (canonicalize_induction_variables): Likewise. (tree_unroll_loops_completely): Likewise. (pass_complete_unrolli::execute): Likewise. * tree-ssa-loop-niter.c (free_numbers_of_iterations_estimates): Add function argument and use it instead of cfun. * tree-ssa-loop-niter.h (free_numbers_of_iterations_estimates): Adjust prototype. * tree-ssa-loop.c (tree_ssa_loop_done): Adjust. * tree-ssa.c (delete_tree_ssa): Add function argument and use it instead of cfun. * tree-ssa.h (delete_tree_ssa): Adjust prototype. * tree-ssanames.c (fini_ssanames): Add function argument and use it instead of cfun. * tree-ssanames.c (fini_ssanames): Adjust prototype. * tree-vrp.c (execute_vrp): Adjust. * value-prof.c (free_histograms): Add function argument and use it instead of cfun. * value-prof.h (free_histograms): Adjust prototype. From-SVN: r229405 --- gcc/cfgloop.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'gcc/cfgloop.c') diff --git a/gcc/cfgloop.c b/gcc/cfgloop.c index b8a1244aaa6..5c13b3737c2 100644 --- a/gcc/cfgloop.c +++ b/gcc/cfgloop.c @@ -1114,12 +1114,12 @@ dump_recorded_exits (FILE *file) /* Releases lists of loop exits. */ void -release_recorded_exits (void) +release_recorded_exits (function *fn) { - gcc_assert (loops_state_satisfies_p (LOOPS_HAVE_RECORDED_EXITS)); - current_loops->exits->empty (); - current_loops->exits = NULL; - loops_state_clear (LOOPS_HAVE_RECORDED_EXITS); + gcc_assert (loops_state_satisfies_p (fn, LOOPS_HAVE_RECORDED_EXITS)); + loops_for_fn (fn)->exits->empty (); + loops_for_fn (fn)->exits = NULL; + loops_state_clear (fn, LOOPS_HAVE_RECORDED_EXITS); } /* Returns the list of the exit edges of a LOOP. */ -- cgit v1.2.3