summaryrefslogtreecommitdiff
path: root/gcc/cfgloop.c
diff options
context:
space:
mode:
authoramacleod <amacleod@138bc75d-0d04-0410-961f-82ee72b054a4>2013-10-18 19:35:40 +0000
committeramacleod <amacleod@138bc75d-0d04-0410-961f-82ee72b054a4>2013-10-18 19:35:40 +0000
commit424a4a92d75bb2fc702832c11c5917467b5a929c (patch)
treedae3f2a566777542e71127cd497bac3fc05fbf29 /gcc/cfgloop.c
parentc1acf60c9540fffb6d89b1c39bb577e5fd9eb529 (diff)
downloadgcc-424a4a92d75bb2fc702832c11c5917467b5a929c.tar.gz
* tree-ssa.h: Don't include gimple-low.h, tree-ssa-address.h, sbitmap.h,
tree-ssa-threadedge.h, tree-ssa-dom.h, and tree-cfgcleanup.h. * gimple-low.c (gimple_check_call_arg, gimple_check_call_matching_types): Move to cgraph.c. * gimple-low.h: Remove prototype. * cgraph.c: (gimple_check_call_arg, gimple_check_call_matching_types): Relocate from gimple-low.c. * cgraph.h: Add prototype. Don't include basic-block.h. * gimplify.c: Add gimple-low to include list. * omp-low.c: Add gimple-low and tree-cfgcleanup.h to include list. * tree-eh.c: Add gimple-low to include list. * tree-nested.c: Likewise. * cfgexpand.c: Add tree-ssa-address.h to include list. * expr.c: Likewise. * gimple-fold.c: Likewise. * gimple-ssa-strength-reduction.c: Likewise. * trans-mem.c: Likewise. * tree-mudflap.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-dom.c: Include tree-ssa-threadedge.h and tree-ssa-dom.h. (degenerate_phi_result): Move to tree-phinodes.c. * tree-ssa-loop-ch.c: Include tree-ssa-threadedge.h. * tree-ssa-threadedge.c: Likewise. * tree-vrp.c: Likewise. * tree-phinodes.c (degenerate_phi_result): Relocate here. * tree-ssa-dom.h (degenerate_phi_result): Remove Prototype. * tree-phinodes.h (degenerate_phi_result): Add prototype. * tree-ssa-copy.c: Include tree-ssa-dom.h. * tree-ssa-forwprop.c: Likewise. * tree-cfgcleanup.c (execute_cleanup_cfg_post_optimizing, pass_data_cleanup_cfg_post_optimizing, make_pass_cleanup_cfg_post_optimizing): Relocate from tree-optimize.c. * tree-optimize.c: Delete File. * graphite.c: Include tree-cfgcleanup.h. * passes.c: Likewise. * tree-cfg.c: Likewise. * tree-profile.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-switch-conversion.c: Don't include tree-ssa-operands.h. * tree-outof-ssa.c: Include sbitmap.h. * tree-ssa-live.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-stdarg.c: Likewise. * Makefile.in (OBJS): Delete tree-optimize.o. * basic-block.h (gcov_type, gcov_type_unsigned): Move to coretypes.h. * coretypes.h (gcov_type, gcov_type_unsigned): Relocate here. * varasm.c: Include basic-block.h. * cfgloop.h: Include function.h instead of basic-block.h (bb_loop_depth): Move to cfgloop.c. * cfgloop.c (bb_loop_depth): Relocate from cfgloop.h. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203833 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgloop.c')
-rw-r--r--gcc/cfgloop.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cfgloop.c b/gcc/cfgloop.c
index 28e30eaa905..3babf777fae 100644
--- a/gcc/cfgloop.c
+++ b/gcc/cfgloop.c
@@ -1912,4 +1912,10 @@ get_max_loop_iterations_int (struct loop *loop)
return hwi_nit < 0 ? -1 : hwi_nit;
}
+/* Returns the loop depth of the loop BB belongs to. */
+int
+bb_loop_depth (const_basic_block bb)
+{
+ return bb->loop_father ? loop_depth (bb->loop_father) : 0;
+}