gcc/gcc/cfg.h
Martin Liska 1a81741814 Introduce dump_flags_t type and use it instead of int type.
2017-05-17  Martin Liska  <mliska@suse.cz>

	* class.c (dump_class_hierarchy): Introduce dump_flags_t type and
	use it instead of int type.
	(dump_vtable): Likewise.
	(dump_vtt): Likewise.
	* decl2.c (dump_tu): Likewise.
2017-05-17  Martin Liska  <mliska@suse.cz>

	* c-common.h: Introduce dump_flags_t type and
	use it instead of int type.
	* c-gimplify.c (c_genericize): Likewise.
	* c-opts.c: Likewise.
2017-05-17  Martin Liska  <mliska@suse.cz>

	* c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
	use it instead of int type.
2017-05-17  Martin Liska  <mliska@suse.cz>

	* cfg.c: Introduce dump_flags_t type and
	use it instead of int type.
	* cfg.h: Likewise.
	* cfghooks.c: Likewise.
	* cfghooks.h (struct cfg_hooks): Likewise.
	* cfgrtl.c: Likewise.
	* cfgrtl.h: Likewise.
	* cgraph.c (cgraph_node::get_body): Likewise.
	* coretypes.h: Likewise.
	* domwalk.c: Likewise.
	* domwalk.h: Likewise.
	* dumpfile.c (struct dump_option_value_info): Likewise.
	(dump_enable_all): Likewise.
	(dump_switch_p_1): Likewise.
	(opt_info_switch_p): Likewise.
	* dumpfile.h (enum tree_dump_index): Likewise.
	(struct dump_file_info): Likewise.
	* genemit.c: Likewise.
	* generic-match-head.c: Likewise.
	* gengtype.c (open_base_files): Likewise.
	* gimple-pretty-print.c: Likewise.
	* gimple-pretty-print.h: Likewise.
	* graph.c (print_graph_cfg): Likewise.
	* graphite-scop-detection.c (dot_all_sese): Likewise.
	* ipa-devirt.c (build_type_inheritance_graph): Likewise.
	* loop-unroll.c (report_unroll): Likewise.
	* passes.c (pass_manager::register_one_dump_file): Likewise.
	* print-tree.c: Likewise.
	* statistics.c: Likewise.
	* tree-cfg.c: Likewise.
	* tree-cfg.h: Likewise.
	* tree-dfa.c: Likewise.
	* tree-dfa.h: Likewise.
	* tree-dump.c (dump_function): Likewise.
	* tree-dump.h (struct dump_info): Likewise.
	* tree-pretty-print.c: Likewise.
	* tree-pretty-print.h: Likewise.
	* tree-ssa-live.c: Likewise.
	* tree-ssa-live.h: Likewise.
	* tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Likewise.
	* tree-vect-loop.c: Likewise.
	* tree-vect-slp.c: Likewise.

From-SVN: r248140
2017-05-17 09:01:36 +00:00

122 lines
4.4 KiB
C

/* Control flow graph manipulation code header file.
Copyright (C) 2014-2017 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_CFG_H
#define GCC_CFG_H
#include "dominance.h"
/* What sort of profiling information we have. */
enum profile_status_d
{
PROFILE_ABSENT,
PROFILE_GUESSED,
PROFILE_READ,
PROFILE_LAST /* Last value, used by profile streaming. */
};
/* A structure to group all the per-function control flow graph data.
The x_* prefixing is necessary because otherwise references to the
fields of this struct are interpreted as the defines for backward
source compatibility following the definition of this struct. */
struct GTY(()) control_flow_graph {
/* Block pointers for the exit and entry of a function.
These are always the head and tail of the basic block list. */
basic_block x_entry_block_ptr;
basic_block x_exit_block_ptr;
/* Index by basic block number, get basic block struct info. */
vec<basic_block, va_gc> *x_basic_block_info;
/* Number of basic blocks in this flow graph. */
int x_n_basic_blocks;
/* Number of edges in this flow graph. */
int x_n_edges;
/* The first free basic block number. */
int x_last_basic_block;
/* UIDs for LABEL_DECLs. */
int last_label_uid;
/* Mapping of labels to their associated blocks. At present
only used for the gimple CFG. */
vec<basic_block, va_gc> *x_label_to_block_map;
enum profile_status_d x_profile_status;
/* Whether the dominators and the postdominators are available. */
enum dom_state x_dom_computed[2];
/* Number of basic blocks in the dominance tree. */
unsigned x_n_bbs_in_dom_tree[2];
/* Maximal number of entities in the single jumptable. Used to estimate
final flowgraph size. */
int max_jumptable_ents;
};
extern void init_flow (function *);
extern void clear_edges (function *);
extern basic_block alloc_block (void);
extern void link_block (basic_block, basic_block);
extern void unlink_block (basic_block);
extern void compact_blocks (void);
extern void expunge_block (basic_block);
extern edge unchecked_make_edge (basic_block, basic_block, int);
extern edge cached_make_edge (sbitmap, basic_block, basic_block, int);
extern edge make_edge (basic_block, basic_block, int);
extern edge make_single_succ_edge (basic_block, basic_block, int);
extern void remove_edge_raw (edge);
extern void redirect_edge_succ (edge, basic_block);
extern void redirect_edge_pred (edge, basic_block);
extern void clear_bb_flags (void);
extern void dump_edge_info (FILE *, edge, dump_flags_t, int);
extern void debug (edge_def &ref);
extern void debug (edge_def *ptr);
extern void alloc_aux_for_blocks (int);
extern void clear_aux_for_blocks (void);
extern void free_aux_for_blocks (void);
extern void alloc_aux_for_edge (edge, int);
extern void alloc_aux_for_edges (int);
extern void clear_aux_for_edges (void);
extern void free_aux_for_edges (void);
extern void debug_bb (basic_block);
extern basic_block debug_bb_n (int);
extern void dump_bb_info (FILE *, basic_block, int, dump_flags_t, bool, bool);
extern void brief_dump_cfg (FILE *, dump_flags_t);
extern void update_bb_profile_for_threading (basic_block, int, gcov_type, edge);
extern void scale_bbs_frequencies_int (basic_block *, int, int, int);
extern void scale_bbs_frequencies_gcov_type (basic_block *, int, gcov_type,
gcov_type);
extern void initialize_original_copy_tables (void);
extern void reset_original_copy_tables (void);
extern void free_original_copy_tables (void);
extern bool original_copy_tables_initialized_p (void);
extern void set_bb_original (basic_block, basic_block);
extern basic_block get_bb_original (basic_block);
extern void set_bb_copy (basic_block, basic_block);
extern basic_block get_bb_copy (basic_block);
void set_loop_copy (struct loop *, struct loop *);
struct loop *get_loop_copy (struct loop *);
#endif /* GCC_CFG_H */