annotate gcc/cfg-flags.def @ 16:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 84e7813d76e9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
16
kono
parents:
diff changeset
1 /* Flags on basic blocks and edges.
kono
parents:
diff changeset
2 Copyright (C) 2012-2017 Free Software Foundation, Inc.
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 This file is part of GCC.
kono
parents:
diff changeset
5
kono
parents:
diff changeset
6 GCC is free software; you can redistribute it and/or modify it under
kono
parents:
diff changeset
7 the terms of the GNU General Public License as published by the Free
kono
parents:
diff changeset
8 Software Foundation; either version 3, or (at your option) any later
kono
parents:
diff changeset
9 version.
kono
parents:
diff changeset
10
kono
parents:
diff changeset
11 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
kono
parents:
diff changeset
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
kono
parents:
diff changeset
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
kono
parents:
diff changeset
14 for more details.
kono
parents:
diff changeset
15
kono
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
kono
parents:
diff changeset
17 along with GCC; see the file COPYING3. If not see
kono
parents:
diff changeset
18 <http://www.gnu.org/licenses/>. */
kono
parents:
diff changeset
19
kono
parents:
diff changeset
20 /* This file defines flags that may appear on basic blocks or on
kono
parents:
diff changeset
21 edges. Source files define DEF_BASIC_BLOCK_FLAG or DEF_EDGE_FLAG
kono
parents:
diff changeset
22 appropriately before including this file. */
kono
parents:
diff changeset
23
kono
parents:
diff changeset
24 #if !defined(DEF_BASIC_BLOCK_FLAG) && !defined(DEF_EDGE_FLAG)
kono
parents:
diff changeset
25 #error "You must define DEF_BASIC_BLOCK_FLAG or DEF_EDGE_FLAG"
kono
parents:
diff changeset
26 #endif
kono
parents:
diff changeset
27
kono
parents:
diff changeset
28 #ifdef DEF_BASIC_BLOCK_FLAG
kono
parents:
diff changeset
29
kono
parents:
diff changeset
30 /* Masks for basic_block.flags.
kono
parents:
diff changeset
31
kono
parents:
diff changeset
32 The format of this file is: DEF_BASIC_BLOCK_FLAG(NAME, IDX).
kono
parents:
diff changeset
33 NAME is the name of the basic block flag. A flag BB_#NAME will be
kono
parents:
diff changeset
34 created and the name is used in dump_edge_info.
kono
parents:
diff changeset
35 IDX is a sequence number that is used to determine the value
kono
parents:
diff changeset
36 of the flag, which is 1 << IDX).
kono
parents:
diff changeset
37
kono
parents:
diff changeset
38 BB_HOT_PARTITION and BB_COLD_PARTITION should be preserved throughout
kono
parents:
diff changeset
39 the compilation, so they are never cleared.
kono
parents:
diff changeset
40
kono
parents:
diff changeset
41 All other flags may be cleared by clear_bb_flags(). It is generally
kono
parents:
diff changeset
42 a bad idea to rely on any flags being up-to-date. */
kono
parents:
diff changeset
43
kono
parents:
diff changeset
44 /* Only set on blocks that have just been created by create_bb. */
kono
parents:
diff changeset
45 DEF_BASIC_BLOCK_FLAG(NEW, 0)
kono
parents:
diff changeset
46
kono
parents:
diff changeset
47 /* Set by find_unreachable_blocks. Do not rely on this being set in any
kono
parents:
diff changeset
48 pass. */
kono
parents:
diff changeset
49 DEF_BASIC_BLOCK_FLAG(REACHABLE, 1)
kono
parents:
diff changeset
50
kono
parents:
diff changeset
51 /* Set for blocks in an irreducible loop by loop analysis. */
kono
parents:
diff changeset
52 DEF_BASIC_BLOCK_FLAG(IRREDUCIBLE_LOOP, 2)
kono
parents:
diff changeset
53
kono
parents:
diff changeset
54 /* Set on blocks that may actually not be single-entry single-exit block. */
kono
parents:
diff changeset
55 DEF_BASIC_BLOCK_FLAG(SUPERBLOCK, 3)
kono
parents:
diff changeset
56
kono
parents:
diff changeset
57 /* Set on basic blocks that the scheduler should not touch. This is used
kono
parents:
diff changeset
58 by SMS to prevent other schedulers from messing with the loop schedule. */
kono
parents:
diff changeset
59 DEF_BASIC_BLOCK_FLAG(DISABLE_SCHEDULE, 4)
kono
parents:
diff changeset
60
kono
parents:
diff changeset
61 /* Set on blocks that should be put in a hot section. */
kono
parents:
diff changeset
62 DEF_BASIC_BLOCK_FLAG(HOT_PARTITION, 5)
kono
parents:
diff changeset
63
kono
parents:
diff changeset
64 /* Set on blocks that should be put in a cold section. */
kono
parents:
diff changeset
65 DEF_BASIC_BLOCK_FLAG(COLD_PARTITION, 6)
kono
parents:
diff changeset
66
kono
parents:
diff changeset
67 /* Set on block that was duplicated. */
kono
parents:
diff changeset
68 DEF_BASIC_BLOCK_FLAG(DUPLICATED, 7)
kono
parents:
diff changeset
69
kono
parents:
diff changeset
70 /* Set if the label at the top of this block is the target of a non-local goto. */
kono
parents:
diff changeset
71 DEF_BASIC_BLOCK_FLAG(NON_LOCAL_GOTO_TARGET, 8)
kono
parents:
diff changeset
72
kono
parents:
diff changeset
73 /* Set on blocks that are in RTL format. */
kono
parents:
diff changeset
74 DEF_BASIC_BLOCK_FLAG(RTL, 9)
kono
parents:
diff changeset
75
kono
parents:
diff changeset
76 /* Set on blocks that are forwarder blocks.
kono
parents:
diff changeset
77 Only used in cfgcleanup.c. */
kono
parents:
diff changeset
78 DEF_BASIC_BLOCK_FLAG(FORWARDER_BLOCK, 10)
kono
parents:
diff changeset
79
kono
parents:
diff changeset
80 /* Set on blocks that cannot be threaded through.
kono
parents:
diff changeset
81 Only used for jump threading. */
kono
parents:
diff changeset
82 DEF_BASIC_BLOCK_FLAG(NONTHREADABLE_BLOCK, 11)
kono
parents:
diff changeset
83
kono
parents:
diff changeset
84 /* Set on blocks that were modified in some way. This bit is set in
kono
parents:
diff changeset
85 df_set_bb_dirty, but not cleared by df_analyze, so it can be used
kono
parents:
diff changeset
86 to test whether a block has been modified prior to a df_analyze call. */
kono
parents:
diff changeset
87 DEF_BASIC_BLOCK_FLAG(MODIFIED, 12)
kono
parents:
diff changeset
88
kono
parents:
diff changeset
89 /* A general visited flag for passes to use. */
kono
parents:
diff changeset
90 DEF_BASIC_BLOCK_FLAG(VISITED, 13)
kono
parents:
diff changeset
91
kono
parents:
diff changeset
92 /* Set on blocks that are in a transaction. This is calculated on
kono
parents:
diff changeset
93 demand, and is available after calling compute_transaction_bits(). */
kono
parents:
diff changeset
94 DEF_BASIC_BLOCK_FLAG(IN_TRANSACTION, 14)
kono
parents:
diff changeset
95
kono
parents:
diff changeset
96 #endif
kono
parents:
diff changeset
97
kono
parents:
diff changeset
98 #ifdef DEF_EDGE_FLAG
kono
parents:
diff changeset
99
kono
parents:
diff changeset
100 /* Masks for edge.flags.
kono
parents:
diff changeset
101
kono
parents:
diff changeset
102 The format of this file is: DEF_EDGE_FLAG(NAME, IDX, STRING).
kono
parents:
diff changeset
103 NAME is the name of the edge flag. A flag EDGE_#NAME will be
kono
parents:
diff changeset
104 created and the name is used in dump_edge_info.
kono
parents:
diff changeset
105 IDX is a sequence number that is used to determine the value
kono
parents:
diff changeset
106 of the flag, which is 1 << IDX). */
kono
parents:
diff changeset
107
kono
parents:
diff changeset
108 /* 'Straight line' flow. In GIMPLE and in cfglayout mode, all normal
kono
parents:
diff changeset
109 edges are fallthru edges. In cfgrtl mode, this flag really means
kono
parents:
diff changeset
110 that control flow falls through to the next basic block in the line. */
kono
parents:
diff changeset
111 DEF_EDGE_FLAG(FALLTHRU, 0)
kono
parents:
diff changeset
112
kono
parents:
diff changeset
113 /* Strange flow, like a computed jump or exception handling. Usually
kono
parents:
diff changeset
114 this means that the edge cannot be split. */
kono
parents:
diff changeset
115 DEF_EDGE_FLAG(ABNORMAL, 1)
kono
parents:
diff changeset
116
kono
parents:
diff changeset
117 /* Edge out of a basic block that ends with a CALL_INSN with abnormal
kono
parents:
diff changeset
118 exit, like an exception or a non-local goto.
kono
parents:
diff changeset
119 ABNORMAL_CALL edges also have ABNORMAL set.
kono
parents:
diff changeset
120 This flag is only used for the RTL CFG. */
kono
parents:
diff changeset
121 DEF_EDGE_FLAG(ABNORMAL_CALL, 2)
kono
parents:
diff changeset
122
kono
parents:
diff changeset
123 /* Exception edge. Exception handling edges represent possible control
kono
parents:
diff changeset
124 transfers from a trapping instruction to an exception handler.
kono
parents:
diff changeset
125 EH edges also have ABNORMAL set for the RTL CFG. */
kono
parents:
diff changeset
126 DEF_EDGE_FLAG(EH, 3)
kono
parents:
diff changeset
127
kono
parents:
diff changeset
128 /* Never merge blocks via this edge. This is used for exception handling,
kono
parents:
diff changeset
129 to prevent merging away edges to the post-landing-pad basic block.
kono
parents:
diff changeset
130 This flag is only used for the RTL CFG. */
kono
parents:
diff changeset
131 DEF_EDGE_FLAG(PRESERVE, 4)
kono
parents:
diff changeset
132
kono
parents:
diff changeset
133 /* Not a real edge. This is used to connect parts of the CFG that do
kono
parents:
diff changeset
134 not halt, such as infinite loops and noreturn functions, to the
kono
parents:
diff changeset
135 EXIT_BLOCK, so that traversing of the reverse CFG is possible. */
kono
parents:
diff changeset
136 DEF_EDGE_FLAG(FAKE, 5)
kono
parents:
diff changeset
137
kono
parents:
diff changeset
138 /* A back edge, marked in a depth-first search of the CFG. Back edges
kono
parents:
diff changeset
139 are hints that this edge may be part of a loop in the CFG. */
kono
parents:
diff changeset
140 DEF_EDGE_FLAG(DFS_BACK, 6)
kono
parents:
diff changeset
141
kono
parents:
diff changeset
142 /* Edge in a part of the CFG that is an irreducible loop. */
kono
parents:
diff changeset
143 DEF_EDGE_FLAG(IRREDUCIBLE_LOOP, 7)
kono
parents:
diff changeset
144
kono
parents:
diff changeset
145 /* Edge taken when controlling predicate is nonzero.
kono
parents:
diff changeset
146 This is only used for the GIMPLE CFG. */
kono
parents:
diff changeset
147 DEF_EDGE_FLAG(TRUE_VALUE, 8)
kono
parents:
diff changeset
148
kono
parents:
diff changeset
149 /* Edge taken when controlling predicate is zero.
kono
parents:
diff changeset
150 This is only used for the GIMPLE CFG. */
kono
parents:
diff changeset
151 DEF_EDGE_FLAG(FALSE_VALUE, 9)
kono
parents:
diff changeset
152
kono
parents:
diff changeset
153 /* Edge is executable. This is only used in GIMPLE SSA-CCP and VRP.
kono
parents:
diff changeset
154 This is only used for the GIMPLE CFG. */
kono
parents:
diff changeset
155 DEF_EDGE_FLAG(EXECUTABLE, 10)
kono
parents:
diff changeset
156
kono
parents:
diff changeset
157 /* Edge crosses between hot and cold sections, when we do partitioning.
kono
parents:
diff changeset
158 This flag is only used for the RTL CFG. */
kono
parents:
diff changeset
159 DEF_EDGE_FLAG(CROSSING, 11)
kono
parents:
diff changeset
160
kono
parents:
diff changeset
161 /* Edge from a sibcall CALL_INSN to exit.
kono
parents:
diff changeset
162 SIBCALL edges also have ABNORMAL set.
kono
parents:
diff changeset
163 This flag is only used for the RTL CFG. */
kono
parents:
diff changeset
164 DEF_EDGE_FLAG(SIBCALL, 12)
kono
parents:
diff changeset
165
kono
parents:
diff changeset
166 /* Candidate for straight line flow. Only used in bb-reorder.c.
kono
parents:
diff changeset
167 This flag is only used for the RTL CFG. */
kono
parents:
diff changeset
168 DEF_EDGE_FLAG(CAN_FALLTHRU, 13)
kono
parents:
diff changeset
169
kono
parents:
diff changeset
170 /* Exit of a loop. This is only used in ifcvt.c.
kono
parents:
diff changeset
171 This flag is only used for the RTL CFG. */
kono
parents:
diff changeset
172 DEF_EDGE_FLAG(LOOP_EXIT, 14)
kono
parents:
diff changeset
173
kono
parents:
diff changeset
174 /* Uninstrumented edge out of a GIMPLE_TRANSACTION statement. */
kono
parents:
diff changeset
175 DEF_EDGE_FLAG(TM_UNINSTRUMENTED, 15)
kono
parents:
diff changeset
176
kono
parents:
diff changeset
177 /* Abort (over) edge out of a GIMPLE_TRANSACTION statement. */
kono
parents:
diff changeset
178 DEF_EDGE_FLAG(TM_ABORT, 16)
kono
parents:
diff changeset
179
kono
parents:
diff changeset
180 /* An edge we should ignore. It should be entirely local to
kono
parents:
diff changeset
181 passes. ie, it is never set on any edge upon the completion
kono
parents:
diff changeset
182 of any pass. */
kono
parents:
diff changeset
183 DEF_EDGE_FLAG(IGNORE, 17)
kono
parents:
diff changeset
184
kono
parents:
diff changeset
185 #endif
kono
parents:
diff changeset
186
kono
parents:
diff changeset
187 /*
kono
parents:
diff changeset
188 Local variables:
kono
parents:
diff changeset
189 mode:c
kono
parents:
diff changeset
190 End:
kono
parents:
diff changeset
191 */