mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-29 15:01:13 +08:00
2014-10-22 Andrew MacLeod <amacleod@redhat.com> * cfgbuild.h: New. Add prototypes for cfgbuild.c. * cfgcleanup.h: New. Add prototypes for cfgcleanup.c. * cfgloopmanip.h: New. Add prototypes for cfgloopmanip.c. * dominance.h: New. Add prototypes for dominance.c. * cfgloop.h: Move some prototypes/enum to cfgloopmanip.h and include it. * cfghooks.h: (struct profile_record) Relocate here. Relocate 2 prototypes from basic-block.h. * basic-block.h: Move prototypes and struct to new header files. Include cfgbuild.h, cfgcleanup.h, and dominance.h. * rtl.h: Move a few prototypes to new header files. * cfgcleanup.c (merge_memattrs): Make static. * genopinit.c (main): Add predict.h to list of includes. * predict.h: Update prototype list to match predict.c. * predict.c (maybe_hot_count_p): Export. (cgraph_edge::maybe_hot_p): Move to cgraph.c. (cgraph_node::optimize_for_size_p): Move to cgraph.h. * cgraph.h (cgraph_node::optimize_for_size_p): Relocate here. * cgraph.c (cgraph_edge::maybe_hot_p): Relocate here. * profile.h: Adjust prototypes. * ifcvt.h: New. Relocate struct ce_if_block here. * ifcvt.c: Include ifcvt.h. * config/frv/frv.c: Include ifcvt.h. * config/frv/frv-protos.h: Add 'struct' to ce_if_block * parameters. From-SVN: r216559
79 lines
3.1 KiB
C
79 lines
3.1 KiB
C
/* Calculate (post)dominators header file.
|
|
Copyright (C) 2014 Free Software Foundation, Inc.
|
|
|
|
This file is part of GCC.
|
|
|
|
GCC is free software; you can redistribute it and/or modify it
|
|
under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 3, or (at your option)
|
|
any later version.
|
|
|
|
GCC is distributed in the hope that it will be useful, but WITHOUT
|
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
|
License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with GCC; see the file COPYING3. If not see
|
|
<http://www.gnu.org/licenses/>. */
|
|
|
|
#ifndef GCC_DOMINANCE_H
|
|
#define GCC_DOMINANCE_H
|
|
|
|
enum cdi_direction
|
|
{
|
|
CDI_DOMINATORS = 1,
|
|
CDI_POST_DOMINATORS = 2
|
|
};
|
|
|
|
/* State of dominance information. */
|
|
|
|
enum dom_state
|
|
{
|
|
DOM_NONE, /* Not computed at all. */
|
|
DOM_NO_FAST_QUERY, /* The data is OK, but the fast query data are not usable. */
|
|
DOM_OK /* Everything is ok. */
|
|
};
|
|
|
|
extern void calculate_dominance_info (enum cdi_direction);
|
|
extern void free_dominance_info (function *, enum cdi_direction);
|
|
extern void free_dominance_info (enum cdi_direction);
|
|
extern basic_block get_immediate_dominator (enum cdi_direction, basic_block);
|
|
extern void set_immediate_dominator (enum cdi_direction, basic_block,
|
|
basic_block);
|
|
extern vec<basic_block> get_dominated_by (enum cdi_direction, basic_block);
|
|
extern vec<basic_block> get_dominated_by_region (enum cdi_direction,
|
|
basic_block *,
|
|
unsigned);
|
|
extern vec<basic_block> get_dominated_to_depth (enum cdi_direction,
|
|
basic_block, int);
|
|
extern vec<basic_block> get_all_dominated_blocks (enum cdi_direction,
|
|
basic_block);
|
|
extern void redirect_immediate_dominators (enum cdi_direction, basic_block,
|
|
basic_block);
|
|
extern basic_block nearest_common_dominator (enum cdi_direction,
|
|
basic_block, basic_block);
|
|
extern basic_block nearest_common_dominator_for_set (enum cdi_direction,
|
|
bitmap);
|
|
extern bool dominated_by_p (enum cdi_direction, const_basic_block,
|
|
const_basic_block);
|
|
unsigned bb_dom_dfs_in (enum cdi_direction, basic_block);
|
|
unsigned bb_dom_dfs_out (enum cdi_direction, basic_block);
|
|
extern void verify_dominators (enum cdi_direction);
|
|
basic_block recompute_dominator (enum cdi_direction, basic_block);
|
|
extern void iterate_fix_dominators (enum cdi_direction,
|
|
vec<basic_block> , bool);
|
|
extern void add_to_dominance_info (enum cdi_direction, basic_block);
|
|
extern void delete_from_dominance_info (enum cdi_direction, basic_block);
|
|
extern basic_block first_dom_son (enum cdi_direction, basic_block);
|
|
extern basic_block next_dom_son (enum cdi_direction, basic_block);
|
|
extern enum dom_state dom_info_state (function *, enum cdi_direction);
|
|
extern enum dom_state dom_info_state (enum cdi_direction);
|
|
extern void set_dom_info_availability (enum cdi_direction, enum dom_state);
|
|
extern bool dom_info_available_p (function *, enum cdi_direction);
|
|
extern bool dom_info_available_p (enum cdi_direction);
|
|
|
|
|
|
|
|
#endif /* GCC_DOMINANCE_H */
|