annotate gcc/gimple-iterator.h @ 127:4c56639505ff

fix function.c and add CbC-example Makefile
author mir3636
date Wed, 11 Apr 2018 18:46:58 +0900
parents 04ced10e8804
children 84e7813d76e9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* Header file for gimple iterators.
kono
parents:
diff changeset
2 Copyright (C) 2013-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 #ifndef GCC_GIMPLE_ITERATOR_H
kono
parents:
diff changeset
21 #define GCC_GIMPLE_ITERATOR_H
kono
parents:
diff changeset
22
kono
parents:
diff changeset
23 /* Iterator object for GIMPLE statement sequences. */
kono
parents:
diff changeset
24
kono
parents:
diff changeset
25 struct gimple_stmt_iterator
kono
parents:
diff changeset
26 {
kono
parents:
diff changeset
27 /* Sequence node holding the current statement. */
kono
parents:
diff changeset
28 gimple_seq_node ptr;
kono
parents:
diff changeset
29
kono
parents:
diff changeset
30 /* Sequence and basic block holding the statement. These fields
kono
parents:
diff changeset
31 are necessary to handle edge cases such as when statement is
kono
parents:
diff changeset
32 added to an empty basic block or when the last statement of a
kono
parents:
diff changeset
33 block/sequence is removed. */
kono
parents:
diff changeset
34 gimple_seq *seq;
kono
parents:
diff changeset
35 basic_block bb;
kono
parents:
diff changeset
36 };
kono
parents:
diff changeset
37
kono
parents:
diff changeset
38 /* Iterator over GIMPLE_PHI statements. */
kono
parents:
diff changeset
39 struct gphi_iterator : public gimple_stmt_iterator
kono
parents:
diff changeset
40 {
kono
parents:
diff changeset
41 gphi *phi () const
kono
parents:
diff changeset
42 {
kono
parents:
diff changeset
43 return as_a <gphi *> (ptr);
kono
parents:
diff changeset
44 }
kono
parents:
diff changeset
45 };
kono
parents:
diff changeset
46
kono
parents:
diff changeset
47 enum gsi_iterator_update
kono
parents:
diff changeset
48 {
kono
parents:
diff changeset
49 GSI_NEW_STMT, /* Only valid when single statement is added, move
kono
parents:
diff changeset
50 iterator to it. */
kono
parents:
diff changeset
51 GSI_SAME_STMT, /* Leave the iterator at the same statement. */
kono
parents:
diff changeset
52 GSI_CONTINUE_LINKING /* Move iterator to whatever position is suitable
kono
parents:
diff changeset
53 for linking other statements in the same
kono
parents:
diff changeset
54 direction. */
kono
parents:
diff changeset
55 };
kono
parents:
diff changeset
56
kono
parents:
diff changeset
57 extern void gsi_insert_seq_before_without_update (gimple_stmt_iterator *,
kono
parents:
diff changeset
58 gimple_seq,
kono
parents:
diff changeset
59 enum gsi_iterator_update);
kono
parents:
diff changeset
60 extern void gsi_insert_seq_before (gimple_stmt_iterator *, gimple_seq,
kono
parents:
diff changeset
61 enum gsi_iterator_update);
kono
parents:
diff changeset
62 extern void gsi_insert_seq_after_without_update (gimple_stmt_iterator *,
kono
parents:
diff changeset
63 gimple_seq,
kono
parents:
diff changeset
64 enum gsi_iterator_update);
kono
parents:
diff changeset
65 extern void gsi_insert_seq_after (gimple_stmt_iterator *, gimple_seq,
kono
parents:
diff changeset
66 enum gsi_iterator_update);
kono
parents:
diff changeset
67 extern gimple_seq gsi_split_seq_after (gimple_stmt_iterator);
kono
parents:
diff changeset
68 extern void gsi_set_stmt (gimple_stmt_iterator *, gimple *);
kono
parents:
diff changeset
69 extern void gsi_split_seq_before (gimple_stmt_iterator *, gimple_seq *);
kono
parents:
diff changeset
70 extern bool gsi_replace (gimple_stmt_iterator *, gimple *, bool);
kono
parents:
diff changeset
71 extern void gsi_replace_with_seq (gimple_stmt_iterator *, gimple_seq, bool);
kono
parents:
diff changeset
72 extern void gsi_insert_before_without_update (gimple_stmt_iterator *, gimple *,
kono
parents:
diff changeset
73 enum gsi_iterator_update);
kono
parents:
diff changeset
74 extern void gsi_insert_before (gimple_stmt_iterator *, gimple *,
kono
parents:
diff changeset
75 enum gsi_iterator_update);
kono
parents:
diff changeset
76 extern void gsi_insert_after_without_update (gimple_stmt_iterator *, gimple *,
kono
parents:
diff changeset
77 enum gsi_iterator_update);
kono
parents:
diff changeset
78 extern void gsi_insert_after (gimple_stmt_iterator *, gimple *,
kono
parents:
diff changeset
79 enum gsi_iterator_update);
kono
parents:
diff changeset
80 extern bool gsi_remove (gimple_stmt_iterator *, bool);
kono
parents:
diff changeset
81 extern gimple_stmt_iterator gsi_for_stmt (gimple *);
kono
parents:
diff changeset
82 extern gphi_iterator gsi_for_phi (gphi *);
kono
parents:
diff changeset
83 extern void gsi_move_after (gimple_stmt_iterator *, gimple_stmt_iterator *);
kono
parents:
diff changeset
84 extern void gsi_move_before (gimple_stmt_iterator *, gimple_stmt_iterator *);
kono
parents:
diff changeset
85 extern void gsi_move_to_bb_end (gimple_stmt_iterator *, basic_block);
kono
parents:
diff changeset
86 extern void gsi_insert_on_edge (edge, gimple *);
kono
parents:
diff changeset
87 extern void gsi_insert_seq_on_edge (edge, gimple_seq);
kono
parents:
diff changeset
88 extern basic_block gsi_insert_on_edge_immediate (edge, gimple *);
kono
parents:
diff changeset
89 extern basic_block gsi_insert_seq_on_edge_immediate (edge, gimple_seq);
kono
parents:
diff changeset
90 extern void gsi_commit_edge_inserts (void);
kono
parents:
diff changeset
91 extern void gsi_commit_one_edge_insert (edge, basic_block *);
kono
parents:
diff changeset
92 extern gphi_iterator gsi_start_phis (basic_block);
kono
parents:
diff changeset
93 extern void update_modified_stmts (gimple_seq);
kono
parents:
diff changeset
94
kono
parents:
diff changeset
95 /* Return a new iterator pointing to GIMPLE_SEQ's first statement. */
kono
parents:
diff changeset
96
kono
parents:
diff changeset
97 static inline gimple_stmt_iterator
kono
parents:
diff changeset
98 gsi_start_1 (gimple_seq *seq)
kono
parents:
diff changeset
99 {
kono
parents:
diff changeset
100 gimple_stmt_iterator i;
kono
parents:
diff changeset
101
kono
parents:
diff changeset
102 i.ptr = gimple_seq_first (*seq);
kono
parents:
diff changeset
103 i.seq = seq;
kono
parents:
diff changeset
104 i.bb = i.ptr ? gimple_bb (i.ptr) : NULL;
kono
parents:
diff changeset
105
kono
parents:
diff changeset
106 return i;
kono
parents:
diff changeset
107 }
kono
parents:
diff changeset
108
kono
parents:
diff changeset
109 #define gsi_start(x) gsi_start_1 (&(x))
kono
parents:
diff changeset
110
kono
parents:
diff changeset
111 static inline gimple_stmt_iterator
kono
parents:
diff changeset
112 gsi_none (void)
kono
parents:
diff changeset
113 {
kono
parents:
diff changeset
114 gimple_stmt_iterator i;
kono
parents:
diff changeset
115 i.ptr = NULL;
kono
parents:
diff changeset
116 i.seq = NULL;
kono
parents:
diff changeset
117 i.bb = NULL;
kono
parents:
diff changeset
118 return i;
kono
parents:
diff changeset
119 }
kono
parents:
diff changeset
120
kono
parents:
diff changeset
121 /* Return a new iterator pointing to the first statement in basic block BB. */
kono
parents:
diff changeset
122
kono
parents:
diff changeset
123 static inline gimple_stmt_iterator
kono
parents:
diff changeset
124 gsi_start_bb (basic_block bb)
kono
parents:
diff changeset
125 {
kono
parents:
diff changeset
126 gimple_stmt_iterator i;
kono
parents:
diff changeset
127 gimple_seq *seq;
kono
parents:
diff changeset
128
kono
parents:
diff changeset
129 seq = bb_seq_addr (bb);
kono
parents:
diff changeset
130 i.ptr = gimple_seq_first (*seq);
kono
parents:
diff changeset
131 i.seq = seq;
kono
parents:
diff changeset
132 i.bb = bb;
kono
parents:
diff changeset
133
kono
parents:
diff changeset
134 return i;
kono
parents:
diff changeset
135 }
kono
parents:
diff changeset
136
kono
parents:
diff changeset
137 gimple_stmt_iterator gsi_start_edge (edge e);
kono
parents:
diff changeset
138
kono
parents:
diff changeset
139 /* Return a new iterator initially pointing to GIMPLE_SEQ's last statement. */
kono
parents:
diff changeset
140
kono
parents:
diff changeset
141 static inline gimple_stmt_iterator
kono
parents:
diff changeset
142 gsi_last_1 (gimple_seq *seq)
kono
parents:
diff changeset
143 {
kono
parents:
diff changeset
144 gimple_stmt_iterator i;
kono
parents:
diff changeset
145
kono
parents:
diff changeset
146 i.ptr = gimple_seq_last (*seq);
kono
parents:
diff changeset
147 i.seq = seq;
kono
parents:
diff changeset
148 i.bb = i.ptr ? gimple_bb (i.ptr) : NULL;
kono
parents:
diff changeset
149
kono
parents:
diff changeset
150 return i;
kono
parents:
diff changeset
151 }
kono
parents:
diff changeset
152
kono
parents:
diff changeset
153 #define gsi_last(x) gsi_last_1 (&(x))
kono
parents:
diff changeset
154
kono
parents:
diff changeset
155 /* Return a new iterator pointing to the last statement in basic block BB. */
kono
parents:
diff changeset
156
kono
parents:
diff changeset
157 static inline gimple_stmt_iterator
kono
parents:
diff changeset
158 gsi_last_bb (basic_block bb)
kono
parents:
diff changeset
159 {
kono
parents:
diff changeset
160 gimple_stmt_iterator i;
kono
parents:
diff changeset
161 gimple_seq *seq;
kono
parents:
diff changeset
162
kono
parents:
diff changeset
163 seq = bb_seq_addr (bb);
kono
parents:
diff changeset
164 i.ptr = gimple_seq_last (*seq);
kono
parents:
diff changeset
165 i.seq = seq;
kono
parents:
diff changeset
166 i.bb = bb;
kono
parents:
diff changeset
167
kono
parents:
diff changeset
168 return i;
kono
parents:
diff changeset
169 }
kono
parents:
diff changeset
170
kono
parents:
diff changeset
171 /* Return true if I is at the end of its sequence. */
kono
parents:
diff changeset
172
kono
parents:
diff changeset
173 static inline bool
kono
parents:
diff changeset
174 gsi_end_p (gimple_stmt_iterator i)
kono
parents:
diff changeset
175 {
kono
parents:
diff changeset
176 return i.ptr == NULL;
kono
parents:
diff changeset
177 }
kono
parents:
diff changeset
178
kono
parents:
diff changeset
179 /* Return true if I is one statement before the end of its sequence. */
kono
parents:
diff changeset
180
kono
parents:
diff changeset
181 static inline bool
kono
parents:
diff changeset
182 gsi_one_before_end_p (gimple_stmt_iterator i)
kono
parents:
diff changeset
183 {
kono
parents:
diff changeset
184 return i.ptr != NULL && i.ptr->next == NULL;
kono
parents:
diff changeset
185 }
kono
parents:
diff changeset
186
kono
parents:
diff changeset
187 /* Advance the iterator to the next gimple statement. */
kono
parents:
diff changeset
188
kono
parents:
diff changeset
189 static inline void
kono
parents:
diff changeset
190 gsi_next (gimple_stmt_iterator *i)
kono
parents:
diff changeset
191 {
kono
parents:
diff changeset
192 i->ptr = i->ptr->next;
kono
parents:
diff changeset
193 }
kono
parents:
diff changeset
194
kono
parents:
diff changeset
195 /* Advance the iterator to the previous gimple statement. */
kono
parents:
diff changeset
196
kono
parents:
diff changeset
197 static inline void
kono
parents:
diff changeset
198 gsi_prev (gimple_stmt_iterator *i)
kono
parents:
diff changeset
199 {
kono
parents:
diff changeset
200 gimple *prev = i->ptr->prev;
kono
parents:
diff changeset
201 if (prev->next)
kono
parents:
diff changeset
202 i->ptr = prev;
kono
parents:
diff changeset
203 else
kono
parents:
diff changeset
204 i->ptr = NULL;
kono
parents:
diff changeset
205 }
kono
parents:
diff changeset
206
kono
parents:
diff changeset
207 /* Return the current stmt. */
kono
parents:
diff changeset
208
kono
parents:
diff changeset
209 static inline gimple *
kono
parents:
diff changeset
210 gsi_stmt (gimple_stmt_iterator i)
kono
parents:
diff changeset
211 {
kono
parents:
diff changeset
212 return i.ptr;
kono
parents:
diff changeset
213 }
kono
parents:
diff changeset
214
kono
parents:
diff changeset
215 /* Return a new iterator pointing to the first non-debug statement
kono
parents:
diff changeset
216 in basic block BB. */
kono
parents:
diff changeset
217
kono
parents:
diff changeset
218 static inline gimple_stmt_iterator
kono
parents:
diff changeset
219 gsi_start_bb_nondebug (basic_block bb)
kono
parents:
diff changeset
220 {
kono
parents:
diff changeset
221 gimple_stmt_iterator gsi = gsi_start_bb (bb);
kono
parents:
diff changeset
222 while (!gsi_end_p (gsi) && is_gimple_debug (gsi_stmt (gsi)))
kono
parents:
diff changeset
223 gsi_next (&gsi);
kono
parents:
diff changeset
224
kono
parents:
diff changeset
225 return gsi;
kono
parents:
diff changeset
226 }
kono
parents:
diff changeset
227
kono
parents:
diff changeset
228 /* Return a block statement iterator that points to the first non-label
kono
parents:
diff changeset
229 statement in block BB. */
kono
parents:
diff changeset
230
kono
parents:
diff changeset
231 static inline gimple_stmt_iterator
kono
parents:
diff changeset
232 gsi_after_labels (basic_block bb)
kono
parents:
diff changeset
233 {
kono
parents:
diff changeset
234 gimple_stmt_iterator gsi = gsi_start_bb (bb);
kono
parents:
diff changeset
235
kono
parents:
diff changeset
236 while (!gsi_end_p (gsi) && gimple_code (gsi_stmt (gsi)) == GIMPLE_LABEL)
kono
parents:
diff changeset
237 gsi_next (&gsi);
kono
parents:
diff changeset
238
kono
parents:
diff changeset
239 return gsi;
kono
parents:
diff changeset
240 }
kono
parents:
diff changeset
241
kono
parents:
diff changeset
242 /* Advance the iterator to the next non-debug gimple statement. */
kono
parents:
diff changeset
243
kono
parents:
diff changeset
244 static inline void
kono
parents:
diff changeset
245 gsi_next_nondebug (gimple_stmt_iterator *i)
kono
parents:
diff changeset
246 {
kono
parents:
diff changeset
247 do
kono
parents:
diff changeset
248 {
kono
parents:
diff changeset
249 gsi_next (i);
kono
parents:
diff changeset
250 }
kono
parents:
diff changeset
251 while (!gsi_end_p (*i) && is_gimple_debug (gsi_stmt (*i)));
kono
parents:
diff changeset
252 }
kono
parents:
diff changeset
253
kono
parents:
diff changeset
254 /* Advance the iterator to the previous non-debug gimple statement. */
kono
parents:
diff changeset
255
kono
parents:
diff changeset
256 static inline void
kono
parents:
diff changeset
257 gsi_prev_nondebug (gimple_stmt_iterator *i)
kono
parents:
diff changeset
258 {
kono
parents:
diff changeset
259 do
kono
parents:
diff changeset
260 {
kono
parents:
diff changeset
261 gsi_prev (i);
kono
parents:
diff changeset
262 }
kono
parents:
diff changeset
263 while (!gsi_end_p (*i) && is_gimple_debug (gsi_stmt (*i)));
kono
parents:
diff changeset
264 }
kono
parents:
diff changeset
265
kono
parents:
diff changeset
266 /* Return a new iterator pointing to the first non-debug statement in
kono
parents:
diff changeset
267 basic block BB. */
kono
parents:
diff changeset
268
kono
parents:
diff changeset
269 static inline gimple_stmt_iterator
kono
parents:
diff changeset
270 gsi_start_nondebug_bb (basic_block bb)
kono
parents:
diff changeset
271 {
kono
parents:
diff changeset
272 gimple_stmt_iterator i = gsi_start_bb (bb);
kono
parents:
diff changeset
273
kono
parents:
diff changeset
274 if (!gsi_end_p (i) && is_gimple_debug (gsi_stmt (i)))
kono
parents:
diff changeset
275 gsi_next_nondebug (&i);
kono
parents:
diff changeset
276
kono
parents:
diff changeset
277 return i;
kono
parents:
diff changeset
278 }
kono
parents:
diff changeset
279
kono
parents:
diff changeset
280 /* Return a new iterator pointing to the first non-debug non-label statement in
kono
parents:
diff changeset
281 basic block BB. */
kono
parents:
diff changeset
282
kono
parents:
diff changeset
283 static inline gimple_stmt_iterator
kono
parents:
diff changeset
284 gsi_start_nondebug_after_labels_bb (basic_block bb)
kono
parents:
diff changeset
285 {
kono
parents:
diff changeset
286 gimple_stmt_iterator i = gsi_after_labels (bb);
kono
parents:
diff changeset
287
kono
parents:
diff changeset
288 if (!gsi_end_p (i) && is_gimple_debug (gsi_stmt (i)))
kono
parents:
diff changeset
289 gsi_next_nondebug (&i);
kono
parents:
diff changeset
290
kono
parents:
diff changeset
291 return i;
kono
parents:
diff changeset
292 }
kono
parents:
diff changeset
293
kono
parents:
diff changeset
294 /* Return a new iterator pointing to the last non-debug statement in
kono
parents:
diff changeset
295 basic block BB. */
kono
parents:
diff changeset
296
kono
parents:
diff changeset
297 static inline gimple_stmt_iterator
kono
parents:
diff changeset
298 gsi_last_nondebug_bb (basic_block bb)
kono
parents:
diff changeset
299 {
kono
parents:
diff changeset
300 gimple_stmt_iterator i = gsi_last_bb (bb);
kono
parents:
diff changeset
301
kono
parents:
diff changeset
302 if (!gsi_end_p (i) && is_gimple_debug (gsi_stmt (i)))
kono
parents:
diff changeset
303 gsi_prev_nondebug (&i);
kono
parents:
diff changeset
304
kono
parents:
diff changeset
305 return i;
kono
parents:
diff changeset
306 }
kono
parents:
diff changeset
307
kono
parents:
diff changeset
308 /* Return true if I is followed only by debug statements in its
kono
parents:
diff changeset
309 sequence. */
kono
parents:
diff changeset
310
kono
parents:
diff changeset
311 static inline bool
kono
parents:
diff changeset
312 gsi_one_nondebug_before_end_p (gimple_stmt_iterator i)
kono
parents:
diff changeset
313 {
kono
parents:
diff changeset
314 if (gsi_one_before_end_p (i))
kono
parents:
diff changeset
315 return true;
kono
parents:
diff changeset
316 if (gsi_end_p (i))
kono
parents:
diff changeset
317 return false;
kono
parents:
diff changeset
318 gsi_next_nondebug (&i);
kono
parents:
diff changeset
319 return gsi_end_p (i);
kono
parents:
diff changeset
320 }
kono
parents:
diff changeset
321
kono
parents:
diff changeset
322 /* Iterates I statement iterator to the next non-virtual statement. */
kono
parents:
diff changeset
323
kono
parents:
diff changeset
324 static inline void
kono
parents:
diff changeset
325 gsi_next_nonvirtual_phi (gphi_iterator *i)
kono
parents:
diff changeset
326 {
kono
parents:
diff changeset
327 gphi *phi;
kono
parents:
diff changeset
328
kono
parents:
diff changeset
329 if (gsi_end_p (*i))
kono
parents:
diff changeset
330 return;
kono
parents:
diff changeset
331
kono
parents:
diff changeset
332 phi = i->phi ();
kono
parents:
diff changeset
333 gcc_assert (phi != NULL);
kono
parents:
diff changeset
334
kono
parents:
diff changeset
335 while (virtual_operand_p (gimple_phi_result (phi)))
kono
parents:
diff changeset
336 {
kono
parents:
diff changeset
337 gsi_next (i);
kono
parents:
diff changeset
338
kono
parents:
diff changeset
339 if (gsi_end_p (*i))
kono
parents:
diff changeset
340 return;
kono
parents:
diff changeset
341
kono
parents:
diff changeset
342 phi = i->phi ();
kono
parents:
diff changeset
343 }
kono
parents:
diff changeset
344 }
kono
parents:
diff changeset
345
kono
parents:
diff changeset
346 /* Return the basic block associated with this iterator. */
kono
parents:
diff changeset
347
kono
parents:
diff changeset
348 static inline basic_block
kono
parents:
diff changeset
349 gsi_bb (gimple_stmt_iterator i)
kono
parents:
diff changeset
350 {
kono
parents:
diff changeset
351 return i.bb;
kono
parents:
diff changeset
352 }
kono
parents:
diff changeset
353
kono
parents:
diff changeset
354 /* Return the sequence associated with this iterator. */
kono
parents:
diff changeset
355
kono
parents:
diff changeset
356 static inline gimple_seq
kono
parents:
diff changeset
357 gsi_seq (gimple_stmt_iterator i)
kono
parents:
diff changeset
358 {
kono
parents:
diff changeset
359 return *i.seq;
kono
parents:
diff changeset
360 }
kono
parents:
diff changeset
361
kono
parents:
diff changeset
362 /* Determine whether SEQ is a nondebug singleton. */
kono
parents:
diff changeset
363
kono
parents:
diff changeset
364 static inline bool
kono
parents:
diff changeset
365 gimple_seq_nondebug_singleton_p (gimple_seq seq)
kono
parents:
diff changeset
366 {
kono
parents:
diff changeset
367 gimple_stmt_iterator gsi;
kono
parents:
diff changeset
368
kono
parents:
diff changeset
369 /* Find a nondebug gimple. */
kono
parents:
diff changeset
370 gsi.ptr = gimple_seq_first (seq);
kono
parents:
diff changeset
371 gsi.seq = &seq;
kono
parents:
diff changeset
372 gsi.bb = NULL;
kono
parents:
diff changeset
373 while (!gsi_end_p (gsi)
kono
parents:
diff changeset
374 && is_gimple_debug (gsi_stmt (gsi)))
kono
parents:
diff changeset
375 gsi_next (&gsi);
kono
parents:
diff changeset
376
kono
parents:
diff changeset
377 /* No nondebug gimple found, not a singleton. */
kono
parents:
diff changeset
378 if (gsi_end_p (gsi))
kono
parents:
diff changeset
379 return false;
kono
parents:
diff changeset
380
kono
parents:
diff changeset
381 /* Find a next nondebug gimple. */
kono
parents:
diff changeset
382 gsi_next (&gsi);
kono
parents:
diff changeset
383 while (!gsi_end_p (gsi)
kono
parents:
diff changeset
384 && is_gimple_debug (gsi_stmt (gsi)))
kono
parents:
diff changeset
385 gsi_next (&gsi);
kono
parents:
diff changeset
386
kono
parents:
diff changeset
387 /* Only a singleton if there's no next nondebug gimple. */
kono
parents:
diff changeset
388 return gsi_end_p (gsi);
kono
parents:
diff changeset
389 }
kono
parents:
diff changeset
390
kono
parents:
diff changeset
391 #endif /* GCC_GIMPLE_ITERATOR_H */