1 2014-10-28 David Malcolm <dmalcolm@redhat.com>
3 * auto-profile.c (autofdo::function_instance::find_icall_target_map):
4 Strengthen param "stmt" from gimple to gcall *.
5 (autofdo::autofdo_source_profile::update_inlined_ind_target):
7 (autofdo::afdo_indirect_call): Rename local gimple "stmt" to "gs",
8 reintroducing "stmt" as a gcall * via a dyn_cast once we've
9 established that we have a GIMPLE_CALL.
10 (autofdo::afdo_set_bb_count): Use a gphi_iterator for the phi
11 iteration, renaming it from "gsi" to "gpi", strengthening
12 local "phi" from gimple to gphi *.
13 (autofdo::afdo_propagate_circuit): Rename local gimple "phi_stmt"
14 to "def_stmt". Reintroduce "phi_stmt" as a gphi * via a dyn_cast
15 once we know we have a GIMPLE_PHI.
16 (autofdo::afdo_vpt_for_early_inline): Strengthen local "stmt" from
17 gimple to gcall *, using a dyn_cast.
18 * gimple-fold.c (replace_stmt_with_simplification): Replace check
19 against GIMPLE_COND with a dyn_cast <gcond *>, introducing local
20 "cond_stmt". Use "cond_stmt" in place of "stmt" for typesafety.
21 * gimple-iterator.h (gsi_next_nonvirtual_phi): Strengthen param
22 from gimple_stmt_iterator * to gphi_iterator *, and local "phi"
23 from gimple to gphi *.
24 * ipa-icf-gimple.c (ipa_icf_gimple::func_checker::parse_labels):
25 Replace check against GIMPLE_LABEL with a dyn_cast <glabel *>,
26 introducing local "label_stmt". Use it in place of "stmt" for
28 (ipa_icf_gimple::func_checker::compare_bb): Add checked casts
29 to appropriate gimple subclasses when invoking comparison methods
30 within the cases for GIMPLE_SWITCH, GIMPLE_RESX, GIMPLE_LABEL,
31 GIMPLE_RETURN, GIMPLE_ASM.
32 (ipa_icf_gimple::func_checker::compare_gimple_label): Strengthen
33 both params from gimple to const glabel *.
34 (ipa_icf_gimple::func_checker::compare_gimple_switch): Strengthen
35 both params from gimple to const gswitch *.
36 (ipa_icf_gimple::func_checker::compare_gimple_return): Strengthen
37 both params from gimple to const greturn *.
38 (ipa_icf_gimple::func_checker::compare_gimple_resx): Strengthen
39 both params from gimple to const gresx *.
40 (ipa_icf_gimple::func_checker::compare_gimple_asm): Strengthen
41 both params from gimple to const gasm *.
42 * ipa-icf-gimple.h (ipa_icf_gimple::func_checker::compare_gimple_label):
43 Strengthen both params from gimple to const glabel *.
44 (ipa_icf_gimple::func_checker::compare_gimple_switch): Strengthen
45 both params from gimple to const gswitch *.
46 (ipa_icf_gimple::func_checker::compare_gimple_return): Strengthen
47 both params from gimple to const greturn *.
48 (ipa_icf_gimple::func_checker::compare_gimple_resx): Strengthen
49 both params from gimple to const gresx *.
50 (ipa_icf_gimple::func_checker::compare_gimple_asm): Strengthen
51 both params from gimple to const gasm *.
52 * ipa-icf.c (ipa_icf_gimple::sem_function::compare_phi_node):
53 Strengthen locals "si1" and "si2" from gimple_stmt_iterator to
54 gphi_iterator, and locals "phi1" and "phi2" from gimple to gphi *.
55 * tree-ssa-forwprop.c (fold_all_stmts): Replace check against
56 GIMPLE_COND with a dyn_cast <gcond *>, introducing local
57 "cond_stmt". Use "cond_stmt" in place of "stmt" for typesafety.
58 * tree-ssa-reassoc.c (branch_fixup): Strengthen local "phi" from
61 2014-10-27 David Malcolm <dmalcolm@redhat.com>
63 * doc/gimple.texi (Class hierarchy of GIMPLE statements): Update
64 to reflect the new gimple subclasses and the renamings of existing
67 2014-10-27 David Malcolm <dmalcolm@redhat.com>
69 * gimple.h (struct gdebug): Remove out-of-date references to
71 (struct ggoto): Likewise.
72 (struct glabel): Likewise.
74 2014-10-27 David Malcolm <dmalcolm@redhat.com>
76 Patch autogenerated by rename_gimple_subclasses.py from
77 https://github.com/davidmalcolm/gcc-refactoring-scripts
78 revision 7d754b63ff2bf47226a67b2c0af5d74b54d4709f
80 * asan.c (get_mem_ref_of_assignment): Rename gimple subclass types.
81 (instrument_strlen_call): Likewise.
82 (instrument_builtin_call): Likewise.
83 (has_mem_ref_been_instrumented): Likewise.
84 (has_stmt_been_instrumented_p): Likewise.
85 (create_cond_insert_point): Likewise.
86 (asan_expand_check_ifn): Likewise.
87 * builtins.c (validate_arg): Likewise.
88 (do_mpc_arg2): Likewise.
89 * builtins.h (validate_gimple_arglist): Likewise.
90 (fold_call_stmt): Likewise.
91 * cfgexpand.c (mark_transaction_restart_calls): Likewise.
92 (expand_gimple_stmt): Likewise.
93 (expand_asm_operands): Likewise.
94 (label_rtx_for_bb): Likewise.
95 (expand_gimple_stmt_1): Likewise.
96 (maybe_cleanup_end_of_block): Likewise.
97 (expand_gimple_basic_block): Likewise.
98 * cfgloop.c (find_subloop_latch_edge_by_ivs): Likewise.
99 * cfgloopmanip.c (create_empty_if_region_on_edge): Likewise.
100 (create_empty_loop_on_edge): Likewise.
101 * cgraph.c (cgraph_add_edge_to_call_site_hash): Likewise.
102 (cgraph_allocate_init_indirect_info): Likewise.
103 (cgraph_set_edge_callee): Likewise.
104 (cgraph_update_edges_for_call_stmt_node): Likewise.
105 * cgraph.h (set_call_stmt_including_clones): Likewise.
106 (create_indirect_edge): Likewise.
107 (create_edge_including_clones): Likewise.
108 (set_call_stmt): Likewise.
109 (redirect_call_stmt_to_callee): Likewise.
110 (rebuild_references): Likewise.
111 (create_edge): Likewise.
112 * cgraphbuild.c (mark_store): Likewise.
113 (record_references_in_initializer): Likewise.
114 * cgraphclones.c (function): Likewise.
115 (clone_function_name): Likewise.
116 * cgraphunit.c (thunk_adjust): Likewise.
117 * coretypes.h: Likewise.
118 * expr.h (expand_normal): Likewise.
119 * gimple-builder.c (get_expr_type): Likewise.
120 (build_assign): Likewise.
121 (build_type_cast): Likewise.
122 * gimple-builder.h (build_assign): Likewise.
123 (build_type_cast): Likewise.
124 * gimple-fold.c (gimple_fold_builtin_snprintf_chk): Likewise.
125 (gimple_fold_builtin_sprintf_chk): Likewise.
126 (gimple_fold_builtin_snprintf): Likewise.
127 (gimple_fold_builtin): Likewise.
128 (gimple_fold_call): Likewise.
129 (gimple_fold_stmt_to_constant_1): Likewise.
130 (fold_gimple_assign): Likewise.
131 (fold_stmt_1): Likewise.
132 * gimple-iterator.c (gsi_commit_one_edge_insert): Likewise.
133 (gsi_start_phis): Likewise.
134 * gimple-iterator.h (gsi_commit_one_edge_insert): Likewise.
135 (gimple_phi_iterator::phi): Likewise.
136 * gimple-low.c (lower_try_catch): Likewise.
137 (gimple_try_catch_may_fallthru): Likewise.
138 (lower_gimple_bind): Likewise.
139 (gimple_stmt_may_fallthru): Likewise.
140 (struct return_statements_t): Likewise.
141 (lower_gimple_return): Likewise.
142 (lower_stmt): Likewise.
143 * gimple-pretty-print.c (dump_gimple_omp_target): Likewise.
144 (dump_gimple_omp_single): Likewise.
145 (dump_gimple_omp_continue): Likewise.
146 (dump_gimple_omp_teams): Likewise.
147 (dump_gimple_omp_parallel): Likewise.
148 (dump_gimple_phi): Likewise.
149 (dump_gimple_debug): Likewise.
150 (dump_gimple_omp_block): Likewise.
151 (dump_gimple_omp_for): Likewise.
152 (dump_gimple_omp_atomic_load): Likewise.
153 (dump_gimple_omp_task): Likewise.
154 (dump_gimple_bind): Likewise.
155 (dump_ssaname_info): Likewise.
156 (dump_phi_nodes): Likewise.
157 (gimple_dump_bb_for_graph): Likewise.
158 (dump_gimple_resx): Likewise.
159 (dump_gimple_eh_else): Likewise.
160 (dump_gimple_eh_must_not_throw): Likewise.
161 (dump_gimple_eh_filter): Likewise.
162 (dump_gimple_catch): Likewise.
163 (dump_gimple_try): Likewise.
164 (dump_gimple_goto): Likewise.
165 (dump_gimple_assign): Likewise.
166 (dump_gimple_omp_return): Likewise.
167 (dump_gimple_return): Likewise.
168 (pp_points_to_solution): Likewise.
169 (dump_gimple_transaction): Likewise.
170 (dump_gimple_fmt): Likewise.
171 (dump_unary_rhs): Likewise.
172 (dump_binary_rhs): Likewise.
173 (dump_ternary_rhs): Likewise.
174 (dump_gimple_call): Likewise.
175 (dump_gimple_cond): Likewise.
176 (pp_cfg_jump): Likewise.
177 (dump_gimple_label): Likewise.
178 (dump_gimple_eh_dispatch): Likewise.
179 (dump_gimple_switch): Likewise.
180 (pp_gimple_stmt_1): Likewise.
181 * gimple-ssa-isolate-paths.c (isolate_path): Likewise.
182 (find_implicit_erroneous_behaviour): Likewise.
183 (find_explicit_erroneous_behaviour): Likewise.
184 (insert_trap_and_remove_trailing_statements): Likewise.
185 * gimple-ssa-strength-reduction.c (slsr_process_copy): Likewise.
186 (add_cand_for_stmt): Likewise.
187 (create_phi_basis): Likewise.
188 (ncd_for_two_cands): Likewise.
189 (ncd_with_phi): Likewise.
190 (ncd_of_cand_and_phis): Likewise.
191 (replace_mult_candidate): Likewise.
192 (create_add_on_incoming_edge): Likewise.
193 (insert_initializers): Likewise.
194 (introduce_cast_before_cand): Likewise.
195 (replace_one_candidate): Likewise.
196 * gimple-streamer-in.c (input_phi): Likewise.
197 (input_gimple_stmt): Likewise.
198 * gimple-streamer-out.c (output_phi): Likewise.
199 (output_bb): Likewise.
200 (output_gimple_stmt): Likewise.
201 * gimple-walk.c (walk_gimple_stmt): Likewise.
202 (walk_gimple_seq): Likewise.
203 (walk_gimple_op): Likewise.
204 (walk_stmt_load_store_addr_ops): Likewise.
205 * gimple.c (gimple_build_omp_target): Likewise.
206 (gimple_build_omp_sections_switch): Likewise.
207 (gimple_build_omp_single): Likewise.
208 (gimple_build_omp_return): Likewise.
209 (gimple_build_omp_sections): Likewise.
210 (gimple_build_omp_task): Likewise.
211 (gimple_build_omp_parallel): Likewise.
212 (gimple_build_omp_for): Likewise.
213 (gimple_build_omp_critical): Likewise.
214 (gimple_build_omp_taskgroup): Likewise.
215 (gimple_build_omp_continue): Likewise.
216 (gimple_build_omp_teams): Likewise.
217 (gimple_build_omp_atomic_load): Likewise.
218 (gimple_build_try): Likewise.
219 (gimple_build_wce): Likewise.
220 (gimple_build_eh_else): Likewise.
221 (gimple_build_eh_must_not_throw): Likewise.
222 (gimple_build_eh_filter): Likewise.
223 (gimple_build_catch): Likewise.
224 (gimple_build_nop): Likewise.
225 (empty_stmt_p): Likewise.
226 (gimple_build_with_ops_stat): Likewise.
227 (infer_nonnull_range): Likewise.
228 (gimple_build_omp_atomic_store): Likewise.
229 (gimple_build_transaction): Likewise.
230 (gimple_copy): Likewise.
231 (gimple_call_flags): Likewise.
232 (gimple_call_fnspec): Likewise.
233 (gimple_call_arg_flags): Likewise.
234 (gimple_build_return): Likewise.
235 (gimple_call_reset_alias_info): Likewise.
236 (gimple_build_call_1): Likewise.
237 (gimple_build_call_vec): Likewise.
238 (gimple_build_call): Likewise.
239 (gimple_build_call_valist): Likewise.
240 (gimple_build_call_internal_1): Likewise.
241 (gimple_build_call_internal): Likewise.
242 (gimple_build_call_internal_vec): Likewise.
243 (canonicalize_cond_expr_cond): Likewise.
244 (gimple_call_copy_skip_args): Likewise.
245 (gimple_has_side_effects): Likewise.
246 (gimple_call_builtin_p): Likewise.
247 (gimple_build_bind): Likewise.
248 (gimple_build_asm_vec): Likewise.
249 (gimple_could_trap_p_1): Likewise.
250 (gimple_build_asm_1): Likewise.
251 (gimple_build_call_from_tree): Likewise.
252 (gimple_build_assign_stat): Likewise.
253 (gimple_build_resx): Likewise.
254 (gimple_build_switch_nlabels): Likewise.
255 (gimple_build_switch): Likewise.
256 (gimple_cond_set_condition_from_tree): Likewise.
257 (gimple_set_bb): Likewise.
258 (gimple_build_label): Likewise.
259 (gimple_build_goto): Likewise.
260 (gimple_build_eh_dispatch): Likewise.
261 (gimple_build_debug_bind_stat): Likewise.
262 (gimple_build_debug_source_bind_stat): Likewise.
263 (gimple_build_assign_with_ops): Likewise.
264 (gimple_build_cond): Likewise.
265 (gimple_build_cond_from_tree): Likewise.
266 * gimple.h (gimple_build_omp_target): Likewise.
267 (gimple_omp_teams_clauses): Likewise.
268 (gimple_omp_teams_clauses_ptr): Likewise.
269 (gimple_omp_target_set_kind): Likewise.
270 (gimple_omp_target_set_child_fn): Likewise.
271 (gimple_build_omp_single): Likewise.
272 (gimple_omp_target_kind): Likewise.
273 (gimple_omp_target_child_fn): Likewise.
274 (gimple_omp_target_child_fn_ptr): Likewise.
275 (gimple_omp_target_data_arg): Likewise.
276 (gimple_omp_target_data_arg_ptr): Likewise.
277 (gimple_omp_target_clauses): Likewise.
278 (gimple_omp_target_clauses_ptr): Likewise.
279 (gimple_build_omp_sections_switch): Likewise.
280 (gimple_omp_single_clauses): Likewise.
281 (gimple_omp_single_clauses_ptr): Likewise.
282 (gimple_build_omp_return): Likewise.
283 (gimple_omp_sections_clauses): Likewise.
284 (gimple_omp_sections_clauses_ptr): Likewise.
285 (gimple_omp_sections_set_clauses): Likewise.
286 (gimple_omp_sections_control): Likewise.
287 (gimple_omp_sections_control_ptr): Likewise.
288 (gimple_omp_sections_set_control): Likewise.
289 (gimple_build_omp_parallel): Likewise.
290 (gimple_omp_task_clauses): Likewise.
291 (gimple_omp_task_clauses_ptr): Likewise.
292 (gimple_omp_task_set_clauses): Likewise.
293 (gimple_omp_task_child_fn): Likewise.
294 (gimple_omp_task_child_fn_ptr): Likewise.
295 (gimple_omp_task_set_child_fn): Likewise.
296 (gimple_omp_task_data_arg): Likewise.
297 (gimple_omp_task_data_arg_ptr): Likewise.
298 (gimple_omp_task_set_data_arg): Likewise.
299 (gimple_omp_task_copy_fn): Likewise.
300 (gimple_omp_task_copy_fn_ptr): Likewise.
301 (gimple_omp_task_set_copy_fn): Likewise.
302 (gimple_omp_task_arg_size): Likewise.
303 (gimple_omp_task_arg_size_ptr): Likewise.
304 (gimple_omp_task_set_arg_size): Likewise.
305 (gimple_omp_task_arg_align): Likewise.
306 (gimple_omp_task_arg_align_ptr): Likewise.
307 (gimple_omp_task_set_arg_align): Likewise.
308 (gimple_omp_parallel_set_clauses): Likewise.
309 (gimple_omp_parallel_set_child_fn): Likewise.
310 (gimple_build_omp_for): Likewise.
311 (gimple_omp_parallel_clauses_ptr): Likewise.
312 (gimple_omp_parallel_child_fn): Likewise.
313 (gimple_omp_parallel_child_fn_ptr): Likewise.
314 (gimple_omp_parallel_data_arg): Likewise.
315 (gimple_omp_parallel_data_arg_ptr): Likewise.
316 (gimple_omp_parallel_clauses): Likewise.
317 (gimple_build_omp_critical): Likewise.
318 (gimple_omp_for_kind): Likewise.
319 (gimple_omp_for_combined_p): Likewise.
320 (gimple_omp_for_combined_into_p): Likewise.
321 (gimple_omp_for_clauses): Likewise.
322 (gimple_omp_for_clauses_ptr): Likewise.
323 (gimple_omp_for_set_clauses): Likewise.
324 (gimple_omp_for_collapse): Likewise.
325 (gimple_omp_for_index): Likewise.
326 (gimple_omp_for_index_ptr): Likewise.
327 (gimple_omp_for_set_index): Likewise.
328 (gimple_omp_for_initial): Likewise.
329 (gimple_omp_for_initial_ptr): Likewise.
330 (gimple_omp_for_set_initial): Likewise.
331 (gimple_omp_for_final): Likewise.
332 (gimple_omp_for_final_ptr): Likewise.
333 (gimple_omp_for_set_final): Likewise.
334 (gimple_omp_for_incr): Likewise.
335 (gimple_omp_for_incr_ptr): Likewise.
336 (gimple_omp_for_set_incr): Likewise.
337 (gimple_omp_for_pre_body_ptr): Likewise.
338 (gimple_omp_for_set_pre_body): Likewise.
339 (gimple_omp_for_set_cond): Likewise.
340 (gimple_omp_set_body): Likewise.
341 (gimple_build_debug_source_bind_stat): Likewise.
342 (gimple_omp_critical_name): Likewise.
343 (gimple_omp_critical_name_ptr): Likewise.
344 (gimple_omp_atomic_load_rhs_ptr): Likewise.
345 (gimple_omp_continue_set_control_def): Likewise.
346 (gimple_build_omp_taskgroup): Likewise.
347 (gimple_omp_continue_control_def): Likewise.
348 (gimple_omp_continue_control_def_ptr): Likewise.
349 (gimple_omp_continue_control_use): Likewise.
350 (gimple_omp_continue_control_use_ptr): Likewise.
351 (gimple_omp_atomic_store_set_val): Likewise.
352 (gimple_build_omp_atomic_load): Likewise.
353 (gimple_omp_for_cond): Likewise.
354 (gimple_omp_atomic_store_val): Likewise.
355 (gimple_omp_atomic_load_set_lhs): Likewise.
356 (gimple_omp_atomic_load_set_rhs): Likewise.
357 (gimple_build_omp_teams): Likewise.
358 (gimple_omp_atomic_store_val_ptr): Likewise.
359 (gimple_omp_atomic_load_lhs): Likewise.
360 (gimple_omp_atomic_load_lhs_ptr): Likewise.
361 (gimple_omp_atomic_load_rhs): Likewise.
362 (gimple_try_kind): Likewise.
363 (gimple_try_cleanup): Likewise.
364 (gimple_try_set_catch_is_cleanup): Likewise.
365 (gimple_try_set_eval): Likewise.
366 (gimple_build_eh_else): Likewise.
367 (gimple_try_eval_ptr): Likewise.
368 (gimple_try_cleanup_ptr): Likewise.
369 (gimple_phi_capacity): Likewise.
370 (gimple_phi_num_args): Likewise.
371 (gimple_phi_result): Likewise.
372 (gimple_phi_result_ptr): Likewise.
373 (gimple_phi_arg): Likewise.
374 (gimple_phi_arg_def): Likewise.
375 (gimple_phi_arg_def_ptr): Likewise.
376 (gimple_phi_arg_edge): Likewise.
377 (gimple_phi_arg_location): Likewise.
378 (gimple_phi_arg_location_from_edge): Likewise.
379 (gimple_phi_arg_set_location): Likewise.
380 (gimple_resx_set_region): Likewise.
381 (gimple_build_switch): Likewise.
382 (gimple_eh_dispatch_region): Likewise.
383 (gimple_phi_arg_has_location): Likewise.
384 (gimple_build_wce): Likewise.
385 (gimple_resx_region): Likewise.
386 (gimple_build_eh_must_not_throw): Likewise.
387 (gimple_eh_must_not_throw_set_fndecl): Likewise.
388 (gimple_eh_else_n_body_ptr): Likewise.
389 (gimple_eh_else_n_body): Likewise.
390 (gimple_eh_else_e_body_ptr): Likewise.
391 (gimple_eh_else_e_body): Likewise.
392 (gimple_eh_else_set_n_body): Likewise.
393 (gimple_build_eh_filter): Likewise.
394 (gimple_eh_filter_set_failure): Likewise.
395 (gimple_eh_must_not_throw_fndecl): Likewise.
396 (gimple_build_catch): Likewise.
397 (gimple_eh_filter_failure): Likewise.
398 (gimple_eh_filter_set_types): Likewise.
399 (gimple_eh_filter_types): Likewise.
400 (gimple_eh_filter_types_ptr): Likewise.
401 (gimple_eh_filter_failure_ptr): Likewise.
402 (gimple_asm_input_p): Likewise.
403 (gimple_build_asm_vec): Likewise.
404 (gimple_catch_types): Likewise.
405 (gimple_catch_types_ptr): Likewise.
406 (gimple_catch_handler_ptr): Likewise.
407 (gimple_catch_handler): Likewise.
408 (gimple_catch_set_types): Likewise.
409 (gimple_statement_catch): Likewise.
410 (gimple_goto_set_dest): Likewise.
411 (gimple_bind_add_seq): Likewise.
412 (gimple_build_nop): Likewise.
413 (gimple_seq_first_stmt): Likewise.
414 (gimple_seq_first_stmt_as_a_bind): Likewise.
415 (gimple_bind_vars): Likewise.
416 (gimple_bind_set_vars): Likewise.
417 (gimple_bind_append_vars): Likewise.
418 (gimple_bind_body_ptr): Likewise.
419 (gimple_bind_body): Likewise.
420 (gimple_bind_set_body): Likewise.
421 (gimple_bind_add_stmt): Likewise.
422 (gimple_bind_block): Likewise.
423 (gimple_transaction_set_subcode): Likewise.
424 (gimple_return_retval_ptr): Likewise.
425 (gimple_alloc_stat): Likewise.
426 (gimple_return_retval): Likewise.
427 (gimple_transaction_body): Likewise.
428 (gimple_transaction_label_ptr): Likewise.
429 (gimple_build_omp_atomic_store): Likewise.
430 (gimple_omp_continue_set_control_use): Likewise.
431 (gimple_transaction_body_ptr): Likewise.
432 (gimple_transaction_label): Likewise.
433 (gimple_transaction_subcode): Likewise.
434 (gimple_transaction_set_body): Likewise.
435 (gimple_transaction_set_label): Likewise.
436 (gimple_call_arg_flags): Likewise.
437 (gimple_call_return_flags): Likewise.
438 (gimple_call_fndecl): Likewise.
439 (gimple_call_chain): Likewise.
440 (gimple_expr_type): Likewise.
441 (gimple_call_reset_alias_info): Likewise.
442 (gimple_build_call_vec): Likewise.
443 (gimple_build_call): Likewise.
444 (gimple_build_call_valist): Likewise.
445 (gimple_build_call_internal): Likewise.
446 (gimple_build_call_internal_vec): Likewise.
447 (canonicalize_cond_expr_cond): Likewise.
448 (gimple_call_copy_skip_args): Likewise.
449 (gimple_call_fn_ptr): Likewise.
450 (gimple_call_set_fndecl): Likewise.
451 (gimple_call_chain_ptr): Likewise.
452 (gimple_call_set_arg): Likewise.
453 (gimple_call_set_tail): Likewise.
454 (gimple_call_tail_p): Likewise.
455 (gimple_call_set_return_slot_opt): Likewise.
456 (gimple_call_return_slot_opt_p): Likewise.
457 (gimple_call_set_from_thunk): Likewise.
458 (gimple_call_from_thunk_p): Likewise.
459 (gimple_call_set_va_arg_pack): Likewise.
460 (gimple_call_noreturn_p): Likewise.
461 (gimple_call_set_nothrow): Likewise.
462 (gimple_call_nothrow_p): Likewise.
463 (gimple_call_set_alloca_for_var): Likewise.
464 (gimple_call_alloca_for_var_p): Likewise.
465 (gimple_call_copy_flags): Likewise.
466 (gimple_call_use_set): Likewise.
467 (gimple_statement_call): Likewise.
468 (gimple_call_internal_fn): Likewise.
469 (gimple_call_fntype): Likewise.
470 (gimple_asm_clobbers_memory_p): Likewise.
471 (gimple_bind_set_block): Likewise.
472 (gimple_asm_ninputs): Likewise.
473 (gimple_asm_noutputs): Likewise.
474 (gimple_asm_nclobbers): Likewise.
475 (gimple_asm_nlabels): Likewise.
476 (gimple_asm_input_op): Likewise.
477 (gimple_asm_set_input_op): Likewise.
478 (gimple_asm_output_op): Likewise.
479 (gimple_asm_set_output_op): Likewise.
480 (gimple_asm_set_clobber_op): Likewise.
481 (gimple_asm_set_label_op): Likewise.
482 (gimple_asm_string): Likewise.
483 (gimple_asm_set_input): Likewise.
484 (gimple_build_bind): Likewise.
485 (gimple_asm_input_op_ptr): Likewise.
486 (gimple_asm_output_op_ptr): Likewise.
487 (gimple_asm_clobber_op): Likewise.
488 (gimple_asm_label_op): Likewise.
489 (gimple_asm_volatile_p): Likewise.
490 (gimple_asm_set_volatile): Likewise.
491 (gimple_assign_set_rhs_with_ops): Likewise.
492 (gimple_build_call_from_tree): Likewise.
493 (gimple_build_assign_stat): Likewise.
494 (gimple_eh_dispatch_set_region): Likewise.
495 (gimple_switch_set_num_labels): Likewise.
496 (gimple_switch_index): Likewise.
497 (gimple_switch_set_index): Likewise.
498 (gimple_switch_set_label): Likewise.
499 (gimple_build_resx): Likewise.
500 (gimple_build_switch_nlabels): Likewise.
501 (gimple_switch_num_labels): Likewise.
502 (gimple_switch_index_ptr): Likewise.
503 (gimple_switch_label): Likewise.
504 (gimple_switch_default_label): Likewise.
505 (gimple_cond_set_condition): Likewise.
506 (gimple_label_label): Likewise.
507 (gimple_build_label): Likewise.
508 (gimple_goto_dest): Likewise.
509 (gimple_build_eh_dispatch): Likewise.
510 (gimple_build_debug_bind_stat): Likewise.
511 (gimple_cond_lhs): Likewise.
512 (gimple_cond_rhs): Likewise.
513 (gimple_cond_set_rhs): Likewise.
514 (gimple_cond_set_false_label): Likewise.
515 (gimple_cond_make_true): Likewise.
516 (gimple_cond_true_p): Likewise.
517 (gimple_build_assign_with_ops): Likewise.
518 (gimple_build_cond): Likewise.
519 (gimple_cond_set_condition_from_tree): Likewise.
520 (gimple_cond_code): Likewise.
521 (gimple_cond_lhs_ptr): Likewise.
522 (gimple_cond_rhs_ptr): Likewise.
523 (gimple_cond_true_label): Likewise.
524 (gimple_cond_set_true_label): Likewise.
525 (gimple_cond_false_label): Likewise.
526 (gimple_cond_make_false): Likewise.
527 (gimple_cond_false_p): Likewise.
528 (gimple_statement_cond): Likewise.
529 (is_a_helper <gimple_statement_cond *>): Likewise.
530 * gimplify-me.c (gimple_regimplify_operands): Likewise.
531 * gimplify.c (gimplify_omp_target_update): Likewise.
532 (gimplify_omp_for): Likewise.
533 (gimplify_omp_atomic): Likewise.
534 (gimplify_cleanup_point_expr): Likewise.
535 (struct gimplify_ctx): Likewise.
536 (pop_gimplify_context): Likewise.
537 (gimple_pop_bind_expr): Likewise.
538 (gimple_current_bind_expr): Likewise.
539 (declare_vars): Likewise.
540 (gimplify_one_sizepos): Likewise.
541 (gimplify_body): Likewise.
542 (gimplify_return_expr): Likewise.
543 (gimplify_transaction): Likewise.
544 (voidify_wrapper_expr): Likewise.
545 (gimplify_bind_expr): Likewise.
546 (gimplify_call_expr): Likewise.
547 (gimplify_modify_expr_to_memcpy): Likewise.
548 (gimplify_modify_expr_to_memset): Likewise.
549 (gimplify_modify_expr): Likewise.
550 (gimplify_expr): Likewise.
551 (gimplify_function_tree): Likewise.
552 (gimplify_asm_expr): Likewise.
553 (gimplify_init_constructor): Likewise.
554 (gimple_push_cleanup): Likewise.
555 (gimplify_switch_expr): Likewise.
556 (gimplify_case_label_expr): Likewise.
557 (gimplify_cond_expr): Likewise.
558 * gimplify.h (pop_gimplify_context): Likewise.
559 (gimple_current_bind_expr): Likewise.
560 (gimplify_one_sizepos): Likewise.
561 * graphite-scop-detection.c (limit_scops): Likewise.
562 (same_close_phi_node): Likewise.
563 (make_close_phi_nodes_unique): Likewise.
564 (canonicalize_loop_closed_ssa): Likewise.
565 * graphite-sese-to-poly.c (phi_arg_in_outermost_loop): Likewise.
566 (simple_copy_phi_p): Likewise.
567 (gsi_for_phi_node): Likewise.
568 (rewrite_close_phi_out_of_ssa): Likewise.
569 (rewrite_cross_bb_scalar_deps): Likewise.
570 (rewrite_commutative_reductions_out_of_ssa_loop): Likewise.
571 (tree_int_to_gmp): Likewise.
572 (reduction_phi_p): Likewise.
573 (build_scop_drs): Likewise.
574 (rewrite_phi_out_of_ssa): Likewise.
575 (rewrite_degenerate_phi): Likewise.
576 (rewrite_reductions_out_of_ssa): Likewise.
577 (is_reduction_operation_p): Likewise.
578 (phi_contains_arg): Likewise.
579 (follow_ssa_with_commutative_ops): Likewise.
580 (detect_commutative_reduction_arg): Likewise.
581 (detect_commutative_reduction_assign): Likewise.
582 (follow_inital_value_to_phi): Likewise.
583 (edge_initial_value_for_loop_phi): Likewise.
584 (used_outside_reduction): Likewise.
585 (detect_commutative_reduction): Likewise.
586 (dr_indices_valid_in_loop): Likewise.
587 (translate_scalar_reduction_to_array): Likewise.
588 (scop_ivs_can_be_represented): Likewise.
589 (remove_simple_copy_phi): Likewise.
590 (remove_invariant_phi): Likewise.
591 (insert_out_of_ssa_copy): Likewise.
592 (translate_scalar_reduction_to_array_for_stmt): Likewise.
593 (create_pw_aff_from_tree): Likewise.
594 (add_conditions_to_domain): Likewise.
595 (add_conditions_to_constraints): Likewise.
596 (single_pred_cond_non_loop_exit): Likewise.
597 * gsstruct.def: Likewise.
598 * internal-fn.c (get_multi_vector_move): Likewise.
599 (expand_LOAD_LANES): Likewise.
600 (expand_STORE_LANES): Likewise.
601 (expand_ANNOTATE): Likewise.
602 (expand_GOMP_SIMD_LANE): Likewise.
603 (expand_GOMP_SIMD_VF): Likewise.
604 (expand_GOMP_SIMD_LAST_LANE): Likewise.
605 (expand_UBSAN_NULL): Likewise.
606 (expand_UBSAN_BOUNDS): Likewise.
607 (expand_UBSAN_OBJECT_SIZE): Likewise.
608 (expand_ASAN_CHECK): Likewise.
609 (ubsan_expand_si_overflow_addsub_check): Likewise.
610 (ubsan_expand_si_overflow_neg_check): Likewise.
611 (ubsan_expand_si_overflow_mul_check): Likewise.
612 (expand_UBSAN_CHECK_ADD): Likewise.
613 (expand_UBSAN_CHECK_SUB): Likewise.
614 (expand_UBSAN_CHECK_MUL): Likewise.
615 (expand_LOOP_VECTORIZED): Likewise.
616 (expand_MASK_LOAD): Likewise.
617 (expand_MASK_STORE): Likewise.
618 (expand_ABNORMAL_DISPATCHER): Likewise.
619 (expand_BUILTIN_EXPECT): Likewise.
620 * internal-fn.h (internal_fn_fnspec): Likewise.
621 * ipa-inline-analysis.c (estimate_function_body_sizes): Likewise.
622 (phi_result_unknown_predicate): Likewise.
623 (set_switch_stmt_execution_predicate): Likewise.
624 * ipa-prop.c (param_type_may_change_p): Likewise.
625 (detect_type_change_from_memory_writes): Likewise.
626 (detect_type_change): Likewise.
627 (ipa_load_from_parm_agg): Likewise.
628 (get_ancestor_addr_info): Likewise.
629 (compute_complex_ancestor_jump_func): Likewise.
630 (build_agg_jump_func_from_list): Likewise.
631 (ipa_compute_jump_functions_for_edge): Likewise.
632 (ipa_is_ssa_with_stmt_def): Likewise.
633 (ipa_note_param_call): Likewise.
634 (ipa_analyze_indirect_call_uses): Likewise.
635 (ipa_analyze_virtual_call_uses): Likewise.
636 (ipa_analyze_stmt_uses): Likewise.
637 (ipa_modify_formal_parameters): Likewise.
638 (ipa_modify_call_arguments): Likewise.
639 * ipa-prop.h (ipa_get_agg_replacements_for_node): Likewise.
640 * ipa-pure-const.c (special_builtin_state): Likewise.
641 (check_stmt): Likewise.
642 * ipa-split.c (consider_split): Likewise.
643 (visit_bb): Likewise.
644 (find_return_bb): Likewise.
645 (find_retval): Likewise.
646 (split_function): Likewise.
647 (verify_non_ssa_vars): Likewise.
648 (check_forbidden_calls): Likewise.
649 * lto-streamer-in.c (fixup_call_stmt_edges_1): Likewise.
650 * lto-streamer-out.c (output_function): Likewise.
651 * omp-low.c (scan_omp_target): Likewise.
652 (scan_omp_single): Likewise.
653 (expand_omp_target): Likewise.
654 (scan_omp_sections): Likewise.
655 (lower_omp_single_simple): Likewise.
656 (scan_omp_for): Likewise.
657 (new_omp_context): Likewise.
658 (delete_omp_context): Likewise.
659 (scan_omp_task): Likewise.
660 (expand_cilk_for_call): Likewise.
661 (task_copyfn_remap_type): Likewise.
662 (gimple_build_cond_empty): Likewise.
663 (remove_exit_barrier): Likewise.
664 (expand_omp_taskreg): Likewise.
665 (expand_cilk_for): Likewise.
666 (struct omp_for_data): Likewise.
667 (is_combined_parallel): Likewise.
668 (workshare_safe_to_combine_p): Likewise.
669 (get_ws_args_for): Likewise.
670 (scan_omp_parallel): Likewise.
671 (finish_taskreg_scan): Likewise.
672 (expand_omp_for): Likewise.
673 (check_omp_nesting_restrictions): Likewise.
674 (expand_omp_sections): Likewise.
675 (expand_omp_atomic): Likewise.
676 (expand_parallel_call): Likewise.
677 (finalize_task_copyfn): Likewise.
678 (scan_omp_1_stmt): Likewise.
679 (lower_omp_sections): Likewise.
680 (lower_omp_single): Likewise.
681 (lower_omp_master): Likewise.
682 (lower_omp_critical): Likewise.
683 (lower_omp_for): Likewise.
684 (lower_omp_taskreg): Likewise.
685 (lower_omp_target): Likewise.
686 (lower_omp_teams): Likewise.
687 (ipa_simd_modify_function_body): Likewise.
688 (build_omp_barrier): Likewise.
689 (lower_omp_taskgroup): Likewise.
690 (lower_omp_ordered): Likewise.
691 (simd_clone_adjust): Likewise.
692 (lower_rec_input_clauses): Likewise.
693 (expand_omp_for_init_vars): Likewise.
694 (expand_omp_atomic_pipeline): Likewise.
695 (expand_omp_atomic_mutex): Likewise.
696 (diagnose_sb_1): Likewise.
697 (lower_lastprivate_clauses): Likewise.
698 (lower_send_shared_vars): Likewise.
699 (expand_omp_for_init_counts): Likewise.
700 (expand_omp_for_generic): Likewise.
701 (expand_omp_for_static_nochunk): Likewise.
702 (expand_omp_for_static_chunk): Likewise.
703 (expand_omp_simd): Likewise.
704 (lower_omp_1): Likewise.
705 (diagnose_sb_2): Likewise.
706 * predict.c (apply_return_prediction): Likewise.
707 (tree_estimate_probability_bb): Likewise.
708 (get_base_value): Likewise.
709 (predict_iv_comparison): Likewise.
710 (predict_extra_loop_exits): Likewise.
711 (predict_loops): Likewise.
712 * sese.c (sese_build_liveouts_bb): Likewise.
713 (sese_add_exit_phis_edge): Likewise.
714 (set_ifsese_condition): Likewise.
715 * ssa-iterators.h (for): Likewise.
716 (num_ssa_operands): Likewise.
717 (single_phi_def): Likewise.
718 (op_iter_init_phiuse): Likewise.
719 (link_use_stmts_after): Likewise.
720 (op_iter_init): Likewise.
721 * stmt.c (reset_out_edges_aux): Likewise.
722 (compute_cases_per_edge): Likewise.
723 * trans-mem.c (diagnose_tm_1): Likewise.
724 (lower_transaction): Likewise.
725 (tm_region_init): Likewise.
726 (generate_tm_state): Likewise.
727 (make_pass_lower_tm): Likewise.
728 (transaction_subcode_ior): Likewise.
729 (build_tm_load): Likewise.
730 (build_tm_store): Likewise.
731 (expand_transaction): Likewise.
732 (expand_block_edges): Likewise.
733 (dump_tm_memopt_transform): Likewise.
734 (tm_memopt_transform_blocks): Likewise.
735 (ipa_tm_insert_irr_call): Likewise.
736 (ipa_tm_transform_calls_redirect): Likewise.
737 (expand_call_tm): Likewise.
738 (ipa_tm_insert_gettmclone_call): Likewise.
739 * tree-call-cdce.c (check_target_format): Likewise.
740 (check_pow): Likewise.
741 (check_builtin_call): Likewise.
742 (gen_conditions_for_pow_int_base): Likewise.
743 (get_no_error_domain): Likewise.
744 (gen_shrink_wrap_conditions): Likewise.
745 (shrink_wrap_one_built_in_call): Likewise.
746 (shrink_wrap_conditional_dead_built_in_calls): Likewise.
747 (gen_one_condition): Likewise.
748 * tree-cfg.c (replace_uses_by): Likewise.
749 (reinstall_phi_args): Likewise.
750 (verify_gimple_in_cfg): Likewise.
751 (gimple_make_forwarder_block): Likewise.
752 (gimple_duplicate_bb): Likewise.
753 (add_phi_args_after_copy_edge): Likewise.
754 (gimple_duplicate_sese_tail): Likewise.
755 (gimple_lv_adjust_loop_header_phi): Likewise.
756 (move_stmt_r): Likewise.
757 (do_warn_unused_result): Likewise.
758 (verify_gimple_assign): Likewise.
759 (extract_true_false_edges_from_block): Likewise.
760 (verify_gimple_transaction): Likewise.
761 (verify_gimple_in_seq_2): Likewise.
762 (single_noncomplex_succ): Likewise.
763 (valid_fixed_convert_types_p): Likewise.
764 (make_gimple_asm_edges): Likewise.
765 (is_ctrl_altering_stmt): Likewise.
766 (need_fake_edge_p): Likewise.
767 (verify_gimple_comparison): Likewise.
768 (verify_gimple_assign_unary): Likewise.
769 (verify_gimple_assign_binary): Likewise.
770 (verify_gimple_assign_ternary): Likewise.
771 (verify_gimple_assign_single): Likewise.
772 (make_gimple_switch_edges): Likewise.
773 (find_case_label_for_value): Likewise.
774 (end_recording_case_labels): Likewise.
775 (get_cases_for_edge): Likewise.
776 (group_case_labels): Likewise.
777 (find_taken_edge): Likewise.
778 (find_taken_edge_cond_expr): Likewise.
779 (find_taken_edge_switch_expr): Likewise.
780 (verify_gimple_goto): Likewise.
781 (gimple_redirect_edge_and_branch): Likewise.
782 (make_edges): Likewise.
783 (gimple_can_merge_blocks_p): Likewise.
784 (gimple_merge_blocks): Likewise.
785 (remove_bb): Likewise.
786 (stmt_starts_bb_p): Likewise.
787 (verify_gimple_debug): Likewise.
788 (gimple_verify_flow_info): Likewise.
789 (gimple_block_label): Likewise.
790 (move_block_to_fn): Likewise.
791 (verify_gimple_return): Likewise.
792 (fold_cond_expr_cond): Likewise.
793 (make_cond_expr_edges): Likewise.
794 (cleanup_dead_labels): Likewise.
795 (verify_gimple_label): Likewise.
796 (verify_gimple_stmt): Likewise.
797 * tree-cfg.h (notice_special_calls): Likewise.
798 (group_case_labels_stmt): Likewise.
799 * tree-cfgcleanup.c (phi_alternatives_equal): Likewise.
800 (cleanup_control_expr_graph): Likewise.
801 (tree_forwarder_block_p): Likewise.
802 (remove_forwarder_block): Likewise.
803 (remove_forwarder_block_with_phi): Likewise.
804 * tree-complex.c (init_dont_simulate_again): Likewise.
805 (complex_visit_stmt): Likewise.
806 (update_phi_components): Likewise.
807 (expand_complex_move): Likewise.
808 (expand_complex_libcall): Likewise.
809 (expand_complex_asm): Likewise.
810 (expand_complex_comparison): Likewise.
811 * tree-data-ref.c (get_references_in_stmt): Likewise.
812 * tree-dfa.c (collect_dfa_stats): Likewise.
813 (dump_dfa_stats): Likewise.
814 * tree-eh.c (lookup_stmt_eh_lp): Likewise.
815 (record_in_finally_tree): Likewise.
816 (collect_finally_tree_1): Likewise.
817 (outside_finally_tree): Likewise.
818 (eh_region_may_contain_throw): Likewise.
819 (lower_try_finally_dup_block): Likewise.
820 (cleanup_is_dead_in): Likewise.
821 (lower_try_finally): Likewise.
822 (lower_eh_filter): Likewise.
823 (same_handler_p): Likewise.
824 (cleanup_empty_eh_merge_phis): Likewise.
825 (emit_eh_dispatch): Likewise.
826 (make_pass_lower_eh): Likewise.
827 (redirect_eh_edge): Likewise.
828 (sink_clobbers): Likewise.
829 (lower_eh_dispatch): Likewise.
830 (verify_eh_edges): Likewise.
831 (emit_resx): Likewise.
832 (make_pass_refactor_eh): Likewise.
833 (lower_resx): Likewise.
834 (mark_reachable_handlers): Likewise.
835 (lower_try_finally_fallthru_label): Likewise.
836 (get_eh_else): Likewise.
837 (lower_try_finally_nofallthru): Likewise.
838 (lower_try_finally_copy): Likewise.
839 (lower_try_finally_switch): Likewise.
840 (decide_copy_try_finally): Likewise.
841 (honor_protect_cleanup_actions): Likewise.
842 (lower_eh_must_not_throw): Likewise.
843 (replace_goto_queue_1): Likewise.
844 (lower_catch): Likewise.
845 (refactor_eh_r): Likewise.
846 (stmt_could_throw_p): Likewise.
847 (lower_eh_constructs_2): Likewise.
848 (collect_finally_tree): Likewise.
849 (emit_post_landing_pad): Likewise.
850 (lower_try_finally_onedest): Likewise.
851 (unsplit_eh): Likewise.
852 (cleanup_empty_eh_unsplit): Likewise.
853 (do_goto_redirection): Likewise.
854 (maybe_record_in_goto_queue): Likewise.
855 * tree-eh.h (make_eh_dispatch_edges): Likewise.
856 (redirect_eh_dispatch_edge): Likewise.
857 (verify_eh_dispatch_edge): Likewise.
858 * tree-emutls.c (lower_emutls_function_body): Likewise.
859 (lower_emutls_stmt): Likewise.
860 (gen_emutls_addr): Likewise.
861 * tree-if-conv.c (if_convertible_loop_p_1): Likewise.
862 (bb_with_exit_edge_p): Likewise.
863 (convert_scalar_cond_reduction): Likewise.
864 (predicate_all_scalar_phis): Likewise.
865 * tree-inline.c (update_ssa_across_abnormal_edges): Likewise.
866 (copy_phis_for_bb): Likewise.
867 (copy_edges_for_bb): Likewise.
868 (remap_gimple_seq): Likewise.
869 (replace_locals_stmt): Likewise.
871 (inline_forbidden_p_stmt): Likewise.
872 (expand_call_inline): Likewise.
873 (estimate_num_insns): Likewise.
874 (mark_local_labels_stmt): Likewise.
875 (remap_gimple_stmt): Likewise.
876 (maybe_move_debug_stmts_to_successors): Likewise.
877 (copy_cfg_body): Likewise.
878 (copy_debug_stmts): Likewise.
879 * tree-inline.h (void): Likewise.
880 * tree-into-ssa.c (node): Likewise.
881 (find_def_blocks_for): Likewise.
882 (mark_phi_for_rewrite): Likewise.
883 (insert_phi_nodes_for): Likewise.
884 (rewrite_add_phi_arguments): Likewise.
885 (rewrite_update_phi_arguments): Likewise.
886 (mark_use_interesting): Likewise.
887 (prepare_block_for_update): Likewise.
888 (prepare_use_sites_for): Likewise.
889 (delete_update_ssa): Likewise.
890 (mark_virtual_operand_for_renaming): Likewise.
891 * tree-into-ssa.h (mark_virtual_phi_result_for_renaming): Likewise.
892 * tree-loop-distribution.c (stmts_from_loop): Likewise.
893 (destroy_loop): Likewise.
894 (distribute_loop): Likewise.
895 (generate_loops_for_partition): Likewise.
896 * tree-nested.c (walk_function): Likewise.
897 (convert_nonlocal_reference_stmt): Likewise.
898 (convert_local_reference_stmt): Likewise.
899 (finalize_nesting_tree_1): Likewise.
900 (get_chain_field): Likewise.
901 (convert_nl_goto_reference): Likewise.
902 (convert_tramp_reference_op): Likewise.
903 (convert_gimple_call): Likewise.
904 (convert_nl_goto_receiver): Likewise.
905 * tree-nrv.c (finalize_nrv_r): Likewise.
906 (make_pass_nrv): Likewise.
907 (dest_safe_for_nrv_p): Likewise.
908 * tree-object-size.c (pass_through_call): Likewise.
909 (addr_object_size): Likewise.
910 (alloc_object_size): Likewise.
911 (expr_object_size): Likewise.
912 (collect_object_sizes_for): Likewise.
913 (check_for_plus_in_loops_1): Likewise.
914 (fini_object_sizes): Likewise.
915 * tree-outof-ssa.c (eliminate_build): Likewise.
916 (eliminate_phi): Likewise.
917 (remove_gimple_phi_args): Likewise.
918 (eliminate_useless_phis): Likewise.
919 (rewrite_trees): Likewise.
920 (insert_backedge_copies): Likewise.
921 * tree-parloops.c (printf): Likewise.
922 (create_phi_for_local_result): Likewise.
923 (loop_has_vector_phi_nodes): Likewise.
924 (gather_scalar_reductions): Likewise.
925 (try_create_reduction_list): Likewise.
926 (take_address_of): Likewise.
927 (transform_to_exit_first_loop): Likewise.
928 (create_parallel_loop): Likewise.
929 * tree-phinodes.c (remove_phi_args): Likewise.
930 (phinodes_print_statistics): Likewise.
931 (release_phi_node): Likewise.
932 (reserve_phi_args_for_new_edge): Likewise.
933 (add_phi_node_to_bb): Likewise.
934 (create_phi_node): Likewise.
935 (add_phi_arg): Likewise.
936 (remove_phi_nodes): Likewise.
937 (allocate_phi_node): Likewise.
938 (ideal_phi_node_len): Likewise.
939 (make_phi_node): Likewise.
940 (resize_phi_node): Likewise.
941 * tree-phinodes.h (add_phi_node_to_bb): Likewise.
942 (add_phi_arg): Likewise.
943 (degenerate_phi_result): Likewise.
944 * tree-predcom.c (valid_initializer_p): Likewise.
945 (find_looparound_phi): Likewise.
946 (add_looparound_copies): Likewise.
947 (initialize_root_vars): Likewise.
948 (eliminate_temp_copies): Likewise.
949 (replace_ref_with): Likewise.
950 (initialize_root_vars_lm): Likewise.
951 (reassociate_to_the_same_stmt): Likewise.
952 * tree-profile.c (gimple_gen_interval_profiler): Likewise.
953 (gimple_gen_pow2_profiler): Likewise.
954 (gimple_gen_one_value_profiler): Likewise.
955 (gimple_gen_time_profiler): Likewise.
956 (gimple_gen_average_profiler): Likewise.
957 (gimple_gen_ior_profiler): Likewise.
958 (gimple_gen_edge_profiler): Likewise.
959 (gimple_gen_ic_profiler): Likewise.
960 (gimple_gen_ic_func_profiler): Likewise.
961 * tree-scalar-evolution.c (follow_ssa_edge_binary): Likewise.
962 (follow_ssa_edge_expr): Likewise.
963 (follow_ssa_edge_in_rhs): Likewise.
964 (backedge_phi_arg_p): Likewise.
965 (follow_ssa_edge_in_condition_phi_branch): Likewise.
966 (follow_ssa_edge_in_condition_phi): Likewise.
967 (follow_ssa_edge_inner_loop_phi): Likewise.
968 (follow_ssa_edge): Likewise.
969 (simplify_peeled_chrec): Likewise.
970 (analyze_evolution_in_loop): Likewise.
971 (analyze_initial_condition): Likewise.
972 (interpret_loop_phi): Likewise.
973 (analyze_scalar_evolution_1): Likewise.
974 (loop_closed_phi_def): Likewise.
975 (scev_const_prop): Likewise.
976 (add_to_evolution): Likewise.
977 (get_loop_exit_condition): Likewise.
978 * tree-scalar-evolution.h (number_of_latch_executions): Likewise.
979 * tree-sra.c (replace_removed_params_ssa_names): Likewise.
980 (convert_callers): Likewise.
981 (scan_function): Likewise.
982 (sra_modify_function_body): Likewise.
983 (ipa_sra_modify_function_body): Likewise.
984 (build_ref_for_offset): Likewise.
985 (generate_subtree_copies): Likewise.
986 (init_subtree_with_zero): Likewise.
987 (sra_modify_expr): Likewise.
988 (load_assign_lhs_subreplacements): Likewise.
989 (sra_modify_assign): Likewise.
990 (sra_ipa_reset_debug_stmts): Likewise.
991 * tree-ssa-alias.c (refs_output_dependent_p): Likewise.
992 (ref_maybe_used_by_call_p_1): Likewise.
993 (ref_maybe_used_by_stmt_p): Likewise.
994 (call_may_clobber_ref_p_1): Likewise.
995 (stmt_may_clobber_ref_p_1): Likewise.
996 * tree-ssa-alias.h (call_may_clobber_ref_p): Likewise.
997 (call_may_clobber_ref_p_1): Likewise.
998 * tree-ssa-ccp.c (ccp_initialize): Likewise.
999 (ccp_lattice_meet): Likewise.
1000 (insert_clobber_before_stack_restore): Likewise.
1001 (ccp_fold): Likewise.
1002 (evaluate_stmt): Likewise.
1003 (ccp_fold_stmt): Likewise.
1004 (optimize_unreachable): Likewise.
1005 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Likewise.
1006 (coalesce_partitions): Likewise.
1007 (create_outofssa_var_map): Likewise.
1008 * tree-ssa-copy.c (copy_prop_visit_stmt): Likewise.
1009 (init_copy_prop): Likewise.
1010 * tree-ssa-copyrename.c (copy_rename_partition_coalesce): Likewise.
1011 * tree-ssa-dce.c (remove_dead_phis): Likewise.
1012 (forward_edge_to_pdom): Likewise.
1013 (eliminate_unnecessary_stmts): Likewise.
1014 (propagate_necessity): Likewise.
1015 (remove_dead_stmt): Likewise.
1016 * tree-ssa-dom.c (record_equivalences_from_phis): Likewise.
1017 (cprop_into_successor_phis): Likewise.
1018 (get_rhs_or_phi_arg): Likewise.
1019 (eliminate_degenerate_phis_1): Likewise.
1020 (struct hashable_expr): Likewise.
1021 (add_hashable_expr): Likewise.
1022 (print_expr_hash_elt): Likewise.
1023 (record_equivalences_from_stmt): Likewise.
1024 (initialize_hash_element): Likewise.
1025 (record_edge_info): Likewise.
1026 (eliminate_redundant_computations): Likewise.
1027 (propagate_rhs_into_lhs): Likewise.
1028 (free_all_edge_infos): Likewise.
1029 (make_pass_dominator): Likewise.
1030 (optimize_stmt): Likewise.
1031 * tree-ssa-forwprop.c (remove_prop_source_from_use): Likewise.
1032 (simplify_bitwise_binary): Likewise.
1033 (simplify_rotate): Likewise.
1034 (simplify_not_neg_expr): Likewise.
1035 (simplify_gimple_switch_label_vec): Likewise.
1036 (forward_propagate_into_comparison): Likewise.
1037 (simplify_mult): Likewise.
1038 * tree-ssa-ifcombine.c (same_phi_args_p): Likewise.
1039 (get_name_for_bit_test): Likewise.
1040 (recognize_single_bit_test): Likewise.
1041 (ifcombine_ifandif): Likewise.
1042 * tree-ssa-live.c (remove_unused_locals): Likewise.
1043 (set_var_live_on_entry): Likewise.
1044 (calculate_live_on_exit): Likewise.
1045 (verify_live_on_entry): Likewise.
1046 * tree-ssa-loop-im.c (mem_ref_in_stmt): Likewise.
1047 (determine_max_movement): Likewise.
1048 (execute_sm_if_changed): Likewise.
1049 (rewrite_reciprocal): Likewise.
1050 (execute_sm): Likewise.
1051 (rewrite_bittest): Likewise.
1052 * tree-ssa-loop-ivcanon.c (propagate_constants_for_unrolling):
1054 (unloop_loops): Likewise.
1055 (tree_estimate_loop_size): Likewise.
1056 (create_canonical_iv): Likewise.
1057 (remove_exits_and_undefined_stmts): Likewise.
1058 (remove_redundant_iv_tests): Likewise.
1059 (try_unroll_loop_completely): Likewise.
1060 * tree-ssa-loop-ivopts.c (get_iv): Likewise.
1061 (find_bivs): Likewise.
1062 (mark_bivs): Likewise.
1063 (find_interesting_uses_outside): Likewise.
1064 (determine_set_costs): Likewise.
1065 (rewrite_use_nonlinear_expr): Likewise.
1066 (remove_unused_ivs): Likewise.
1067 (extract_cond_operands): Likewise.
1068 (rewrite_use_compare): Likewise.
1069 * tree-ssa-loop-manip.c (tree_unroll_loop): Likewise.
1070 (rewrite_all_phi_nodes_with_iv): Likewise.
1071 (add_exit_phi): Likewise.
1072 (find_uses_to_rename_bb): Likewise.
1073 (verify_loop_closed_ssa): Likewise.
1074 (split_loop_exit_edge): Likewise.
1075 (create_iv): Likewise.
1076 (rewrite_phi_with_iv): Likewise.
1077 (tree_transform_and_unroll_loop): Likewise.
1078 (canonicalize_loop_ivs): Likewise.
1079 * tree-ssa-loop-niter.c (determine_value_range): Likewise.
1080 (finite_loop_p): Likewise.
1081 (chain_of_csts_start): Likewise.
1082 (get_base_for): Likewise.
1083 (loop_niter_by_eval): Likewise.
1084 (number_of_iterations_exit): Likewise.
1085 * tree-ssa-loop-prefetch.c (issue_prefetch_ref): Likewise.
1086 (emit_mfence_after_loop): Likewise.
1087 * tree-ssa-loop-unswitch.c (tree_may_unswitch_on): Likewise.
1088 (tree_unswitch_single_loop): Likewise.
1089 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Likewise.
1090 (build_and_insert_call): Likewise.
1091 (insert_reciprocals): Likewise.
1092 (powi_as_mults_1): Likewise.
1093 (powi_as_mults): Likewise.
1094 (build_and_insert_binop): Likewise.
1095 (build_and_insert_cast): Likewise.
1096 (gimple_expand_builtin_cabs): Likewise.
1097 (convert_mult_to_fma): Likewise.
1098 * tree-ssa-operands.c (get_tmr_operands): Likewise.
1099 (maybe_add_call_vops): Likewise.
1100 (parse_ssa_operands): Likewise.
1101 * tree-ssa-phiopt.c (tree_ssa_cs_elim): Likewise.
1102 (single_non_singleton_phi_for_edges): Likewise.
1103 (tree_ssa_phiopt_worker): Likewise.
1104 (replace_phi_edge_with_variable): Likewise.
1105 (hoist_adjacent_loads): Likewise.
1106 (conditional_replacement): Likewise.
1107 (abs_replacement): Likewise.
1108 (cond_store_replacement): Likewise.
1109 (cond_if_else_store_replacement_1): Likewise.
1110 (minmax_replacement): Likewise.
1111 * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
1112 (phivn_valid_p): Likewise.
1113 (phiprop_insert_phi): Likewise.
1114 * tree-ssa-pre.c (insert_into_preds_of_block): Likewise.
1115 (compute_avail): Likewise.
1116 (create_expression_by_pieces): Likewise.
1117 (do_regular_insertion): Likewise.
1118 (eliminate_insert): Likewise.
1119 * tree-ssa-propagate.c (simulate_stmt): Likewise.
1120 (replace_uses_in): Likewise.
1121 (replace_phi_args_in): Likewise.
1122 (update_gimple_call): Likewise.
1123 (update_call_from_tree): Likewise.
1124 (may_propagate_copy_into_stmt): Likewise.
1125 (propagate_tree_value_into_stmt): Likewise.
1126 * tree-ssa-propagate.h (prop_simulate_again_p): Likewise.
1127 * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
1128 (is_phi_for_stmt): Likewise.
1129 (build_and_add_sum): Likewise.
1130 (update_ops): Likewise.
1131 (get_reassociation_width): Likewise.
1132 (reassociate_bb): Likewise.
1133 (maybe_optimize_range_tests): Likewise.
1134 * tree-ssa-sccvn.c (DFS): Likewise.
1135 (ao_ref_init_from_vn_reference): Likewise.
1136 (valueize_shared_reference_ops_from_ref): Likewise.
1137 (vn_reference_lookup_3): Likewise.
1138 (vn_reference_lookup): Likewise.
1139 (visit_nary_op): Likewise.
1140 (simplify_binary_expression): Likewise.
1141 (simplify_unary_expression): Likewise.
1142 (visit_use): Likewise.
1143 (set_hashtable_value_ids): Likewise.
1144 * tree-ssa-sccvn.h (vn_constant_eq_with_type): Likewise.
1145 * tree-ssa-sink.c (find_bb_for_arg): Likewise.
1146 (nearest_common_dominator_of_uses): Likewise.
1147 (statement_sink_location): Likewise.
1148 * tree-ssa-strlen.c (do_invalidate): Likewise.
1149 * tree-ssa-structalias.c (new_var_info): Likewise.
1150 (get_call_vi): Likewise.
1151 (lookup_call_use_vi): Likewise.
1152 (lookup_call_clobber_vi): Likewise.
1153 (get_call_use_vi): Likewise.
1154 (get_function_part_constraint): Likewise.
1155 (handle_rhs_call): Likewise.
1156 (handle_lhs_call): Likewise.
1157 (handle_const_call): Likewise.
1158 (handle_pure_call): Likewise.
1159 (get_fi_for_callee): Likewise.
1160 (find_func_aliases_for_builtin_call): Likewise.
1161 (find_func_clobbers): Likewise.
1162 (compute_points_to_sets): Likewise.
1163 (ipa_pta_execute): Likewise.
1164 (find_func_aliases): Likewise.
1165 * tree-ssa-tail-merge.c (same_succ_hash): Likewise.
1166 (release_last_vdef): Likewise.
1167 (same_phi_alternatives_1): Likewise.
1168 (find_clusters): Likewise.
1169 (vop_phi): Likewise.
1170 (replace_block_by): Likewise.
1171 * tree-ssa-ter.c (ter_is_replaceable_p): Likewise.
1172 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
1174 (record_temporary_equivalences_from_stmts_at_dest): Likewise.
1175 (simplify_control_stmt_condition): Likewise.
1176 (dummy_simplify): Likewise.
1177 (propagate_threaded_block_debug_into): Likewise.
1178 (thread_around_empty_blocks): Likewise.
1179 (thread_through_normal_block): Likewise.
1180 * tree-ssa-threadedge.h (thread_across_edge): Likewise.
1181 * tree-ssa-threadupdate.c (copy_phi_arg_into_existing_phi): Likewise.
1182 (get_value_locus_in_path): Likewise.
1183 (copy_phi_args): Likewise.
1184 (phi_args_equal_on_edges): Likewise.
1185 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
1186 * tree-ssa-uninit.c (can_skip_redundant_opnd): Likewise.
1187 (find_predicates): Likewise.
1188 (collect_phi_def_edges): Likewise.
1189 (find_matching_predicate_in_rest_chains): Likewise.
1190 (prune_uninit_phi_opnds_in_unrealizable_paths): Likewise.
1191 (use_pred_not_overlap_with_undef_path_pred): Likewise.
1192 (normalize_preds): Likewise.
1193 (is_use_properly_guarded): Likewise.
1194 (find_uninit_use): Likewise.
1195 (gate_warn_uninitialized): Likewise.
1196 * tree-ssa.c (ssa_redirect_edge): Likewise.
1197 (flush_pending_stmts): Likewise.
1198 (verify_use): Likewise.
1199 (verify_ssa): Likewise.
1200 (execute_update_addresses_taken): Likewise.
1201 (insert_debug_temp_for_var_def): Likewise.
1202 * tree-stdarg.c (check_all_va_list_escapes): Likewise.
1203 * tree-switch-conversion.c (check_final_bb): Likewise.
1204 (build_constructors): Likewise.
1205 (build_arrays): Likewise.
1206 (gen_def_assigns): Likewise.
1207 (case_bit_test_cmp): Likewise.
1208 (emit_case_bit_tests): Likewise.
1209 (gather_default_values): Likewise.
1210 (constructor_contains_same_values_p): Likewise.
1211 (array_value_type): Likewise.
1212 (build_one_array): Likewise.
1213 (fix_phi_nodes): Likewise.
1214 (process_switch): Likewise.
1215 (hoist_edge_and_branch_if_true): Likewise.
1216 (gen_inbound_check): Likewise.
1217 * tree-tailcall.c (add_successor_phi_arg): Likewise.
1218 (propagate_through_phis): Likewise.
1219 (eliminate_tail_call): Likewise.
1220 (create_tailcall_accumulator): Likewise.
1221 (tree_optimize_tail_calls_1): Likewise.
1222 (adjust_return_value): Likewise.
1223 (optimize_tail_call): Likewise.
1224 (independent_of_stmt_p): Likewise.
1225 (find_tail_calls): Likewise.
1226 (adjust_return_value_with_ops): Likewise.
1227 (update_accumulator_with_ops): Likewise.
1228 * tree-vect-data-refs.c (bump_vector_ptr): Likewise.
1229 (vect_setup_realignment): Likewise.
1230 * tree-vect-generic.c (expand_vector_condition): Likewise.
1231 (optimize_vector_constructor): Likewise.
1232 (lower_vec_perm): Likewise.
1233 (expand_vector_operations_1): Likewise.
1234 * tree-vect-loop-manip.c (rename_variables_in_bb): Likewise.
1235 (vect_can_advance_ivs_p): Likewise.
1236 (slpeel_update_phi_nodes_for_guard1): Likewise.
1237 (slpeel_update_phi_nodes_for_guard2): Likewise.
1238 (slpeel_tree_duplicate_loop_to_edge_cfg): Likewise.
1239 (slpeel_tree_peel_loop_to_edge): Likewise.
1240 (vect_update_ivs_after_vectorizer): Likewise.
1241 (vect_loop_versioning): Likewise.
1242 (slpeel_make_loop_iterate_ntimes): Likewise.
1243 (slpeel_add_loop_guard): Likewise.
1244 (slpeel_can_duplicate_loop_p): Likewise.
1245 (set_prologue_iterations): Likewise.
1246 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
1247 (vect_analyze_scalar_cycles_1): Likewise.
1248 (vect_analyze_loop_operations): Likewise.
1249 (get_initial_def_for_induction): Likewise.
1250 (vectorizable_reduction): Likewise.
1251 (vect_transform_loop): Likewise.
1252 (vect_create_epilog_for_reduction): Likewise.
1253 (vect_analyze_scalar_cycles): Likewise.
1254 (vect_analyze_loop_form): Likewise.
1255 * tree-vect-patterns.c (vect_recog_pow_pattern): Likewise.
1256 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
1257 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
1258 (vectorizable_load): Likewise.
1259 (vect_finish_stmt_generation): Likewise.
1260 (vectorizable_call): Likewise.
1261 (vectorizable_condition): Likewise.
1262 * tree-vectorizer.h (unlimited_cost_model): Likewise.
1263 * tree-vrp.c (find_assert_locations): Likewise.
1264 (vrp_initialize): Likewise.
1265 (vrp_meet): Likewise.
1266 (extract_range_from_unary_expr): Likewise.
1267 (extract_range_basic): Likewise.
1268 (build_assert_expr_for): Likewise.
1269 (vrp_visit_assignment_or_call): Likewise.
1270 (simplify_truth_ops_using_ranges): Likewise.
1271 (simplify_float_conversion_using_ranges): Likewise.
1272 (live_on_edge): Likewise.
1273 (compare_case_labels): Likewise.
1274 (vrp_visit_cond_stmt): Likewise.
1275 (find_case_label_index): Likewise.
1276 (find_case_label_range): Likewise.
1277 (find_case_label_ranges): Likewise.
1278 (simplify_cond_using_ranges): Likewise.
1279 (register_edge_assert_for): Likewise.
1280 (find_assert_locations_1): Likewise.
1281 (vrp_evaluate_conditional): Likewise.
1282 (vrp_visit_stmt): Likewise.
1283 (range_fits_type_p): Likewise.
1284 (simplify_stmt_using_ranges): Likewise.
1285 (fold_predicate_in): Likewise.
1286 (simplify_stmt_for_jump_threading): Likewise.
1287 (identify_jump_threads): Likewise.
1288 * tree.c (find_decls_types_in_node): Likewise.
1289 * ubsan.c (instrument_nonnull_return): Likewise.
1290 (instrument_mem_ref): Likewise.
1291 * value-prof.c (find_func_by_profile_id): Likewise.
1292 (check_ic_target): Likewise.
1293 (gimple_ic_transform): Likewise.
1294 (interesting_stringop_to_profile_p): Likewise.
1295 (gimple_stringops_transform): Likewise.
1296 (gimple_stringops_values_to_profile): Likewise.
1297 (gimple_value_profile_transformations): Likewise.
1298 (gimple_divmod_fixed_value_transform): Likewise.
1299 (gimple_mod_pow2_value_transform): Likewise.
1300 (gimple_mod_subtract_transform): Likewise.
1301 (gimple_divmod_fixed_value): Likewise.
1302 (gimple_mod_pow2): Likewise.
1303 (gimple_mod_subtract): Likewise.
1304 (gimple_ic): Likewise.
1305 (gimple_stringop_fixed_value): Likewise.
1306 * value-prof.h (stringop_block_profile): Likewise.
1307 (gimple_ic): Likewise.
1308 * vtable-verify.c (verify_bb_vtables): Likewise.
1310 2014-10-27 David Malcolm <dmalcolm@redhat.com>
1312 * coretypes.h (gimple_cond): Drop this typedef.
1313 (const_gimple_cond): Likewise.
1314 (gimple_debug): Likewise.
1315 (const_gimple_debug): Likewise.
1316 (gimple_goto): Likewise.
1317 (const_gimple_goto): Likewise.
1318 (gimple_label): Likewise.
1319 (const_gimple_label): Likewise.
1320 (gimple_switch): Likewise.
1321 (const_gimple_switch): Likewise.
1322 (gimple_assign): Likewise.
1323 (const_gimple_assign): Likewise.
1324 (gimple_asm): Likewise.
1325 (const_gimple_asm): Likewise.
1326 (gimple_call): Likewise.
1327 (const_gimple_call): Likewise.
1328 (gimple_transaction): Likewise.
1329 (const_gimple_transaction): Likewise.
1330 (gimple_return): Likewise.
1331 (const_gimple_return): Likewise.
1332 (gimple_bind): Likewise.
1333 (const_gimple_bind): Likewise.
1334 (gimple_catch): Likewise.
1335 (const_gimple_catch): Likewise.
1336 (gimple_eh_filter): Likewise.
1337 (const_gimple_eh_filter): Likewise.
1338 (gimple_eh_must_not_throw;): Likewise.
1339 (const_gimple_eh_must_not_throw): Likewise.
1340 (gimple_eh_else): Likewise.
1341 (const_gimple_eh_else): Likewise.
1342 (gimple_resx): Likewise.
1343 (const_gimple_resx): Likewise.
1344 (gimple_eh_dispatch): Likewise.
1345 (const_gimple_eh_dispatch): Likewise.
1346 (gimple_phi): Likewise.
1347 (const_gimple_phi): Likewise.
1348 (gimple_try): Likewise.
1349 (const_gimple_try): Likewise.
1350 (gimple_omp_atomic_load): Likewise.
1351 (const_gimple_omp_atomic_load): Likewise.
1352 (gimple_omp_atomic_store): Likewise.
1353 (const_gimple_omp_atomic_store): Likewise.
1354 (gimple_omp_continue): Likewise.
1355 (const_gimple_omp_continue): Likewise.
1356 (gimple_omp_critical): Likewise.
1357 (const_gimple_omp_critical): Likewise.
1358 (gimple_omp_for): Likewise.
1359 (const_gimple_omp_for): Likewise.
1360 (gimple_omp_parallel): Likewise.
1361 (const_gimple_omp_parallel): Likewise.
1362 (gimple_omp_task): Likewise.
1363 (const_gimple_omp_task): Likewise.
1364 (gimple_omp_sections): Likewise.
1365 (const_gimple_omp_sections): Likewise.
1366 (gimple_omp_single): Likewise.
1367 (const_gimple_omp_single): Likewise.
1368 (gimple_omp_target): Likewise.
1369 (const_gimple_omp_target): Likewise.
1370 (gimple_omp_teams): Likewise.
1371 (const_gimple_omp_teams): Likewise.
1373 2014-10-24 David Malcolm <dmalcolm@redhat.com>
1375 * tree-inline.h (struct copy_body_data): Rename field
1376 "gimple_call" to "call_stmt".
1378 * gimplify.c (gimplify_bind_expr): Rename local "gimple_bind" to
1380 (gimplify_switch_expr): Rename local "gimple_switch" to
1382 (gimplify_cond_expr): Rename local "gimple_cond" to "cond_stmt".
1383 * tree-eh.c (lower_catch): Rename local "gcatch" to "catch_stmt".
1384 * tree-inline.c (copy_bb): Update for renaming of field within
1385 struct copy_body_data from "gimple_call" to "call_stmt".
1386 (copy_cfg_body): Likewise.
1387 (copy_debug_stmt): Likewise.
1388 (expand_call_inline): Likewise.
1390 2014-10-24 David Malcolm <dmalcolm@redhat.com>
1392 Convert various gimple to gimple_phi within ssa-iterators.h
1394 * ssa-iterators.h (FOR_EACH_PHI_OR_STMT_USE): Add checked cast to
1396 (FOR_EACH_PHI_OR_STMT_DEF): Likewise.
1398 * ssa-iterators.h (single_phi_def): Require a gimple_phi.
1399 (op_iter_init_phiuse): Likewise.
1400 (op_iter_init_phidef): Likewise.
1401 * tree-ssa-loop-im.c (extract_true_false_args_from_phi): Likewise.
1403 * tree-ssa-loop-im.c (link_use_stmts_after): Replace check against
1404 GIMPLE_PHI with add a dyn_cast to gimple_phi, using result as needed.
1405 (determine_max_movement): Likewise.
1406 * tree-ssa-reassoc.c (is_phi_for_stmt): Likewise.
1407 * tree-ssa-sccvn.c (start_over:): Likewise.
1409 * tree-ssa-loop-im.c
1410 (move_computations_dom_walker::before_dom_children): Split iterator
1411 into gimple_stmt_iterator and a gimple_phi_iterator so that a local
1412 can become a gimple_phi.
1414 2014-10-24 David Malcolm <dmalcolm@redhat.com>
1416 Use gimple_phi in many more places.
1418 * gimple-ssa-strength-reduction.c (slsr_process_phi): Require a
1420 * ipa-inline-analysis.c (predicate_for_phi_result): Likewise.
1421 * tree-emutls.c (lower_emutls_phi_arg): Likewise.
1422 * tree-if-conv.c (predicate_scalar_phi): Likewise.
1423 * tree-into-ssa.c (mark_virtual_phi_result_for_renaming): Likewise.
1424 * tree-into-ssa.h (mark_virtual_phi_result_for_renaming): Likewise.
1425 * tree-phinodes.c (degenerate_phi_result): Likewise.
1426 * tree-phinodes.h (degenerate_phi_result): Likewise.
1427 * tree-ssa.c (verify_use): Likewise.
1428 * tree-switch-conversion.c (array_value_type): Likewise.
1430 * graphite-scop-detection.c (same_close_phi_node): Require a pair
1432 (remove_duplicate_close_phi): Require a gimple_phi and a
1433 gimple_phi_iterator.
1434 (make_close_phi_nodes_unique): Convert a local into a
1435 gimple_phi_iterator.
1437 * gimple-pretty-print.c (gimple_dump_bb_for_graph): Split iterator
1438 into gimple_stmt_iterator and gimple_phi_iterator, converting local
1439 from gimple to gimple_phi.
1440 * gimple-ssa-strength-reduction.c
1441 (find_candidates_dom_walker::before_dom_children): Likewise.
1442 * ipa-inline-analysis.c (estimate_function_body_sizes): Likewise.
1443 * ipa-split.c (verify_non_ssa_vars): Likewise.
1444 (visit_bb): Likewise.
1445 (split_function): Likewise.
1446 * lto-streamer-out.c (output_function): Likewise.
1447 * sese.c (sese_build_liveouts_bb): Likewise.
1448 * tree-cfg.c (gimple_can_merge_blocks_p): Likewise.
1449 * tree-complex.c (init_dont_simulate_again): Likewise.
1450 * tree-dfa.c (collect_dfa_stats): Likewise.
1451 * tree-eh.c (sink_clobbers): Likewise.
1452 * tree-emutls.c (lower_emutls_function_body): Likewise.
1453 * tree-into-ssa.c (rewrite_dom_walker::before_dom_children):
1455 (rewrite_update_dom_walker::before_dom_children): Likewise.
1456 (prepare_block_for_update): Likewise.
1457 * tree-loop-distribution.c (stmts_from_loop): Likewise.
1458 (generate_loops_for_partition): Likewise.
1459 (destroy_loop): Likewise.
1460 (tree_loop_distribution): Likewise.
1461 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Likewise.
1462 * tree-ssa-copy.c (init_copy_prop): Likewise.
1463 * tree-ssa-copyrename.c (rename_ssa_copies): Likewise.
1464 * tree-ssa-loop-ivcanon.c (propagate_constants_for_unrolling): Likewise.
1465 * tree-ssa-loop-manip.c (find_uses_to_rename_bb): Likewise.
1466 (verify_loop_closed_ssa): Likewise.
1467 * tree-ssa-math-opts.c (execute_cse_reciprocals): Likewise.
1468 * tree-ssa-pre.c (compute_avail): Likewise.
1469 (eliminate_dom_walker::before_dom_children): Likewise.
1470 * tree-ssa-strlen.c (strlen_dom_walker::before_dom_children): Likewise.
1471 * tree-ssa-structalias.c (compute_points_to_sets): Likewise.
1472 (ipa_pta_execute): Likewise.
1473 * tree-ssa-tail-merge.c (same_succ_hash): Likewise.
1474 (release_last_vdef): Likewise.
1475 * tree-ssa.c (verify_ssa): Likewise.
1476 (execute_update_addresses_taken): Likewise.
1477 * tree-stdarg.c (check_all_va_list_escapes): Likewise.
1478 (execute_optimize_stdarg): Likewise.
1479 * tree-switch-conversion.c (build_arrays): Likewise.
1480 * tree-vect-loop-manip.c (rename_variables_in_bb): Likewise.
1481 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
1482 (vect_analyze_loop_operations): Likewise.
1483 (vect_transform_loop): Likewise.
1484 * tree-vrp.c (find_assert_locations_1): Likewise.
1485 (vrp_initialize): Likewise.
1487 * graphite-sese-to-poly.c (gsi_for_phi_node): Convert psi to a
1488 gimple_phi_iterator.
1489 (rewrite_degenerate_phi): Require a gimple_phi_iterator; strengthen
1490 local "phi" from gimple to gimple-phi.
1492 * ipa-split.c (consider_split): Convert local psi to a
1493 gimple_phi_iterator.
1494 * tree-cfg.c (gimple_merge_blocks): Likewise.
1496 * tree-eh.c (unsplit_eh): Replace reuse of gsi with a new
1497 gimple_phi_iterator gpi, using it to convert statement from gimple
1499 (cleanup_empty_eh_merge_phis): Strengthen ophi from gimple to
1501 * tree-ssa-dce.c (eliminate_unnecessary_stmts): Replace reuse of
1502 gsi with a new gimple_phi_iterator gpi, using it to convert
1503 expressions from gimple to gimple_phi; add a checked cast to
1506 * tree-if-conv.c (predicate_all_scalar_phis): Convert local phi_gsi
1507 to be a gimple_phi_iterator; convert "phi" to be a gimple_phi.
1508 * tree-parloops.c (loop_has_vector_phi_nodes): Convert local to be a
1509 gimple_phi_iterator.
1510 * tree-ssa-ccp.c (ccp_initialize): Likewise.
1512 * tree-scalar-evolution.c (analyze_initial_condition): Add checked cast
1514 * tree-ssa.c (insert_debug_temp_for_var_def): Likewise.
1515 * tree-ssa-dom.c (get_rhs_or_phi_arg): Likewise.
1517 2014-10-24 David Malcolm <dmalcolm@redhat.com>
1519 Use gimple_call in some places within tree-ssa-dom.c
1521 * tree-ssa-dom.c (struct hashable_expr): Strengthen field
1522 call.fn_from from gimple to gimple_call.
1523 (initialize_hash_element): Replace check against GIMPLE_CALL
1524 with dyn_cast<gimple_call> and update gimple_call_ uses to use
1525 new gimple_call local, along with fn_from initializer.
1526 (iterative_hash_hashable_expr): Strengthen type of local "fn_from"
1527 from gimple to gimple_call.
1528 (print_expr_hash_elt): Likewise.
1530 2014-10-24 David Malcolm <dmalcolm@redhat.com>
1532 Concretize gimple_call_copy_flags and ipa_modify_call_arguments
1534 * gimple.h (gimple_call_copy_flags): Require gimple_calls.
1536 * ipa-prop.c (ipa_modify_call_arguments): Require a gimple_call.
1537 * ipa-prop.h (ipa_modify_call_arguments): Likewise.
1539 * tree-inline.c (copy_bb): Replace is_gimple_call with new local
1540 and call to dyn_cast<gimple_call>, updating gimple_call_ uses to
1541 use the type-checked local.
1543 * tree-sra.c (convert_callers): Replace check for GIMPLE_CALL with
1546 2014-10-24 David Malcolm <dmalcolm@redhat.com>
1548 Concretize gimple_assign_nontemporal_move_p
1550 * gimple.h (gimple_assign_nontemporal_move_p): Require a
1551 const_gimple_assign rather than a const_gimple.
1553 * cfgexpand.c (expand_gimple_stmt_1): Add local assign_stmt and
1554 checked cast within "case GIMPLE_ASSIGN".
1556 * gimple-streamer-out.c (output_gimple_stmt): Add checked cast to
1559 2014-10-24 David Malcolm <dmalcolm@redhat.com>
1561 Concretize gimple_call_arg_flags
1563 * gimple.h (gimple_call_arg_flags): Require a const_gimple_call
1564 rather than a const_gimple.
1566 * gimple.c (gimple_call_fnspec): Likewise.
1567 (gimple_call_arg_flags): Likewise.
1569 * tree-inline.c (remap_gimple_stmt): Use a dyn_cast rather than a
1570 is_gimple_call and repeated checked casts.
1572 2014-10-24 David Malcolm <dmalcolm@redhat.com>
1574 Concretize gimple_call_set_tail and gimple_call_tail_p
1576 * gimple.h (gimple_call_set_tail): Require a gimple_call.
1577 (gimple_call_tail_p): Likewise.
1579 * cfgexpand.c (expand_gimple_tailcall): Likewise.
1580 (expand_gimple_basic_block): Convert calls to is_gimple_call to a
1581 dyn_cast, introducing a new "call_stmt" local.
1583 * trans-mem.c (expand_block_edges): Likewise, for comparison against
1586 * tree-inline.c (remap_gimple_stmt): Add checked casts to
1587 gimple_call in region guarded by is_gimple_call.
1589 * tree-tailcall.c (optimize_tail_call): Add checked cast to gimple_call
1592 2014-10-24 David Malcolm <dmalcolm@redhat.com>
1594 Concretize gimple_call_set_fntype
1596 * gimple-fold.c (gimple_fold_builtin_sprintf_chk): Strengthen
1597 local "stmt" from gimple to gimple_call.
1599 * gimple.h (gimple_call_set_fntype): Require a gimple_call.
1601 * omp-low.c (lower_omp_1): Add a new local gimple_call "call_stmt",
1602 from a checked cast to gimple_call within the "case GIMPLE_CALL",
1603 for the regions where "stmt" is not subsequently overwritten.
1605 2014-10-24 David Malcolm <dmalcolm@redhat.com>
1607 Concretize gimple_call_set_fn
1609 * gimple.h (gimple_call_set_fn): Require a gimple_call.
1611 * trans-mem.c (dump_tm_memopt_transform): Likewise.
1612 (tm_memopt_transform_blocks): Add checked casts to gimple_call in
1613 suites guarded by is_tm_simple_{load|store}, which enforce that
1614 the statement must be a GIMPLE_CALL; use this when invoking
1615 dump_tm_memopt_transform.
1617 2014-10-24 David Malcolm <dmalcolm@redhat.com>
1619 Tweak to gimplify_modify_expr
1621 * gimplify.c (gimplify_modify_expr): Introduce local "call_stmt".
1623 2014-10-24 David Malcolm <dmalcolm@redhat.com>
1625 Concretize gimple_call_nothrow_p
1627 * gimple.h (gimple_call_nothrow_p): Require a gimple_call.
1629 * tree-eh.c (stmt_could_throw_p): Add checked cast to gimple_call.
1631 * tree-vect-slp.c (vect_build_slp_tree_1): Replace call to
1632 is_gimple_call with dyn_cast<gimple_call>, introducing a local.
1634 2014-10-24 David Malcolm <dmalcolm@redhat.com>
1636 Concretize gimple_call_set_nothrow
1638 * gimple.h (gimple_call_set_nothrow): Require a gimple_call.
1640 * trans-mem.c (ipa_tm_insert_gettmclone_call): Likewise.
1641 (ipa_tm_transform_calls_redirect): Add checked cast to gimple call; this
1642 is only called for gsi on a GIMPLE_CALL statement.
1644 2014-10-24 David Malcolm <dmalcolm@redhat.com>
1646 Concretize various expressions from gimple to gimple_cond
1648 * ipa-split.c (check_forbidden_calls): Replace check against
1649 GIMPLE_COND with a dyn_cast<gimple_cond>, introducing a
1651 * predict.c (predict_extra_loop_exits): Likewise.
1652 * tree-vrp.c (fold_predicate_in): Likewise.
1653 (simplify_stmt_for_jump_threading): Likewise.
1655 * predict.c (is_comparison_with_loop_invariant_p): Require a
1657 (predict_iv_comparison): Add checked cast to gimple_cond once we
1658 know the code is GIMPLE_COND.
1659 (predict_loops): Change type of "stmt" to gimple_cond,
1660 adding checked casts to its assignments (which are both guarded by
1661 checks against GIMPLE_COND).
1663 * tree-vrp.c (find_conditional_asserts): Require a gimple_cond.
1664 (vrp_evaluate_conditional): Likewise.
1665 (find_assert_locations_1): Add checked cast to gimple_cond.
1666 (vrp_visit_stmt): Likewise.
1668 2014-10-24 David Malcolm <dmalcolm@redhat.com>
1670 Concretize gimple_cond_{lhs|rhs}_ptr
1672 * gimple.h (gimple_cond_lhs_ptr): Require a const_gimple_cond
1673 rather than just a const_gimple_cond.
1674 (gimple_cond_rhs_ptr): Likewise.
1676 * gimplify-me.c (gimple_regimplify_operands): Add a checked cast
1677 to gimple_cond within "case GIMPLE_COND".
1678 * omp-low.c (lower_omp_1): Likewise.
1680 * omp-low.c (expand_omp_simd): Introduce a new local cond_stmt
1681 to express that the conditional is indeed a gimple_cond.
1683 * tree-ssa-loop-ivopts.c (extract_cond_operands): Add a checked
1684 cast to gimple_cond within a region where the code is known to
1687 2014-10-24 David Malcolm <dmalcolm@redhat.com>
1689 Concretize gimple_cond_set_{lhs|rhs}
1691 * gimple.h (gimple_cond_set_lhs): Require a gimple_cond.
1692 (gimple_cond_set_rhs): Likewise.
1694 * tree-parloops.c (transform_to_exit_first_loop): Convert locals
1695 "cond_stmt" and "cond_nit" to gimple_cond, adding checked casts,
1696 since the existing code assumes that code is GIMPLE_COND. Convert
1697 "stmt" to a gimple_assign.
1698 (create_parallel_loop): Likewise for "cond_stmt".
1700 * tree-ssa-loop-im.c (rewrite_bittest): Replace check for code
1701 GIMPLE_COND with a dyn_cast, adding new local "cond_stmt".
1703 2014-10-24 David Malcolm <dmalcolm@redhat.com>
1705 Concretize gimple_cond_set_code
1707 * gimple.h (gimple_cond_set_code): Require a gimple_cond.
1709 * tree-complex.c (expand_complex_comparison): Add a checked cast to
1710 gimple_cond within "case GIMPLE_COND".
1712 * tree-ssa-loop-ivcanon.c (create_canonical_iv): Convert local "cond"
1713 to a gimple_cond, adding a checked cast. The existing code requires
1714 that the last statement before the exit edge have code GIMPLE_COND,
1715 though it's not clear to me where this is verified.
1717 * tree-ssa-loop-ivopts.c (rewrite_use_compare): Add a checked cast
1718 to gimple_cond on "use->stmt".
1720 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Convert
1721 local "exit_if" to gimple_cond, adding a checked cast. It's not
1722 clear to me exactly where the GIMPLE_COND-ness of this is
1723 established, but the existing code requires it.
1724 (canonicalize_loop_ivs): Similarly for "stmt".
1726 * tree-ssa-propagate.c (propagate_tree_value_into_stmt): Replace
1727 a check against GIMPLE_COND with a dyn_cast<gimple_cond>.
1729 2014-10-24 David Malcolm <dmalcolm@redhat.com>
1731 Concretize gimple_cond_{true|false}_label
1733 * gimple.h (gimple_cond_true_label): Require a const_gimple_cond
1734 rather than just a const_gimple.
1735 (gimple_cond_false_label): Likewise.
1737 * omp-low.c (diagnose_sb_2): Add checked cast to gimple_cond within
1739 * tree-eh.c (maybe_record_in_goto_queue): Likewise.
1741 * tree-cfg.c (verify_gimple_stmt): Add a checked cast to gimple_cond
1742 within "case GIMPLE_COND", splitting it out into...
1743 (verify_gimple_label): New.
1745 2014-10-24 David Malcolm <dmalcolm@redhat.com>
1747 Concretize gimple_switch_index and gimple_switch_index_ptr
1749 * gimple.h (gimple_switch_index): Require a const_gimple_switch rather
1750 than a plain const_gimple.
1751 (gimple_switch_index_ptr): Likewise.
1753 * gimplify-me.c (gimple_regimplify_operands): Add checked cast to
1754 gimple_switch within "case GIMPLE_SWITCH".
1755 * tree-cfgcleanup.c (cleanup_control_expr_graph): Likewise.
1756 * tree-ssa-ccp.c (ccp_fold): Likewise.
1757 * tree-ssa-dom.c (optimize_stmt): Likewise.
1759 * tree-ssa-ccp.c (evaluate_stmt): Add checked cast to
1760 gimple_switch within region guarded by check for GIMPLE_SWITCH.
1761 * tree-ssa-dom.c (record_edge_info): Likewise.
1762 (eliminate_redundant_computations): Likewise.
1763 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Likewise.
1764 * tree-ssa-threadedge.c (simplify_control_stmt_condition): Likewise.
1766 * tree-ssa-dom.c (initialize_hash_element): Replace check for
1767 code GIMPLE_SWITCH with a dyn_cast<gimple_switch>.
1768 (propagate_rhs_into_lhs): Likewise.
1769 * tree-ssa-propagate.c (may_propagate_copy_into_stmt): Likewise.
1770 (propagate_tree_value_into_stmt): Likewise.
1772 2014-10-24 David Malcolm <dmalcolm@redhat.com>
1774 Concretize gimple_cond_make_{false|true}
1776 * gimple.h (gimple_cond_make_false): Require a gimple_cond.
1777 (gimple_cond_make_true): Likewise.
1779 * tree-cfg.c (fold_cond_expr_cond): Add a checked cast to
1780 gimple_cond within region guarded by check for GIMPLE_COND.
1781 * tree-ssa-ccp.c (ccp_fold_stmt): Likewise.
1783 * tree-loop-distribution.c (generate_loops_for_partition): Replace
1784 a check for GIMPLE_COND with a dyn_cast<gimple_cond>.
1785 * tree-ssa-ccp.c (optimize_unreachable): Likewise.
1786 * tree-ssa-loop-niter.c (number_of_iterations_exit): Likewise.
1787 * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
1790 * tree-vrp.c (fold_predicate_in): Add a checked cast to
1791 gimple_cond. We must be dealing with a GIMPLE_COND since logic
1792 at top of the function ensures we only act on GIMPLE_ASSIGN and
1793 GIMPLE_COND statements, and we're now within a "not a GIMPLE_ASSIGN"
1796 * tree-ssa-loop-ivcanon.c (remove_exits_and_undefined_stmts): Add
1797 checked cast of elt->stmt to gimple_cond. The existing code requires
1798 this to be a GIMPLE_COND, though it's not clear to me how this
1799 requirement is enforced.
1800 (remove_redundant_iv_tests): Likewise.
1801 (try_unroll_loop_completely): Likewise, for the last_stmt of the
1802 preceding bb along edge_to_cancel.
1803 * tree-ssa-reassoc.c (maybe_optimize_range_tests): Likewise, for the
1806 2014-10-24 David Malcolm <dmalcolm@redhat.com>
1808 Concretize locals within expand_omp_for_init_counts
1810 * omp-low.c (expand_omp_for_init_counts): Eliminate local "stmt"
1811 in favor of new locals "cond_stmt" and "assign_stmt" with more
1814 2014-10-24 David Malcolm <dmalcolm@redhat.com>
1816 Make gimple_cond_set_{true|false}_label require gimple_cond.
1818 * gimple.h (gimple_cond_set_true_label): Require a gimple_cond.
1819 (gimple_cond_set_false_label): Likewise.
1821 * tree-cfg.c (make_cond_expr_edges): Convert "entry" from gimple to
1823 (cleanup_dead_labels): Introduce a checked cast to a gimple_cond within
1824 the GIMPLE_COND case.
1826 2014-10-24 David Malcolm <dmalcolm@redhat.com>
1828 Concretize three gimple_return_ accessors
1830 * gimple.h (gimple_return_retval_ptr): Require a const_gimple_return
1831 rather than a const_gimple.
1832 (gimple_return_retval): Likewise.
1833 (gimple_return_set_retval): Require a gimple_return.
1835 * cfgexpand.c (expand_gimple_stmt_1): Add a checked cast to
1837 (expand_gimple_basic_block): Likewise.
1838 * tree-complex.c (expand_complex_move): Likewise.
1839 (expand_complex_comparison): Likewise.
1840 * tree-inline.c (remap_gimple_stmt): Likewise.
1841 * tree-sra.c (scan_function): Likewise.
1842 (sra_modify_function_body): Likewise.
1843 (ipa_sra_modify_function_body): Likewise.
1844 * tree-ssa-structalias.c (find_func_aliases): Likewise.
1846 * gimple-ssa-isolate-paths.c (isolate_path): Strengthen local
1847 "ret" from gimple to gimple_return.
1848 (find_implicit_erroneous_behaviour): Replace a check for code
1849 GIMPLE_RETURN with a dyn_cast and a new local.
1850 (find_explicit_erroneous_behaviour): Likewise.
1851 * gimple-walk.c (walk_stmt_load_store_addr_ops): Likewise.
1852 * gimple.c (infer_nonnull_range): Likewise.
1853 * ipa-split.c (find_return_bb): Likewise.
1854 (find_retval): Likewise.
1855 (split_function): Likewise.
1856 * omp-low.c (ipa_simd_modify_function_body): Likewise.
1857 * tree-cfg.c (pass_warn_function_return::execute): Likewise.
1858 * tree-nrv.c (tree_nrv): Likewise.
1859 * tree-ssa-alias.c (ref_maybe_used_by_stmt_p): Likewise.
1860 * tree-ssa-dce.c (propagate_necessity): Likewise.
1861 * tree-ssa-structalias.c (find_func_clobbers): Likewise.
1862 * tree-tailcall.c (find_tail_calls): Likewise.
1864 * predict.c (apply_return_prediction): Rework the search for
1865 return_stmt so that the latter can have type gimple_return.
1867 2014-10-24 David Malcolm <dmalcolm@redhat.com>
1869 Make gimple_phi_arg_location require a gimple_phi.
1871 * gimple.h (gimple_phi_arg_location): Require a gimple_phi.
1873 * tree-into-ssa.c (rewrite_update_phi_arguments): Replace a check
1874 for code GIMPLE_PHI with a dyn_cast and a new local.
1875 * tree-ssa-ter.c (ter_is_replaceable_p): Likewise.
1877 * tree-ssa-live.c (remove_unused_locals): Replace a
1878 gimple_stmt_iterator with a gimple_phi_iterator, using it to make
1879 local "phi" be a gimple_phi.
1880 * tree-ssa-phiopt.c (tree_ssa_phiopt_worker): Likewise.
1882 * tree-ssa-phiopt.c (conditional_replacement): Require a gimple_phi.
1883 (single_non_singleton_phi_for_edges): Return a gimple_phi; update
1884 local to be a gimple_phi, adding checked casts since we're working
1885 on a sequence of gimple_phi.
1886 (conditional_replacement): Require a gimple_phi.
1888 * tree-ssa-threadupdate.c (get_value_locus_in_path): Strengthen
1889 type of local "def_phi" to gimple_phi by replacing a check of the
1890 code for GIMPLE_PHI with a dyn_cast<gimple_phi>.
1892 2014-10-24 David Malcolm <dmalcolm@redhat.com>
1894 Make gimple_phi_arg_location_from_edge require a gimple_phi
1896 * gimple.h (gimple_phi_arg_location_from_edge): Require a
1899 * tree-parloops.c (create_parallel_loop): Split up local variable
1900 "stmt", introducing other locals for the various statements created
1901 by this function. Reuse "stmt" within the phi-handling code, and
1902 change to type gimple_phi, since this is the only remaining
1903 "non-phi" user of gimple_phi_arg_location_from_edge.
1905 2014-10-24 David Malcolm <dmalcolm@redhat.com>
1907 Concretize three gimple_try_set_ accessors
1909 * gimple.c (gimple_copy): Add checked casts to gimple_try.
1911 * gimple.h (gimple_try_set_kind): Require a gimple_try.
1912 (gimple_try_set_eval): Likewise.
1913 (gimple_try_set_cleanup): Likewise.
1915 * tree-eh.c (optimize_double_finally): Require a pair of gimple_try
1917 (refactor_eh_r): Convert code comparisons to dynamic casts.
1919 2014-10-24 David Malcolm <dmalcolm@redhat.com>
1921 Concretize gimple_try_set_catch_is_cleanup
1923 * gimple.h (gimple_try_set_catch_is_cleanup): Require a gimple_try.
1925 * gimplify.c (gimplify_expr): Convert local "try_" from a gimple
1928 2014-10-24 David Malcolm <dmalcolm@redhat.com>
1930 Concretize gimple_eh_filter_set_types and gimple_eh_filter_set_failure
1932 * gimple.h (gimple_eh_filter_set_types): Require a gimple_eh_filter.
1933 (gimple_eh_filter_set_failure): Likewise.
1934 * gimple.c (gimple_copy): Add checked casts to gimple_eh_filter
1935 within GIMPLE_EH_FILTER case.
1937 2014-10-24 David Malcolm <dmalcolm@redhat.com>
1939 Concretize gimple_label_label
1941 * gimple.h (gimple_label_label): Require a const_gimple_label
1942 rather than just a const_gimple.
1944 * cfgexpand.c (label_rtx_for_bb): Convert local from gimple to
1945 gimple_label, replacing a check against GIMPLE_LABEL with a
1946 dyn_cast<gimple_label>.
1947 * predict.c (tree_estimate_probability_bb): Likewise.
1948 * tree-cfg.c (make_edges): Likewise.
1949 (cleanup_dead_labels): Likewise (twice).
1950 (gimple_can_merge_blocks_p): Likewise.
1951 (gimple_block_label): Likewise.
1952 * tree-eh.c (unsplit_eh): Likewise.
1953 (cleanup_empty_eh_unsplit): Likewise.
1954 * tree-inline.c (mark_local_labels_stmt): Likewise.
1955 * tree-nested.c (convert_nl_goto_receiver): Likewise.
1957 * cfgexpand.c (expand_gimple_stmt_1): Add a checked cast to
1958 gimple_label when invoking gimple_label_label in a region where
1959 we've checked the code is GIMPLE_LABEL.
1960 * gimple-pretty-print.c (pp_cfg_jump): Likewise.
1961 * gimple.c (gimple_set_bb): Likewise.
1962 * ipa-pure-const.c (check_stmt): Likewise.
1963 * omp-low.c (diagnose_sb_1): Likewise.
1964 * tree-cfg.c (gimple_verify_flow_info): Likewise.
1965 * tree-cfgcleanup.c (tree_forwarder_block_p): Likewise.
1966 (remove_forwarder_block): Likewise.
1967 * tree-eh.c (collect_finally_tree): Likewise.
1969 * ipa-split.c (verify_non_ssa_vars): Replace a check against
1970 GIMPLE_LABEL with a dyn_cast<gimple_label>, introducing a
1972 * tree-cfg.c (gimple_can_merge_blocks_p): Likewise.
1973 (gimple_merge_blocks): Likewise.
1974 (remove_bb): Likewise.
1975 (stmt_starts_bb_p): Likewise.
1976 (gimple_verify_flow_info): Likewise.
1977 (move_block_to_fn): Likewise.
1978 * tree-cfgcleanup.c (remove_forwarder_block): Likewise.
1979 (remove_forwarder_block_with_phi): Likewise.
1980 * tree-ssa-ccp.c (optimize_unreachable): Likewise.
1982 2014-10-24 David Malcolm <dmalcolm@redhat.com>
1984 Concretize gimple_call_use_set and gimple_call_clobber_set
1986 * gimple.h (gimple_call_use_set): Require a gimple_call.
1987 (gimple_call_clobber_set): Likewise.
1989 2014-10-24 David Malcolm <dmalcolm@redhat.com>
1991 Concretize gimple_catch_types
1993 * gimple.h (gimple_catch_types): Require a const_gimple_catch
1994 rather than a const_gimple.
1996 2014-10-24 David Malcolm <dmalcolm@redhat.com>
1998 Make gimple_goto_set_dest require a gimple_goto
2000 * gimple.h (gimple_goto_set_dest): Require a gimple_goto.
2002 * tree-cfg.c (factor_computed_gotos): Add checked cast to
2004 (cleanup_dead_labels): Likewise.
2006 2014-10-24 David Malcolm <dmalcolm@redhat.com>
2008 Make gimple_label_set_label require a gimple_label
2010 * gimple.h (gimple_label_set_label): Require a gimple_label.
2012 2014-10-24 David Malcolm <dmalcolm@redhat.com>
2014 Concretize parameter to gimple_call_copy_skip_args
2016 * gimple.c (gimple_call_copy_skip_args): Require a gimple_call.
2017 * gimple.h (gimple_call_copy_skip_args): Likewise.
2019 2014-10-24 David Malcolm <dmalcolm@redhat.com>
2021 Various gimple to gimple_call conversions in IPA
2023 * ipa-prop.c (detect_type_change_from_memory_writes): Require a
2024 gimple_call rather than a plain gimple.
2025 (detect_type_change): Likewise.
2026 (detect_type_change_ssa): Likewise.
2027 (compute_complex_assign_jump_func): Likewise.
2028 (compute_complex_ancestor_jump_func): Likewise.
2029 (compute_known_type_jump_func): Likewise.
2030 (determine_locally_known_aggregate_parts): Likewise.
2031 (ipa_compute_jump_functions_for_edge): Strengthen local "call" to
2032 a gimple_call; add checked cast to gimple_phi.
2033 (ipa_note_param_call): Require a gimple_call rather than a plain
2035 (ipa_analyze_indirect_call_uses): Likewise.
2036 (ipa_analyze_virtual_call_uses): Likewise.
2037 (ipa_analyze_call_uses): Likewise.
2038 (ipa_analyze_stmt_uses):Add checked cast to gimple_call.
2040 * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
2041 Replace use of is_gimple_call with dyn_cast<gimple_call> and a
2042 new local "call_stmt".
2044 2014-10-24 David Malcolm <dmalcolm@redhat.com>
2046 Use gimple_call for callgraph edges
2048 * cgraph.h (cgraph_edge::call_stmt): Strengthen field from plain
2049 gimple to a gimple_call.
2050 (cgraph_node::set_call_stmt_including_clones): Likewise for param
2052 (cgraph_node::create_edge): Likewise for param "call_stmt".
2053 (cgraph_node::create_indirect_edge): Likewise.
2054 (cgraph_node::create_edge_including_clones): Likewise for param
2056 (cgraph_edge::set_call_stmt): Likewise for param "new_stmt".
2057 (cgraph_edge::clone): Likewise for param "call_stmt".
2058 (symbol_table::create_edge): Likewise.
2060 * cgraph.c (cgraph_edge::set_call_stmt): Require a gimple_call
2061 rather than a plain gimple.
2062 (symbol_table::create_edge): Likewise.
2063 (cgraph_node::create_edge): Likewise.
2064 (cgraph_node::create_indirect_edge): Likewise.
2065 (cgraph_edge::redirect_call_stmt_to_callee): Strengthen local
2066 "new_stmt" from gimple to gimple_call.
2067 (cgraph_update_edges_for_call_stmt_node): Add checked casts to
2070 * cgraphbuild.c (pass_build_cgraph_edges::execute): Replace
2071 is_gimple_call with dyn_cast<gimple_call> and new local
2073 (cgraph_edge::rebuild_edges): Likewise.
2075 * cgraphclones.c (cgraph_edge::clone): Require a gimple_call
2076 rather than a plain gimple.
2077 (cgraph_node::set_call_stmt_including_clones): Likewise.
2078 (cgraph_node::create_edge_including_clones): Likewise.
2080 * lto-streamer-in.c (fixup_call_stmt_edges_1): Add checked casts
2083 * omp-low.c (simd_clone_adjust): Strengthen local "call" from
2084 gimple to gimple_call.
2086 * trans-mem.c (ipa_tm_insert_irr_call): Likewise for "g".
2087 (ipa_tm_insert_gettmclone_call): Likewise; also strengthen "g2"
2090 * tree-emutls.c (gen_emutls_addr): Strengthen local "x" from
2091 gimple to gimple_call.
2093 * tree-inline.c (copy_bb): Replace is_gimple_call with
2094 dyn_cast<gimple_call> and new local "call_stmt".
2096 * value-prof.c (gimple_ic): Require and return a gimple_call,
2097 rather than a plain gimple.
2098 * value-prof.h (gimple_ic): Likewise.
2100 2014-10-24 David Malcolm <dmalcolm@redhat.com>
2102 Make gimple_call_return_slot_opt_p require a gimple_call.
2104 * gimple.h (gimple_call_return_slot_opt_p): Require a gimple_call
2105 rather than a plain gimple.
2107 * gimple-walk.c (walk_stmt_load_store_addr_ops): Convert usage of
2108 is_gimple_call to dyn_cast<gimple_call>, introducing a new local
2111 * trans-mem.c (expand_call_tm): Split local "stmt", strengthening
2112 from plain gimple to a gimple_call, and introducing new local
2113 gimple_assign "assign_stmt".
2115 * tree-inline.c (expand_call_inline): Convert check of code against
2116 GIMPLE_CALL to dyn_cast<gimple_call>, introducing a new local
2119 2014-10-24 David Malcolm <dmalcolm@redhat.com>
2123 * gimple.h (gimple_phi_set_result): Require a gimple_phi rather
2124 than a plain gimple.
2125 (gimple_phi_set_arg): Likewise.
2127 * tree-outof-ssa.c (remove_gimple_phi_args): Likewise; add a checked
2130 * tree-sra.c (replace_removed_params_ssa_names): Add a checked
2133 2014-10-24 David Malcolm <dmalcolm@redhat.com>
2135 Make gimple_phi_arg_edge require a gimple_phi
2137 * gimple.h (gimple_phi_arg_edge): Require a gimple_phi rather
2138 than a plain gimple.
2140 * gimple-ssa-strength-reduction.c (ncd_with_phi): Strengthen
2141 param "phi" from gimple to gimple_phi. Add a checked cast.
2142 (ncd_of_cand_and_phis): Add a checked cast.
2144 * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Require a
2145 gimple_phi_iterator; strengthen local "phi" from gimple to a
2147 (rewrite_cross_bb_scalar_deps): Strengthen local "psi" from
2148 a gimple_stmt_iterator to a gimple_phi_iterator.
2149 (edge_initial_value_for_loop_phi): Require a gimple phi.
2150 (initial_value_for_loop_phi): Likewise.
2152 * ipa-split.c (consider_split): Convert "bsi" to a
2153 gimple_phi_iterator and "stmt" to a gimple_phi.
2155 * predict.c (predict_extra_loop_exits): Convert "phi_stmt" to be
2156 a gimple_phi; introduce "lhs_def_stmt" as plain gimple.
2157 (apply_return_prediction): Convert "phi" to be a gimple_phi.
2159 * tree-cfg.c (replace_uses_by): Add checked cast to gimple_phi.
2160 (verify_gimple_in_cfg): Introduce gimple_phi_iterator "gpi" and use
2161 it to convert "phi" to a gimple_phi.
2163 * tree-eh.c (cleanup_empty_eh_merge_phis): Convert "ngsi", "ogsi"
2164 to be gimple_phi_iterators. Convert "ophi", "nphi" to be
2167 * tree-into-ssa.c (prepare_use_sites_for): Add checked cast to
2170 * tree-ssa-coalesce.c (create_outofssa_var_map): Introduce
2171 gimple_phi_iterator "gpi" and use it to convert "phi" to a
2174 * tree-ssa-dce.c (propagate_necessity): Introduce local "phi",
2175 from checked cast to gimple_phi.
2177 * tree-ssa-live.c (set_var_live_on_entry): Add checked cast to
2180 * tree-ssa-propagate.c (replace_phi_args_in): Require a gimple_phi
2181 rather than a plain gimple.
2182 (substitute_and_fold_dom_walker::before_dom_children): Introduce
2183 gimple_phi_iterator "gpi".
2185 * tree-ssa-sink.c (find_bb_for_arg): Require a gimple_phi rather
2186 than a plain gimple.
2187 (nearest_common_dominator_of_uses): Replace check of code against
2188 GIMPLE_PHI with a dyn_cast<gimple_phi>, introducing a new local.
2189 (statement_sink_location): Add checked cast to gimple_phi.
2191 * tree-ssa-uninit.c (compute_uninit_opnds_pos): Require a
2192 gimple_phi rather than a plain gimple.
2193 (collect_phi_def_edges): Likewise. Add a checked cast.
2194 (find_def_preds): Strengthen param "phi" from gimple to
2196 (prune_uninit_phi_opnds_in_unrealizable_paths): Likewise for
2197 params "phi" and "flag_def". Strenghen param "visited_phis" from
2198 hash_set<gimple> * to hash_set<gimple_phi> *. Convert
2199 "flag_arg_def", "phi_arg_def" to gimple_phi using
2200 dyn_cast<gimple_phi>. Similarly, introduce new local
2202 (use_pred_not_overlap_with_undef_path_pred): Strengthen param
2203 "phi" from gimple to gimple_phi, and param "visited_phis" from
2204 hash_set<gimple> * to hash_set<gimple_phi> *. Add a checked cast.
2205 (is_use_properly_guarded): Likewise for params.
2206 (find_uninit_use): Replace check of code against GIMPLE_PHI with
2207 a dyn_cast<gimple_phi>, introducing a new local "use_phi".
2208 Strengthen local "visited_phis" from hash_set<gimple> to
2209 hash_set<gimple_phi>.
2211 2014-10-24 David Malcolm <dmalcolm@redhat.com>
2213 Update GRAPHITE to use more concrete gimple statement classes
2215 * graphite-scop-detection.c (canonicalize_loop_closed_ssa):
2216 Strengthen local "psi" to be a gimple_phi_iterator and "phi" to
2219 * graphite-sese-to-poly.c (phi_arg_in_outermost_loop): Require
2220 a gimple_phi rathen than a plain gimple.
2221 (remove_simple_copy_phi): Require a gimple_phi_iterator;
2222 strengthen local "phi" to be a gimple_phi and "stmt" to be a
2224 (remove_invariant_phi): Likewise.
2225 (simple_copy_phi_p): Require a gimple_phi.
2226 (reduction_phi_p): Require a gimple_phi_iterator; strengthen
2227 local "phi" to be a gimple_phi.
2228 (add_condition_to_pbb): Require a gimple_cond rather than a
2230 (add_conditions_to_domain): Add checked cast to gimple_cond
2231 within GIMPLE_COND case of switch statement.
2232 (single_pred_cond_non_loop_exit): Return a gimple_cond rather
2233 than a plain gimple, via a checked cast.
2234 (sese_dom_walker::before_dom_children): Strengthen local "stmt"
2235 from gimple to gimple_cond.
2236 (gsi_for_phi_node): Require a gimple_phi, and return a
2237 gimple_phi_iterator.
2238 (insert_out_of_ssa_copy): Strengthen local "stmt" from gimple to
2240 (rewrite_reductions_out_of_ssa): Strengthen "psi" to be a
2241 gimple_phi_iterator, and "phi" to be a gimple_phi.
2242 (phi_contains_arg): Require a gimple_phi.
2243 (follow_ssa_with_commutative_ops): Strengthen return type from
2244 gimple to gimple_phi, by converting a check for code GIMPLE_PHI to
2245 a dyn_cast<gimple_phi>, and strengthening local "res" from gimple
2247 (detect_commutative_reduction_arg): Strengthen return type from
2248 gimple to gimple_phi, and strengthen local "phi" to be a
2250 (detect_commutative_reduction_assign): Strengthen return type from
2251 gimple to gimple_phi, and strengthen local "res" to be a
2253 (follow_inital_value_to_phi): Strengthen return type from
2254 gimple to gimple_phi. Replace check for code GIMPLE_PHI with
2255 a dyn_cast<gimple_phi>.
2256 (detect_commutative_reduction): Strengthen return type and locals
2257 "loop_phi", "phi", "close_phi" from gimple to gimple_phi,
2258 introducing a checked cast of "stmt" in region guarded by
2259 scalar_close_phi_node_p (stmt).
2260 (translate_scalar_reduction_to_array_for_stmt): Require param
2261 "loop_phi" to be a gimple_phi. Strengthen local "assign" from
2262 gimple to gimple_assign.
2263 (remove_phi): Require a gimple_phi.
2264 (close_phi_written_to_memory): Likewise.
2265 (translate_scalar_reduction_to_array): We expect the first element
2266 in each vector to be an arbitrary statement, but all of the
2267 subsequent elements to be phi nodes. Hence the decls of gimple
2268 locals "loop_phi" and "close_phi" are replaced with decls of gimple
2269 "loop_stmt" and "close_stmt", with decls of the more-strongly typed
2270 gimple_phi "loop_phi" and "close_phi" occurring lower down, within
2271 the region where we're dealing with i > 0 and hence where we can
2272 safely assign them using the checked cast as_a <gimple_phi>.
2273 This allows many of the strengthenings from gimple to gimple_phi
2274 above. We eliminate the local "stmt", since we can simply use
2276 (rewrite_commutative_reductions_out_of_ssa_close_phi): Strengthen
2277 param "close_phi" from gimple to gimple_phi, and local "gsi" from
2278 gimple_stmt_iterator to gimple_phi_iterator, converting uses of
2279 gsi_stmt to gsi.phi for type-safety.
2280 (scop_ivs_can_be_represented): Strengthen local "gsi" from
2281 gimple_stmt_iterator to gimple_phi_iterator, and "phi" from gimple
2284 2014-10-24 David Malcolm <dmalcolm@redhat.com>
2286 Make gimple_phi_arg_set_location require a gimple_phi
2288 * gimple.h (gimple_phi_arg_set_location): Require a gimple_phi
2289 rather than a plain gimple.
2291 2014-10-24 David Malcolm <dmalcolm@redhat.com>
2293 Make add_phi_arg require a gimple_phi
2295 * tree-phinodes.h (add_phi_arg): Require a gimple_phi rather than
2297 * tree-phinodes.c (add_phi_arg): Likewise.
2299 * gimple-ssa-strength-reduction.c (create_phi_basis): Strengthen
2300 local "phi" from plain gimple to gimple_phi.
2302 * graphite-scop-detection.c (canonicalize_loop_closed_ssa):
2303 Likewise for "close_phi".
2305 * ipa-split.c (split_function): Convert "psi" to
2306 gimple_phi_iterator.
2308 * omp-low.c (expand_omp_for_static_nochunk): Introduce
2309 gimple_phi_iterator gpi, using it to strengthen "phi" to be a
2311 (expand_omp_for_static_chunk): Likewise.
2313 * tree-cfg.c (gimple_duplicate_bb): Make topmost "gsi" decl more
2314 tightly-scoped, and eliminate decls "phis", "phi", "stmt", "copy"
2315 in favor of more tightly-scoped gimple_phi_iterator gpi and
2316 gimple_phi decls "phi" and "copy", and gimple decls "stmt" and
2319 * tree-parloops.c (create_parallel_loop): Introduce
2320 gimple_phi_iterator gpi, using it to strengthen "phi" to be a
2323 * tree-ssa-loop-im.c (execute_sm_if_changed): Likewise.
2325 * tree-ssa-loop-manip.c (create_iv): Split out new gimple_phi
2326 local "phi" from "stmt", and convert the latter into being a
2329 * tree-ssa-pre.c (insert_into_preds_of_block): Strengthen local
2330 "phi" to be a gimple_phi.
2332 * tree-ssa-tail-merge.c (vop_phi): Require a gimple_phi rather
2333 than a plain gimple.
2334 (replace_block_by): Strengthen local "bb2_phi" to be a gimple_phi.
2336 * tree-tailcall.c (add_successor_phi_arg): Use gsi.phi when
2337 invoking add_phi_arg.
2338 (eliminate_tail_call): Introduce gimple_phi_iterator gpi, using it
2339 to strengthen "phi" to be a gimple_phi.
2340 (create_tailcall_accumulator): Strengthen local "phi" to be a
2342 (tree_optimize_tail_calls_1): Likewise.
2344 * tree-vect-data-refs.c (vect_setup_realignment): Strengthen
2345 local "phi_stmt" to be a gimple_phi.
2347 * tree-vect-loop-manip.c (slpeel_tree_duplicate_loop_to_edge_cfg):
2348 Strengthen "gsi", "gsi_orig", "gsi_new" to be
2349 gimple_phi_iterators, and "phi" "orig_phi", "new_phi" to be
2350 gimple_phi instances.
2351 (slpeel_tree_peel_loop_to_edge): Strengthen local "new_phi" to be
2354 * tree-vect-loop.c (get_initial_def_for_induction): Likewise for
2356 (vect_create_epilog_for_reduction): Add checked casts to
2357 gimple_phi; strengthen local "outer_phi" to gimple_phi and
2358 "new_vec_stmt" to gimple_assign.
2359 (vect_finalize_reduction): Strengthen local "vect_phi" to
2361 (vectorizable_reduction): Likewise for "new_phi".
2363 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
2364 (vectorizable_load): Likewise for "phi".
2366 2014-10-24 David Malcolm <dmalcolm@redhat.com>
2368 Make gimple_phi_arg_def_ptr and gimple_phi_arg_has_location require a gimple_phi
2370 * gimple.h (gimple_phi_arg_def_ptr): Require a gimple_phi rather
2371 than a plain gimple.
2372 (gimple_phi_arg_has_location): Likewise.
2374 * gimple-streamer-in.c (input_phi): Return a gimple_phi rather
2375 than a plain gimple.
2376 * gimple-streamer-out.c (output_phi): Require a gimple_phi rather
2377 than a plain gimple.
2378 (output_bb): Convert iteration to a gimple_phi_iterator, and local
2379 "phi" to gimple_phi.
2381 * omp-low.c (expand_omp_for_static_chunk): Convert iterator "psi"
2382 to a gimple_phi_iterator; convert locals "phi" and "nphi" to be
2385 * tree-cfg.c (gimple_duplicate_sese_tail): Likewise for "psi" and
2387 (move_block_to_fn): Introduce new gimple_phi_iterator "psi", using
2388 it in place of "gsi" where necessary. Convert "phi" to be a
2391 * tree-cfgcleanup.c (remove_forwarder_block): Likewise.
2393 * tree-vect-loop-manip.c (vect_loop_versioning): Convert "gsi" to
2394 a gimple_phi_iterator, and "orig_phi" and "new_phi" to be
2397 * tree.c (find_decls_types_in_node): Introduce new
2398 gimple_phi_iterator "psi", using it in place of "si" where
2399 necessary. Convert "phi" to be a gimple_phi.
2401 2014-10-24 David Malcolm <dmalcolm@redhat.com>
2403 omp-low.c: Use more concrete types of gimple statement for various locals
2405 * omp-low.c (finalize_task_copyfn): Strengthen local "bind" from
2406 plain gimple to gimple_bind.
2407 (lower_rec_input_clauses): Strengthen local "g" from
2408 plain gimple to gimple_assign.
2409 (lower_lastprivate_clauses): Likewise for "stmt" to gimple_cond
2410 and "g" to gimple_call.
2411 (expand_omp_for_init_vars): Likewise, for two decls of "stmt" to
2413 (expand_omp_atomic_pipeline): Likewise for one decl of "stmt".
2414 (expand_omp_atomic_mutex): Likewise.
2415 (lower_omp_master): Likewise for "x" to gimple_call.
2416 (lower_omp_ordered): Likewise.
2418 2014-10-24 David Malcolm <dmalcolm@redhat.com>
2420 tree-parloops.c: Use gimple_phi in various places
2422 * tree-parloops.c (reduction_info::keep_res): Strengthen field
2423 from plain gimple to gimple_phi.
2424 (transform_to_exit_first_loop): Strengthen locals "phi", "nphi"
2425 to gimple_phi. Eliminate early decl of gimple_stmt_iterator gsi
2426 in favor of more tightly scoped gimple_phi_iterators, and a final
2427 later decl as a gimple_stmt_iterator.
2429 2014-10-24 David Malcolm <dmalcolm@redhat.com>
2431 Introduce gimple_omp_sections
2433 * coretypes.h (gimple_omp_sections): New typedef.
2434 (const_gimple_omp_sections): New typedef.
2436 * gimple-pretty-print.c (dump_gimple_omp_sections): Require a
2437 gimple_omp_sections rather than a plain gimple.
2438 (pp_gimple_stmt_1): Add checked cast to gimple_omp_sections within
2439 GIMPLE_OMP_SECTIONS case of switch statement.
2441 * gimple.c (gimple_build_omp_sections): Return a
2442 gimple_omp_sections rather than a plain gimple.
2444 * gimple.h (gimple_build_omp_sections): Return a
2445 gimple_omp_sections rather than a plain gimple.
2447 * omp-low.c (scan_omp_sections): Require a gimple_omp_sections
2448 rather than a plain gimple.
2449 (scan_omp_1_stmt): Add checked cast to gimple_omp_sections within
2450 GIMPLE_OMP_SECTIONS case of switch statement.
2451 (expand_omp_sections): Strengthen local "sections_stmt" from gimple
2452 to gimple_omp_sections.
2453 (lower_omp_sections): Likewise for "stmt".
2455 2014-10-24 David Malcolm <dmalcolm@redhat.com>
2457 Introduce gimple_omp_teams
2459 * coretypes.h (gimple_omp_teams): New typedef.
2460 (const_gimple_omp_teams): New typedef.
2462 * gimple.h (gimple_build_omp_teams): Return a gimple_omp_teams
2463 rather than a plain gimple.
2464 (gimple_omp_teams_set_clauses): Require a gimple_omp_teams rather
2465 than a plain gimple.
2467 * gimple-pretty-print.c (dump_gimple_omp_teams): Require a
2468 gimple_omp_teams rather than a plain gimple.
2469 (pp_gimple_stmt_1): Add checked cast to gimple_omp_teams within
2470 GIMPLE_OMP_TEAMS case of switch statement.
2472 * gimple.c (gimple_build_omp_teams): Return a gimple_omp_teams
2473 rather than a plain gimple.
2475 * omp-low.c (scan_omp_teams): Likewise.
2476 (scan_omp_1_stmt): Add checked cast to gimple_omp_teams within
2477 GIMPLE_OMP_TEAMS case of switch statement.
2478 (lower_omp_teams): Strengthen local "teams_stmt" from gimple to
2481 2014-10-24 David Malcolm <dmalcolm@redhat.com>
2483 Introduce gimple_omp_target
2485 * coretypes.h (gimple_omp_target): New typedef.
2486 (const_gimple_omp_target): New typedef.
2488 * gimple.h (gimple_build_omp_target): Return a gimple_omp_target
2489 rather than a plain gimple.
2490 (gimple_omp_target_set_clauses): Require a gimple_omp_target
2491 rather than a plain gimple.
2492 (gimple_omp_target_set_kind): Likewise.
2493 (gimple_omp_target_child_fn_ptr): Likewise.
2494 (gimple_omp_target_set_child_fn): Likewise.
2495 (gimple_omp_target_data_arg_ptr): Likewise.
2496 (gimple_omp_target_set_data_arg): Likewise.
2497 (gimple_omp_target_child_fn): Require a const_gimple_omp_target
2498 rather than a plain const_gimple.
2499 (gimple_omp_target_data_arg): Likewise.
2501 * gimple-pretty-print.c (dump_gimple_omp_target): Require a
2502 gimple_omp_target rather than a plain gimple.
2503 (pp_gimple_stmt_1): Add checked cast to gimple_omp_target within
2504 GIMPLE_OMP_TARGET case of switch statement.
2506 * gimple.c (gimple_build_omp_target): Return a gimple_omp_target
2507 rather than a plain gimple.
2509 * gimplify.c (gimplify_omp_target_update): Strengthen local "stmt"
2510 from gimple to gimple_omp_target.
2512 * omp-low.c (scan_omp_target): Require a gimple_omp_target rather
2513 than a plain gimple.
2514 (scan_omp_1_stmt): Add checked cast to gimple_omp_target within
2515 GIMPLE_OMP_TARGET case of switch statement.
2516 (expand_omp_target): Strengthen local "entry_stmt" from gimple to
2518 (lower_omp_target): Likewise for "stmt".
2520 * tree-nested.c (convert_nonlocal_reference_stmt): Add checked
2521 cast to gimple_omp_target.
2522 (convert_local_reference_stmt): Likewise.
2523 (convert_gimple_call): Likewise.
2525 2014-10-24 David Malcolm <dmalcolm@redhat.com>
2527 Introduce gimple_omp_single
2529 * coretypes.h (gimple_omp_single): New typedef.
2530 (const_gimple_omp_single): New typedef.
2532 * gimple.h (gimple_build_omp_single): Return a gimple_omp_single
2533 rather than a plain gimple.
2534 (gimple_omp_single_set_clauses): Require a gimple_omp_single
2535 rather than a plain gimple.
2537 * gimple-pretty-print.c (dump_gimple_omp_single): Require a
2538 gimple_omp_single rather than a plain gimple.
2539 (pp_gimple_stmt_1): Add checked cast to gimple_omp_single within
2540 GIMPLE_OMP_SINGLE case of switch statement.
2542 * gimple.c (gimple_build_omp_single): Return a gimple_omp_single
2543 rather than a plain gimple.
2545 * omp-low.c (scan_omp_single): Require a gimple_omp_single rather
2546 than a plain gimple.
2547 (scan_omp_1_stmt): Add checked cast to gimple_omp_single within
2548 GIMPLE_OMP_SINGLE case of switch statement.
2549 (lower_omp_single_simple): Require a gimple_omp_single rather
2550 than a plain gimple.
2551 (lower_omp_single_copy): Likewise.
2552 (lower_omp_single): Strengthen local "single_stmt" from gimple to
2555 2014-10-24 David Malcolm <dmalcolm@redhat.com>
2557 Introduce gimple_omp_task
2559 * coretypes.h (gimple_omp_task): New typedef.
2560 (const_gimple_omp_task): New typedef.
2562 * gimple.h (gimple_build_omp_task): Return a gimple_omp_task
2563 rather than a plain gimple.
2565 * gimple-pretty-print.c (dump_gimple_omp_task): Require a
2566 gimple_omp_task rather than a plain gimple.
2567 (pp_gimple_stmt_1): Add checked cast to gimple_omp_task within
2568 GIMPLE_OMP_TASK case of switch statement.
2570 * gimple.c (gimple_build_omp_task): Return a gimple_omp_task
2571 rather than a plain gimple.
2573 * omp-low.c (finalize_task_copyfn): Require a gimple_omp_task
2574 rather than a plain gimple.
2575 (delete_omp_context): Add checked cast to gimple_omp_task.
2576 (scan_omp_task): Strengthen local "stmt" from gimple to
2578 (expand_task_call): Require a gimple_omp_task rather than a plain
2580 (expand_omp_taskreg): Add checked cast to gimple_omp_task.
2581 (create_task_copyfn): Require a gimple_omp_task rather than a
2583 (lower_omp_taskreg): Add checked cast to gimple_omp_task.
2585 2014-10-24 David Malcolm <dmalcolm@redhat.com>
2587 tree-cfg.c: Make verify_gimple_call require a gimple_call
2589 * tree-cfg.c (verify_gimple_call): Require a gimple_call rather
2590 than a plain gimple.
2591 (verify_gimple_stmt): Add checked cast to gimple_call within
2592 GIMPLE_CALL case of switch statement.
2594 2014-10-24 David Malcolm <dmalcolm@redhat.com>
2596 Introduce gimple_omp_parallel
2598 * coretypes.h (gimple_omp_parallel): New typedef.
2599 (const_gimple_omp_parallel): New typedef.
2601 * cgraphbuild.c (build_cgraph_edges): Convert check of code
2602 against GIMPLE_OMP_PARALLEL to a dyn_cast <gimple_omp_parallel>
2605 * gimple-pretty-print.c (dump_gimple_omp_parallel): Require a
2606 gimple_omp_parallel rather than a plain gimple.
2607 (pp_gimple_stmt_1): Add a checked cast to gimple_omp_parallel
2608 within GIMPLE_OMP_PARALLEL case of switch statement.
2610 * gimple-walk.c (walk_gimple_op): Likewise, introducing a local.
2612 * gimple.c (gimple_build_omp_parallel): Return a
2613 gimple_omp_parallel rather than a plain gimple.
2614 (gimple_copy): Add checked casts to gimple_omp_parallel within
2615 GIMPLE_OMP_PARALLEL case of switch statement, introducing locals.
2617 * gimple.h (gimple_build_omp_parallel): Return a
2618 gimple_omp_parallel rather than a plain gimple.
2619 (gimple_omp_parallel_clauses_ptr): Require a gimple_omp_parallel
2620 rather than a plain gimple.
2621 (gimple_omp_parallel_set_clauses): Likewise.
2622 (gimple_omp_parallel_data_arg_ptr): Likewise.
2623 (gimple_omp_parallel_set_data_arg): Likewise.
2624 (gimple_omp_parallel_child_fn_ptr): Likewise.
2625 (gimple_omp_parallel_set_child_fn): Likewise.
2626 (gimple_omp_parallel_child_fn): Require a
2627 const_gimple_omp_parallel rather than a plain const_gimple.
2628 (gimple_omp_parallel_data_arg): Likewise.
2630 * omp-low.c (scan_omp_parallel): Strengthen local "stmt" from
2631 gimple to gimple_omp_parallel.
2632 (expand_parallel_call): Require a gimple_omp_parallel for
2633 "entry_stmt" rather than a plain gimple.
2634 (remove_exit_barrier): Strengthen local "parallel_stmt" from
2635 gimple to gimple_omp_parallel.
2636 (expand_omp_taskreg): Add checked casts to gimple_omp_parallel.
2638 * tree-inline.c (remap_gimple_stmt): Add a checked cast to
2639 gimple_omp_parallel within GIMPLE_OMP_PARALLEL case of switch
2640 statement, introducing local.
2642 2014-10-24 David Malcolm <dmalcolm@redhat.com>
2644 Introduce gimple_omp_for
2646 * coretypes.h (gimple_omp_for): New.
2647 (const_gimple_omp_for): New.
2649 * gimple.h (gimple_build_omp_for): Return a gimple_omp_for rather
2650 than a plain gimple.
2651 (gimple_omp_for_set_kind): Require a gimple_omp_for rather than a
2653 (gimple_omp_for_set_combined_p): Likewise.
2654 (gimple_omp_for_set_combined_into_p): Likewise.
2656 * gimple-pretty-print.c (dump_gimple_omp_for): Require a
2657 gimple_omp_for rather than a plain gimple.
2658 (pp_gimple_stmt_1): Add a checked cast to gimple_omp_for in
2659 GIMPLE_OMP_FOR case of switch statement.
2661 * gimple.c (gimple_build_omp_for): Return a gimple_omp_for rather
2662 than a plain gimple.
2663 (gimple_copy): Add a checked cast to gimple_omp_for and a new local.
2665 * gimplify.c (gimplify_omp_for): Strengthen local "gfor" from
2666 gimple to gimple_omp_for.
2668 * omp-low.c (omp_for_data::for_stmt): Strengthen field from gimple
2670 (extract_omp_for_data): Require a gimple_omp_for rather than a
2672 (workshare_safe_to_combine_p): Add a checked cast to
2674 (get_ws_args_for): Convert check of code against GIMPLE_OMP_FOR
2675 with a dyn_cast<gimple_omp_for> and a new local.
2676 (scan_omp_parallel): Add a checked cast to gimple_omp_for and a
2678 (scan_omp_for): Require a gimple_omp_for rather than a plain
2680 (scan_omp_1_stmt): Add a checked cast to gimple_omp_for in
2681 GIMPLE_OMP_FOR case of switch statement.
2682 (expand_omp_for): Add a checked cast to gimple_omp_for.
2683 (lower_omp_for): Strengthen local "stmt" from gimple to
2686 * tree-nested.c (walk_gimple_omp_for): Require a gimple_omp_for
2687 rather than a plain gimple.
2688 (convert_nonlocal_reference_stmt): Add a checked cast to
2689 gimple_omp_for in GIMPLE_OMP_FOR case of switch statement.
2690 (convert_local_reference_stmt): Likewise.
2692 * tree-parloops.c (create_parallel_loop): Strengthen local
2693 "for_stmt" from gimple to gimple_omp_for.
2695 2014-10-24 David Malcolm <dmalcolm@redhat.com>
2697 Introduce gimple_omp_critical
2699 * coretypes.h (gimple_omp_critical): New typedef.
2700 (const_gimple_omp_critical): New typedef.
2702 * gimple-pretty-print.c (dump_gimple_omp_critical): Require a
2703 gimple_omp_critical rather than a plain gimple.
2704 (pp_gimple_stmt_1): Add a checked cast to gimple_omp_critical
2705 within GIMPLE_OMP_CRITICAL case of switch statement.
2707 * gimple-walk.c (walk_gimple_op): Likewise.
2709 * gimple.c (gimple_build_omp_critical): Return a gimple_omp_critical
2710 rather than a plain gimple.
2711 (gimple_copy): Add checked casts to gimple_omp_critical
2712 within GIMPLE_OMP_CRITICAL case of switch statement.
2714 * gimple.h (gimple_debug): Likewise.
2715 (gimple_build_omp_critical): Return a gimple_omp_critical rather
2716 than a plain gimple.
2717 (gimple_omp_critical_name): Require a const_gimple_omp_critical
2718 rather than a plain const_gimple.
2719 (gimple_omp_critical_name_ptr): Require a gimple_omp_critical
2720 rather than a plain gimple.
2721 (gimple_omp_critical_set_name): Likewise.
2723 * omp-low.c (check_omp_nesting_restrictions): Add a checked cast
2724 to gimple_omp_critical within GIMPLE_OMP_CRITICAL case of switch
2725 statement, introducing a new local "other_crit" for type-safety.
2726 (lower_omp_critical): Strengthen local "stmt" to
2727 gimple_omp_critical.
2729 * tree-inline.c (remap_gimple_stmt): Add a checked cast to
2730 gimple_omp_critical within GIMPLE_OMP_CRITICAL case of switch
2733 2014-10-24 David Malcolm <dmalcolm@redhat.com>
2735 Introduce gimple_omp_continue
2737 * coretypes.h (gimple_omp_continue): New typedef.
2738 (const_gimple_omp_continue): New typedef.
2740 * gimple.h (gimple_build_omp_continue): Return a
2741 gimple_omp_continue rather than a plain gimple.
2742 (gimple_omp_continue_control_def): Require a
2743 const_gimple_omp_continue rather than a plain const_gimple.
2744 (gimple_omp_continue_control_use): Likewise.
2745 (gimple_omp_continue_control_def_ptr): Require a gimple_omp_continue
2746 rather than a plain gimple.
2747 (gimple_omp_continue_set_control_def): Likewise.
2748 (gimple_omp_continue_control_use_ptr): Likewise.
2749 (gimple_omp_continue_set_control_use): Likewise.
2751 * gimple-pretty-print.c (dump_gimple_omp_continue): Require a
2752 gimple_omp_continue rather than a plain gimple.
2753 (pp_gimple_stmt_1): Add a checked cast to gimple_omp_continue
2754 within GIMPLE_OMP_CONTINUE case of switch statement.
2756 * gimple-walk.c (walk_gimple_op): Likewise, adding a new local.
2758 * gimple.c (gimple_build_omp_continue): Return a
2759 gimple_omp_continue rather than a plain gimple.
2761 * omp-low.c (gimple_build_cond_empty): Return a gimple_cond
2762 rather than a plain gimple.
2763 (expand_omp_for_generic): Split local "stmt" into "assign_stmt",
2764 "cont_stmt", "cond_stmt", "call_stmt" of types gimple_assign,
2765 gimple_omp_continue, gimple_cond, gimple_call respectively.
2766 (expand_omp_for_static_nochunk): Likewise, splitting into two
2767 "cond_stmt" decls. "assign_stmt", "cont_stmt"
2768 (expand_omp_for_static_chunk): Likewise, splitting into
2769 "cond_stmt", "assign_stmt", "cont_stmt".
2770 (expand_omp_sections): Strengthen local "cont" from gimple to
2771 gimple_omp_continue.
2773 2014-10-24 David Malcolm <dmalcolm@redhat.com>
2775 Introduce gimple_omp_atomic_store
2777 * coretypes.h (gimple_omp_atomic_store): New typedef.
2778 (const_gimple_omp_atomic_store): New typedef.
2780 * gimple-pretty-print.c (dump_gimple_omp_atomic_store): Require
2781 a gimple_omp_atomic_store rather than a plain gimple.
2782 (pp_gimple_stmt_1): Add checked cast to gimple_omp_atomic_store
2783 within GIMPLE_OMP_ATOMIC_STORE case of switch statement.
2784 * gimple-walk.c (walk_gimple_op): Likewise.
2786 * gimple.c (gimple_build_omp_atomic_store): Return a
2787 gimple_omp_atomic_store rather than a plain gimple.
2789 * gimple.h (gimple_build_omp_atomic_store): Return a
2790 gimple_omp_atomic_store rather than a plain gimple.
2791 (gimple_omp_atomic_store_set_val): Require a gimple_omp_atomic_store
2792 rather than a plain gimple.
2793 (gimple_omp_atomic_store_val_ptr): Likewise.
2794 (gimple_omp_atomic_store_val): Require a
2795 const_gimple_omp_atomic_store rather than a plain const_gimple.
2797 * gimplify.c (gimplify_omp_atomic): Strengthen locals "loadstmt" and
2798 "storestmt" from gimple to gimple_omp_atomic_load loadstmt and
2799 gimple_omp_atomic_store storestmt respectively.
2801 * omp-low.c (expand_omp_atomic): Strengthen local "store" from
2802 gimple to gimple_omp_atomic_store.
2804 2014-10-24 David Malcolm <dmalcolm@redhat.com>
2806 Introduce gimple_omp_atomic_load
2808 * coretypes.h (gimple_omp_atomic_load): New typedef.
2809 (const_gimple_omp_atomic_load): New typedef.
2811 * gimple-pretty-print.c (dump_gimple_omp_atomic_load): Require a
2812 gimple_omp_atomic_load rather than a plain gimple.
2813 (pp_gimple_stmt_1): Add a checked cast to gimple_omp_atomic_load
2814 within GIMPLE_OMP_ATOMIC_LOAD case of switch statement.
2816 * gimple-walk.c (walk_gimple_op): Likewise, introducing a new local.
2818 * gimple.c (gimple_build_omp_atomic_load): Return a
2819 gimple_omp_atomic_load rather than a plain gimple.
2821 * gimple.h (gimple_build_omp_atomic_load): Return a
2822 gimple_omp_atomic_load rather than a plain gimple.
2823 (gimple_omp_atomic_load_set_lhs): Require a
2824 gimple_omp_atomic_load rather than a plain gimple.
2825 (gimple_omp_atomic_load_lhs_ptr): Likewise.
2826 (gimple_omp_atomic_load_set_rhs): Likewise.
2827 (gimple_omp_atomic_load_rhs_ptr): Likewise.
2828 (gimple_omp_atomic_load_lhs): Require a
2829 const_gimple_omp_atomic_load rather than a plain const_gimple.
2830 (gimple_omp_atomic_load_rhs): Likewise.
2832 * gimplify-me.c (gimple_regimplify_operands): Add a checked cast
2833 to gimple_omp_atomic_load within GIMPLE_OMP_ATOMIC_LOAD case of
2836 * omp-low.c (expand_omp_atomic): Strengthen type of local "load"
2837 from gimple to gimple_omp_atomic_load.
2838 (lower_omp_1): Add a checked cast to gimple_omp_atomic_load within
2839 GIMPLE_OMP_ATOMIC_LOAD case of switch statement.
2841 2014-10-24 David Malcolm <dmalcolm@redhat.com>
2843 Use more concrete types for various gimple statements
2845 * cgraphunit.c (thunk_adjust): Strengthen local "stmt" from gimple
2848 * gimple-ssa-isolate-paths.c
2849 (insert_trap_and_remove_trailing_statements): Strengthen local
2850 "new_stmt" from gimple to gimple_call.
2852 * gimple-ssa-strength-reduction.c (replace_mult_candidate):
2853 Strengthen local "copy_stmt" from gimple to gimple_assign.
2854 (create_add_on_incoming_edge): Likewise, for "new_stmt".
2855 (insert_initializers): Likewise, for "init_stmt".
2856 (introduce_cast_before_cand): Likewise, for "cast_stmt".
2857 (replace_one_candidate): Likewise, for "copy_stmt" and
2860 * gimplify.c (build_stack_save_restore): Require gimple_calls
2861 rather than plain gimples.
2862 (gimplify_bind_expr): Strengthen locals "stack_save" and
2863 "stack_restore" from gimple to gimple_call. Strengthen "gs"
2865 (gimplify_switch_expr): Strengthen local "gimple_switch" from
2866 gimple to gimple_switch, and "new_default" to gimple_label.
2867 (gimplify_cond_expr): Strengthen local "gimple_cond" from gimple
2869 (gimplify_init_constructor): Strengthen local "init" from gimple
2871 (gimplify_cleanup_point_expr): Strengthen local "gtry" from gimple
2873 (gimple_push_cleanup): Strengthen locals "ffalse" and "ftrue" from
2874 gimple to gimple_assign.
2876 * tree-eh.c (do_goto_redirection): Strengthen local to gimple_goto.
2877 (emit_post_landing_pad): Strengthen local to gimple_label.
2879 * tree-outof-ssa.c (insert_backedge_copies): Strengthen local
2880 "stmt" from gimple to gimple_assign.
2882 * tree-parloops.c (take_address_of): Likewise.
2884 * tree-predcom.c (replace_ref_with): Likewise, for "new_stmt".
2885 (initialize_root_vars_lm): Likewise, for "init_stmt".
2886 (reassociate_to_the_same_stmt): Likewise, for "new_stmt" and "tmp_stmt".
2888 * tree-profile.c (gimple_gen_edge_profiler): Likewise, for "stmt1",
2890 (gimple_gen_ic_profiler): Likewise.
2891 (gimple_gen_ic_func_profiler): Strengthen local "stmt1" from
2892 gimple to gimple_call, and "stmt2" to gimple_assign.
2894 * tree-scalar-evolution.c (scev_const_prop): Strengthen local
2895 "ass" from gimple to gimple_assign.
2897 * tree-sra.c (build_ref_for_offset): Likewise for "stmt".
2898 (generate_subtree_copies): Likewise; also strengthen "ds" to
2900 (init_subtree_with_zero): Likewise.
2901 (sra_modify_expr): Likewise.
2902 (load_assign_lhs_subreplacements): Likewise.
2903 (sra_modify_assign): Strengthen "ds" to gimple_debug.
2904 (sra_ipa_reset_debug_stmts): Likewise for "def_temp".
2906 * tree-ssa-ccp.c (insert_clobber_before_stack_restore):
2907 Strengthen local "clobber_stmt" from gimple to gimple_assign.
2909 * tree-ssa-dce.c (remove_dead_stmt): Strengthen "note" to
2912 * tree-ssa-dom.c (record_equivalences_from_stmt): Strengthen
2913 local "new_stmt" from gimple to gimple_assign.
2914 (optimize_stmt): Likewise.
2916 * tree-ssa-forwprop.c (simplify_bitwise_binary): Likewise for
2917 4 declarations of "newop".
2918 (simplify_rotate): Likewise for "g".
2920 * tree-ssa-loop-im.c (rewrite_reciprocal): Likewise for 3 locals.
2921 (rewrite_bittest): Likewise for "stmt" and "stmt2".
2922 (move_computations_dom_walker::before_dom_children): Likewise for
2924 (execute_sm): Likewise for "load" and "store".
2926 * tree-ssa-loop-ivcanon.c (remove_exits_and_undefined_stmts):
2927 Strengthen local "stmt" from gimple to gimple_call.
2928 (unloop_loops): Likewise.
2930 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Strengthen
2931 local "ass" from gimple to gimple_assign.
2932 (remove_unused_ivs): Strengthen "def_temp" to gimple_debug.
2934 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Strengthen local "stmt"
2935 from gimple to gimple_assign.
2937 * tree-ssa-loop-prefetch.c (issue_prefetch_ref): Strengthen local
2938 "prefetch" from gimple to gimple_call.
2940 * tree-ssa-math-opts.c (insert_reciprocals): Strengthen local
2941 "new_stmt" from gimple to gimple_assign.
2942 (powi_as_mults_1): Likewise for "mult_stmt".
2943 (powi_as_mults): Likewise for "div_stmt".
2944 (build_and_insert_binop): Likewise for "stmt".
2945 (build_and_insert_cast): Likewise.
2946 (pass_cse_sincos::execute): Likewise for "stmt" and various decls
2948 (convert_mult_to_fma): Likewise for "fma_stmt".
2950 * tree-ssa-phiopt.c (conditional_replacement): Likewise for "new_stmt".
2951 (abs_replacement): Likewise.
2953 * tree-ssa-phiprop.c (phiprop_insert_phi): Likewise for "tmp".
2955 * tree-ssa-pre.c (create_expression_by_pieces): Likewise for "newstmt".
2956 (eliminate_insert): Likewise for "tem".
2958 * tree-ssa-propagate.c (update_gimple_call): Strengthen locals
2959 "new_stmt" and "stmt" from gimple to gimple_call.
2960 (update_call_from_tree): Likewise for "new_stmt".
2962 * tree-ssa-reassoc.c (build_and_add_sum): Likewise for "sum".
2963 (update_ops): Likewise for "g".
2964 (maybe_optimize_range_tests): Likewise.
2965 (rewrite_expr_tree_parallel): Require a gimple_assign rather than
2967 (reassociate_bb): Add a checked cast to gimple_assign.
2969 * tree-ssa.c (insert_debug_temp_for_var_def): Strengthen local
2970 "def_temp" from gimple to gimple_debug.
2972 * tree-switch-conversion.c (emit_case_bit_tests): Strengthen local
2973 "shift_stmt" from gimple to gimple_assign.
2975 * tree-tailcall.c (adjust_return_value_with_ops): Likewise for
2977 (update_accumulator_with_ops): Likewise.
2979 * tree-vect-data-refs.c (bump_vector_ptr): Likewise for
2982 * tree-vect-stmts.c (vectorizable_condition): Likewise for
2985 * tree-vrp.c (build_assert_expr_for): Likewise for "assertion".
2986 (simplify_truth_ops_using_ranges): Likewise for "newop".
2987 (simplify_float_conversion_using_ranges): Likewise for "conv".
2989 * ubsan.c (instrument_mem_ref): Strengthen local "g" from gimple
2992 * value-prof.c (gimple_divmod_fixed_value): Require a
2993 gimple_assign rather than a plain gimple; strengthen types of locals.
2994 (gimple_mod_pow2): Likewise.
2995 (gimple_mod_subtract): Likewise.
2996 (gimple_divmod_fixed_value_transform): Strengthen local
2997 "stmt" from gimple to gimple_assign.
2998 (gimple_mod_pow2_value_transform): Likewise.
2999 (gimple_mod_subtract_transform): Likewise.
3000 (gimple_ic): Strengthen types of locals.
3002 2014-10-24 David Malcolm <dmalcolm@redhat.com>
3004 Introduce gimple_try
3006 * coretypes.h (gimple_try): New typedef.
3007 (const_gimple_try): New typedef.
3009 * gimple-low.c (gimple_try_catch_may_fallthru): Require a
3010 gimple_try rather than a plain gimple.
3011 (gimple_stmt_may_fallthru): Add checked cast to gimple_try.
3013 * gimple-pretty-print.c (dump_gimple_try): Require a gimple_try
3014 rather than a plain gimple.
3015 (pp_gimple_stmt_1): Add checked cast to gimple_try within
3016 GIMPLE_TRY case of switch statement.
3018 * tree-eh.c (finally_tree_node::parent): Strengthen field from
3019 gimple to gimple_try.
3020 (record_in_finally_tree): Require a gimple_try rather than a plain
3022 (collect_finally_tree): Likewise.
3023 (collect_finally_tree_1): Likewise.
3024 (struct leh_tf_state::try_finally_expr): Strengthen field from
3025 gimple to gimple_try.
3026 (struct leh_tf_state::top_p): Likewise.
3027 (lower_eh_must_not_throw): Require a gimple_try rather than a
3029 (frob_into_branch_around): Likewise.
3030 (lower_try_finally_dup_block): Strengthen local from gimple to
3032 (honor_protect_cleanup_actions): Split out uses of "x" into new
3033 locals "eh_mnt" and "try_stmt" with stronger types.
3034 (lower_try_finally): Require a gimple_try rather than a plain
3036 (lower_catch): Likewise.
3037 (lower_eh_filter): Likewise.
3038 (lower_eh_must_not_throw): Likewise.
3039 (lower_cleanup): Likewise.
3040 (lower_eh_constructs_2): Add checked cast to gimple_try within
3041 GIMPLE_TRY case of switch statement, introducing new local
3042 "try_stmt", using it for type-safety.
3044 2014-10-24 David Malcolm <dmalcolm@redhat.com>
3046 Use subclasses of gimple in various places
3048 * asan.c (insert_if_then_before_iter): Require a gimple cond
3049 rathern than a plain gimple.
3050 (asan_expand_check_ifn): Add a checked cast to gimple_cond.
3052 * cfgloopmanip.c (create_empty_if_region_on_edge): Likewise.
3054 * omp-low.c (simd_clone_adjust): Strengthen local from gimple
3057 * sese.c (set_ifsese_condition): Strengthen local from gimple to
3060 * tree-call-cdce.c (gen_one_condition): Strengthen locals from
3061 gimple to gimple_assign and gimple_cond.
3063 * tree-ssa-phiopt.c (minmax_replacement): Likewise.
3064 (cond_store_replacement): Strengthen locals from gimple to
3065 gimple_phi and gimple_assign.
3066 (cond_if_else_store_replacement_1): Likewise.
3068 * tree-ssa-pre.c (do_regular_insertion): Strengthen local from
3069 gimple to gimple_assign.
3071 * tree-switch-conversion.c (hoist_edge_and_branch_if_true):
3072 Strengthen local from gimple to gimple_cond.
3073 (gen_def_assigns): Return a gimple_assign rather than a plain
3075 (gen_inbound_check): Strengthen locals from gimple to gimple_cond
3078 * tree-vect-loop-manip.c (slpeel_add_loop_guard): Strengthen local
3079 from gimple to gimple_cond.
3080 (set_prologue_iterations): Strengthen locals from gimple to
3081 gimple_phi and gimple_cond.
3083 * value-prof.c (gimple_ic): Strengthen local from gimple to
3085 (gimple_stringop_fixed_value): Strengthen locals from gimple to
3086 gimple_assign, gimple_cond, gimple_call, and gimple_phi.
3088 2014-10-24 David Malcolm <dmalcolm@redhat.com>
3090 Introduce gimple_eh_dispatch
3092 * coretypes.h (gimple_eh_dispatch): New typedef.
3093 (const_gimple_eh_dispatch): New typedef.
3095 * gimple-pretty-print.c (dump_gimple_eh_dispatch): Require a
3096 gimple_eh_dispatch rather than a plain gimple.
3097 (pp_gimple_stmt_1): Add a checked cast to gimple_eh_dispatch
3098 within GIMPLE_EH_DISPATCH case of switch statement.
3100 * gimple-streamer-in.c (input_gimple_stmt): Likewise.
3102 * gimple-streamer-out.c (output_gimple_stmt): Likewise.
3104 * gimple.c (gimple_build_eh_dispatch): Return a gimple_eh_dispatch
3105 rather than a plain gimple.
3107 * gimple.h (gimple_build_eh_dispatch): Return a gimple_eh_dispatch
3108 rather than a plain gimple.
3109 (gimple_eh_dispatch_region): Require a const_gimple_eh_dispatch
3110 rather than a plain const_gimple.
3111 (gimple_eh_dispatch_set_region): Require a gimple_eh_dispatch
3112 rather than a plain gimple.
3114 * tree-cfg.c (make_edges): Add a checked cast to gimple_eh_dispatch
3115 within GIMPLE_EH_DISPATCH case of switch statement.
3116 (gimple_verify_flow_info): Likewise.
3117 (gimple_redirect_edge_and_branch): Likewise.
3118 (move_stmt_r): Likewise, adding a local.
3120 * tree-eh.c (emit_eh_dispatch): Convert local from gimple to
3122 (make_eh_dispatch_edges): Require a gimple_eh_dispatch rather than
3124 (redirect_eh_dispatch_edge): Likewise.
3125 (lower_eh_dispatch): Likewise.
3126 (execute_lower_eh_dispatch): Add a checked cast to
3128 (mark_reachable_handlers): Likewise.
3129 (verify_eh_dispatch_edge): Require a gimple_eh_dispatch rather
3130 than a plain gimple.
3132 * tree-eh.h (make_eh_dispatch_edges): Likewise.
3133 (redirect_eh_dispatch_edge): Likewise.
3134 (verify_eh_dispatch_edge): Likewise.
3136 * tree-inline.c (remap_gimple_stmt): Add a checked cast to
3137 gimple_eh_dispatch within GIMPLE_EH_DISPATCH case of switch
3138 statement, adding a local.
3139 (copy_edges_for_bb): Add a checked cast to gimple_eh_dispatch.
3141 2014-10-24 David Malcolm <dmalcolm@redhat.com>
3143 Introduce gimple_resx
3145 * coretypes.h (gimple_resx): New typedef.
3146 (const_gimple_resx): New typedef.
3148 * gimple.h (gimple_build_resx): Return a gimple_resx rather than a
3150 (gimple_resx_region): Require a const_gimple_resx rather than a
3152 (gimple_resx_set_region): Require a gimple_resx rather than a
3155 * gimple-pretty-print.c (dump_gimple_resx): Require a gimple_resx
3156 rather than a plain gimple.
3157 (pp_gimple_stmt_1): Add a checked cast to gimple_resx within
3158 GIMPLE_RESX case of switch statement.
3160 * gimple-streamer-in.c (input_gimple_stmt): Likewise.
3162 * gimple-streamer-out.c (output_gimple_stmt): Likewise.
3164 * gimple.c (gimple_build_resx): Return a gimple_resx rather than
3167 * tree-cfg.c (move_stmt_r): Add a checked cast to gimple_resx
3168 within GIMPLE_RESX case of switch statement, adding a new local.
3170 * tree-eh.c (emit_resx): Convert local "x" from gimple to
3172 (lower_resx): Require a gimple_resx rather than a plain gimple.
3173 (pass_lower_resx::execute): Add a checked cast to gimple_resx.
3174 (mark_reachable_handlers): Likewise.
3176 * tree-inline.c (remap_gimple_stmt): Add a checked cast to
3177 gimple_resx within GIMPLE_RESX case of switch statement, adding
3180 2014-10-24 David Malcolm <dmalcolm@redhat.com>
3182 Introduce gimple_eh_else
3184 * coretypes.h (gimple_eh_else): New typedef.
3185 (const_gimple_eh_else): New typedef.
3187 * gimple.h (gimple_build_eh_else): Return a gimple_eh_else rather
3188 than a plain gimple.
3189 (gimple_eh_else_n_body_ptr): Require a gimple_eh_else rather than
3191 (gimple_eh_else_n_body): Likewise.
3192 (gimple_eh_else_e_body_ptr): Likewise.
3193 (gimple_eh_else_e_body): Likewise.
3194 (gimple_eh_else_set_n_body): Likewise.
3195 (gimple_eh_else_set_e_body): Likewise.
3197 * gimple-low.c (lower_stmt): Add checked cast to gimple_eh_else
3198 within GIMPLE_EH_ELSE case of switch statement, introducing a new
3200 (gimple_stmt_may_fallthru): Likewise.
3202 * gimple-pretty-print.c (dump_gimple_eh_else): Require a
3203 gimple_eh_else rather than a plain gimple.
3204 (pp_gimple_stmt_1): Add checked cast to gimple_eh_else within
3205 GIMPLE_EH_ELSE case of switch statement
3207 * gimple-walk.c (walk_gimple_stmt): Add checked cast to
3208 gimple_eh_else within GIMPLE_EH_ELSE case of switch statement,
3209 introducing a new local.
3211 * gimple.c (gimple_build_eh_else): Return a gimple_eh_else
3212 rather than a plain gimple.
3213 (gimple_copy): Add checked casts to gimple_eh_else within
3214 GIMPLE_EH_ELSE case of switch statement, introducing new locals.
3216 * tree-cfg.c (verify_gimple_in_seq_2): Add checked cast to
3217 gimple_eh_else within GIMPLE_EH_ELSE case of switch statement,
3218 introducing a new local.
3220 * tree-eh.c (collect_finally_tree): Likewise.
3221 (replace_goto_queue_1): Likewise.
3222 (get_eh_else): Return a gimple_eh_else rather than a plain gimple.
3223 (honor_protect_cleanup_actions): Convert local "eh_else" from
3224 gimple to gimple_eh_else.
3225 (lower_try_finally_nofallthru): Likewise.
3226 (lower_try_finally_onedest): Introduce locals "eh_else" and
3227 "label_stmt", using them in favor of "x" for the gimple_eh_else
3228 and the gimple_label.
3229 (lower_try_finally_copy): Convert local "eh_else" from gimple to
3231 (lower_try_finally_switch): Likewise.
3232 (decide_copy_try_finally): Likewise.
3233 (refactor_eh_r): Add checked cast to gimple_eh_else within
3234 GIMPLE_EH_ELSE case of switch statement, introducing a new local.
3236 2014-10-24 David Malcolm <dmalcolm@redhat.com>
3238 Introduce gimple_eh_must_not_throw
3240 * coretypes.h (gimple_eh_must_not_throw): New typedef.
3241 (const_gimple_eh_must_not_throw): New typedef.
3243 * gimple-pretty-print.c (dump_gimple_eh_must_not_throw): Require
3244 a gimple_eh_must_not_throw rather than a plain gimple.
3245 (pp_gimple_stmt_1): Add a checked cast to gimple_eh_must_not_throw
3246 within GIMPLE_EH_MUST_NOT_THROW case of switch statement.
3248 * gimple-streamer-in.c (input_gimple_stmt): Likewise.
3250 * gimple-streamer-out.c (output_gimple_stmt): Likewise.
3252 * gimple.c (gimple_build_eh_must_not_throw): Return a
3253 gimple_eh_must_not_throw rather than a plain gimple.
3255 * gimple.h (gimple_build_eh_must_not_throw): Return a
3256 gimple_eh_must_not_throw rather than a plain gimple.
3257 (gimple_eh_must_not_throw_fndecl): Require a
3258 gimple_eh_must_not_throw rather than a plain gimple.
3259 (gimple_eh_must_not_throw_set_fndecl): Likewise.
3261 * tree-eh.c (lower_eh_must_not_throw): Add checked cast.
3263 2014-10-24 David Malcolm <dmalcolm@redhat.com>
3265 Introduce gimple_eh_filter
3267 * coretypes.h (gimple_eh_filter): New typedef.
3268 (const_gimple_eh_filter): New typedef.
3270 * gimple.h (gimple_build_eh_filter): Return a gimple_eh_filter
3271 rather than a plain gimple.
3273 * gimple-pretty-print.c (dump_gimple_eh_filter): Require a
3274 gimple_eh_filter rather than a plain gimple.
3275 (pp_gimple_stmt_1): Add checked cast to gimple_eh_filter within
3276 GIMPLE_EH_FILTER case of switch statement.
3278 * gimple.c (gimple_build_eh_filter): Return a gimple_eh_filter
3279 rather than a plain gimple.
3281 2014-10-24 David Malcolm <dmalcolm@redhat.com>
3283 Introduce gimple_catch
3285 * coretypes.h (gimple_catch): New typedef.
3286 (const_gimple_catch): New typedef.
3288 * gimple-low.c (lower_try_catch): Add checked cast to gimple_catch.
3289 (gimple_try_catch_may_fallthru): Likewise.
3291 * gimple-pretty-print.c (dump_gimple_catch): Require a gimple_catch
3292 rather than a plain gimple.
3293 (pp_gimple_stmt_1): Add checked cast to gimple_catch within
3294 GIMPLE_CATCH case of switch statement.
3296 * gimple-walk.c (walk_gimple_op): Likewise.
3297 (walk_gimple_stmt): Likewise.
3299 * gimple.c (gimple_build_catch): Return a gimple_catch rather than
3301 (gimple_copy): Add checked casts to gimple_catch within
3302 GIMPLE_CATCH case of switch statement, introducing new locals.
3304 * gimple.h (gimple_build_catch): Return a gimple_catch rather than
3306 (gimple_catch_types_ptr): Require a gimple_catch rather than a
3308 (gimple_catch_handler_ptr): Likewise.
3309 (gimple_catch_handler): Likewise.
3310 (gimple_catch_set_types): Likewise.
3311 (gimple_catch_set_handler): Likewise.
3313 * omp-low.c (lower_omp_1): Add checked cast to gimple_catch within
3314 GIMPLE_CATCH case of switch statement.
3316 * tree-cfg.c (verify_gimple_in_seq_2): Likewise.
3317 (do_warn_unused_result): Likewise.
3319 * tree-eh.c (collect_finally_tree): Likewise.
3320 (replace_goto_queue_1): Likewise.
3321 (lower_catch): Convert local from gimple to gimple_catch.
3322 (refactor_eh_r): Add checked cast to gimple_catch within
3323 GIMPLE_CATCH case of switch statement.
3325 * tree-inline.c (remap_gimple_stmt): Likewise.
3326 (estimate_num_insns): Add checked cast to gimple_catch within
3327 GIMPLE_CATCH case of switch statement, introducing new local.
3329 2014-10-24 David Malcolm <dmalcolm@redhat.com>
3331 Introduce gimple_transaction
3333 * coretypes.h (gimple_transaction): New typedef.
3334 (const_gimple_transaction): New typedef.
3336 * gimple.h (gimple_build_transaction): Return a gimple_transaction
3337 rather than a plain gimple.
3338 (gimple_transaction_body_ptr): Require a gimple_transaction rather
3339 than a plain gimple.
3340 (gimple_transaction_body): Likewise.
3341 (gimple_transaction_label_ptr): Likewise.
3342 (gimple_transaction_set_body): Likewise.
3343 (gimple_transaction_set_label): Likewise.
3344 (gimple_transaction_set_subcode): Likewise.
3345 (gimple_transaction_label): Require a const_gimple_transaction
3346 rather than a plain const_gimple.
3347 (gimple_transaction_subcode): Likewise.
3349 * gimple-low.c (lower_stmt): Add checked cast to
3350 gimple_transaction within GIMPLE_TRANSACTION case of switch
3353 * gimple-pretty-print.c (dump_gimple_transaction): Require a
3354 gimple_transaction rather than a plain gimple.
3355 (pp_gimple_stmt_1): Add checked cast to gimple_transaction within
3356 GIMPLE_TRANSACTION case of switch statement.
3357 * gimple-streamer-in.c (input_gimple_stmt): Likewise.
3358 * gimple-streamer-out.c (output_gimple_stmt): Likewise.
3359 * gimple-walk.c (walk_gimple_op): Likewise.
3360 (walk_gimple_stmt): Likewise.
3362 * gimple.c (gimple_build_transaction): Return a gimple_transaction
3363 rather than a plain gimple.
3364 (gimple_copy): Add checked casts to gimple_transaction within
3365 GIMPLE_TRANSACTION case of switch statement.
3367 * gimplify.c (gimplify_transaction): Split local "g" into
3368 "body_stmt" and "trans_stmt", strengthening the type of the latter
3369 from gimple to gimple_transaction.
3371 * omp-low.c (lower_omp_1): Add checked cast to gimple_transaction
3372 within GIMPLE_TRANSACTION case of switch statement.
3374 * trans-mem.c (diagnose_tm_1): Add checked cast within
3375 GIMPLE_TRANSACTION case of switch statement, introducing a new
3376 local "trans_stmt". Use it in place of "stmt".
3377 (examine_call_tm): Convert local from gimple to gimple_transaction.
3378 (tm_region::get_transaction_stmt): New method.
3379 (tm_region::transaction_stmt): Add clarification of type to the
3381 (tm_region_init_0): Require a gimple_transaction rather than a
3383 (tm_region_init): Convert a check against GIMPLE_TRANSACTION to a
3384 dyn_cast<gimple_transaction> and new local.
3385 (transaction_subcode_ior): Add a new local, using the new
3386 get_transaction_stmt method to perform a checked cast.
3387 (propagate_tm_flags_out): Likewise.
3388 (expand_transaction): Add a checked cast using the new
3389 get_transaction_stmt method.
3390 (generate_tm_state): Likewise.
3391 (execute_tm_mark): Likewise.
3392 (ipa_tm_diagnose_transaction): Likewise.
3394 * tree-cfg.c (verify_gimple_transaction): Require a
3395 gimple_transaction rather than a plain gimple.
3396 (make_edges): Add checked cast within GIMPLE_TRANSACTION case of
3398 (cleanup_dead_labels): Likewise.
3399 (verify_gimple_stmt): Likewise.
3400 (verify_gimple_in_seq_2): Likewise.
3401 (verify_gimple_in_seq_2): Likewise.
3402 (gimple_redirect_edge_and_branch): Add checked cast.
3404 * tree-inline.c (remap_gimple_stmt): Add checked cast within
3405 GIMPLE_TRANSACTION case of switch statement, introducing a new
3406 local "old_trans_stmt". Use it in place of "stmt". Add new
3407 local "new_trans_stmt", using it to initialize "copy", and for
3408 type-safe operations as a transaction.
3409 (estimate_num_insns): Add checked cast within GIMPLE_TRANSACTION
3410 case of switch statement.
3412 2014-10-24 David Malcolm <dmalcolm@redhat.com>
3414 Introduce gimple_asm
3416 * coretypes.h (gimple_asm): New typedef.
3417 (const_gimple_asm): New typedef.
3419 * gimple.h (gimple_build_asm_vec): Return a gimple_asm rather than
3421 (gimple_asm_clobbers_memory_p): Require a const_gimple_asm rather
3422 than just a const_gimple.
3423 (gimple_asm_ninputs): Likewise.
3424 (gimple_asm_noutputs): Likewise.
3425 (gimple_asm_nclobbers): Likewise.
3426 (gimple_asm_nlabels): Likewise.
3427 (gimple_asm_input_op): Likewise.
3428 (gimple_asm_input_op_ptr): Likewise.
3429 (gimple_asm_output_op): Likewise.
3430 (gimple_asm_output_op_ptr): Likewise.
3431 (gimple_asm_clobber_op): Likewise.
3432 (gimple_asm_label_op): Likewise.
3433 (gimple_asm_string): Likewise.
3434 (gimple_asm_volatile_p): Likewise.
3435 (gimple_asm_input_p): Likewise.
3436 (gimple_asm_set_input_op): Require a gimple_asm rather than a plain
3438 (gimple_asm_set_output_op): Likewise.
3439 (gimple_asm_set_clobber_op): Likewise.
3440 (gimple_asm_set_label_op): Likewise.
3441 (gimple_asm_set_volatile): Likewise.
3442 (gimple_asm_set_input): Likewise.
3444 * cfgexpand.c (expand_asm_stmt): Require a gimple_asm rather than
3446 (expand_gimple_stmt_1): Add checked cast to gimple_asm within
3447 GIMPLE_ASM case of switch statement.
3449 * gimple-fold.c (fold_stmt_1): Add new local from checked cast to
3450 gimple_asm within case GIMPLE_ASM.
3452 * gimple-pretty-print.c (dump_gimple_asm): Require a gimple_asm
3453 rather than a plain gimple.
3454 (pp_gimple_stmt_1): Add checked cast to gimple_asm within
3455 GIMPLE_ASM case of switch statement.
3457 * gimple-streamer-in.c (input_gimple_stmt): Rework existing
3458 checked cast to gimple_asm; add a new one.
3460 * gimple-streamer-out.c (output_gimple_stmt): Add new local from
3461 checked cast to gimple_asm within case GIMPLE_ASM.
3463 * gimple-walk.c (walk_gimple_asm): Require a gimple_asm rather
3464 than a plain gimple.
3465 (walk_gimple_op): Add checked cast to gimple_asm within GIMPLE_ASM
3466 case of switch statement.
3467 (walk_stmt_load_store_addr_ops): Use dyn_cast<gimple_asm> in place
3468 of a code check against GIMPLE_ASM to introduce a new gimple_asm
3471 * gimple.c (gimple_build_asm_1): Return a gimple_asm rather than
3473 (gimple_build_asm_vec): Likewise.
3474 (gimple_has_side_effects): Add a checked cast to gimple_asm.
3475 (gimple_could_trap_p_1): Likewise.
3476 (gimple_call_builtin_p): Require a const_gimple_asm rather then
3479 * gimplify-me.c (gimple_regimplify_operands): Add a checked cast
3480 and a new local of type gimple_asm within GIMPLE_ASM case.
3482 * gimplify.c (gimplify_asm_expr): Convert a local from gimple to
3485 * ipa-pure-const.c (check_stmt): Add checked casts within
3488 * ssa-iterators.h (op_iter_init): Likewise.
3490 * tree-cfg.c (make_goto_expr_edges): Convert a local from gimple
3492 (cleanup_dead_labels): Add a checked cast and a new local of type
3493 gimple_asm within GIMPLE_ASM case.
3494 (gimple_redirect_edge_and_branch): Likewise.
3495 (is_ctrl_altering_stmt): Add a checked cast.
3496 (need_fake_edge_p): Replace a code check against GIMPLE_ASM with a
3497 dyn_cast<gimple_asm>.
3499 * tree-complex.c (expand_complex_comparison): Convert a local from
3500 gimple to gimple_asm.
3502 * tree-data-ref.c (get_references_in_stmt): Add a checked cast to
3505 * tree-eh.c (stmt_could_throw_p): Likewise.
3507 * tree-inline.c (estimate_num_insns): Likewise.
3509 * tree-sra.c (scan_function): Add a checked cast and a new local
3510 of type gimple_asm within GIMPLE_ASM case.
3511 (sra_modify_function_body): Likewise.
3512 (ipa_sra_modify_function_body): Likewise.
3514 * tree-ssa-coalesce.c (create_outofssa_var_map): Likewise.
3516 * tree-ssa-dce.c (propagate_necessity): Replace a code check
3517 against GIMPLE_ASM with a dyn_cast<gimple_asm>.
3519 * tree-ssa-operands.c (maybe_add_call_vops): Require a gimple_asm
3520 rather than a plain gimple.
3521 (parse_ssa_operands): Add a checked cast to gimple_asm.
3523 * tree-ssa-structalias.c (find_func_aliases): Replace a check for
3524 GIMPLE_ASM with a dyn_cast<gimple_asm>, introducing a new local
3525 "asm_stmt", using it in place of "t" for typesafety.
3527 * tree-ssa-threadedge.c
3528 (record_temporary_equivalences_from_stmts_at_dest): Add a checked
3531 * tree-ssa.c (execute_update_addresses_taken): Add checked casts
3532 and new locals of type gimple_asm within clauses guarded by code
3535 2014-10-24 David Malcolm <dmalcolm@redhat.com>
3537 Introduce gimple_goto
3539 * coretypes.h (gimple_goto): New typedef.
3540 (const_gimple_goto): New typedef.
3542 * gimple.h (gimple_statement_goto): New subclass of
3543 gimple_statement_with_ops, adding the invariant that
3544 stmt->code == GIMPLE_GOTO.
3545 (is_a_helper <gimple_statement_goto>::test): New.
3546 (gimple_build_goto): Return a gimple_goto rather than a
3549 * gimple-pretty-print.c (dump_gimple_goto): Require a gimple_goto
3550 rather than a plain gimple.
3551 (pp_gimple_stmt_1): Add a checked cast to gimple_goto within
3552 GIMPLE_GOTO case of switch statement.
3554 * gimple.c (gimple_build_goto): Return a gimple_goto rather than a
3557 * tree-cfg.c (verify_gimple_goto): Require a gimple_goto rather
3558 than a plain gimple.
3559 (verify_gimple_stmt): Add a checked cast to gimple_goto within
3560 GIMPLE_GOTO case of switch statement.
3562 2014-10-24 David Malcolm <dmalcolm@redhat.com>
3564 Introduce gimple_return
3566 * coretypes.h (gimple_return): New typedef.
3567 (const_gimple_return): New typedef.
3569 * gimple.h (gimple_statement_return): New subclass of
3570 gimple_statement_with_memory_ops, adding the invariant that
3571 stmt->code == GIMPLE_RETURN.
3572 (is_a_helper <gimple_statement_return>::test): New.
3573 (gimple_build_return): Return a gimple_return rather
3574 than a plain gimple.
3576 * gimple.c (gimple_build_return): Return a gimple_return rather
3577 than a plain gimple.
3579 * cgraphunit.c (expand_thunk): Convert local from a gimple to
3582 * gimple-low.c (struct return_statements_t): Convert field "stmt"
3583 from a gimple to a gimple_return.
3584 (lower_gimple_return): Convert local from a gimple to a
3587 * gimple-pretty-print.c (dump_gimple_return): Require a
3588 gimple_return rather than a plain gimple.
3589 (pp_gimple_stmt_1): Add a checked cast to gimple_return within
3590 case GIMPLE_RETURN of switch statement.
3592 * gimplify.c (gimplify_return_expr): Convert locals from
3593 gimple to gimple_return.
3595 * ipa-split.c (split_function): Likewise.
3597 * tree-cfg.c (verify_gimple_assign): Require a gimple_return
3598 rather than a plain gimple.
3599 (verify_gimple_stmt): Add checked cast to gimple_return within
3600 case GIMPLE_RETURN of switch statement.
3602 * tree-tailcall.c (adjust_return_value): Convert local from
3603 gimple to gimple_return.
3605 2014-10-24 David Malcolm <dmalcolm@redhat.com>
3607 Introduce gimple_call
3609 * coretypes.h (gimple_call): New typedef.
3610 (const_gimple_call): New typedef.
3612 * asan.c (get_mem_refs_of_builtin_call): Require a
3613 const_gimple_call rather than a const gimple.
3614 (has_stmt_been_instrumented_p): Add a checked cast to
3616 (instrument_strlen_call): Likewise.
3617 (instrument_builtin_call): Likewise.
3618 * builtins.c (validate_gimple_arglist): Require a
3619 const_gimple_call rather than a const gimple.
3620 (fold_call_stmt): Require a gimple_call rather than a gimple.
3621 * builtins.h (validate_gimple_arglist): Require a
3622 const_gimple_call rather than a const gimple.
3623 (fold_call_stmt): Require a gimple_call rather than a gimple.
3624 * cfgexpand.c (expand_call_stmt): Likewise.
3625 (expand_gimple_stmt_1): Add a checked cast to gimple_call within
3627 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Strengthen
3628 local "new_stmt" from gimple to gimple_call, adding a checked
3630 * cgraphunit.c (cgraph_node::expand_thunk): Likewise for local
3632 * gimple-fold.c (gimple_fold_builtin_snprintf_chk): Likewise for
3634 (gimple_fold_builtin_snprintf): Likewise.
3635 (gimple_fold_builtin): Likewise.
3636 (gimple_fold_call): Likewise.
3637 (gimple_fold_stmt_to_constant_1): Introduce local "call_stmt" via
3638 checked cast of "stmt" to gimple_call, using it in various places
3640 * gimple-pretty-print.c (dump_gimple_call_args): Strengthen param
3641 2 from gimple to gimple_call.
3642 (dump_gimple_call): Likewise.
3643 (pp_gimple_stmt_1): Add a checked cast to gimple_call within
3645 * gimple-streamer-in.c (input_gimple_stmt): Replace is_gimple_call
3646 with a dyn_cast<gimple_call>, introducing local "call_stmt", and
3647 using it in place of "stmt" for typesafety. Add a checked cast
3648 in statement guarded by check for GIMPLE_CALL.
3649 * gimple-walk.c (walk_gimple_op): Add a checked cast to
3651 * gimple.c (gimple_call_reset_alias_info): Strengthen param from
3652 gimple to gimple_call.
3653 (gimple_build_call_1): Strengthen return type and local from
3654 gimple to gimple_call.
3655 (gimple_build_call_vec): Likewise.
3656 (gimple_build_call): Likewise.
3657 (gimple_build_call_valist): Likewise.
3658 (gimple_build_call_internal_1): Likewise.
3659 (gimple_build_call_internal): Likewise.
3660 (gimple_build_call_internal_vec): Likewise.
3661 (gimple_build_call_from_tree): Likewise.
3662 (gimple_call_return_flags): Strengthen param from
3663 const_gimple to const_gimple_call.
3664 (gimple_call_copy_skip_args): Strengthen return type and local from
3665 gimple to gimple_call.
3666 * gimple.h (gimple_call_reset_alias_info): Strengthen param from
3667 gimple to gimple_call.
3668 (gimple_build_call_vec): Strengthen return type from gimple to
3670 (gimple_build_call): Likewise.
3671 (gimple_build_call_valist): Likewise.
3672 (gimple_build_call_internal): Likewise.
3673 (gimple_build_call_internal_vec): Likewise.
3674 (gimple_build_call_from_tree): Likewise.
3675 (gimple_call_return_flags): Strengthen param from const_gimple to
3677 (gimple_call_copy_skip_args): Strengthen return type from gimple
3679 (gimple_call_set_internal_fn): Strengthen param "call_stmt" from
3680 gimple to gimple_call.
3681 (gimple_call_return_type): Strengthen param from const_gimple to
3683 (gimple_call_chain_ptr): Likewise.
3684 (gimple_call_set_chain): Strengthen param from gimple to
3686 (gimple_call_set_return_slot_opt): Likewise.
3687 (gimple_call_set_from_thunk): Likewise.
3688 (gimple_call_from_thunk_p): Likewise.
3689 (gimple_call_set_va_arg_pack): Likewise.
3690 (gimple_call_va_arg_pack_p): Likewise.
3691 (gimple_call_set_alloca_for_var): Likewise.
3692 (gimple_call_alloca_for_var_p): Likewise.
3693 (gimple_expr_type): Introduce local "call_stmt" via a checked cast
3694 and use it for typesafety.
3695 * gimplify.c (gimplify_call_expr): Strengthen local "call" from
3696 gimple to gimple_call.
3697 (gimplify_modify_expr_to_memcpy): Likewise for local "gs".
3698 (gimplify_modify_expr_to_memset): Likewise.
3699 (gimplify_modify_expr): Add a checked cast to gimple_call.
3700 (gimplify_expr): Strengthen local "call" from gimple to
3702 (gimplify_function_tree): Likewise.
3703 * internal-fn.c (expand_LOAD_LANES): Strengthen param from gimple
3705 (expand_STORE_LANES): Likewise.
3706 (expand_ANNOTATE): Likewise.
3707 (expand_GOMP_SIMD_LANE): Likewise.
3708 (expand_GOMP_SIMD_VF): Likewise.
3709 (expand_GOMP_SIMD_LAST_LANE): Likewise.
3710 (expand_UBSAN_NULL): Likewise.
3711 (expand_UBSAN_BOUNDS): Likewise.
3712 (expand_UBSAN_OBJECT_SIZE): Likewise.
3713 (expand_ASAN_CHECK): Likewise.
3714 (ubsan_expand_si_overflow_addsub_check): Likewise.
3715 (ubsan_expand_si_overflow_neg_check): Likewise.
3716 (ubsan_expand_si_overflow_mul_check): Likewise.
3717 (expand_UBSAN_CHECK_ADD): Likewise.
3718 (expand_UBSAN_CHECK_SUB): Likewise.
3719 (expand_UBSAN_CHECK_MUL): Likewise.
3720 (expand_LOOP_VECTORIZED): Likewise.
3721 (expand_MASK_LOAD): Likewise.
3722 (expand_MASK_STORE): Likewise.
3723 (expand_ABNORMAL_DISPATCHER): Likewise.
3724 (expand_BUILTIN_EXPECT): Likewise.
3725 (internal_fn_expanders): Likewise for entries in this table.
3726 (expand_internal_call): Likewise.
3727 * internal-fn.def: Update comment to reflect strengthening of
3729 * internal-fn.h (expand_internal_call): Strengthen param from
3730 gimple to gimple_call.
3731 * ipa-prop.c (ipa_modify_call_arguments): Likewise for local
3733 * ipa-pure-const.c (check_call): Likewise for param "call".
3734 (check_stmt): Add a checked cast to gimple_call within GIMPLE_CALL
3736 * ipa-split.c (split_function): Strengthen local "call" from
3737 gimple to gimple_call.
3738 * omp-low.c (build_omp_barrier): Likewise for local "g".
3739 (lower_rec_input_clauses): Likewise for local "stmt".
3740 * trans-mem.c (build_tm_load): Likewise for return type and local
3742 (build_tm_store): Likewise.
3743 (expand_transaction): Likewise for local "call".
3744 * tree-call-cdce.c (check_pow): Likewise for param.
3745 (check_builtin_call): Likewise.
3746 (is_call_dce_candidate): Likewise.
3747 (gen_conditions_for_pow): Likewise.
3748 (gen_shrink_wrap_conditions): Likewise.
3749 (shrink_wrap_one_built_in_call): Likewise.
3750 (shrink_wrap_conditional_dead_built_in_calls): Strengthen param
3751 from vec<gimple> to vec<gimple_call>, and local "bi_call" from
3752 gimple to gimple_call.
3753 (pass_call_cdce::execute): Strengthen local
3754 "cond_dead_built_in_calls" from auto_vec<gimple> to
3755 auto_vec<gimple_call> and local "stmt" from gimple to gimple_call,
3756 * tree-cfg.c (notice_special_calls): Strengthen param from gimple
3758 * tree-cfg.h (notice_special_calls): Likewise.
3759 * tree-complex.c (expand_complex_libcall): Likewise for local
3761 * tree-inline.c (remap_gimple_stmt): Add checked cast to
3763 (copy_bb): Likewise. Strengthen local "new_call" from gimple to
3765 (inline_forbidden_p_stmt): Add checked cast to gimple_call.
3766 * tree-nested.c (init_tmp_var_with_call): Strengthen param "call"
3767 from gimple to gimple_call.
3768 (convert_nl_goto_reference): Likewise for local "call".
3769 (convert_tramp_reference_op): Likewise.
3770 (convert_gimple_call): Add checked cast to gimple_call.
3771 * tree-nrv.c (dest_safe_for_nrv_p): Strengthen param "call" from
3772 gimple to gimple_call.
3773 (pass_return_slot::execute): Likewise for local "stmt", using a
3774 dyn_cast<gimple_call> rather than an is_gimple_call call.
3775 * tree-object-size.c (alloc_object_size): Strengthen param "call"
3776 from const_gimple to const_gimple_call.
3777 (pass_through_call): Likewise.
3778 (call_object_size): Strengthen param "call" from gimple to
3780 (collect_object_sizes_for): Introduce local "call_stmt" via a
3781 checked cast, using it for typesafety.
3782 (check_for_plus_in_loops_1): Likewise.
3783 (pass_object_sizes::execute): Add a checked cast to gimple_call.
3784 * tree-profile.c (gimple_gen_interval_profiler): Strengthen local
3785 "call" from gimple to gimple_call.
3786 (gimple_gen_pow2_profiler): Likewise.
3787 (gimple_gen_one_value_profiler): Likewise.
3788 (gimple_gen_time_profiler): Likewise.
3789 (gimple_gen_average_profiler): Likewise.
3790 (gimple_gen_ior_profiler): Likewise.
3791 * tree-ssa-alias.c (ref_maybe_used_by_call_p_1): Likewise for
3793 (ref_maybe_used_by_call_p): Likewise.
3794 (ref_maybe_used_by_stmt_p): Add a checked cast to gimple_call.
3795 (call_may_clobber_ref_p_1): Strengthen param "call" from gimple to
3797 (call_may_clobber_ref_p): Likewise.
3798 (stmt_may_clobber_ref_p_1): Add a checked cast to gimple_call.
3799 * tree-ssa-alias.h (call_may_clobber_ref_p): Strengthen param 1
3800 from gimple to gimple_call.
3801 (call_may_clobber_ref_p_1): Likewise.
3802 * tree-ssa-dce.c (eliminate_unnecessary_stmts): Add a checked cast
3804 * tree-ssa-loop-prefetch.c (emit_mfence_after_loop): Strengthen
3805 local "call" from gimple to gimple_call.
3806 * tree-ssa-math-opts.c (build_and_insert_call): Likewise for local
3808 * tree-ssa-operands.c (maybe_add_call_vops): Likewise for param
3810 (parse_ssa_operands): Add a checked cast to gimple_call within
3812 * tree-ssa-pre.c (compute_avail): Add a checked cast to
3814 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Strengthen
3815 param "call" from gimple to gimple_call.
3816 (valueize_shared_reference_ops_from_call): Likewise.
3817 (vn_reference_lookup_3): Add a checked cast to gimple_call.
3818 (vn_reference_lookup_call): Strengthen param "call" from gimple to
3820 (visit_reference_op_call): Likewise for param "stmt".
3821 (visit_use): Replace is_gimple_call with a dyn_cast, introducing
3822 local "call_stmt", using it in place of "stmt" for type-safety.
3823 * tree-ssa-sccvn.h (vn_reference_lookup_call): Strengthen param 1
3824 from gimple to gimple_call.
3825 * tree-ssa-structalias.c (get_call_vi): Likewise.
3826 (lookup_call_use_vi): Likewise.
3827 (lookup_call_clobber_vi): Likewise.
3828 (get_call_use_vi): Likewise.
3829 (get_call_clobber_vi): Likewise.
3830 (handle_rhs_call): Likewise.
3831 (handle_lhs_call): Likewise.
3832 (handle_const_call): Likewise.
3833 (handle_pure_call): Likewise.
3834 (get_fi_for_callee): Likewise.
3835 (find_func_aliases_for_builtin_call): Likewise for param 2.
3836 (find_func_aliases_for_call): Likewise.
3837 (find_func_aliases): Add a checked cast to gimple_call.
3838 (find_func_clobbers): Replace is_gimple_call with a dyn_cast,
3839 introducing local "call_stmt", using it in place of "stmt" for
3841 (compute_points_to_sets): Strengthen local "stmt" from gimple to
3842 gimple_call, replacing is_gimple_call with a
3843 dyn_cast <gimple_call>.
3844 (ipa_pta_execute): Likewise.
3845 * tree-ssa-threadedge.c
3846 (record_temporary_equivalences_from_stmts_at_dest): Add checked
3847 cast to gimple_call.
3848 * tree-tailcall.c (find_tail_calls): Strengthen local "call" from
3849 gimple to gimple_call, adding a checked cast.
3850 * tree-vect-data-refs.c (vect_setup_realignment): Eliminate
3851 top-level local "new_stmt" in favor of more tightly-scoped locals
3852 "new_stmt" of type gimple_assign and gimple_call.
3853 * tree-vect-patterns.c (vect_recog_pow_pattern): Strenghthen local
3854 "stmt" from gimple to gimple_call.
3855 * tree-vect-stmts.c (vectorizable_function): Likewise for param
3857 (vectorizable_call): Rename param 1 from "stmt" to "gs",
3858 reintroducing "stmt" as a gimple_call once we've established that
3859 we're working with a GIMPLE_CALL.
3860 * tree-vectorizer.h (vectorizable_function): Strengthen param 1
3861 from gimple to gimple_call.
3862 * value-prof.c (check_ic_target): Likewise.
3863 (gimple_ic_transform): Likewise for local "stmt", replacing a
3864 check for GIMPLE_CALL with a dyn_cast.
3865 (interesting_stringop_to_profile_p): Strengthen param "call"
3866 from gimple to gimple_call.
3867 (gimple_stringop_fixed_value): Likewise for param "vcall_stmt".
3868 (gimple_stringops_transform): Likewise for local "stmt",
3869 replacing a check for GIMPLE_CALL with a dyn_cast.
3870 (gimple_stringops_values_to_profile): Rename param 1 from "stmt"
3871 to "gs", reintroducing "stmt" as a gimple_call once we've
3872 established that we're working with a GIMPLE_CALL.
3873 * vtable-verify.c (verify_bb_vtables): Strengthen local
3874 "call_stmt" from gimple to gimple_call.
3876 2014-10-24 David Malcolm <dmalcolm@redhat.com>
3878 Concretize get_loop_exit_condition et al to working on gimple_cond
3880 * tree-scalar-evolution.h (get_loop_exit_condition): Return a
3882 * tree-scalar-evolution.c (get_loop_exit_condition): Likewise, also
3883 concretizing local "res" from gimple to gimple_cond.
3884 * tree-vect-loop-manip.c (slpeel_make_loop_iterate_ntimes): Convert
3885 locals from gimple to gimple_cond.
3886 (slpeel_can_duplicate_loop_p): Likewise.
3887 * tree-vect-loop.c (vect_get_loop_niters): Return a gimple_cond.
3888 (vect_analyze_loop_form): Convert local from gimple to gimple_cond.
3890 2014-10-24 David Malcolm <dmalcolm@redhat.com>
3892 Update various expressions within tree-scalar-evolution.c to be gimple_phi
3894 * tree-scalar-evolution.c (follow_ssa_edge): Require a gimple_phi,
3895 rather than a gimple.
3896 (follow_ssa_edge_binary): Likewise.
3897 (follow_ssa_edge_expr): Likewise.
3898 (follow_ssa_edge_in_rhs): Likewise.
3899 (backedge_phi_arg_p): Likewise.
3900 (follow_ssa_edge_in_condition_phi_branch): Likewise.
3901 (follow_ssa_edge_in_condition_phi): Likewise.
3902 (follow_ssa_edge_inner_loop_phi): Likewise.
3903 (analyze_evolution_in_loop): Likewise.
3904 (analyze_initial_condition): Likewise.
3905 (interpret_loop_phi): Likewise.
3906 (interpret_condition_phi): Likewise.
3907 (follow_ssa_edge): Likewise; also, add checked casts to gimple_phi.
3909 (analyze_scalar_evolution_1): Add checked casts to gimple_phi
3910 within "case GIMPLE_PHI".
3912 2014-10-24 David Malcolm <dmalcolm@redhat.com>
3914 tree-ssa-loop-ivopts.c: use gimple_phi in a few places
3916 * tree-ssa-loop-ivopts.c (determine_biv_step): Require a gimple_phi.
3917 (find_bivs): Convert local "phi" into a gimple_phi.
3918 (mark_bivs): Likewise.
3920 2014-10-24 David Malcolm <dmalcolm@redhat.com>
3922 tree-ssa-loop-manip.c: use gimple_phi in three places
3924 * tree-ssa-loop-manip.c (add_exit_phi): Convert local "phi" to be a
3926 (split_loop_exit_edge): Likewise for "phi" and "new_phi".
3928 2014-10-24 David Malcolm <dmalcolm@redhat.com>
3930 tree-ssa-loop-niter.c: use gimple_phi in a few places
3932 * tree-ssa-loop-niter.c (chain_of_csts_start): Return a gimple_phi
3933 rather than a gimple.
3934 (get_base_for): Likewise; convert local "phi" to be a gimple_phi.
3935 (loop_niter_by_eval): Convert local "phi" to be a gimple_phi.
3937 2014-10-24 David Malcolm <dmalcolm@redhat.com>
3939 tree-ssa-phiprop.c: use gimple_phi
3941 * tree-ssa-phiprop.c (phiprop_insert_phi): Strengthen types of
3942 parameter "phi" and local "new_phi" from gimple to gimple_phi.
3944 2014-10-24 David Malcolm <dmalcolm@redhat.com>
3946 tree-predcom.c: use gimple_phi in various places
3948 * tree-predcom.c (find_looparound_phi): Return a gimple_phi rather
3950 (insert_looparound_copy): Require a gimple_phi rather than just a
3952 (add_looparound_copies): Convert local "phi" to be a gimple_phi.
3953 (initialize_root_vars): Likewise.
3954 (initialize_root_vars_lm): Likewise.
3956 2014-10-24 David Malcolm <dmalcolm@redhat.com>
3958 tree-parloops.c: use gimple_phi in various places
3960 * tree-parloops.c (struct reduction_info): Strengthen field "new_phi"
3961 from gimple to gimple_phi.
3962 (create_phi_for_local_result): Convert local "new_phi" to gimple_phi.
3963 (loop_has_vector_phi_nodes): Require a gimple_phi rather than a gimple.
3964 (gather_scalar_reductions): Convert to a gimple_phi_iterator and
3966 (try_create_reduction_list): Likewise.
3968 2014-10-24 David Malcolm <dmalcolm@redhat.com>
3970 Update ssa_prop_visit_phi_fn callbacks to take a gimple_phi
3972 * tree-ssa-propagate.h (typedef ssa_prop_visit_phi_fn): Strengthen
3973 type of parameter from gimple to gimple_phi.
3975 * tree-complex.c (complex_visit_phi): Update signature of callback
3976 implementation accordingly.
3977 * tree-ssa-ccp.c (ccp_visit_phi_node): Likewise.
3978 * tree-ssa-copy.c (copy_prop_visit_phi_node): Likewise.
3979 * tree-vrp.c (vrp_visit_phi_node): Likewise.
3981 * tree-ssa-propagate.c (simulate_stmt): Add a checked cast to
3982 gimple_phi when invoking the ssa_prop_visit_phi callback.
3984 2014-10-24 David Malcolm <dmalcolm@redhat.com>
3986 Introduce gimple_phi_iterator
3988 * gimple-iterator.h (struct gimple_phi_iterator): New subclass of
3989 gimple_stmt_iterator with identical layout, but adding...
3990 (gimple_phi_iterator::phi): ...new method, equivalent to
3991 gsi_stmt (), but casting the underlying gimple to gimple_phi,
3992 checking that code == GIMPLE_PHI in a checked build.
3993 (gsi_start_phis): Return a gimple_phi_iterator, rather than just a
3994 gimple_stmt_iterator.
3996 * tree-if-conv.c (bb_with_exit_edge_p): Require a gimple_phi rather
3998 (if_convertible_phi_p): Likewise.
3999 * tree-phinodes.h (add_phi_node_to_bb): Likewise.
4000 * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
4002 * tree-ssa-uninit.c (warn_uninitialized_phi): Require a gimple_phi
4003 and a vec<gimple_phi> *, rather than just a gimple and
4004 vec<gimple> *, and a hash_set<gimple_phi> * rather than a
4006 (find_uninit_use): Likewise; add checked cast to gimple_phi when
4008 (pass_late_warn_uninitialized::execute): Strengthen types of
4009 various locals, "worklist" from vec<gimple> to vec<gimple_phi>,
4010 "gsi" to a gimple_phi_iterator, "phi" and "cur_phi" to a
4011 gimple_phi, "added_to_worklist" from hash_set<gimple> to
4012 hash_set<gimple_phi>.
4014 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Require a
4015 gimple_phi_iterator * rather than a gimple_stmt_iterator *;
4016 use it to strengthen local from a gimple to a gimple_phi.
4018 * cfgloop.c (find_subloop_latch_edge_by_ivs): Convert local from a
4019 gimple_stmt_iterator to a gimple_phi_iterator. Use the iterator's
4020 "phi" method rather than gsi_stmt. Use this checked cast to convert
4021 the type of related local from a plain gimple to a gimple_phi.
4022 * gimple-pretty-print.c (dump_phi_nodes): Likewise.
4023 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behaviour):
4025 * sese.c (sese_add_exit_phis_edge): Likewise.
4026 * tree-cfg.c (reinstall_phi_args): Likewise.
4027 (gimple_make_forwarder_block): Likewise.
4028 (add_phi_args_after_copy_edge): Likewise.
4029 (gimple_lv_adjust_loop_header_phi): Likewise.
4030 * tree-cfgcleanup.c (phi_alternatives_equal): Likewise.
4031 (remove_forwarder_block_with_phi): Likewise.
4032 (merge_phi_nodes): Likewise.
4033 * tree-complex.c (update_phi_components): Likewise.
4034 * tree-if-conv.c (if_convertible_loop_p_1): Likewise.
4035 * tree-inline.c (update_ssa_across_abnormal_edges): Likewise.
4036 (copy_phis_for_bb): Likewise.
4037 * tree-into-ssa.c (rewrite_add_phi_arguments): Likewise.
4038 * tree-outof-ssa.c (eliminate_build): Likewise.
4039 (eliminate_useless_phis): Likewise.
4040 (rewrite_trees): Likewise.
4041 (insert_backedge_copies): Likewise.
4042 * tree-phinodes.c (reserve_phi_args_for_new_edge): Likewise.
4043 (remove_phi_args): Likewise.
4044 (remove_phi_nodes): Likewise.
4045 * tree-predcom.c (find_looparound_phi): Likewise.
4046 (eliminate_temp_copies): Likewise.
4047 * tree-scalar-evolution.c (loop_closed_phi_def): Likewise.
4048 (scev_const_prop): Likewise; also, add checked cast to phi.
4049 * tree-ssa-coalesce.c (coalesce_partitions): Likewise.
4050 * tree-ssa-dce.c (remove_dead_phis): Likewise.
4051 (forward_edge_to_pdom): Likewise.
4052 * tree-ssa-dom.c (record_equivalences_from_phis): Likewise.
4053 (cprop_into_successor_phis): Likewise.
4054 (propagate_rhs_into_lhs): Likewise.
4055 (eliminate_degenerate_phis_1): Likewise.
4056 * tree-ssa-ifcombine.c (same_phi_args_p): Likewise.
4057 * tree-ssa-live.c (calculate_live_on_exit): Likewise.
4058 (verify_live_on_entry): Likewise.
4059 * tree-ssa-loop-im.c
4060 (move_computations_dom_walker::before_dom_children): Likewise.
4061 * tree-ssa-loop-ivopts.c (find_bivs): Likewise.
4062 (mark_bivs): Likewise.
4063 (find_interesting_uses_outside): Likewise.
4064 (determine_set_costs): Likewise.
4065 * tree-ssa-loop-manip.c (split_loop_exit_edge): Likewise.
4066 (tree_transform_and_unroll_loop): Likewise.
4067 (rewrite_all_phi_nodes_with_iv): Likewise.
4068 (canonicalize_loop_ivs): Likewise.
4069 * tree-ssa-loop-niter.c (determine_value_range): Likewise.
4070 * tree-ssa-phiopt.c (hoist_adjacent_loads): Likewise.
4071 * tree-ssa-phiprop.c (tree_ssa_phiprop): Likewise.
4072 * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
4073 * tree-ssa-tail-merge.c (same_phi_alternatives_1): Likewise.
4074 (vop_phi): Likewise.
4075 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
4077 * tree-ssa-threadupdate.c (copy_phi_arg_into_existing_phi): Likewise.
4078 (copy_phi_args): Likewise.
4079 (phi_args_equal_on_edges): Likewise.
4080 * tree-ssa.c (ssa_redirect_edge): Likewise.
4081 (flush_pending_stmts): Likewise.
4082 * tree-switch-conversion.c (check_final_bb): Likewise.
4083 (gather_default_values): Likewise.
4084 (build_constructors): Likewise.
4085 (fix_phi_nodes): Likewise.
4086 * tree-tailcall.c (propagate_through_phis): Likewise.
4087 (add_successor_phi_arg): Likewise.
4088 * tree-vect-loop-manip.c (slpeel_update_phi_nodes_for_guard1):
4090 (slpeel_update_phi_nodes_for_guard2): Likewise.
4091 (slpeel_tree_peel_loop_to_edge): Likewise.
4092 (vect_can_advance_ivs_p): Likewise.
4093 (vect_update_ivs_after_vectorizer): Likewise.
4094 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
4095 * tree-vrp.c (find_assert_locations): Likewise.
4096 * value-prof.c (gimple_ic): Likewise.
4098 * omp-low.c (expand_parallel_call): Convert local to a gimple_phi.
4100 2014-10-24 David Malcolm <dmalcolm@redhat.com>
4102 Introduce gimple_phi and use it in various places
4104 * coretypes.h (gimple_phi): New typedef.
4105 (const_gimple_phi): New typedef.
4107 * gdbhooks.py (build_pretty_printer): Add gimple_phi and its
4108 variants, using the gimple printer.
4110 * gimple.h (gimple_vec): Eliminate thie typedef in the hope of using
4111 vecs of more concrete gimple subclasses as appropriate; also the
4112 comment is about to become misleading.
4114 * gimple.h (gimple_phi_capacity): Use const_gimple_phi typedef
4115 rather than spelling out the full type.
4116 (gimple_phi_num_args): Likewise.
4117 (gimple_phi_result): Likewise.
4118 (gimple_phi_result_ptr): Use gimple_phi typedef.
4119 (gimple_phi_set_result): Likewise.
4120 (gimple_phi_arg): Likewise.
4121 (gimple_phi_set_arg): Likewise.
4122 * tree-phinodes.c (allocate_phi_node): Likewise.
4123 (resize_phi_node): Likewise.
4124 (reserve_phi_args_for_new_edge): Likewise.
4125 (remove_phi_arg_num): Likewise.
4127 * gimple-pretty-print.c (dump_gimple_phi): Require a gimple_phi
4128 rather than just a gimple.
4129 * tree-into-ssa.c (mark_phi_for_rewrite): Likewise.
4131 * tree-phinodes.c (make_phi_node): Return a gimple_phi rather than
4133 (create_phi_node): Likewise.
4134 * tree-phinodes.h (create_phi_node): Likewise.
4136 * trans-mem.c (struct struct tm_log_entry): Replace use of
4137 now-removed gimple_vec with a plain vec<gimple>.
4139 * tree-into-ssa.c (phis_to_rewrite): Strengthen from a
4140 vec<gimple_vec> to a vec< vec<gimple_phi> >.
4142 * tree-into-ssa.c (insert_phi_nodes_for): Update local to be a
4144 * tree-into-ssa.c (rewrite_update_phi_arguments): Strengthen local
4145 "phis" from a gimple_vec to a vec<gimple_phi>, and local "phi" to
4147 * tree-into-ssa.c (delete_update_ssa): Strengthen local
4148 "phis" from a gimple_vec to a vec<gimple_phi>.
4150 * gimple-pretty-print.c (pp_gimple_stmt_1): Add checked cast to
4151 gimple_phi in regions where a stmt is known to have code
4153 * tree-into-ssa.c (mark_use_interesting): Likewise.
4155 2014-10-24 David Malcolm <dmalcolm@redhat.com>
4157 Introduce gimple_debug and use it in a few places
4159 * coretypes.h (gimple_debug): New typedef.
4160 (const_gimple_debug): New typedef.
4162 * gimple.h (struct gimple_statement_debug): New subclass of
4163 gimple_statement_with_ops, adding the invariant that
4164 stmt->code == GIMPLE_DEBUG.
4165 (is_a_helper <gimple_statement_debug>::test): New.
4167 * gdbhooks.py (build_pretty_printer): Add gimple_debug and its
4168 variants, using the gimple printer.
4170 * gimple-pretty-print.c (dump_gimple_debug): Require a gimple_debug
4171 rather than just a gimple.
4172 * tree-inline.c (copy_debug_stmt): Likewise.
4174 * tree-inline.h (struct copy_body_data): Strengthen field
4175 "debug_stmts" from a vec<gimple> to a vec<gimple_debug>.
4177 * gimple.c (gimple_build_debug_bind_stat): Return a gimple_debug
4178 rather than just a gimple.
4179 (gimple_build_debug_source_bind_stat): Likewise.
4180 * gimple.h (gimple_build_debug_bind_stat): Likewise.
4181 (gimple_build_debug_source_bind_stat): Likewise.
4183 * tree-inline.c (remap_gimple_stmt): Update locals to be a
4185 (maybe_move_debug_stmts_to_successors): Likewise.
4186 (copy_debug_stmts): Likewise.
4188 * gimple-pretty-print.c (pp_gimple_stmt_1): Add checked cast to
4189 gimple_debug in regions where a stmt is known to have code
4192 2014-10-24 David Malcolm <dmalcolm@redhat.com>
4194 Introduce gimple_label and use it in a few places
4196 * coretypes.h (gimple_label): New typedef.
4197 (const_gimple_label): New typedef.
4199 * gimple.h (struct gimple_statement_label): New subclass of
4200 gimple_statement_with_ops, adding the invariant that
4201 stmt->code == GIMPLE_LABEL.
4202 (is_a_helper <gimple_statement_label>::test): New.
4204 * gdbhooks.py (build_pretty_printer): Add gimple_label and its
4205 variants, reusing the gimple printer.
4207 * gimple-pretty-print.c (dump_gimple_label): Require a gimple_label
4208 rather than just a gimple.
4209 * tree-cfg.c (verify_gimple_label): Likewise.
4211 * gimple.c (gimple_build_label): Return a gimple_label rather than
4213 * gimple.h (gimple_build_label): Likewise.
4215 * gimplify.c (gimplify_case_label_expr): Update local to be a
4217 * tree-switch-conversion.c (gen_inbound_check): Likewise.
4219 * gimple-pretty-print.c (pp_gimple_stmt_1): Add checked cast to
4220 gimple_label in regions where a stmt is known to have code
4222 * tree-cfg.c (verify_gimple_stmt): Likewise.
4224 2014-10-24 David Malcolm <dmalcolm@redhat.com>
4226 Introduce gimple_assign and use it in various places
4228 * coretypes.h (gimple_assign): New typedef.
4229 (const_gimple_assign): New typedef.
4231 * gimple.h (struct gimple_statement_assign): New subclass of
4232 gimple_statement_with_memory_ops, adding the invariant that
4233 stmt->code == GIMPLE_ASSIGN.
4234 (is_a_helper <gimple_statement_assign>::test): New.
4236 * gdbhooks.py (build_pretty_printer): Add gimple_assign and its
4237 variants, using the gimple printer.
4239 * gimple-builder.c (build_assign): Return a gimple_assign rather
4240 than just a gimple from each of the overloaded variants.
4241 (build_type_cast): Likewise.
4242 * gimple-builder.h (build_assign): Likewise.
4243 (build_type_cast): Likewise.
4244 * gimple.c (gimple_build_assign_stat): Likewise.
4245 (gimple_build_assign_with_ops): Likewise.
4246 * gimple.h (gimple_build_assign_stat): Likewise.
4247 (gimple_build_assign_with_ops): Likewise.
4249 * asan.c (get_mem_ref_of_assignment): Require a const_gimple_assign
4250 rather than just a "const gimple" (the latter is not a
4252 * gimple-pretty-print.c (dump_unary_rhs): Require a gimple_assign
4253 rather than just a gimple.
4254 (dump_binary_rhs): Likewise.
4255 (dump_ternary_rhs): Likewise.
4256 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
4257 (verify_gimple_assign_binary): Likewise.
4258 (verify_gimple_assign_ternary): Likewise.
4259 (verify_gimple_assign_single): Likewise.
4260 (verify_gimple_assign): Likewise.
4261 * tree-ssa-sccvn.c (simplify_unary_expression): Likewise.
4262 (try_to_simplify): Likewise.
4263 * tree-tailcall.c (process_assignment): Likewise.
4264 * tree-vect-generic.c (expand_vector_operation): Likewise.
4265 * tree-vrp.c (extract_range_from_cond_expr): Likewise.
4266 (extract_range_from_assignment): Likewise.
4268 * asan.c (has_stmt_been_instrumented_p): Add checked cast to
4269 gimple_assign in regions where a stmt is known to have code
4271 * gimple-pretty-print.c (pp_gimple_stmt_1): Likewise.
4272 * tree-cfg.c (verify_gimple_stmt): Likewise.
4273 * tree-ssa-sccvn.c (visit_use): Likewise.
4274 * tree-tailcall.c (find_tail_calls): Likewise.
4275 * tree-vrp.c (vrp_visit_assignment_or_call): Likewise.
4277 * tree-vrp.c (simplify_stmt_for_jump_threading): Replace a check
4278 against GIMPLE_ASSIGN with a dyn_cast<gimple_assign>, introducing
4279 a gimple_assign local.
4281 * tree-vect-generic.c (expand_vector_condition): Convert local to a
4282 gimple_assign, adding a checked cast when extracting from gsi, since
4283 this is only called when underlying stmt has code GIMPLE_ASSIGN.
4284 (optimize_vector_constructor): Likewise.
4285 (lower_vec_perm): Likewise.
4286 (expand_vector_operations_1): Convert local to a gimple_assign,
4287 introducing a dyn_cast.
4289 2014-10-24 David Malcolm <dmalcolm@redhat.com>
4291 Introduce gimple_cond and use it in various places
4293 * coretypes.h (gimple_cond): New typedef.
4294 (const_gimple_cond): Likewise.
4296 * gimple.h (struct gimple_statement_cond): New subclass of
4297 gimple_statement_with_ops, adding the invariant that
4298 stmt->code == GIMPLE_COND.
4299 (is_a_helper <gimple_statement_cond>::test): New.
4300 (gimple_build_cond): Return a gimple_cond, rather than just
4302 (gimple_build_cond_from_tree): Likewise.
4304 * gdbhooks.py (build_pretty_printer): Add gimple_cond and its
4305 variants, using the gimple printer.
4307 * cfgexpand.c (expand_gimple_cond): Require a gimple_cond rather
4309 * gimple.h (gimple_cond_set_condition_from_tree): Likewise.
4310 (gimple_cond_true_p): Likewise.
4311 (gimple_cond_false_p): Likewise.
4312 (gimple_cond_set_condition): Likewise.
4313 * gimple.c (gimple_cond_set_condition_from_tree): Likewise.
4314 * gimple-fold.c (fold_gimple_cond): Likewise.
4315 * gimple-pretty-print.c (dump_gimple_cond): Likewise.
4316 * tree-ssa-dom.c (canonicalize_comparison): Likewise.
4317 * tree-ssa-forwprop.c (forward_propagate_into_gimple_cond): Likewise.
4318 * tree-ssa-ifcombine.c (recognize_single_bit_test): Likewise.
4319 (recognize_bits_test): Likewise.
4320 * tree-ssa-threadedge.c (simplify_control_stmt_condition): Likewise.
4321 (thread_around_empty_blocks): Likewise.
4322 (thread_through_normal_block): Likewise.
4323 (thread_across_edge): Likewise.
4324 * tree-ssa-threadedge.h (thread_across_edge): Likewise.
4325 * tree-vrp.c (range_fits_type_p): Likewise.
4327 * cfgexpand.c (expand_gimple_basic_block): Add checked cast to
4328 gimple_cond in regions where a stmt is known to have code GIMPLE_COND.
4329 * gimple-fold.c (fold_stmt_1): Likewise.
4330 * gimple-pretty-print.c (pp_gimple_stmt_1): Likewise.
4331 * tree-ssa-dom.c (optimize_stmt): Likewise.
4332 * tree-ssa-forwprop.c (ssa_forward_propagate_and_combine): Likewise.
4333 * tree-ssa-loop-unswitch.c (tree_unswitch_single_loop): Likewise.
4334 * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
4336 * tree-vrp.c (simplify_stmt_using_ranges): Likewise.
4338 * cfgloopmanip.c (create_empty_loop_on_edge): Update local to be a
4340 * tree-vrp.c (identify_jump_threads): Likewise.
4342 * gimple.c (gimple_build_cond): Return a gimple_cond, rather than
4344 (gimple_build_cond_from_tree): Likewise.
4346 * tree-ssa-dom.c (class dom_opt_dom_walker): Strengthen type of
4347 field "m_dummy_cond" from a plain gimple to a gimple_cond.
4349 * tree-ssa-ifcombine.c (ifcombine_ifandif): Introduce locals
4350 inner_stmt and outer_stmt so that inner_cond and outer_cond can be
4351 of type gimple_cond once we know that we have code == GIMPLE_COND.
4352 * tree-ssa-loop-unswitch.c (tree_may_unswitch_on): Introduce local
4353 "last" so that stmt can be of type gimple_cond.
4355 2014-10-24 David Malcolm <dmalcolm@redhat.com>
4357 Introduce gimple_bind and use it for accessors.
4359 * coretypes.h (gimple_bind): New typedef.
4360 (const_gimple_bind): New typedef.
4362 * gdbhooks.py (build_pretty_printer): Add gimple_bind
4363 and its variants, using the gimple printer.
4365 * gimple-pretty-print.c (dump_gimple_bind): Update type-signature to
4366 require a gimple_bind rather than just a gimple.
4368 * gimple.c (gimple_build_bind): Return a gimple_bind rather than
4370 * gimple.h (gimple_build_bind): Likewise.
4372 * gimple.h (gimple_seq_first_stmt_as_a_bind): New.
4374 * gimple.h (gimple_bind_vars): Update type-signature to
4375 require a gimple_bind rather than just a gimple, removing
4376 as_a and hence run-time check.
4377 (gimple_bind_set_vars): Likewise.
4378 (gimple_bind_append_vars): Likewise.
4379 (gimple_bind_body_ptr): Likewise.
4380 (gimple_bind_body): Likewise.
4381 (gimple_bind_set_body): Likewise.
4382 (gimple_bind_add_stmt): Likewise.
4383 (gimple_bind_add_seq): Likewise.
4384 (gimple_bind_block): Likewise.
4385 (gimple_bind_set_block): Likewise.
4386 * gimplify.c (gimple_push_bind_expr): Likewise.
4387 (gimple_current_bind_expr): Likewise.
4388 * tree-inline.c (copy_gimple_bind): Likewise.
4390 * gimplify.h (gimple_current_bind_expr): Return a gimple_bind
4391 rather than a plain gimple.
4392 (gimplify_body): Likewise.
4393 (gimple_bind_expr_stack): Return a vec<gimple_bind> rather than
4396 * gimplify.c (struct gimplify_ctx): Strengthen field
4397 "bind_expr_stack" from vec<gimple> to vec<gimple_bind>.
4398 (gimple_bind_expr_stack): Likewise for type of returned value.
4400 * gimplify.c (gimplify_body): Strengthen various types from gimple
4401 to gimple_bind, including the return type.
4403 * gimplify.c (declare_vars): Introduce "gs" as a generic gimple,
4404 so that local "scope" can be of type gimple_bind once we've reached
4405 the region where it must be of code GIMPLE_BIND.
4407 * gimple-low.c (lower_gimple_bind): Add checked cast to
4408 gimple_bind, since both callers (lower_function_body and
4409 lower_stmt) have checked the code for us.
4411 * gimple.c (gimple_copy): Add checked cast to gimple_bind in
4412 region guarded by check for code GIMPLE_BIND.
4413 * gimple-low.c (gimple_stmt_may_fallthru): Likewise.
4414 * gimple-pretty-print.c (pp_gimple_stmt_1): Likewise.
4415 * gimple-walk.c (walk_gimple_stmt): Likewise.
4416 * omp-low.c (scan_omp_1_stmt): Likewise.
4417 (lower_omp_1): Likewise.
4418 (lower_omp_for): Likewise.
4419 * tree-cfg.c (verify_gimple_in_seq_2): Likewise.
4420 (do_warn_unused_result): Likewise.
4421 * tree-inline.c (remap_gimple_stmt): Likewise.
4422 (estimate_num_insns): Likewise.
4423 * tree-nested.c (convert_nonlocal_reference_stmt): Likewise.
4425 * gimplify.c (gimplify_bind_expr): Update local(s) to be a
4426 gimple_bind rather than just a gimple.
4427 (gimplify_function_tree): Likewise.
4428 * omp-low.c (lower_omp_sections): Likewise.
4429 (lower_omp_single): Likewise.
4430 (lower_omp_master): Likewise.
4431 (lower_omp_taskgroup): Likewise.
4432 (lower_omp_ordered): Likewise.
4433 (lower_omp_critical): Likewise.
4434 (lower_omp_taskreg): Likewise.
4435 (lower_omp_teams): Likewise.
4436 * omp-low.c (lower_omp_for): Likewise; use
4437 gimple_seq_first_stmt_as_a_bind to encapsulate the checked cast.
4438 (lower_omp_target): Likewise.
4439 * tree-nested.c (finalize_nesting_tree_1): Likewise.
4441 * gimple.c (empty_stmt_p): Add dyn_cast to a gimple_bind.
4442 * tree-inline.c (replace_locals_stmt): Add dyn_cast to gimple_bind.
4444 2014-10-24 David Malcolm <dmalcolm@redhat.com>
4446 Introduce gimple_switch and use it in various places
4448 * gimple.h (gimple_statement_switch): New subclass of
4449 gimple_statement_with_ops, adding the invariant that
4450 stmt->code == GIMPLE_SWITCH.
4451 (is_a_helper <gimple_statement_switch>::test (gimple)): New.
4453 * coretypes.h (gimple_switch): New typedef
4454 (const_gimple_switch): Likewise.
4456 * gdbhooks.py (build_pretty_printer): Add gimple_switch
4457 and its variants, using the gimple printer.
4459 * gimple.c (gimple_build_switch_nlabels): Return a gimple_switch
4460 rather than just a gimple.
4461 (gimple_build_switch): Likewise.
4462 * gimple.h (gimple_build_switch_nlabels): Likewise.
4463 (gimple_build_switch): Likewise.
4465 * gimple.h (gimple_switch_num_labels): Update type-signature to
4466 require a gimple_switch rather than just a gimple.
4467 (gimple_switch_set_num_labels): Likewise.
4468 (gimple_switch_set_index): Likewise.
4469 (gimple_switch_label): Likewise.
4470 (gimple_switch_set_label): Likewise.
4471 (gimple_switch_default_label): Likewise.
4472 (gimple_switch_set_default_label): Likewise.
4473 * expr.h (expand_case): Likewise.
4474 * gimple-pretty-print.c (dump_gimple_call): Likewise.
4475 * stmt.c (compute_cases_per_edge): Likewise.
4476 (expand_case): Likewise.
4477 * tree-cfg.h (group_case_labels_stmt): Likewise.
4478 * tree-cfg.c (make_gimple_switch_edges): Likewise.
4479 (find_taken_edge_switch_expr) Likewise.
4480 (find_case_label_for_value) Likewise.
4481 (get_cases_for_edge): Likewise.
4482 (group_case_labels_stmt): Likewise.
4483 (verify_gimple_switch): Likewise.
4484 * tree-eh.c (verify_norecord_switch_expr): Likewise.
4485 * tree-eh.c (lower_eh_constructs_2): Likewise.
4486 * tree-loop-distribution.c (generate_loops_for_partition): Likewise.
4487 * tree-ssa-dom.c (record_edge_info): Likewise.
4488 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
4489 (simplify_gimple_switch): Likewise.
4490 * tree-switch-conversion.c (emit_case_bit_tests): Likewise.
4491 (collect_switch_conv_info): Likewise.
4492 (build_constructors): Likewise.
4493 (array_value_type): Likewise.
4494 (build_one_array): Likewise.
4495 (build_arrays): Likewise.
4496 (gen_inbound_check): Likewise.
4497 * tree-vrp.c (find_switch_asserts): Likewise.
4498 (find_case_label_range): Likewise.
4499 (find_case_label_ranges): Likewise.
4500 (vrp_visit_switch_stmt): Likewise.
4501 (simplify_switch_using_ranges): Likewise.
4503 * tree-vrp.c (switch_update): Strengthen field "stmt" from being
4504 merely a gimple to being a gimple_switch.
4506 * cfgexpand.c (expand_gimple_stmt_1): Add checked cast to
4507 gimple_switch in regions where the stmt code has been tested as
4509 * gimple-pretty-print.c (pp_gimple_stmt_1): Likewise.
4510 * tree-cfg.c (make_edges): Likewise.
4511 (end_recording_case_labels): Likewise.
4512 (cleanup_dead_labels): Likewise.
4513 (cleanup_dead_labels): Likewise.
4514 (group_case_labels): Likewise.
4515 (find_taken_edge): Likewise.
4516 (find_case_label_for_value): Likewise.
4517 (verify_gimple_stmt): Likewise.
4518 (gimple_verify_flow_info): Likewise.
4519 (gimple_redirect_edge_and_branch): Likewise.
4520 * tree-inline.c (estimate_num_insns): Likewise.
4521 * tree-ssa-forwprop.c (ssa_forward_propagate_and_combine): Likewise.
4522 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
4523 * tree-switch-conversion.c (do_switchconv): Likewise.
4524 * tree-vrp.c (find_assert_locations_1): Likewise.
4525 (vrp_visit_stmt): Likewise.
4526 (simplify_stmt_using_ranges): Likewise.
4528 * ipa-inline-analysis.c (set_switch_stmt_execution_predicate):
4529 Introduce local "lastg" as a generic gimple, so that local "last"
4530 can be of type gimple_switch once lastg's code has been verified.
4532 * omp-low.c (diagnose_sb_2): Introduce switch_stmt local to handle
4533 the GIMPLE_SWITCH case.
4535 * tree-cfg.c (find_taken_edge_switch_expr): Add gimple_switch
4536 argument, since the caller (find_taken_edge) has checked that
4537 last_stmt is a switch.
4539 Copyright (C) 2014 Free Software Foundation, Inc.
4541 Copying and distribution of this file, with or without modification,
4542 are permitted in any medium without royalty provided the copyright
4543 notice and this notice are preserved.