annotate gcc/tree-cfg.h @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* Data and Control Flow Analysis for Trees.
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
2 Copyright (C) 2001-2018 Free Software Foundation, Inc.
111
kono
parents:
diff changeset
3 Contributed by Diego Novillo <dnovillo@redhat.com>
kono
parents:
diff changeset
4
kono
parents:
diff changeset
5 This file is part of GCC.
kono
parents:
diff changeset
6
kono
parents:
diff changeset
7 GCC is free software; you can redistribute it and/or modify
kono
parents:
diff changeset
8 it under the terms of the GNU General Public License as published by
kono
parents:
diff changeset
9 the Free Software Foundation; either version 3, or (at your option)
kono
parents:
diff changeset
10 any later version.
kono
parents:
diff changeset
11
kono
parents:
diff changeset
12 GCC is distributed in the hope that it will be useful,
kono
parents:
diff changeset
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
kono
parents:
diff changeset
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
kono
parents:
diff changeset
15 GNU General Public License for more details.
kono
parents:
diff changeset
16
kono
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
kono
parents:
diff changeset
18 along with GCC; see the file COPYING3. If not see
kono
parents:
diff changeset
19 <http://www.gnu.org/licenses/>. */
kono
parents:
diff changeset
20
kono
parents:
diff changeset
21 #ifndef _TREE_CFG_H
kono
parents:
diff changeset
22 #define _TREE_CFG_H
kono
parents:
diff changeset
23
kono
parents:
diff changeset
24 /* Location to track pending stmt for edge insertion. */
kono
parents:
diff changeset
25 #define PENDING_STMT(e) ((e)->insns.g)
kono
parents:
diff changeset
26
kono
parents:
diff changeset
27 /* Garbage collection and PCH support for edge_def. */
kono
parents:
diff changeset
28 extern void gt_ggc_mx (edge_def *e);
kono
parents:
diff changeset
29 extern void gt_pch_nx (edge_def *e);
kono
parents:
diff changeset
30 extern void gt_pch_nx (edge_def *e, gt_pointer_operator, void *);
kono
parents:
diff changeset
31
kono
parents:
diff changeset
32 extern void init_empty_tree_cfg_for_function (struct function *);
kono
parents:
diff changeset
33 extern void init_empty_tree_cfg (void);
kono
parents:
diff changeset
34 extern void start_recording_case_labels (void);
kono
parents:
diff changeset
35 extern void end_recording_case_labels (void);
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
36 extern basic_block label_to_block (struct function *, tree);
111
kono
parents:
diff changeset
37 extern void cleanup_dead_labels (void);
kono
parents:
diff changeset
38 extern bool group_case_labels_stmt (gswitch *);
kono
parents:
diff changeset
39 extern bool group_case_labels (void);
kono
parents:
diff changeset
40 extern void replace_uses_by (tree, tree);
kono
parents:
diff changeset
41 extern basic_block single_noncomplex_succ (basic_block bb);
kono
parents:
diff changeset
42 extern void notice_special_calls (gcall *);
kono
parents:
diff changeset
43 extern void clear_special_calls (void);
kono
parents:
diff changeset
44 extern edge find_taken_edge (basic_block, tree);
kono
parents:
diff changeset
45 extern void gimple_debug_bb (basic_block);
kono
parents:
diff changeset
46 extern basic_block gimple_debug_bb_n (int);
kono
parents:
diff changeset
47 extern void gimple_debug_cfg (int);
kono
parents:
diff changeset
48 extern void gimple_dump_cfg (FILE *, dump_flags_t);
kono
parents:
diff changeset
49 extern void dump_cfg_stats (FILE *);
kono
parents:
diff changeset
50 extern void debug_cfg_stats (void);
kono
parents:
diff changeset
51 extern bool computed_goto_p (gimple *);
kono
parents:
diff changeset
52 extern bool stmt_can_make_abnormal_goto (gimple *);
kono
parents:
diff changeset
53 extern basic_block get_abnormal_succ_dispatcher (basic_block);
kono
parents:
diff changeset
54 extern bool is_ctrl_stmt (gimple *);
kono
parents:
diff changeset
55 extern bool is_ctrl_altering_stmt (gimple *);
kono
parents:
diff changeset
56 extern bool simple_goto_p (gimple *);
kono
parents:
diff changeset
57 extern bool stmt_ends_bb_p (gimple *);
kono
parents:
diff changeset
58 extern bool gimple_seq_unreachable_p (gimple_seq);
kono
parents:
diff changeset
59 extern bool assert_unreachable_fallthru_edge_p (edge);
kono
parents:
diff changeset
60 extern void delete_tree_cfg_annotations (function *);
kono
parents:
diff changeset
61 extern gphi *get_virtual_phi (basic_block);
kono
parents:
diff changeset
62 extern gimple *first_stmt (basic_block);
kono
parents:
diff changeset
63 extern gimple *last_stmt (basic_block);
kono
parents:
diff changeset
64 extern gimple *last_and_only_stmt (basic_block);
kono
parents:
diff changeset
65 extern void verify_gimple_in_seq (gimple_seq);
kono
parents:
diff changeset
66 extern void verify_gimple_in_cfg (struct function *, bool);
kono
parents:
diff changeset
67 extern tree gimple_block_label (basic_block);
kono
parents:
diff changeset
68 extern void add_phi_args_after_copy_bb (basic_block);
kono
parents:
diff changeset
69 extern void add_phi_args_after_copy (basic_block *, unsigned, edge);
kono
parents:
diff changeset
70 extern basic_block split_edge_bb_loc (edge);
kono
parents:
diff changeset
71 extern bool gimple_duplicate_sese_region (edge, edge, basic_block *, unsigned,
kono
parents:
diff changeset
72 basic_block *, bool);
kono
parents:
diff changeset
73 extern bool gimple_duplicate_sese_tail (edge, edge, basic_block *, unsigned,
kono
parents:
diff changeset
74 basic_block *);
kono
parents:
diff changeset
75 extern void gather_blocks_in_sese_region (basic_block entry, basic_block exit,
kono
parents:
diff changeset
76 vec<basic_block> *bbs_p);
kono
parents:
diff changeset
77 extern void verify_sese (basic_block, basic_block, vec<basic_block> *);
kono
parents:
diff changeset
78 extern bool gather_ssa_name_hash_map_from (tree const &, tree const &, void *);
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
79 extern void fold_loop_internal_call (gimple *, tree);
111
kono
parents:
diff changeset
80 extern basic_block move_sese_region_to_fn (struct function *, basic_block,
kono
parents:
diff changeset
81 basic_block, tree);
kono
parents:
diff changeset
82 extern void dump_function_to_file (tree, FILE *, dump_flags_t);
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
83 extern void debug_function (tree, dump_flags_t);
111
kono
parents:
diff changeset
84 extern void print_loops_bb (FILE *, basic_block, int, int);
kono
parents:
diff changeset
85 extern void print_loops (FILE *, int);
kono
parents:
diff changeset
86 extern void debug (struct loop &ref);
kono
parents:
diff changeset
87 extern void debug (struct loop *ptr);
kono
parents:
diff changeset
88 extern void debug_verbose (struct loop &ref);
kono
parents:
diff changeset
89 extern void debug_verbose (struct loop *ptr);
kono
parents:
diff changeset
90 extern void debug_loops (int);
kono
parents:
diff changeset
91 extern void debug_loop (struct loop *, int);
kono
parents:
diff changeset
92 extern void debug_loop_num (unsigned, int);
kono
parents:
diff changeset
93 extern void remove_edge_and_dominated_blocks (edge);
kono
parents:
diff changeset
94 extern bool gimple_purge_dead_eh_edges (basic_block);
kono
parents:
diff changeset
95 extern bool gimple_purge_all_dead_eh_edges (const_bitmap);
kono
parents:
diff changeset
96 extern bool gimple_purge_dead_abnormal_call_edges (basic_block);
kono
parents:
diff changeset
97 extern bool gimple_purge_all_dead_abnormal_call_edges (const_bitmap);
kono
parents:
diff changeset
98 extern tree gimplify_build3 (gimple_stmt_iterator *, enum tree_code,
kono
parents:
diff changeset
99 tree, tree, tree, tree);
kono
parents:
diff changeset
100 extern tree gimplify_build2 (gimple_stmt_iterator *, enum tree_code,
kono
parents:
diff changeset
101 tree, tree, tree);
kono
parents:
diff changeset
102 extern tree gimplify_build1 (gimple_stmt_iterator *, enum tree_code,
kono
parents:
diff changeset
103 tree, tree);
kono
parents:
diff changeset
104 extern void extract_true_false_edges_from_block (basic_block, edge *, edge *);
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
105 extern tree find_case_label_for_value (const gswitch *switch_stmt, tree val);
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
106 extern edge find_taken_edge_switch_expr (const gswitch *switch_stmt, tree val);
111
kono
parents:
diff changeset
107 extern unsigned int execute_fixup_cfg (void);
kono
parents:
diff changeset
108 extern unsigned int split_critical_edges (void);
kono
parents:
diff changeset
109 extern basic_block insert_cond_bb (basic_block, gimple *, gimple *,
kono
parents:
diff changeset
110 profile_probability);
kono
parents:
diff changeset
111 extern bool gimple_find_sub_bbs (gimple_seq, gimple_stmt_iterator *);
kono
parents:
diff changeset
112 extern bool extract_true_false_controlled_edges (basic_block, basic_block,
kono
parents:
diff changeset
113 edge *, edge *);
kono
parents:
diff changeset
114 extern void generate_range_test (basic_block bb, tree index, tree low,
kono
parents:
diff changeset
115 tree high, tree *lhs, tree *rhs);
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
116 extern basic_block gimple_switch_label_bb (function *, gswitch *, unsigned);
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
117 extern basic_block gimple_switch_default_bb (function *, gswitch *);
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
118 extern edge gimple_switch_edge (function *, gswitch *, unsigned);
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
119 extern edge gimple_switch_default_edge (function *, gswitch *);
111
kono
parents:
diff changeset
120
kono
parents:
diff changeset
121 /* Return true if the LHS of a call should be removed. */
kono
parents:
diff changeset
122
kono
parents:
diff changeset
123 inline bool
kono
parents:
diff changeset
124 should_remove_lhs_p (tree lhs)
kono
parents:
diff changeset
125 {
kono
parents:
diff changeset
126 return (lhs
kono
parents:
diff changeset
127 && TREE_CODE (TYPE_SIZE_UNIT (TREE_TYPE (lhs))) == INTEGER_CST
kono
parents:
diff changeset
128 && !TREE_ADDRESSABLE (TREE_TYPE (lhs)));
kono
parents:
diff changeset
129 }
kono
parents:
diff changeset
130
kono
parents:
diff changeset
131 #endif /* _TREE_CFG_H */