Concretize gimple_call_use_set and gimple_call_clobber_set
[official-gcc.git] / gcc / ChangeLog.gimple-classes
blob5cf1049d76d0cf420928354d9e5607733b4fa56c
1 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
3         Concretize gimple_call_use_set and gimple_call_clobber_set
5         * gimple.h (gimple_call_use_set): Require a gimple_call.
6         (gimple_call_clobber_set): Likewise.
8 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
10         Concretize gimple_catch_types
12         * gimple.h (gimple_catch_types): Require a const_gimple_catch
13         rather than a const_gimple.
15 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
17         Make gimple_goto_set_dest require a gimple_goto
19         * gimple.h (gimple_goto_set_dest): Require a gimple_goto.
21         * tree-cfg.c (factor_computed_gotos): Add checked cast to
22         gimple_goto.
23         (cleanup_dead_labels): Likewise.
25 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
27         Make gimple_label_set_label require a gimple_label
29         * gimple.h (gimple_label_set_label): Require a gimple_label.
31 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
33         Concretize parameter to gimple_call_copy_skip_args
35         * gimple.c (gimple_call_copy_skip_args): Require a gimple_call.
36         * gimple.h (gimple_call_copy_skip_args): Likewise.
38 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
40         Various gimple to gimple_call conversions in IPA
42         * ipa-prop.c (detect_type_change_from_memory_writes): Require a
43         gimple_call rather than a plain gimple.
44         (detect_type_change): Likewise.
45         (detect_type_change_ssa): Likewise.
46         (compute_complex_assign_jump_func): Likewise.
47         (compute_complex_ancestor_jump_func): Likewise.
48         (compute_known_type_jump_func): Likewise.
49         (determine_locally_known_aggregate_parts): Likewise.
50         (ipa_compute_jump_functions_for_edge): Strengthen local "call" to
51         a gimple_call; add checked cast to gimple_phi.
52         (ipa_note_param_call): Require a gimple_call rather than a plain
53         gimple.
54         (ipa_analyze_indirect_call_uses): Likewise.
55         (ipa_analyze_virtual_call_uses): Likewise.
56         (ipa_analyze_call_uses): Likewise.
57         (ipa_analyze_stmt_uses):Add checked cast to gimple_call.
59         * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
60         Replace use of is_gimple_call with dyn_cast<gimple_call> and a
61         new local "call_stmt".
63 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
65         Use gimple_call for callgraph edges
67         * cgraph.h (cgraph_edge::call_stmt): Strengthen field from plain
68         gimple to a gimple_call.
69         (cgraph_node::set_call_stmt_including_clones): Likewise for param
70         "new_stmt".
71         (cgraph_node::create_edge): Likewise for param "call_stmt".
72         (cgraph_node::create_indirect_edge): Likewise.
73         (cgraph_node::create_edge_including_clones): Likewise for param
74         "stmt".
75         (cgraph_edge::set_call_stmt): Likewise for param "new_stmt".
76         (cgraph_edge::clone): Likewise for param "call_stmt".
77         (symbol_table::create_edge): Likewise.
79         * cgraph.c (cgraph_edge::set_call_stmt): Require a gimple_call
80         rather than a plain gimple.
81         (symbol_table::create_edge): Likewise.
82         (cgraph_node::create_edge): Likewise.
83         (cgraph_node::create_indirect_edge): Likewise.
84         (cgraph_edge::redirect_call_stmt_to_callee): Strengthen local
85         "new_stmt" from gimple to gimple_call.
86         (cgraph_update_edges_for_call_stmt_node): Add checked casts to
87         gimple_call.
89         * cgraphbuild.c (pass_build_cgraph_edges::execute): Replace
90         is_gimple_call with dyn_cast<gimple_call> and new local
91         "call_stmt".
92         (cgraph_edge::rebuild_edges): Likewise.
94         * cgraphclones.c (cgraph_edge::clone): Require a gimple_call
95         rather than a plain gimple.
96         (cgraph_node::set_call_stmt_including_clones): Likewise.
97         (cgraph_node::create_edge_including_clones): Likewise.
99         * lto-streamer-in.c (fixup_call_stmt_edges_1): Add checked casts
100         to gimple_call.
102         * omp-low.c (simd_clone_adjust): Strengthen local "call" from
103         gimple to gimple_call.
105         * trans-mem.c (ipa_tm_insert_irr_call): Likewise for "g".
106         (ipa_tm_insert_gettmclone_call): Likewise; also strengthen "g2"
107         to gimple_assign.
109         * tree-emutls.c (gen_emutls_addr): Strengthen local "x" from
110         gimple to gimple_call.
112         * tree-inline.c (copy_bb): Replace is_gimple_call with
113         dyn_cast<gimple_call> and new local "call_stmt".
115         * value-prof.c (gimple_ic): Require and return a gimple_call,
116         rather than a plain gimple.
117         * value-prof.h (gimple_ic): Likewise.
119 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
121         Make gimple_call_return_slot_opt_p require a gimple_call.
123         * gimple.h (gimple_call_return_slot_opt_p): Require a gimple_call
124         rather than a plain gimple.
126         * gimple-walk.c (walk_stmt_load_store_addr_ops): Convert usage of
127         is_gimple_call to dyn_cast<gimple_call>, introducing a new local
128         "call_stmt".
130         * trans-mem.c (expand_call_tm): Split local "stmt", strengthening
131         from plain gimple to a gimple_call, and introducing new local
132         gimple_assign "assign_stmt".
134         * tree-inline.c (expand_call_inline):  Convert check of code against
135         GIMPLE_CALL to dyn_cast<gimple_call>, introducing a new local
136         "call_stmt".
138 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
140         More gimple_phi
142         * gimple.h (gimple_phi_set_result): Require a gimple_phi rather
143         than a plain gimple.
144         (gimple_phi_set_arg): Likewise.
146         * tree-outof-ssa.c (remove_gimple_phi_args): Likewise; add a checked
147         cast to gimple_phi.
149         * tree-sra.c (replace_removed_params_ssa_names): Add a checked
150         cast to gimple_phi.
152 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
154         Make gimple_phi_arg_edge require a gimple_phi
156         * gimple.h (gimple_phi_arg_edge): Require a gimple_phi rather
157         than a plain gimple.
159         * gimple-ssa-strength-reduction.c (ncd_with_phi): Strengthen
160         param "phi" from gimple to gimple_phi.  Add a checked cast.
161         (ncd_of_cand_and_phis): Add a checked cast.
163         * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Require a
164         gimple_phi_iterator; strengthen local "phi" from gimple to a
165         gimple_phi.
166         (rewrite_cross_bb_scalar_deps): Strengthen local "psi" from
167         a gimple_stmt_iterator to a gimple_phi_iterator.
168         (edge_initial_value_for_loop_phi): Require a gimple phi.
169         (initial_value_for_loop_phi): Likewise.
171         * ipa-split.c (consider_split): Convert "bsi" to a
172         gimple_phi_iterator and "stmt" to a gimple_phi.
174         * predict.c (predict_extra_loop_exits): Convert "phi_stmt" to be
175         a gimple_phi; introduce "lhs_def_stmt" as plain gimple.
176         (apply_return_prediction): Convert "phi" to be a gimple_phi.
178         * tree-cfg.c (replace_uses_by): Add checked cast to gimple_phi.
179         (verify_gimple_in_cfg): Introduce gimple_phi_iterator "gpi" and use
180         it to convert "phi" to a gimple_phi.
182         * tree-eh.c (cleanup_empty_eh_merge_phis): Convert "ngsi", "ogsi"
183         to be gimple_phi_iterators.  Convert "ophi", "nphi" to be
184         gimple_phi.
186         * tree-into-ssa.c (prepare_use_sites_for): Add checked cast to
187         gimple_phi.
189         * tree-ssa-coalesce.c (create_outofssa_var_map): Introduce
190         gimple_phi_iterator "gpi" and use it to convert "phi" to a
191         gimple_phi.
193         * tree-ssa-dce.c (propagate_necessity): Introduce local "phi",
194         from checked cast to gimple_phi.
196         * tree-ssa-live.c (set_var_live_on_entry): Add checked cast to
197         gimple_phi.
199         * tree-ssa-propagate.c (replace_phi_args_in): Require a gimple_phi
200         rather than a plain gimple.
201         (substitute_and_fold_dom_walker::before_dom_children): Introduce
202         gimple_phi_iterator "gpi".
204         * tree-ssa-sink.c (find_bb_for_arg): Require a gimple_phi rather
205         than a plain gimple.
206         (nearest_common_dominator_of_uses): Replace check of code against
207         GIMPLE_PHI with a dyn_cast<gimple_phi>, introducing a new local.
208         (statement_sink_location): Add checked cast to gimple_phi.
210         * tree-ssa-uninit.c (compute_uninit_opnds_pos): Require a
211         gimple_phi rather than a plain gimple.
212         (collect_phi_def_edges): Likewise.  Add a checked cast.
213         (find_def_preds): Strengthen param "phi" from gimple to
214         gimple_phi.
215         (prune_uninit_phi_opnds_in_unrealizable_paths): Likewise for
216         params "phi" and "flag_def".  Strenghen param "visited_phis" from
217         hash_set<gimple> * to hash_set<gimple_phi> *.  Convert
218         "flag_arg_def", "phi_arg_def" to gimple_phi using
219         dyn_cast<gimple_phi>.  Similarly, introduce new local
220         "opnd_def_phi".
221         (use_pred_not_overlap_with_undef_path_pred): Strengthen param
222         "phi" from gimple to gimple_phi, and param "visited_phis" from
223         hash_set<gimple> * to hash_set<gimple_phi> *.  Add a checked cast.
224         (is_use_properly_guarded): Likewise for params.
225         (find_uninit_use): Replace check of code against GIMPLE_PHI with
226         a dyn_cast<gimple_phi>, introducing a new local "use_phi".
227         Strengthen local "visited_phis" from hash_set<gimple> to
228         hash_set<gimple_phi>.
230 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
232         Update GRAPHITE to use more concrete gimple statement classes
234         * graphite-scop-detection.c (canonicalize_loop_closed_ssa):
235         Strengthen local "psi" to be a gimple_phi_iterator and "phi" to
236         a gimple_phi.
238         * graphite-sese-to-poly.c (phi_arg_in_outermost_loop): Require
239         a gimple_phi rathen than a plain gimple.
240         (remove_simple_copy_phi): Require a gimple_phi_iterator;
241         strengthen local "phi" to be a gimple_phi and "stmt" to be a
242         gimple_assign.
243         (remove_invariant_phi): Likewise.
244         (simple_copy_phi_p): Require a gimple_phi.
245         (reduction_phi_p): Require a gimple_phi_iterator; strengthen
246         local "phi" to be a gimple_phi.
247         (add_condition_to_pbb): Require a gimple_cond rather than a
248         plain gimple.
249         (add_conditions_to_domain): Add checked cast to gimple_cond
250         within GIMPLE_COND case of switch statement.
251         (single_pred_cond_non_loop_exit): Return a gimple_cond rather
252         than a plain gimple, via a checked cast.
253         (sese_dom_walker::before_dom_children): Strengthen local "stmt"
254         from gimple to gimple_cond.
255         (gsi_for_phi_node): Require a gimple_phi, and return a
256         gimple_phi_iterator.
257         (insert_out_of_ssa_copy): Strengthen local "stmt" from gimple to
258         gimple_assign.
259         (rewrite_reductions_out_of_ssa): Strengthen "psi" to be a
260         gimple_phi_iterator, and "phi" to be a gimple_phi.
261         (phi_contains_arg): Require a gimple_phi.
262         (follow_ssa_with_commutative_ops): Strengthen return type from
263         gimple to gimple_phi, by converting a check for code GIMPLE_PHI to
264         a dyn_cast<gimple_phi>, and strengthening local "res" from gimple
265         to gimple_phi.
266         (detect_commutative_reduction_arg): Strengthen return type from
267         gimple to gimple_phi, and strengthen local "phi" to be a
268         gimple_phi.
269         (detect_commutative_reduction_assign): Strengthen return type from
270         gimple to gimple_phi, and strengthen local "res" to be a
271         gimple_phi.
272         (follow_inital_value_to_phi): Strengthen return type from
273         gimple to gimple_phi.  Replace check for code GIMPLE_PHI with
274         a dyn_cast<gimple_phi>.
275         (detect_commutative_reduction): Strengthen return type and locals
276         "loop_phi", "phi", "close_phi" from gimple to gimple_phi,
277         introducing a checked cast of "stmt" in region guarded by
278         scalar_close_phi_node_p (stmt).
279         (translate_scalar_reduction_to_array_for_stmt): Require param
280         "loop_phi" to be a gimple_phi.  Strengthen local "assign" from
281         gimple to gimple_assign.
282         (remove_phi): Require a gimple_phi.
283         (close_phi_written_to_memory): Likewise.
284         (translate_scalar_reduction_to_array): We expect the first element
285         in each vector to be an arbitrary statement, but all of the
286         subsequent elements to be phi nodes.  Hence the decls of gimple
287         locals "loop_phi" and "close_phi" are replaced with decls of gimple
288         "loop_stmt" and "close_stmt", with decls of the more-strongly typed
289         gimple_phi "loop_phi" and "close_phi" occurring lower down, within
290         the region where we're dealing with i > 0 and hence where we can
291         safely assign them using the checked cast as_a <gimple_phi>.
292         This allows many of the strengthenings from gimple to gimple_phi
293         above.  We eliminate the local "stmt", since we can simply use
294         "loop_stmt".
295         (rewrite_commutative_reductions_out_of_ssa_close_phi): Strengthen
296         param "close_phi" from gimple to gimple_phi, and local "gsi" from
297         gimple_stmt_iterator to gimple_phi_iterator, converting uses of
298         gsi_stmt to gsi.phi for type-safety.
299         (scop_ivs_can_be_represented): Strengthen local "gsi" from
300         gimple_stmt_iterator to gimple_phi_iterator, and "phi" from gimple
301         to gimple_phi.
303 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
305         Make gimple_phi_arg_set_location require a gimple_phi
307         * gimple.h (gimple_phi_arg_set_location): Require a gimple_phi
308         rather than a plain gimple.
310 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
312         Make add_phi_arg require a gimple_phi
314         * tree-phinodes.h (add_phi_arg): Require a gimple_phi rather than
315         a plain gimple.
316         * tree-phinodes.c (add_phi_arg): Likewise.
318         * gimple-ssa-strength-reduction.c (create_phi_basis): Strengthen
319         local "phi" from plain gimple to gimple_phi.
321         * graphite-scop-detection.c (canonicalize_loop_closed_ssa):
322         Likewise for "close_phi".
324         * ipa-split.c (split_function): Convert "psi" to
325         gimple_phi_iterator.
327         * omp-low.c (expand_omp_for_static_nochunk): Introduce
328         gimple_phi_iterator gpi, using it to strengthen "phi" to be a
329         gimple_phi.
330         (expand_omp_for_static_chunk): Likewise.
332         * tree-cfg.c (gimple_duplicate_bb): Make topmost "gsi" decl more
333         tightly-scoped, and eliminate decls "phis", "phi", "stmt", "copy"
334         in favor of more tightly-scoped gimple_phi_iterator gpi and
335         gimple_phi decls "phi" and "copy", and gimple decls "stmt" and
336         "copy".
338         * tree-parloops.c (create_parallel_loop): Introduce
339         gimple_phi_iterator gpi, using it to strengthen "phi" to be a
340         gimple_phi.
342         * tree-ssa-loop-im.c (execute_sm_if_changed): Likewise.
344         * tree-ssa-loop-manip.c (create_iv): Split out new gimple_phi
345         local "phi" from "stmt", and convert the latter into being a
346         gimple_assign.
348         * tree-ssa-pre.c (insert_into_preds_of_block): Strengthen local
349         "phi" to be a gimple_phi.
351         * tree-ssa-tail-merge.c (vop_phi): Require a gimple_phi rather
352         than a plain gimple.
353         (replace_block_by): Strengthen local "bb2_phi" to be a gimple_phi.
355         * tree-tailcall.c (add_successor_phi_arg): Use gsi.phi when
356         invoking add_phi_arg.
357         (eliminate_tail_call): Introduce gimple_phi_iterator gpi, using it
358         to strengthen "phi" to be a gimple_phi.
359         (create_tailcall_accumulator): Strengthen local "phi" to be a
360         gimple_phi.
361         (tree_optimize_tail_calls_1): Likewise.
363         * tree-vect-data-refs.c (vect_setup_realignment): Strengthen
364         local "phi_stmt" to be a gimple_phi.
366         * tree-vect-loop-manip.c (slpeel_tree_duplicate_loop_to_edge_cfg):
367         Strengthen "gsi", "gsi_orig", "gsi_new" to be
368         gimple_phi_iterators, and "phi" "orig_phi", "new_phi" to be
369         gimple_phi instances.
370         (slpeel_tree_peel_loop_to_edge): Strengthen local "new_phi" to be
371         a gimple_phi.
373         * tree-vect-loop.c (get_initial_def_for_induction): Likewise for
374         "induction_phi".
375         (vect_create_epilog_for_reduction): Add checked casts to
376         gimple_phi; strengthen local "outer_phi" to gimple_phi and
377         "new_vec_stmt" to gimple_assign.
378         (vect_finalize_reduction): Strengthen local "vect_phi" to
379         gimple_phi.
380         (vectorizable_reduction): Likewise for "new_phi".
382         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
383         (vectorizable_load): Likewise for "phi".
385 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
387         Make gimple_phi_arg_def_ptr and gimple_phi_arg_has_location require a gimple_phi
389         * gimple.h (gimple_phi_arg_def_ptr): Require a gimple_phi rather
390         than a plain gimple.
391         (gimple_phi_arg_has_location): Likewise.
393         * gimple-streamer-in.c (input_phi): Return a gimple_phi rather
394         than a plain gimple.
395         * gimple-streamer-out.c (output_phi): Require a gimple_phi rather
396         than a plain gimple.
397         (output_bb): Convert iteration to a gimple_phi_iterator, and local
398         "phi" to gimple_phi.
400         * omp-low.c (expand_omp_for_static_chunk): Convert iterator "psi"
401         to a gimple_phi_iterator; convert locals "phi" and "nphi" to be
402         gimple_phi.
404         * tree-cfg.c (gimple_duplicate_sese_tail): Likewise for "psi" and
405         "phi".
406         (move_block_to_fn): Introduce new gimple_phi_iterator "psi", using
407         it in place of "gsi" where necessary.  Convert "phi" to be a
408         gimple_phi.
410         * tree-cfgcleanup.c (remove_forwarder_block): Likewise.
412         * tree-vect-loop-manip.c (vect_loop_versioning): Convert "gsi" to
413         a gimple_phi_iterator, and "orig_phi" and "new_phi" to be
414         gimple_phi.
416         * tree.c (find_decls_types_in_node): Introduce new
417         gimple_phi_iterator "psi", using it in place of "si" where
418         necessary.  Convert "phi" to be a gimple_phi.
420 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
422         omp-low.c: Use more concrete types of gimple statement for various locals
424         * omp-low.c (finalize_task_copyfn): Strengthen local "bind" from
425         plain gimple to gimple_bind.
426         (lower_rec_input_clauses): Strengthen local "g" from
427         plain gimple to gimple_assign.
428         (lower_lastprivate_clauses): Likewise for "stmt" to gimple_cond
429         and "g" to gimple_call.
430         (expand_omp_for_init_vars): Likewise, for two decls of "stmt" to
431         gimple_assign.
432         (expand_omp_atomic_pipeline): Likewise for one decl of "stmt".
433         (expand_omp_atomic_mutex): Likewise.
434         (lower_omp_master): Likewise for "x" to gimple_call.
435         (lower_omp_ordered): Likewise.
437 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
439         tree-parloops.c: Use gimple_phi in various places
441         * tree-parloops.c (reduction_info::keep_res): Strengthen field
442         from plain gimple to gimple_phi.
443         (transform_to_exit_first_loop): Strengthen locals "phi", "nphi"
444         to gimple_phi.  Eliminate early decl of gimple_stmt_iterator gsi
445         in favor of more tightly scoped gimple_phi_iterators, and a final
446         later decl as a gimple_stmt_iterator.
448 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
450         Introduce gimple_omp_sections
452         * coretypes.h (gimple_omp_sections): New typedef.
453         (const_gimple_omp_sections): New typedef.
455         * gimple-pretty-print.c (dump_gimple_omp_sections): Require a
456         gimple_omp_sections rather than a plain gimple.
457         (pp_gimple_stmt_1): Add checked cast to gimple_omp_sections within
458         GIMPLE_OMP_SECTIONS case of switch statement.
460         * gimple.c (gimple_build_omp_sections): Return a
461         gimple_omp_sections rather than a plain gimple.
463         * gimple.h (gimple_build_omp_sections): Return a
464         gimple_omp_sections rather than a plain gimple.
466         * omp-low.c (scan_omp_sections): Require a gimple_omp_sections
467         rather than a plain gimple.
468         (scan_omp_1_stmt): Add checked cast to gimple_omp_sections within
469         GIMPLE_OMP_SECTIONS case of switch statement.
470         (expand_omp_sections): Strengthen local "sections_stmt" from gimple
471         to gimple_omp_sections.
472         (lower_omp_sections): Likewise for "stmt".
474 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
476         Introduce gimple_omp_teams
478         * coretypes.h (gimple_omp_teams): New typedef.
479         (const_gimple_omp_teams): New typedef.
481         * gimple.h (gimple_build_omp_teams): Return a gimple_omp_teams
482         rather than a plain gimple.
483         (gimple_omp_teams_set_clauses): Require a gimple_omp_teams rather
484         than a plain gimple.
486         * gimple-pretty-print.c (dump_gimple_omp_teams): Require a
487         gimple_omp_teams rather than a plain gimple.
488         (pp_gimple_stmt_1): Add checked cast to gimple_omp_teams within
489         GIMPLE_OMP_TEAMS case of switch statement.
491         * gimple.c (gimple_build_omp_teams): Return a gimple_omp_teams
492         rather than a plain gimple.
494         * omp-low.c (scan_omp_teams): Likewise.
495         (scan_omp_1_stmt): Add checked cast to gimple_omp_teams within
496         GIMPLE_OMP_TEAMS case of switch statement.
497         (lower_omp_teams): Strengthen local "teams_stmt" from gimple to
498         gimple_omp_teams.
500 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
502         Introduce gimple_omp_target
504         * coretypes.h (gimple_omp_target): New typedef.
505         (const_gimple_omp_target): New typedef.
507         * gimple.h (gimple_build_omp_target): Return a gimple_omp_target
508         rather than a plain gimple.
509         (gimple_omp_target_set_clauses): Require a gimple_omp_target
510         rather than a plain gimple.
511         (gimple_omp_target_set_kind): Likewise.
512         (gimple_omp_target_child_fn_ptr): Likewise.
513         (gimple_omp_target_set_child_fn): Likewise.
514         (gimple_omp_target_data_arg_ptr): Likewise.
515         (gimple_omp_target_set_data_arg): Likewise.
516         (gimple_omp_target_child_fn): Require a const_gimple_omp_target
517         rather than a plain const_gimple.
518         (gimple_omp_target_data_arg): Likewise.
520         * gimple-pretty-print.c (dump_gimple_omp_target): Require a
521         gimple_omp_target rather than a plain gimple.
522         (pp_gimple_stmt_1): Add checked cast to gimple_omp_target within
523         GIMPLE_OMP_TARGET case of switch statement.
525         * gimple.c (gimple_build_omp_target): Return a gimple_omp_target
526         rather than a plain gimple.
528         * gimplify.c (gimplify_omp_target_update): Strengthen local "stmt"
529         from gimple to gimple_omp_target.
531         * omp-low.c (scan_omp_target): Require a gimple_omp_target rather
532         than a plain gimple.
533         (scan_omp_1_stmt): Add checked cast to gimple_omp_target within
534         GIMPLE_OMP_TARGET case of switch statement.
535         (expand_omp_target): Strengthen local "entry_stmt" from gimple to
536         gimple_omp_target.
537         (lower_omp_target): Likewise for "stmt".
539         * tree-nested.c (convert_nonlocal_reference_stmt): Add checked
540         cast to gimple_omp_target.
541         (convert_local_reference_stmt): Likewise.
542         (convert_gimple_call): Likewise.
544 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
546         Introduce gimple_omp_single
548         * coretypes.h (gimple_omp_single): New typedef.
549         (const_gimple_omp_single): New typedef.
551         * gimple.h (gimple_build_omp_single): Return a gimple_omp_single
552         rather than a plain gimple.
553         (gimple_omp_single_set_clauses): Require a gimple_omp_single
554         rather than a plain gimple.
556         * gimple-pretty-print.c (dump_gimple_omp_single): Require a
557         gimple_omp_single rather than a plain gimple.
558         (pp_gimple_stmt_1): Add checked cast to gimple_omp_single within
559         GIMPLE_OMP_SINGLE case of switch statement.
561         * gimple.c (gimple_build_omp_single): Return a gimple_omp_single
562         rather than a plain gimple.
564         * omp-low.c (scan_omp_single): Require a gimple_omp_single rather
565         than a plain gimple.
566         (scan_omp_1_stmt): Add checked cast to gimple_omp_single within
567         GIMPLE_OMP_SINGLE case of switch statement.
568         (lower_omp_single_simple): Require a gimple_omp_single rather
569         than a plain gimple.
570         (lower_omp_single_copy): Likewise.
571         (lower_omp_single): Strengthen local "single_stmt" from gimple to
572         gimple_omp_single.
574 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
576         Introduce gimple_omp_task
578         * coretypes.h (gimple_omp_task): New typedef.
579         (const_gimple_omp_task): New typedef.
581         * gimple.h (gimple_build_omp_task): Return a gimple_omp_task
582         rather than a plain gimple.
584         * gimple-pretty-print.c (dump_gimple_omp_task): Require a
585         gimple_omp_task rather than a plain gimple.
586         (pp_gimple_stmt_1): Add checked cast to gimple_omp_task within
587         GIMPLE_OMP_TASK case of switch statement.
589         * gimple.c (gimple_build_omp_task): Return a gimple_omp_task
590         rather than a plain gimple.
592         * omp-low.c (finalize_task_copyfn): Require a gimple_omp_task
593         rather than a plain gimple.
594         (delete_omp_context): Add checked cast to gimple_omp_task.
595         (scan_omp_task): Strengthen local "stmt" from gimple to
596         gimple_omp_task.
597         (expand_task_call): Require a gimple_omp_task rather than a plain
598         gimple.
599         (expand_omp_taskreg): Add checked cast to gimple_omp_task.
600         (create_task_copyfn): Require a gimple_omp_task rather than a
601         plain gimple.
602         (lower_omp_taskreg): Add checked cast to gimple_omp_task.
604 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
606         tree-cfg.c: Make verify_gimple_call require a gimple_call
608         * tree-cfg.c (verify_gimple_call): Require a gimple_call rather
609         than a plain gimple.
610         (verify_gimple_stmt): Add checked cast to gimple_call within
611         GIMPLE_CALL case of switch statement.
613 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
615         Introduce gimple_omp_parallel
617         * coretypes.h (gimple_omp_parallel): New typedef.
618         (const_gimple_omp_parallel): New typedef.
620         * cgraphbuild.c (build_cgraph_edges): Convert check of code
621         against GIMPLE_OMP_PARALLEL to a dyn_cast <gimple_omp_parallel>
622         and new local.
624         * gimple-pretty-print.c (dump_gimple_omp_parallel): Require a
625         gimple_omp_parallel rather than a plain gimple.
626         (pp_gimple_stmt_1): Add a checked cast to gimple_omp_parallel
627         within GIMPLE_OMP_PARALLEL case of switch statement.
629         * gimple-walk.c (walk_gimple_op): Likewise, introducing a local.
631         * gimple.c (gimple_build_omp_parallel): Return a
632         gimple_omp_parallel rather than a plain gimple.
633         (gimple_copy): Add checked casts to gimple_omp_parallel within
634         GIMPLE_OMP_PARALLEL case of switch statement, introducing locals.
636         * gimple.h (gimple_build_omp_parallel): Return a
637         gimple_omp_parallel rather than a plain gimple.
638         (gimple_omp_parallel_clauses_ptr): Require a gimple_omp_parallel
639         rather than a plain gimple.
640         (gimple_omp_parallel_set_clauses): Likewise.
641         (gimple_omp_parallel_data_arg_ptr): Likewise.
642         (gimple_omp_parallel_set_data_arg): Likewise.
643         (gimple_omp_parallel_child_fn_ptr): Likewise.
644         (gimple_omp_parallel_set_child_fn): Likewise.
645         (gimple_omp_parallel_child_fn): Require a
646         const_gimple_omp_parallel rather than a plain const_gimple.
647         (gimple_omp_parallel_data_arg): Likewise.
649         * omp-low.c (scan_omp_parallel): Strengthen local "stmt" from
650         gimple to gimple_omp_parallel.
651         (expand_parallel_call): Require a gimple_omp_parallel for
652         "entry_stmt" rather than a plain gimple.
653         (remove_exit_barrier):  Strengthen local "parallel_stmt" from
654         gimple to gimple_omp_parallel.
655         (expand_omp_taskreg): Add checked casts to gimple_omp_parallel.
657         * tree-inline.c (remap_gimple_stmt): Add a checked cast to
658         gimple_omp_parallel within GIMPLE_OMP_PARALLEL case of switch
659         statement, introducing local.
661 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
663         Introduce gimple_omp_for
665         * coretypes.h (gimple_omp_for): New.
666         (const_gimple_omp_for): New.
668         * gimple.h (gimple_build_omp_for): Return a gimple_omp_for rather
669         than a plain gimple.
670         (gimple_omp_for_set_kind): Require a gimple_omp_for rather than a
671         plain gimple.
672         (gimple_omp_for_set_combined_p): Likewise.
673         (gimple_omp_for_set_combined_into_p): Likewise.
675         * gimple-pretty-print.c (dump_gimple_omp_for): Require a
676         gimple_omp_for rather than a plain gimple.
677         (pp_gimple_stmt_1): Add a checked cast to gimple_omp_for in
678         GIMPLE_OMP_FOR case of switch statement.
680         * gimple.c (gimple_build_omp_for): Return a gimple_omp_for rather
681         than a plain gimple.
682         (gimple_copy): Add a checked cast to gimple_omp_for and a new local.
684         * gimplify.c (gimplify_omp_for): Strengthen local "gfor" from
685         gimple to gimple_omp_for.
687         * omp-low.c (omp_for_data::for_stmt): Strengthen field from gimple
688         to gimple_omp_for.
689         (extract_omp_for_data): Require a gimple_omp_for rather than a
690         plain gimple.
691         (workshare_safe_to_combine_p): Add a checked cast to
692         gimple_omp_for.
693         (get_ws_args_for): Convert check of code against GIMPLE_OMP_FOR
694         with a dyn_cast<gimple_omp_for> and a new local.
695         (scan_omp_parallel): Add a checked cast to gimple_omp_for and a
696         new local.
697         (scan_omp_for): Require a gimple_omp_for rather than a plain
698         gimple.
699         (scan_omp_1_stmt): Add a checked cast to gimple_omp_for in
700         GIMPLE_OMP_FOR case of switch statement.
701         (expand_omp_for): Add a checked cast to gimple_omp_for.
702         (lower_omp_for): Strengthen local "stmt" from gimple to
703         gimple_omp_for.
705         * tree-nested.c (walk_gimple_omp_for): Require a gimple_omp_for
706         rather than a plain gimple.
707         (convert_nonlocal_reference_stmt): Add a checked cast to
708         gimple_omp_for in GIMPLE_OMP_FOR case of switch statement.
709         (convert_local_reference_stmt): Likewise.
711         * tree-parloops.c (create_parallel_loop): Strengthen local
712         "for_stmt" from gimple to gimple_omp_for.
714 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
716         Introduce gimple_omp_critical
718         * coretypes.h (gimple_omp_critical): New typedef.
719         (const_gimple_omp_critical): New typedef.
721         * gimple-pretty-print.c (dump_gimple_omp_critical): Require a
722         gimple_omp_critical rather than a plain gimple.
723         (pp_gimple_stmt_1): Add a checked cast to gimple_omp_critical
724         within GIMPLE_OMP_CRITICAL case of switch statement.
726         * gimple-walk.c (walk_gimple_op): Likewise.
728         * gimple.c (gimple_build_omp_critical): Return a gimple_omp_critical
729         rather than a plain gimple.
730         (gimple_copy): Add checked casts to gimple_omp_critical
731         within GIMPLE_OMP_CRITICAL case of switch statement.
733         * gimple.h (gimple_debug): Likewise.
734         (gimple_build_omp_critical): Return a gimple_omp_critical rather
735         than a plain gimple.
736         (gimple_omp_critical_name): Require a const_gimple_omp_critical
737         rather than a plain const_gimple.
738         (gimple_omp_critical_name_ptr): Require a gimple_omp_critical
739         rather than a plain gimple.
740         (gimple_omp_critical_set_name): Likewise.
742         * omp-low.c (check_omp_nesting_restrictions): Add a checked cast
743         to gimple_omp_critical within GIMPLE_OMP_CRITICAL case of switch
744         statement, introducing a new local "other_crit" for type-safety.
745         (lower_omp_critical): Strengthen local "stmt" to
746         gimple_omp_critical.
748         * tree-inline.c (remap_gimple_stmt): Add a checked cast to
749         gimple_omp_critical within GIMPLE_OMP_CRITICAL case of switch
750         statement.
752 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
754         Introduce gimple_omp_continue
756         * coretypes.h (gimple_omp_continue): New typedef.
757         (const_gimple_omp_continue): New typedef.
759         * gimple.h (gimple_build_omp_continue): Return a
760         gimple_omp_continue rather than a plain gimple.
761         (gimple_omp_continue_control_def): Require a
762         const_gimple_omp_continue rather than a plain const_gimple.
763         (gimple_omp_continue_control_use): Likewise.
764         (gimple_omp_continue_control_def_ptr): Require a gimple_omp_continue
765         rather than a plain gimple.
766         (gimple_omp_continue_set_control_def): Likewise.
767         (gimple_omp_continue_control_use_ptr): Likewise.
768         (gimple_omp_continue_set_control_use): Likewise.
770         * gimple-pretty-print.c (dump_gimple_omp_continue): Require a
771         gimple_omp_continue rather than a plain gimple.
772         (pp_gimple_stmt_1): Add a checked cast to gimple_omp_continue
773         within GIMPLE_OMP_CONTINUE case of switch statement.
775         * gimple-walk.c (walk_gimple_op): Likewise, adding a new local.
777         * gimple.c (gimple_build_omp_continue): Return a
778         gimple_omp_continue rather than a plain gimple.
780         * omp-low.c (gimple_build_cond_empty): Return a gimple_cond
781         rather than a plain gimple.
782         (expand_omp_for_generic): Split local "stmt" into "assign_stmt",
783         "cont_stmt", "cond_stmt", "call_stmt" of types gimple_assign,
784         gimple_omp_continue, gimple_cond, gimple_call respectively.
785         (expand_omp_for_static_nochunk): Likewise, splitting into two
786         "cond_stmt" decls. "assign_stmt", "cont_stmt"
787         (expand_omp_for_static_chunk): Likewise, splitting into
788         "cond_stmt", "assign_stmt", "cont_stmt".
789         (expand_omp_sections): Strengthen local "cont" from gimple to
790         gimple_omp_continue.
792 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
794         Introduce gimple_omp_atomic_store
796         * coretypes.h (gimple_omp_atomic_store): New typedef.
797         (const_gimple_omp_atomic_store): New typedef.
799         * gimple-pretty-print.c (dump_gimple_omp_atomic_store): Require
800         a gimple_omp_atomic_store rather than a plain gimple.
801         (pp_gimple_stmt_1): Add checked cast to gimple_omp_atomic_store
802         within GIMPLE_OMP_ATOMIC_STORE case of switch statement.
803         * gimple-walk.c (walk_gimple_op): Likewise.
805         * gimple.c (gimple_build_omp_atomic_store): Return a
806         gimple_omp_atomic_store rather than a plain gimple.
808         * gimple.h (gimple_build_omp_atomic_store): Return a
809         gimple_omp_atomic_store rather than a plain gimple.
810         (gimple_omp_atomic_store_set_val): Require a gimple_omp_atomic_store
811         rather than a plain gimple.
812         (gimple_omp_atomic_store_val_ptr): Likewise.
813         (gimple_omp_atomic_store_val): Require a
814         const_gimple_omp_atomic_store rather than a plain const_gimple.
816         * gimplify.c (gimplify_omp_atomic): Strengthen locals "loadstmt" and
817         "storestmt" from gimple to gimple_omp_atomic_load loadstmt and
818         gimple_omp_atomic_store storestmt respectively.
820         * omp-low.c (expand_omp_atomic): Strengthen local "store" from
821         gimple to gimple_omp_atomic_store.
823 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
825         Introduce gimple_omp_atomic_load
827         * coretypes.h (gimple_omp_atomic_load): New typedef.
828         (const_gimple_omp_atomic_load): New typedef.
830         * gimple-pretty-print.c (dump_gimple_omp_atomic_load): Require a
831         gimple_omp_atomic_load rather than a plain gimple.
832         (pp_gimple_stmt_1): Add a checked cast to gimple_omp_atomic_load
833         within GIMPLE_OMP_ATOMIC_LOAD case of switch statement.
835         * gimple-walk.c (walk_gimple_op): Likewise, introducing a new local.
837         * gimple.c (gimple_build_omp_atomic_load): Return a
838         gimple_omp_atomic_load rather than a plain gimple.
840         * gimple.h (gimple_build_omp_atomic_load): Return a
841         gimple_omp_atomic_load rather than a plain gimple.
842         (gimple_omp_atomic_load_set_lhs): Require a
843         gimple_omp_atomic_load rather than a plain gimple.
844         (gimple_omp_atomic_load_lhs_ptr): Likewise.
845         (gimple_omp_atomic_load_set_rhs): Likewise.
846         (gimple_omp_atomic_load_rhs_ptr): Likewise.
847         (gimple_omp_atomic_load_lhs): Require a
848         const_gimple_omp_atomic_load rather than a plain const_gimple.
849         (gimple_omp_atomic_load_rhs): Likewise.
851         * gimplify-me.c (gimple_regimplify_operands): Add a checked cast
852         to gimple_omp_atomic_load within GIMPLE_OMP_ATOMIC_LOAD case of
853         switch statement.
855         * omp-low.c (expand_omp_atomic): Strengthen type of local "load"
856         from gimple to gimple_omp_atomic_load.
857         (lower_omp_1): Add a checked cast to gimple_omp_atomic_load within
858         GIMPLE_OMP_ATOMIC_LOAD case of switch statement.
860 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
862         Use more concrete types for various gimple statements
864         * cgraphunit.c (thunk_adjust): Strengthen local "stmt" from gimple
865         to gimple_assign.
867         * gimple-ssa-isolate-paths.c
868         (insert_trap_and_remove_trailing_statements): Strengthen local
869         "new_stmt" from gimple to gimple_call.
871         * gimple-ssa-strength-reduction.c (replace_mult_candidate):
872         Strengthen local "copy_stmt" from gimple to gimple_assign.
873         (create_add_on_incoming_edge): Likewise, for "new_stmt".
874         (insert_initializers): Likewise, for "init_stmt".
875         (introduce_cast_before_cand): Likewise, for "cast_stmt".
876         (replace_one_candidate): Likewise, for "copy_stmt" and
877         "cast_stmt".
879         * gimplify.c (build_stack_save_restore): Require gimple_calls
880         rather than plain gimples.
881         (gimplify_bind_expr): Strengthen locals "stack_save" and
882         "stack_restore" from gimple to gimple_call.  Strengthen "gs"
883         to gimple_try.
884         (gimplify_switch_expr): Strengthen local "gimple_switch" from
885         gimple to gimple_switch, and "new_default" to gimple_label.
886         (gimplify_cond_expr): Strengthen local "gimple_cond" from gimple
887         to gimple_cond.
888         (gimplify_init_constructor): Strengthen local "init" from gimple
889         to gimple_assign.
890         (gimplify_cleanup_point_expr): Strengthen local "gtry" from gimple
891         to gimple_try.
892         (gimple_push_cleanup): Strengthen locals "ffalse" and "ftrue" from
893         gimple to gimple_assign.
895         * tree-eh.c (do_goto_redirection): Strengthen local to gimple_goto.
896         (emit_post_landing_pad): Strengthen local to gimple_label.
898         * tree-outof-ssa.c (insert_backedge_copies): Strengthen local
899         "stmt" from gimple to gimple_assign.
901         * tree-parloops.c (take_address_of): Likewise.
903         * tree-predcom.c (replace_ref_with): Likewise, for "new_stmt".
904         (initialize_root_vars_lm): Likewise, for "init_stmt".
905         (reassociate_to_the_same_stmt): Likewise, for "new_stmt" and "tmp_stmt".
907         * tree-profile.c (gimple_gen_edge_profiler): Likewise, for "stmt1",
908         "stmt2", "stmt3".
909         (gimple_gen_ic_profiler): Likewise.
910         (gimple_gen_ic_func_profiler): Strengthen local "stmt1" from
911         gimple to gimple_call, and "stmt2" to gimple_assign.
913         * tree-scalar-evolution.c (scev_const_prop): Strengthen local
914         "ass" from gimple to gimple_assign.
916         * tree-sra.c (build_ref_for_offset): Likewise for "stmt".
917         (generate_subtree_copies): Likewise; also strengthen "ds" to
918         gimple_debug.
919         (init_subtree_with_zero): Likewise.
920         (sra_modify_expr): Likewise.
921         (load_assign_lhs_subreplacements): Likewise.
922         (sra_modify_assign): Strengthen "ds" to gimple_debug.
923         (sra_ipa_reset_debug_stmts): Likewise for "def_temp".
925         * tree-ssa-ccp.c (insert_clobber_before_stack_restore):
926         Strengthen local "clobber_stmt" from gimple to gimple_assign.
928         * tree-ssa-dce.c (remove_dead_stmt): Strengthen "note" to
929         gimple_debug.
931         * tree-ssa-dom.c (record_equivalences_from_stmt): Strengthen
932         local "new_stmt" from gimple to gimple_assign.
933         (optimize_stmt): Likewise.
935         * tree-ssa-forwprop.c (simplify_bitwise_binary): Likewise for
936         4 declarations of "newop".
937         (simplify_rotate): Likewise for "g".
939         * tree-ssa-loop-im.c (rewrite_reciprocal): Likewise for 3 locals.
940         (rewrite_bittest): Likewise for "stmt" and "stmt2".
941         (move_computations_dom_walker::before_dom_children): Likewise for
942         "new_stmt".
943         (execute_sm): Likewise for "load" and "store".
945         * tree-ssa-loop-ivcanon.c (remove_exits_and_undefined_stmts):
946         Strengthen local "stmt" from gimple to gimple_call.
947         (unloop_loops): Likewise.
949         * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Strengthen
950         local "ass" from gimple to gimple_assign.
951         (remove_unused_ivs): Strengthen "def_temp" to gimple_debug.
953         * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Strengthen local "stmt"
954         from gimple to gimple_assign.
956         * tree-ssa-loop-prefetch.c (issue_prefetch_ref): Strengthen local
957         "prefetch" from gimple to gimple_call.
959         * tree-ssa-math-opts.c (insert_reciprocals): Strengthen local
960         "new_stmt" from gimple to gimple_assign.
961         (powi_as_mults_1): Likewise for "mult_stmt".
962         (powi_as_mults): Likewise for "div_stmt".
963         (build_and_insert_binop): Likewise for "stmt".
964         (build_and_insert_cast): Likewise.
965         (pass_cse_sincos::execute): Likewise for "stmt" and various decls
966         of "new_stmt".
967         (convert_mult_to_fma): Likewise for "fma_stmt".
969         * tree-ssa-phiopt.c (conditional_replacement): Likewise for "new_stmt".
970         (abs_replacement): Likewise.
972         * tree-ssa-phiprop.c (phiprop_insert_phi): Likewise for "tmp".
974         * tree-ssa-pre.c (create_expression_by_pieces): Likewise for "newstmt".
975         (eliminate_insert): Likewise for "tem".
977         * tree-ssa-propagate.c (update_gimple_call): Strengthen locals
978         "new_stmt" and "stmt" from gimple to gimple_call.
979         (update_call_from_tree): Likewise for "new_stmt".
981         * tree-ssa-reassoc.c (build_and_add_sum): Likewise for "sum".
982         (update_ops): Likewise for "g".
983         (maybe_optimize_range_tests): Likewise.
984         (rewrite_expr_tree_parallel): Require a gimple_assign rather than
985         a plain gimple.
986         (reassociate_bb): Add a checked cast to gimple_assign.
988         * tree-ssa.c (insert_debug_temp_for_var_def): Strengthen local
989         "def_temp" from gimple to gimple_debug.
991         * tree-switch-conversion.c (emit_case_bit_tests): Strengthen local
992         "shift_stmt" from gimple to gimple_assign.
994         * tree-tailcall.c (adjust_return_value_with_ops): Likewise for
995         "stmt".
996         (update_accumulator_with_ops): Likewise.
998         * tree-vect-data-refs.c (bump_vector_ptr): Likewise for
999         "incr_stmt".
1001         * tree-vect-stmts.c (vectorizable_condition): Likewise for
1002         "new_stmt".
1004         * tree-vrp.c (build_assert_expr_for): Likewise for "assertion".
1005         (simplify_truth_ops_using_ranges): Likewise for "newop".
1006         (simplify_float_conversion_using_ranges): Likewise for "conv".
1008         * ubsan.c (instrument_mem_ref): Strengthen local "g" from gimple
1009         to gimple_call.
1011         * value-prof.c (gimple_divmod_fixed_value): Require a
1012         gimple_assign rather than a plain gimple; strengthen types of locals.
1013         (gimple_mod_pow2): Likewise.
1014         (gimple_mod_subtract): Likewise.
1015         (gimple_divmod_fixed_value_transform): Strengthen local
1016         "stmt" from gimple to gimple_assign.
1017         (gimple_mod_pow2_value_transform): Likewise.
1018         (gimple_mod_subtract_transform): Likewise.
1019         (gimple_ic): Strengthen types of locals.
1021 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
1023         Introduce gimple_try
1025         * coretypes.h (gimple_try): New typedef.
1026         (const_gimple_try): New typedef.
1028         * gimple-low.c (gimple_try_catch_may_fallthru): Require a
1029         gimple_try rather than a plain gimple.
1030         (gimple_stmt_may_fallthru): Add checked cast to gimple_try.
1032         * gimple-pretty-print.c (dump_gimple_try): Require a gimple_try
1033         rather than a plain gimple.
1034         (pp_gimple_stmt_1): Add checked cast to gimple_try within
1035         GIMPLE_TRY case of switch statement.
1037         * tree-eh.c (finally_tree_node::parent): Strengthen field from
1038         gimple to gimple_try.
1039         (record_in_finally_tree): Require a gimple_try rather than a plain
1040         gimple.
1041         (collect_finally_tree): Likewise.
1042         (collect_finally_tree_1): Likewise.
1043         (struct leh_tf_state::try_finally_expr): Strengthen field from
1044         gimple to gimple_try.
1045         (struct leh_tf_state::top_p): Likewise.
1046         (lower_eh_must_not_throw): Require a gimple_try rather than a
1047         plain gimple.
1048         (frob_into_branch_around): Likewise.
1049         (lower_try_finally_dup_block): Strengthen local from gimple to
1050         gimple_try.
1051         (honor_protect_cleanup_actions): Split out uses of "x" into new
1052         locals "eh_mnt" and "try_stmt" with stronger types.
1053         (lower_try_finally): Require a gimple_try rather than a plain
1054         gimple.
1055         (lower_catch): Likewise.
1056         (lower_eh_filter): Likewise.
1057         (lower_eh_must_not_throw): Likewise.
1058         (lower_cleanup): Likewise.
1059         (lower_eh_constructs_2): Add checked cast to gimple_try within
1060         GIMPLE_TRY case of switch statement, introducing new local
1061         "try_stmt", using it for type-safety.
1063 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
1065         Use subclasses of gimple in various places
1067         * asan.c (insert_if_then_before_iter): Require a gimple cond
1068         rathern than a plain gimple.
1069         (asan_expand_check_ifn): Add a checked cast to gimple_cond.
1071         * cfgloopmanip.c (create_empty_if_region_on_edge): Likewise.
1073         * omp-low.c (simd_clone_adjust): Strengthen local from gimple
1074         to gimple_phi.
1076         * sese.c (set_ifsese_condition): Strengthen local from gimple to
1077         gimple_cond.
1079         * tree-call-cdce.c (gen_one_condition): Strengthen locals from
1080         gimple to gimple_assign and gimple_cond.
1082         * tree-ssa-phiopt.c (minmax_replacement): Likewise.
1083         (cond_store_replacement): Strengthen locals from gimple to
1084         gimple_phi and gimple_assign.
1085         (cond_if_else_store_replacement_1): Likewise.
1087         * tree-ssa-pre.c (do_regular_insertion): Strengthen local from
1088         gimple to gimple_assign.
1090         * tree-switch-conversion.c (hoist_edge_and_branch_if_true):
1091         Strengthen local from gimple to gimple_cond.
1092         (gen_def_assigns): Return a gimple_assign rather than a plain
1093         gimple.
1094         (gen_inbound_check): Strengthen locals from gimple to gimple_cond
1095         and gimple_assign.
1097         * tree-vect-loop-manip.c (slpeel_add_loop_guard): Strengthen local
1098         from gimple to gimple_cond.
1099         (set_prologue_iterations): Strengthen locals from gimple to
1100         gimple_phi and gimple_cond.
1102         * value-prof.c (gimple_ic): Strengthen local from gimple to
1103         gimple_phi.
1104         (gimple_stringop_fixed_value): Strengthen locals from gimple to
1105         gimple_assign, gimple_cond, gimple_call, and gimple_phi.
1107 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
1109         Introduce gimple_eh_dispatch
1111         * coretypes.h (gimple_eh_dispatch): New typedef.
1112         (const_gimple_eh_dispatch): New typedef.
1114         * gimple-pretty-print.c (dump_gimple_eh_dispatch): Require a
1115         gimple_eh_dispatch rather than a plain gimple.
1116         (pp_gimple_stmt_1): Add a checked cast to gimple_eh_dispatch
1117         within GIMPLE_EH_DISPATCH case of switch statement.
1119         * gimple-streamer-in.c (input_gimple_stmt): Likewise.
1121         * gimple-streamer-out.c (output_gimple_stmt): Likewise.
1123         * gimple.c (gimple_build_eh_dispatch): Return a gimple_eh_dispatch
1124         rather than a plain gimple.
1126         * gimple.h (gimple_build_eh_dispatch): Return a gimple_eh_dispatch
1127         rather than a plain gimple.
1128         (gimple_eh_dispatch_region): Require a const_gimple_eh_dispatch
1129         rather than a plain const_gimple.
1130         (gimple_eh_dispatch_set_region): Require a gimple_eh_dispatch
1131         rather than a plain gimple.
1133         * tree-cfg.c (make_edges): Add a checked cast to gimple_eh_dispatch
1134         within GIMPLE_EH_DISPATCH case of switch statement.
1135         (gimple_verify_flow_info): Likewise.
1136         (gimple_redirect_edge_and_branch): Likewise.
1137         (move_stmt_r): Likewise, adding a local.
1139         * tree-eh.c (emit_eh_dispatch): Convert local from gimple to
1140         gimple_eh_dispatch.
1141         (make_eh_dispatch_edges): Require a gimple_eh_dispatch rather than
1142         a plain gimple.
1143         (redirect_eh_dispatch_edge): Likewise.
1144         (lower_eh_dispatch): Likewise.
1145         (execute_lower_eh_dispatch): Add a checked cast to
1146         gimple_eh_dispatch.
1147         (mark_reachable_handlers): Likewise.
1148         (verify_eh_dispatch_edge): Require a gimple_eh_dispatch rather
1149         than a plain gimple.
1151         * tree-eh.h (make_eh_dispatch_edges): Likewise.
1152         (redirect_eh_dispatch_edge): Likewise.
1153         (verify_eh_dispatch_edge): Likewise.
1155         * tree-inline.c (remap_gimple_stmt): Add a checked cast to
1156         gimple_eh_dispatch within GIMPLE_EH_DISPATCH case of switch
1157         statement, adding a local.
1158         (copy_edges_for_bb): Add a checked cast to gimple_eh_dispatch.
1160 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
1162         Introduce gimple_resx
1164         * coretypes.h (gimple_resx): New typedef.
1165         (const_gimple_resx): New typedef.
1167         * gimple.h (gimple_build_resx): Return a gimple_resx rather than a
1168         plain gimple.
1169         (gimple_resx_region): Require a const_gimple_resx rather than a
1170         plain const_gimple.
1171         (gimple_resx_set_region): Require a gimple_resx rather than a
1172         plain gimple.
1174         * gimple-pretty-print.c (dump_gimple_resx): Require a gimple_resx
1175         rather than a plain gimple.
1176         (pp_gimple_stmt_1): Add a checked cast to gimple_resx within
1177         GIMPLE_RESX case of switch statement.
1179         * gimple-streamer-in.c (input_gimple_stmt): Likewise.
1181         * gimple-streamer-out.c (output_gimple_stmt): Likewise.
1183         * gimple.c (gimple_build_resx): Return a gimple_resx rather than
1184         a plain gimple.
1186         * tree-cfg.c (move_stmt_r): Add a checked cast to gimple_resx
1187         within GIMPLE_RESX case of switch statement, adding a new local.
1189         * tree-eh.c (emit_resx): Convert local "x" from gimple to
1190         gimple_resx.
1191         (lower_resx): Require a gimple_resx rather than a plain gimple.
1192         (pass_lower_resx::execute): Add a checked cast to gimple_resx.
1193         (mark_reachable_handlers): Likewise.
1195         * tree-inline.c (remap_gimple_stmt): Add a checked cast to
1196         gimple_resx within GIMPLE_RESX case of switch statement, adding
1197         a new local.
1199 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
1201         Introduce gimple_eh_else
1203         * coretypes.h (gimple_eh_else): New typedef.
1204         (const_gimple_eh_else): New typedef.
1206         * gimple.h (gimple_build_eh_else): Return a gimple_eh_else rather
1207         than a plain gimple.
1208         (gimple_eh_else_n_body_ptr): Require a gimple_eh_else rather than
1209         a plain gimple.
1210         (gimple_eh_else_n_body): Likewise.
1211         (gimple_eh_else_e_body_ptr): Likewise.
1212         (gimple_eh_else_e_body): Likewise.
1213         (gimple_eh_else_set_n_body): Likewise.
1214         (gimple_eh_else_set_e_body): Likewise.
1216         * gimple-low.c (lower_stmt): Add checked cast to gimple_eh_else
1217         within GIMPLE_EH_ELSE case of switch statement, introducing a new
1218         local.
1219         (gimple_stmt_may_fallthru): Likewise.
1221         * gimple-pretty-print.c (dump_gimple_eh_else): Require a
1222         gimple_eh_else rather than a plain gimple.
1223         (pp_gimple_stmt_1): Add checked cast to gimple_eh_else within
1224         GIMPLE_EH_ELSE case of switch statement
1226         * gimple-walk.c (walk_gimple_stmt): Add checked cast to
1227         gimple_eh_else within GIMPLE_EH_ELSE case of switch statement,
1228         introducing a new local.
1230         * gimple.c (gimple_build_eh_else): Return a gimple_eh_else
1231         rather than a plain gimple.
1232         (gimple_copy): Add checked casts to gimple_eh_else within
1233         GIMPLE_EH_ELSE case of switch statement, introducing new locals.
1235         * tree-cfg.c (verify_gimple_in_seq_2): Add checked cast to
1236         gimple_eh_else within GIMPLE_EH_ELSE case of switch statement,
1237         introducing a new local.
1239         * tree-eh.c (collect_finally_tree): Likewise.
1240         (replace_goto_queue_1): Likewise.
1241         (get_eh_else): Return a gimple_eh_else rather than a plain gimple.
1242         (honor_protect_cleanup_actions): Convert local "eh_else" from
1243         gimple to gimple_eh_else.
1244         (lower_try_finally_nofallthru): Likewise.
1245         (lower_try_finally_onedest): Introduce locals "eh_else" and
1246         "label_stmt", using them in favor of "x" for the gimple_eh_else
1247         and the gimple_label.
1248         (lower_try_finally_copy): Convert local "eh_else" from gimple to
1249         gimple_eh_else.
1250         (lower_try_finally_switch): Likewise.
1251         (decide_copy_try_finally): Likewise.
1252         (refactor_eh_r): Add checked cast to gimple_eh_else within
1253         GIMPLE_EH_ELSE case of switch statement, introducing a new local.
1255 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
1257         Introduce gimple_eh_must_not_throw
1259         * coretypes.h (gimple_eh_must_not_throw): New typedef.
1260         (const_gimple_eh_must_not_throw): New typedef.
1262         * gimple-pretty-print.c (dump_gimple_eh_must_not_throw): Require
1263         a gimple_eh_must_not_throw rather than a plain gimple.
1264         (pp_gimple_stmt_1): Add a checked cast to gimple_eh_must_not_throw
1265         within GIMPLE_EH_MUST_NOT_THROW case of switch statement.
1267         * gimple-streamer-in.c (input_gimple_stmt): Likewise.
1269         * gimple-streamer-out.c (output_gimple_stmt): Likewise.
1271         * gimple.c (gimple_build_eh_must_not_throw): Return a
1272         gimple_eh_must_not_throw rather than a plain gimple.
1274         * gimple.h (gimple_build_eh_must_not_throw): Return a
1275         gimple_eh_must_not_throw rather than a plain gimple.
1276         (gimple_eh_must_not_throw_fndecl): Require a
1277         gimple_eh_must_not_throw rather than a plain gimple.
1278         (gimple_eh_must_not_throw_set_fndecl): Likewise.
1280         * tree-eh.c (lower_eh_must_not_throw): Add checked cast.
1282 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
1284         Introduce gimple_eh_filter
1286         * coretypes.h (gimple_eh_filter): New typedef.
1287         (const_gimple_eh_filter): New typedef.
1289         * gimple.h (gimple_build_eh_filter): Return a gimple_eh_filter
1290         rather than a plain gimple.
1292         * gimple-pretty-print.c (dump_gimple_eh_filter): Require a
1293         gimple_eh_filter rather than a plain gimple.
1294         (pp_gimple_stmt_1): Add checked cast to gimple_eh_filter within
1295         GIMPLE_EH_FILTER case of switch statement.
1297         * gimple.c (gimple_build_eh_filter): Return a gimple_eh_filter
1298         rather than a plain gimple.
1300 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
1302         Introduce gimple_catch
1304         * coretypes.h (gimple_catch): New typedef.
1305         (const_gimple_catch): New typedef.
1307         * gimple-low.c (lower_try_catch): Add checked cast to gimple_catch.
1308         (gimple_try_catch_may_fallthru): Likewise.
1310         * gimple-pretty-print.c (dump_gimple_catch): Require a gimple_catch
1311         rather than a plain gimple.
1312         (pp_gimple_stmt_1): Add checked cast to gimple_catch within
1313         GIMPLE_CATCH case of switch statement.
1315         * gimple-walk.c (walk_gimple_op): Likewise.
1316         (walk_gimple_stmt): Likewise.
1318         * gimple.c (gimple_build_catch): Return a gimple_catch rather than
1319         a plain gimple.
1320         (gimple_copy): Add checked casts to gimple_catch within
1321         GIMPLE_CATCH case of switch statement, introducing new locals.
1323         * gimple.h (gimple_build_catch): Return a gimple_catch rather than
1324         a plain gimple.
1325         (gimple_catch_types_ptr): Require a gimple_catch rather than a
1326         plain gimple.
1327         (gimple_catch_handler_ptr): Likewise.
1328         (gimple_catch_handler): Likewise.
1329         (gimple_catch_set_types): Likewise.
1330         (gimple_catch_set_handler): Likewise.
1332         * omp-low.c (lower_omp_1): Add checked cast to gimple_catch within
1333         GIMPLE_CATCH case of switch statement.
1335         * tree-cfg.c (verify_gimple_in_seq_2): Likewise.
1336         (do_warn_unused_result): Likewise.
1338         * tree-eh.c (collect_finally_tree): Likewise.
1339         (replace_goto_queue_1): Likewise.
1340         (lower_catch): Convert local from gimple to gimple_catch.
1341         (refactor_eh_r): Add checked cast to gimple_catch within
1342         GIMPLE_CATCH case of switch statement.
1344         * tree-inline.c (remap_gimple_stmt): Likewise.
1345         (estimate_num_insns): Add checked cast to gimple_catch within
1346         GIMPLE_CATCH case of switch statement, introducing new local.
1348 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
1350         Introduce gimple_transaction
1352         * coretypes.h (gimple_transaction): New typedef.
1353         (const_gimple_transaction): New typedef.
1355         * gimple.h (gimple_build_transaction): Return a gimple_transaction
1356         rather than a plain gimple.
1357         (gimple_transaction_body_ptr): Require a gimple_transaction rather
1358         than a plain gimple.
1359         (gimple_transaction_body): Likewise.
1360         (gimple_transaction_label_ptr): Likewise.
1361         (gimple_transaction_set_body): Likewise.
1362         (gimple_transaction_set_label): Likewise.
1363         (gimple_transaction_set_subcode): Likewise.
1364         (gimple_transaction_label): Require a const_gimple_transaction
1365         rather than a plain const_gimple.
1366         (gimple_transaction_subcode): Likewise.
1368         * gimple-low.c (lower_stmt): Add checked cast to
1369         gimple_transaction within GIMPLE_TRANSACTION case of switch
1370         statement.
1372         * gimple-pretty-print.c (dump_gimple_transaction): Require a
1373         gimple_transaction rather than a plain gimple.
1374         (pp_gimple_stmt_1): Add checked cast to gimple_transaction within
1375         GIMPLE_TRANSACTION case of switch statement.
1376         * gimple-streamer-in.c (input_gimple_stmt): Likewise.
1377         * gimple-streamer-out.c (output_gimple_stmt): Likewise.
1378         * gimple-walk.c (walk_gimple_op): Likewise.
1379         (walk_gimple_stmt): Likewise.
1381         * gimple.c (gimple_build_transaction): Return a gimple_transaction
1382         rather than a plain gimple.
1383         (gimple_copy): Add checked casts to gimple_transaction within
1384         GIMPLE_TRANSACTION case of switch statement.
1386         * gimplify.c (gimplify_transaction): Split local "g" into
1387         "body_stmt" and "trans_stmt", strengthening the type of the latter
1388         from gimple to gimple_transaction.
1390         * omp-low.c (lower_omp_1): Add checked cast to gimple_transaction
1391         within GIMPLE_TRANSACTION case of switch statement.
1393         * trans-mem.c (diagnose_tm_1): Add checked cast within
1394         GIMPLE_TRANSACTION case of switch statement, introducing a new
1395         local "trans_stmt".  Use it in place of "stmt".
1396         (examine_call_tm): Convert local from gimple to gimple_transaction.
1397         (tm_region::get_transaction_stmt): New method.
1398         (tm_region::transaction_stmt): Add clarification of type to the
1399         comment.
1400         (tm_region_init_0): Require a gimple_transaction rather than a
1401         plain gimple.
1402         (tm_region_init): Convert a check against GIMPLE_TRANSACTION to a
1403         dyn_cast<gimple_transaction> and new local.
1404         (transaction_subcode_ior): Add a new local, using the new
1405         get_transaction_stmt method to perform a checked cast.
1406         (propagate_tm_flags_out): Likewise.
1407         (expand_transaction): Add a checked cast using the new
1408         get_transaction_stmt method.
1409         (generate_tm_state): Likewise.
1410         (execute_tm_mark): Likewise.
1411         (ipa_tm_diagnose_transaction): Likewise.
1413         * tree-cfg.c (verify_gimple_transaction): Require a
1414         gimple_transaction rather than a plain gimple.
1415         (make_edges): Add checked cast within GIMPLE_TRANSACTION case of
1416         switch statement
1417         (cleanup_dead_labels): Likewise.
1418         (verify_gimple_stmt): Likewise.
1419         (verify_gimple_in_seq_2): Likewise.
1420         (verify_gimple_in_seq_2): Likewise.
1421         (gimple_redirect_edge_and_branch): Add checked cast.
1423         * tree-inline.c (remap_gimple_stmt): Add checked cast within
1424         GIMPLE_TRANSACTION case of switch statement, introducing a new
1425         local "old_trans_stmt".  Use it in place of "stmt".  Add new
1426         local "new_trans_stmt", using it to initialize "copy", and for
1427         type-safe operations as a transaction.
1428         (estimate_num_insns): Add checked cast within GIMPLE_TRANSACTION
1429         case of switch statement.
1431 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
1433         Introduce gimple_asm
1435         * coretypes.h (gimple_asm): New typedef.
1436         (const_gimple_asm): New typedef.
1438         * gimple.h (gimple_build_asm_vec): Return a gimple_asm rather than
1439         just a gimple.
1440         (gimple_asm_clobbers_memory_p): Require a const_gimple_asm rather
1441         than just a const_gimple.
1442         (gimple_asm_ninputs): Likewise.
1443         (gimple_asm_noutputs): Likewise.
1444         (gimple_asm_nclobbers): Likewise.
1445         (gimple_asm_nlabels): Likewise.
1446         (gimple_asm_input_op): Likewise.
1447         (gimple_asm_input_op_ptr): Likewise.
1448         (gimple_asm_output_op): Likewise.
1449         (gimple_asm_output_op_ptr): Likewise.
1450         (gimple_asm_clobber_op): Likewise.
1451         (gimple_asm_label_op): Likewise.
1452         (gimple_asm_string): Likewise.
1453         (gimple_asm_volatile_p): Likewise.
1454         (gimple_asm_input_p): Likewise.
1455         (gimple_asm_set_input_op): Require a gimple_asm rather than a plain
1456         gimple.
1457         (gimple_asm_set_output_op): Likewise.
1458         (gimple_asm_set_clobber_op): Likewise.
1459         (gimple_asm_set_label_op): Likewise.
1460         (gimple_asm_set_volatile): Likewise.
1461         (gimple_asm_set_input): Likewise.
1463         * cfgexpand.c (expand_asm_stmt): Require a gimple_asm rather than
1464         a plain gimple.
1465         (expand_gimple_stmt_1): Add checked cast to gimple_asm within
1466         GIMPLE_ASM case of switch statement.
1468         * gimple-fold.c (fold_stmt_1): Add new local from checked cast to
1469         gimple_asm within case GIMPLE_ASM.
1471         * gimple-pretty-print.c (dump_gimple_asm): Require a gimple_asm
1472         rather than a plain gimple.
1473         (pp_gimple_stmt_1): Add checked cast to gimple_asm within
1474         GIMPLE_ASM case of switch statement.
1476         * gimple-streamer-in.c (input_gimple_stmt): Rework existing
1477         checked cast to gimple_asm; add a new one.
1479         * gimple-streamer-out.c (output_gimple_stmt): Add new local from
1480         checked cast to gimple_asm within case GIMPLE_ASM.
1482         * gimple-walk.c (walk_gimple_asm): Require a gimple_asm rather
1483         than a plain gimple.
1484         (walk_gimple_op): Add checked cast to gimple_asm within GIMPLE_ASM
1485         case of switch statement.
1486         (walk_stmt_load_store_addr_ops): Use dyn_cast<gimple_asm> in place
1487         of a code check against GIMPLE_ASM to introduce a new gimple_asm
1488         local.
1490         * gimple.c (gimple_build_asm_1): Return a gimple_asm rather than
1491         a plain gimple.
1492         (gimple_build_asm_vec): Likewise.
1493         (gimple_has_side_effects): Add a checked cast to gimple_asm.
1494         (gimple_could_trap_p_1): Likewise.
1495         (gimple_call_builtin_p): Require a const_gimple_asm rather then
1496         a const_gimple.
1498         * gimplify-me.c (gimple_regimplify_operands): Add a checked cast
1499         and a new local of type gimple_asm within GIMPLE_ASM case.
1501         * gimplify.c (gimplify_asm_expr): Convert a local from gimple to
1502         gimple_asm.
1504         * ipa-pure-const.c (check_stmt): Add checked casts within
1505         GIMPLE_ASM case.
1507         * ssa-iterators.h (op_iter_init): Likewise.
1509         * tree-cfg.c (make_goto_expr_edges): Convert a local from gimple
1510         to gimple_asm.
1511         (cleanup_dead_labels): Add a checked cast and a new local of type
1512         gimple_asm within GIMPLE_ASM case.
1513         (gimple_redirect_edge_and_branch): Likewise.
1514         (is_ctrl_altering_stmt): Add a checked cast.
1515         (need_fake_edge_p): Replace a code check against GIMPLE_ASM with a
1516         dyn_cast<gimple_asm>.
1518         * tree-complex.c (expand_complex_comparison): Convert a local from
1519         gimple to gimple_asm.
1521         * tree-data-ref.c (get_references_in_stmt): Add a checked cast to
1522         gimple_asm.
1524         * tree-eh.c (stmt_could_throw_p): Likewise.
1526         * tree-inline.c (estimate_num_insns): Likewise.
1528         * tree-sra.c (scan_function): Add a checked cast and a new local
1529         of type gimple_asm within GIMPLE_ASM case.
1530         (sra_modify_function_body): Likewise.
1531         (ipa_sra_modify_function_body): Likewise.
1533         * tree-ssa-coalesce.c (create_outofssa_var_map): Likewise.
1535         * tree-ssa-dce.c (propagate_necessity): Replace a code check
1536         against GIMPLE_ASM with a dyn_cast<gimple_asm>.
1538         * tree-ssa-operands.c (maybe_add_call_vops): Require a gimple_asm
1539         rather than a plain gimple.
1540         (parse_ssa_operands): Add a checked cast to gimple_asm.
1542         * tree-ssa-structalias.c (find_func_aliases): Replace a check for
1543         GIMPLE_ASM with a dyn_cast<gimple_asm>, introducing  a new local
1544         "asm_stmt", using it in place of "t" for typesafety.
1546         * tree-ssa-threadedge.c
1547         (record_temporary_equivalences_from_stmts_at_dest): Add a checked
1548         cast to gimple_asm.
1550         * tree-ssa.c (execute_update_addresses_taken): Add checked casts
1551         and new locals of type gimple_asm within clauses guarded by code
1552         check.
1554 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
1556         Introduce gimple_goto
1558         * coretypes.h (gimple_goto): New typedef.
1559         (const_gimple_goto): New typedef.
1561         * gimple.h (gimple_statement_goto): New subclass of
1562         gimple_statement_with_ops, adding the invariant that
1563         stmt->code == GIMPLE_GOTO.
1564         (is_a_helper <gimple_statement_goto>::test): New.
1565         (gimple_build_goto): Return a gimple_goto rather than a
1566         plain gimple.
1568         * gimple-pretty-print.c (dump_gimple_goto): Require a gimple_goto
1569         rather than a plain gimple.
1570         (pp_gimple_stmt_1): Add a checked cast to gimple_goto within
1571         GIMPLE_GOTO case of switch statement.
1573         * gimple.c (gimple_build_goto): Return a gimple_goto rather than a
1574         plain gimple.
1576         * tree-cfg.c (verify_gimple_goto): Require a gimple_goto rather
1577         than a plain gimple.
1578         (verify_gimple_stmt): Add a checked cast to gimple_goto within
1579         GIMPLE_GOTO case of switch statement.
1581 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
1583         Introduce gimple_return
1585         * coretypes.h (gimple_return): New typedef.
1586         (const_gimple_return): New typedef.
1588         * gimple.h (gimple_statement_return): New subclass of
1589         gimple_statement_with_memory_ops, adding the invariant that
1590         stmt->code == GIMPLE_RETURN.
1591         (is_a_helper <gimple_statement_return>::test): New.
1592         (gimple_build_return): Return a gimple_return rather
1593         than a plain gimple.
1595         * gimple.c (gimple_build_return): Return a gimple_return rather
1596         than a plain gimple.
1598         * cgraphunit.c (expand_thunk): Convert local from a gimple to
1599         a gimple_return.
1601         * gimple-low.c (struct return_statements_t): Convert field "stmt"
1602         from a gimple to a gimple_return.
1603         (lower_gimple_return): Convert local from a gimple to a
1604         gimple_return.
1606         * gimple-pretty-print.c (dump_gimple_return): Require a
1607         gimple_return rather than a plain gimple.
1608         (pp_gimple_stmt_1): Add a checked cast to gimple_return within
1609         case GIMPLE_RETURN of switch statement.
1611         * gimplify.c (gimplify_return_expr): Convert locals from
1612         gimple to gimple_return.
1614         * ipa-split.c (split_function): Likewise.
1616         * tree-cfg.c (verify_gimple_assign): Require a gimple_return
1617         rather than a plain gimple.
1618         (verify_gimple_stmt): Add checked cast to gimple_return within
1619         case GIMPLE_RETURN of switch statement.
1621         * tree-tailcall.c (adjust_return_value): Convert local from
1622         gimple to gimple_return.
1624 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
1626         Introduce gimple_call
1628         * coretypes.h (gimple_call): New typedef.
1629         (const_gimple_call): New typedef.
1631         * asan.c (get_mem_refs_of_builtin_call): Require a
1632         const_gimple_call rather than a const gimple.
1633         (has_stmt_been_instrumented_p): Add a checked cast to
1634         gimple_call.
1635         (instrument_strlen_call): Likewise.
1636         (instrument_builtin_call): Likewise.
1637         * builtins.c (validate_gimple_arglist): Require a
1638         const_gimple_call rather than a const gimple.
1639         (fold_call_stmt): Require a gimple_call rather than a gimple.
1640         * builtins.h (validate_gimple_arglist): Require a
1641         const_gimple_call rather than a const gimple.
1642         (fold_call_stmt): Require a gimple_call rather than a gimple.
1643         * cfgexpand.c (expand_call_stmt): Likewise.
1644         (expand_gimple_stmt_1): Add a checked cast to gimple_call within
1645         GIMPLE_CALL case.
1646         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Strengthen
1647         local "new_stmt" from gimple to gimple_call, adding a checked
1648         cast.
1649         * cgraphunit.c (cgraph_node::expand_thunk): Likewise for local
1650         "call".
1651         * gimple-fold.c (gimple_fold_builtin_snprintf_chk): Likewise for
1652         local "stmt".
1653         (gimple_fold_builtin_snprintf): Likewise.
1654         (gimple_fold_builtin): Likewise.
1655         (gimple_fold_call): Likewise.
1656         (gimple_fold_stmt_to_constant_1): Introduce local "call_stmt" via
1657         checked cast of "stmt" to gimple_call, using it in various places
1658         for typesafety.
1659         * gimple-pretty-print.c (dump_gimple_call_args): Strengthen param
1660         2 from gimple to gimple_call.
1661         (dump_gimple_call): Likewise.
1662         (pp_gimple_stmt_1): Add a checked cast to gimple_call within
1663         GIMPLE_CALL case.
1664         * gimple-streamer-in.c (input_gimple_stmt): Replace is_gimple_call
1665         with a dyn_cast<gimple_call>, introducing local "call_stmt", and
1666         using it in place of "stmt" for typesafety.  Add a checked cast
1667         in statement guarded by check for GIMPLE_CALL.
1668         * gimple-walk.c (walk_gimple_op): Add a checked cast to
1669         gimple_call.
1670         * gimple.c (gimple_call_reset_alias_info): Strengthen param from
1671         gimple to gimple_call.
1672         (gimple_build_call_1): Strengthen return type and local from
1673         gimple to gimple_call.
1674         (gimple_build_call_vec): Likewise.
1675         (gimple_build_call): Likewise.
1676         (gimple_build_call_valist): Likewise.
1677         (gimple_build_call_internal_1): Likewise.
1678         (gimple_build_call_internal): Likewise.
1679         (gimple_build_call_internal_vec): Likewise.
1680         (gimple_build_call_from_tree): Likewise.
1681         (gimple_call_return_flags): Strengthen param from
1682         const_gimple to const_gimple_call.
1683         (gimple_call_copy_skip_args): Strengthen return type and local from
1684         gimple to gimple_call.
1685         * gimple.h (gimple_call_reset_alias_info): Strengthen param from
1686         gimple to gimple_call.
1687         (gimple_build_call_vec): Strengthen return type from gimple to
1688         gimple_call.
1689         (gimple_build_call): Likewise.
1690         (gimple_build_call_valist): Likewise.
1691         (gimple_build_call_internal): Likewise.
1692         (gimple_build_call_internal_vec): Likewise.
1693         (gimple_build_call_from_tree): Likewise.
1694         (gimple_call_return_flags): Strengthen param from const_gimple to
1695         const_gimple_call.
1696         (gimple_call_copy_skip_args): Strengthen return type from gimple
1697         to gimple_call.
1698         (gimple_call_set_internal_fn): Strengthen param "call_stmt" from
1699         gimple to gimple_call.
1700         (gimple_call_return_type): Strengthen param from const_gimple to
1701         const_gimple_call.
1702         (gimple_call_chain_ptr): Likewise.
1703         (gimple_call_set_chain): Strengthen param from gimple to
1704         gimple_call.
1705         (gimple_call_set_return_slot_opt): Likewise.
1706         (gimple_call_set_from_thunk): Likewise.
1707         (gimple_call_from_thunk_p): Likewise.
1708         (gimple_call_set_va_arg_pack): Likewise.
1709         (gimple_call_va_arg_pack_p): Likewise.
1710         (gimple_call_set_alloca_for_var): Likewise.
1711         (gimple_call_alloca_for_var_p): Likewise.
1712         (gimple_expr_type): Introduce local "call_stmt" via a checked cast
1713         and use it for typesafety.
1714         * gimplify.c (gimplify_call_expr): Strengthen local "call" from
1715         gimple to gimple_call.
1716         (gimplify_modify_expr_to_memcpy): Likewise for local "gs".
1717         (gimplify_modify_expr_to_memset): Likewise.
1718         (gimplify_modify_expr): Add a checked cast to gimple_call.
1719         (gimplify_expr): Strengthen local "call" from gimple to
1720         gimple_call.
1721         (gimplify_function_tree): Likewise.
1722         * internal-fn.c (expand_LOAD_LANES): Strengthen param from gimple
1723         to gimple_call.
1724         (expand_STORE_LANES): Likewise.
1725         (expand_ANNOTATE): Likewise.
1726         (expand_GOMP_SIMD_LANE): Likewise.
1727         (expand_GOMP_SIMD_VF): Likewise.
1728         (expand_GOMP_SIMD_LAST_LANE): Likewise.
1729         (expand_UBSAN_NULL): Likewise.
1730         (expand_UBSAN_BOUNDS): Likewise.
1731         (expand_UBSAN_OBJECT_SIZE): Likewise.
1732         (expand_ASAN_CHECK): Likewise.
1733         (ubsan_expand_si_overflow_addsub_check): Likewise.
1734         (ubsan_expand_si_overflow_neg_check): Likewise.
1735         (ubsan_expand_si_overflow_mul_check): Likewise.
1736         (expand_UBSAN_CHECK_ADD): Likewise.
1737         (expand_UBSAN_CHECK_SUB): Likewise.
1738         (expand_UBSAN_CHECK_MUL): Likewise.
1739         (expand_LOOP_VECTORIZED): Likewise.
1740         (expand_MASK_LOAD): Likewise.
1741         (expand_MASK_STORE): Likewise.
1742         (expand_ABNORMAL_DISPATCHER): Likewise.
1743         (expand_BUILTIN_EXPECT): Likewise.
1744         (internal_fn_expanders): Likewise for entries in this table.
1745         (expand_internal_call): Likewise.
1746         * internal-fn.def: Update comment to reflect strengthening of
1747         param of expanders.
1748         * internal-fn.h (expand_internal_call): Strengthen param from
1749         gimple to gimple_call.
1750         * ipa-prop.c (ipa_modify_call_arguments): Likewise for local
1751         "new_stmt".
1752         * ipa-pure-const.c (check_call): Likewise for param "call".
1753         (check_stmt): Add a checked cast to gimple_call within GIMPLE_CALL
1754         case.
1755         * ipa-split.c (split_function): Strengthen local "call" from
1756         gimple to gimple_call.
1757         * omp-low.c (build_omp_barrier): Likewise for local "g".
1758         (lower_rec_input_clauses): Likewise for local "stmt".
1759         * trans-mem.c (build_tm_load): Likewise for return type and local
1760         "gcall".
1761         (build_tm_store): Likewise.
1762         (expand_transaction): Likewise for local "call".
1763         * tree-call-cdce.c (check_pow): Likewise for param.
1764         (check_builtin_call): Likewise.
1765         (is_call_dce_candidate): Likewise.
1766         (gen_conditions_for_pow): Likewise.
1767         (gen_shrink_wrap_conditions): Likewise.
1768         (shrink_wrap_one_built_in_call): Likewise.
1769         (shrink_wrap_conditional_dead_built_in_calls): Strengthen param
1770         from vec<gimple> to vec<gimple_call>, and local "bi_call" from
1771         gimple to gimple_call.
1772         (pass_call_cdce::execute): Strengthen local
1773         "cond_dead_built_in_calls" from auto_vec<gimple> to
1774         auto_vec<gimple_call> and local "stmt" from gimple to gimple_call,
1775         * tree-cfg.c (notice_special_calls): Strengthen param from gimple
1776         to gimple_call.
1777         * tree-cfg.h (notice_special_calls): Likewise.
1778         * tree-complex.c (expand_complex_libcall): Likewise for local
1779         "stmt".
1780         * tree-inline.c (remap_gimple_stmt): Add checked cast to
1781         gimple_call.
1782         (copy_bb): Likewise.  Strengthen local "new_call" from gimple to
1783         gimple_call.
1784         (inline_forbidden_p_stmt): Add checked cast to gimple_call.
1785         * tree-nested.c (init_tmp_var_with_call): Strengthen param "call"
1786         from gimple to gimple_call.
1787         (convert_nl_goto_reference): Likewise for local "call".
1788         (convert_tramp_reference_op): Likewise.
1789         (convert_gimple_call): Add checked cast to gimple_call.
1790         * tree-nrv.c (dest_safe_for_nrv_p): Strengthen param "call" from
1791         gimple to gimple_call.
1792         (pass_return_slot::execute): Likewise for local "stmt", using a
1793         dyn_cast<gimple_call> rather than an is_gimple_call call.
1794         * tree-object-size.c (alloc_object_size): Strengthen param "call"
1795         from const_gimple to const_gimple_call.
1796         (pass_through_call): Likewise.
1797         (call_object_size): Strengthen param "call" from gimple to
1798         gimple_call.
1799         (collect_object_sizes_for): Introduce local "call_stmt" via a
1800         checked cast, using it for typesafety.
1801         (check_for_plus_in_loops_1): Likewise.
1802         (pass_object_sizes::execute): Add a checked cast to gimple_call.
1803         * tree-profile.c (gimple_gen_interval_profiler): Strengthen local
1804         "call" from gimple to gimple_call.
1805         (gimple_gen_pow2_profiler): Likewise.
1806         (gimple_gen_one_value_profiler): Likewise.
1807         (gimple_gen_time_profiler): Likewise.
1808         (gimple_gen_average_profiler): Likewise.
1809         (gimple_gen_ior_profiler): Likewise.
1810         * tree-ssa-alias.c (ref_maybe_used_by_call_p_1): Likewise for
1811         param "call".
1812         (ref_maybe_used_by_call_p): Likewise.
1813         (ref_maybe_used_by_stmt_p): Add a checked cast to gimple_call.
1814         (call_may_clobber_ref_p_1): Strengthen param "call" from gimple to
1815         gimple_call.
1816         (call_may_clobber_ref_p): Likewise.
1817         (stmt_may_clobber_ref_p_1): Add a checked cast to gimple_call.
1818         * tree-ssa-alias.h (call_may_clobber_ref_p): Strengthen param 1
1819         from gimple to gimple_call.
1820         (call_may_clobber_ref_p_1): Likewise.
1821         * tree-ssa-dce.c (eliminate_unnecessary_stmts): Add a checked cast
1822         to gimple_call.
1823         * tree-ssa-loop-prefetch.c (emit_mfence_after_loop): Strengthen
1824         local "call" from gimple to gimple_call.
1825         * tree-ssa-math-opts.c (build_and_insert_call): Likewise for local
1826         "call_stmt".
1827         * tree-ssa-operands.c (maybe_add_call_vops): Likewise for param
1828         "stmt".
1829         (parse_ssa_operands): Add a checked cast to gimple_call within
1830         GIMPLE_CALL case.
1831         * tree-ssa-pre.c (compute_avail): Add a checked cast to
1832         gimple_call.
1833         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Strengthen
1834         param "call" from gimple to gimple_call.
1835         (valueize_shared_reference_ops_from_call): Likewise.
1836         (vn_reference_lookup_3): Add a checked cast to gimple_call.
1837         (vn_reference_lookup_call): Strengthen param "call" from gimple to
1838         gimple_call.
1839         (visit_reference_op_call): Likewise for param "stmt".
1840         (visit_use): Replace is_gimple_call with a dyn_cast, introducing
1841         local "call_stmt", using it in place of "stmt" for type-safety.
1842         * tree-ssa-sccvn.h (vn_reference_lookup_call): Strengthen param 1
1843         from gimple to gimple_call.
1844         * tree-ssa-structalias.c (get_call_vi): Likewise.
1845         (lookup_call_use_vi): Likewise.
1846         (lookup_call_clobber_vi): Likewise.
1847         (get_call_use_vi): Likewise.
1848         (get_call_clobber_vi): Likewise.
1849         (handle_rhs_call): Likewise.
1850         (handle_lhs_call): Likewise.
1851         (handle_const_call): Likewise.
1852         (handle_pure_call): Likewise.
1853         (get_fi_for_callee): Likewise.
1854         (find_func_aliases_for_builtin_call): Likewise for param 2.
1855         (find_func_aliases_for_call): Likewise.
1856         (find_func_aliases): Add a checked cast to gimple_call.
1857         (find_func_clobbers): Replace is_gimple_call with a dyn_cast,
1858         introducing local "call_stmt", using it in place of "stmt" for
1859         type-safety.
1860         (compute_points_to_sets): Strengthen local "stmt" from gimple to
1861         gimple_call, replacing is_gimple_call with a
1862         dyn_cast <gimple_call>.
1863         (ipa_pta_execute): Likewise.
1864         * tree-ssa-threadedge.c
1865         (record_temporary_equivalences_from_stmts_at_dest): Add checked
1866         cast to gimple_call.
1867         * tree-tailcall.c (find_tail_calls): Strengthen local "call" from
1868         gimple to gimple_call, adding a checked cast.
1869         * tree-vect-data-refs.c (vect_setup_realignment): Eliminate
1870         top-level local "new_stmt" in favor of more tightly-scoped locals
1871         "new_stmt" of type gimple_assign and gimple_call.
1872         * tree-vect-patterns.c (vect_recog_pow_pattern): Strenghthen local
1873         "stmt" from gimple to gimple_call.
1874         * tree-vect-stmts.c (vectorizable_function): Likewise for param
1875         "call".
1876         (vectorizable_call): Rename param 1 from "stmt" to "gs",
1877         reintroducing "stmt" as a gimple_call once we've established that
1878         we're working with a GIMPLE_CALL.
1879         * tree-vectorizer.h (vectorizable_function): Strengthen param 1
1880         from gimple to gimple_call.
1881         * value-prof.c (check_ic_target): Likewise.
1882         (gimple_ic_transform): Likewise for local "stmt", replacing a
1883         check for GIMPLE_CALL with a dyn_cast.
1884         (interesting_stringop_to_profile_p): Strengthen param "call"
1885         from gimple to gimple_call.
1886         (gimple_stringop_fixed_value): Likewise for param "vcall_stmt".
1887         (gimple_stringops_transform): Likewise for local "stmt",
1888         replacing a check for GIMPLE_CALL with a dyn_cast.
1889         (gimple_stringops_values_to_profile): Rename param 1 from "stmt"
1890         to "gs", reintroducing "stmt" as a gimple_call once we've
1891         established that we're working with a GIMPLE_CALL.
1892         * vtable-verify.c (verify_bb_vtables): Strengthen local
1893         "call_stmt" from gimple to gimple_call.
1895 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
1897         Concretize get_loop_exit_condition et al to working on gimple_cond
1899         * tree-scalar-evolution.h (get_loop_exit_condition): Return a
1900         gimple_cond.
1901         * tree-scalar-evolution.c (get_loop_exit_condition): Likewise, also
1902         concretizing local "res" from gimple to gimple_cond.
1903         * tree-vect-loop-manip.c (slpeel_make_loop_iterate_ntimes): Convert
1904         locals from gimple to gimple_cond.
1905         (slpeel_can_duplicate_loop_p): Likewise.
1906         * tree-vect-loop.c (vect_get_loop_niters): Return a gimple_cond.
1907         (vect_analyze_loop_form): Convert local from gimple to gimple_cond.
1909 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
1911         Update various expressions within tree-scalar-evolution.c to be gimple_phi
1913         * tree-scalar-evolution.c (follow_ssa_edge): Require a gimple_phi,
1914         rather than a gimple.
1915         (follow_ssa_edge_binary): Likewise.
1916         (follow_ssa_edge_expr): Likewise.
1917         (follow_ssa_edge_in_rhs): Likewise.
1918         (backedge_phi_arg_p): Likewise.
1919         (follow_ssa_edge_in_condition_phi_branch): Likewise.
1920         (follow_ssa_edge_in_condition_phi): Likewise.
1921         (follow_ssa_edge_inner_loop_phi): Likewise.
1922         (analyze_evolution_in_loop): Likewise.
1923         (analyze_initial_condition): Likewise.
1924         (interpret_loop_phi): Likewise.
1925         (interpret_condition_phi): Likewise.
1926         (follow_ssa_edge): Likewise; also, add checked casts to gimple_phi.
1928         (analyze_scalar_evolution_1): Add checked casts to gimple_phi
1929         within "case GIMPLE_PHI".
1931 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
1933         tree-ssa-loop-ivopts.c: use gimple_phi in a few places
1935         * tree-ssa-loop-ivopts.c (determine_biv_step): Require a gimple_phi.
1936         (find_bivs): Convert local "phi" into a gimple_phi.
1937         (mark_bivs): Likewise.
1939 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
1941         tree-ssa-loop-manip.c: use gimple_phi in three places
1943         * tree-ssa-loop-manip.c (add_exit_phi): Convert local "phi" to be a
1944         gimple_phi.
1945         (split_loop_exit_edge): Likewise for "phi" and "new_phi".
1947 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
1949         tree-ssa-loop-niter.c: use gimple_phi in a few places
1951         * tree-ssa-loop-niter.c (chain_of_csts_start): Return a gimple_phi
1952         rather than a gimple.
1953         (get_base_for): Likewise; convert local "phi" to be a gimple_phi.
1954         (loop_niter_by_eval): Convert local "phi" to be a gimple_phi.
1956 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
1958         tree-ssa-phiprop.c: use gimple_phi
1960         * tree-ssa-phiprop.c (phiprop_insert_phi): Strengthen types of
1961         parameter "phi" and local "new_phi" from gimple to gimple_phi.
1963 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
1965         tree-predcom.c: use gimple_phi in various places
1967         * tree-predcom.c (find_looparound_phi): Return a gimple_phi rather
1968         than just a gimple.
1969         (insert_looparound_copy): Require a gimple_phi rather than just a
1970         gimple.
1971         (add_looparound_copies): Convert local "phi" to be a gimple_phi.
1972         (initialize_root_vars): Likewise.
1973         (initialize_root_vars_lm): Likewise.
1975 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
1977         tree-parloops.c: use gimple_phi in various places
1979         * tree-parloops.c (struct reduction_info): Strengthen field "new_phi"
1980         from gimple to gimple_phi.
1981         (create_phi_for_local_result): Convert local "new_phi" to gimple_phi.
1982         (loop_has_vector_phi_nodes): Require a gimple_phi rather than a gimple.
1983         (gather_scalar_reductions): Convert to a gimple_phi_iterator and
1984         gimple_phi.
1985         (try_create_reduction_list): Likewise.
1987 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
1989         Update ssa_prop_visit_phi_fn callbacks to take a gimple_phi
1991         * tree-ssa-propagate.h (typedef ssa_prop_visit_phi_fn): Strengthen
1992         type of parameter from gimple to gimple_phi.
1994         * tree-complex.c (complex_visit_phi): Update signature of callback
1995         implementation accordingly.
1996         * tree-ssa-ccp.c (ccp_visit_phi_node): Likewise.
1997         * tree-ssa-copy.c (copy_prop_visit_phi_node): Likewise.
1998         * tree-vrp.c (vrp_visit_phi_node): Likewise.
2000         * tree-ssa-propagate.c (simulate_stmt): Add a checked cast to
2001         gimple_phi when invoking the ssa_prop_visit_phi callback.
2003 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
2005         Introduce gimple_phi_iterator
2007         * gimple-iterator.h (struct gimple_phi_iterator): New subclass of
2008         gimple_stmt_iterator with identical layout, but adding...
2009         (gimple_phi_iterator::phi): ...new method, equivalent to
2010         gsi_stmt (), but casting the underlying gimple to gimple_phi,
2011         checking that code == GIMPLE_PHI in a checked build.
2012         (gsi_start_phis): Return a gimple_phi_iterator, rather than just a
2013         gimple_stmt_iterator.
2015         * tree-if-conv.c (bb_with_exit_edge_p): Require a gimple_phi rather
2016         than just a gimple.
2017         (if_convertible_phi_p): Likewise.
2018         * tree-phinodes.h (add_phi_node_to_bb): Likewise.
2019         * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
2021         * tree-ssa-uninit.c (warn_uninitialized_phi): Require a gimple_phi
2022         and a vec<gimple_phi> *, rather than just a gimple and
2023         vec<gimple> *, and a hash_set<gimple_phi> * rather than a
2024         hash_set<gimple> *.
2025         (find_uninit_use): Likewise; add checked cast to gimple_phi when
2026         adding to worklist.
2027         (pass_late_warn_uninitialized::execute): Strengthen types of
2028         various locals, "worklist" from vec<gimple> to vec<gimple_phi>,
2029         "gsi" to a gimple_phi_iterator, "phi" and "cur_phi" to a
2030         gimple_phi, "added_to_worklist" from hash_set<gimple> to
2031         hash_set<gimple_phi>.
2033         * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Require a
2034         gimple_phi_iterator * rather than a gimple_stmt_iterator *;
2035         use it to strengthen local from a gimple to a gimple_phi.
2037         * cfgloop.c (find_subloop_latch_edge_by_ivs): Convert local from a
2038         gimple_stmt_iterator to a gimple_phi_iterator.  Use the iterator's
2039         "phi" method rather than gsi_stmt.  Use this checked cast to convert
2040         the type of related local from a plain gimple to a gimple_phi.
2041         * gimple-pretty-print.c (dump_phi_nodes): Likewise.
2042         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behaviour):
2043         Likewise.
2044         * sese.c (sese_add_exit_phis_edge): Likewise.
2045         * tree-cfg.c (reinstall_phi_args): Likewise.
2046         (gimple_make_forwarder_block): Likewise.
2047         (add_phi_args_after_copy_edge): Likewise.
2048         (gimple_lv_adjust_loop_header_phi): Likewise.
2049         * tree-cfgcleanup.c (phi_alternatives_equal): Likewise.
2050         (remove_forwarder_block_with_phi): Likewise.
2051         (merge_phi_nodes): Likewise.
2052         * tree-complex.c (update_phi_components): Likewise.
2053         * tree-if-conv.c (if_convertible_loop_p_1): Likewise.
2054         * tree-inline.c (update_ssa_across_abnormal_edges): Likewise.
2055         (copy_phis_for_bb): Likewise.
2056         * tree-into-ssa.c (rewrite_add_phi_arguments): Likewise.
2057         * tree-outof-ssa.c (eliminate_build): Likewise.
2058         (eliminate_useless_phis): Likewise.
2059         (rewrite_trees): Likewise.
2060         (insert_backedge_copies): Likewise.
2061         * tree-phinodes.c (reserve_phi_args_for_new_edge): Likewise.
2062         (remove_phi_args): Likewise.
2063         (remove_phi_nodes): Likewise.
2064         * tree-predcom.c (find_looparound_phi): Likewise.
2065         (eliminate_temp_copies): Likewise.
2066         * tree-scalar-evolution.c (loop_closed_phi_def): Likewise.
2067         (scev_const_prop): Likewise; also, add checked cast to phi.
2068         * tree-ssa-coalesce.c (coalesce_partitions): Likewise.
2069         * tree-ssa-dce.c (remove_dead_phis): Likewise.
2070         (forward_edge_to_pdom): Likewise.
2071         * tree-ssa-dom.c (record_equivalences_from_phis): Likewise.
2072         (cprop_into_successor_phis): Likewise.
2073         (propagate_rhs_into_lhs): Likewise.
2074         (eliminate_degenerate_phis_1): Likewise.
2075         * tree-ssa-ifcombine.c (same_phi_args_p): Likewise.
2076         * tree-ssa-live.c (calculate_live_on_exit): Likewise.
2077         (verify_live_on_entry): Likewise.
2078         * tree-ssa-loop-im.c
2079         (move_computations_dom_walker::before_dom_children): Likewise.
2080         * tree-ssa-loop-ivopts.c (find_bivs): Likewise.
2081         (mark_bivs): Likewise.
2082         (find_interesting_uses_outside): Likewise.
2083         (determine_set_costs): Likewise.
2084         * tree-ssa-loop-manip.c (split_loop_exit_edge): Likewise.
2085         (tree_transform_and_unroll_loop): Likewise.
2086         (rewrite_all_phi_nodes_with_iv): Likewise.
2087         (canonicalize_loop_ivs): Likewise.
2088         * tree-ssa-loop-niter.c (determine_value_range): Likewise.
2089         * tree-ssa-phiopt.c (hoist_adjacent_loads): Likewise.
2090         * tree-ssa-phiprop.c (tree_ssa_phiprop): Likewise.
2091         * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
2092         * tree-ssa-tail-merge.c (same_phi_alternatives_1): Likewise.
2093         (vop_phi): Likewise.
2094         * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
2095         Likewise.
2096         * tree-ssa-threadupdate.c (copy_phi_arg_into_existing_phi): Likewise.
2097         (copy_phi_args): Likewise.
2098         (phi_args_equal_on_edges): Likewise.
2099         * tree-ssa.c (ssa_redirect_edge): Likewise.
2100         (flush_pending_stmts): Likewise.
2101         * tree-switch-conversion.c (check_final_bb): Likewise.
2102         (gather_default_values): Likewise.
2103         (build_constructors): Likewise.
2104         (fix_phi_nodes): Likewise.
2105         * tree-tailcall.c (propagate_through_phis): Likewise.
2106         (add_successor_phi_arg): Likewise.
2107         * tree-vect-loop-manip.c (slpeel_update_phi_nodes_for_guard1):
2108         Likewise.
2109         (slpeel_update_phi_nodes_for_guard2): Likewise.
2110         (slpeel_tree_peel_loop_to_edge): Likewise.
2111         (vect_can_advance_ivs_p): Likewise.
2112         (vect_update_ivs_after_vectorizer): Likewise.
2113         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
2114         * tree-vrp.c (find_assert_locations): Likewise.
2115         * value-prof.c (gimple_ic): Likewise.
2117         * omp-low.c (expand_parallel_call): Convert local to a gimple_phi.
2119 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
2121         Introduce gimple_phi and use it in various places
2123         * coretypes.h (gimple_phi): New typedef.
2124         (const_gimple_phi): New typedef.
2126         * gdbhooks.py (build_pretty_printer): Add gimple_phi and its
2127         variants, using the gimple printer.
2129         * gimple.h (gimple_vec): Eliminate thie typedef in the hope of using
2130         vecs of more concrete gimple subclasses as appropriate; also the
2131         comment is about to become misleading.
2133         * gimple.h (gimple_phi_capacity): Use const_gimple_phi typedef
2134         rather than spelling out the full type.
2135         (gimple_phi_num_args): Likewise.
2136         (gimple_phi_result): Likewise.
2137         (gimple_phi_result_ptr): Use gimple_phi typedef.
2138         (gimple_phi_set_result): Likewise.
2139         (gimple_phi_arg): Likewise.
2140         (gimple_phi_set_arg): Likewise.
2141         * tree-phinodes.c (allocate_phi_node): Likewise.
2142         (resize_phi_node): Likewise.
2143         (reserve_phi_args_for_new_edge): Likewise.
2144         (remove_phi_arg_num): Likewise.
2146         * gimple-pretty-print.c (dump_gimple_phi): Require a gimple_phi
2147         rather than just a gimple.
2148         * tree-into-ssa.c (mark_phi_for_rewrite): Likewise.
2150         * tree-phinodes.c (make_phi_node): Return a gimple_phi rather than
2151         just a gimple.
2152         (create_phi_node): Likewise.
2153         * tree-phinodes.h (create_phi_node): Likewise.
2155         * trans-mem.c (struct struct tm_log_entry): Replace use of
2156         now-removed gimple_vec with a plain vec<gimple>.
2158         * tree-into-ssa.c (phis_to_rewrite): Strengthen from a
2159         vec<gimple_vec> to a vec< vec<gimple_phi> >.
2161         * tree-into-ssa.c (insert_phi_nodes_for): Update local to be a
2162         gimple_phi.
2163         * tree-into-ssa.c (rewrite_update_phi_arguments): Strengthen local
2164         "phis" from a gimple_vec to a vec<gimple_phi>, and local "phi" to
2165         a gimple_phi.
2166         * tree-into-ssa.c (delete_update_ssa): Strengthen local
2167         "phis" from a gimple_vec to a vec<gimple_phi>.
2169         * gimple-pretty-print.c (pp_gimple_stmt_1): Add checked cast to
2170         gimple_phi in regions where a stmt is known to have code
2171         GIMPLE_PHI.
2172         * tree-into-ssa.c (mark_use_interesting): Likewise.
2174 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
2176         Introduce gimple_debug and use it in a few places
2178         * coretypes.h (gimple_debug): New typedef.
2179         (const_gimple_debug): New typedef.
2181         * gimple.h (struct gimple_statement_debug): New subclass of
2182         gimple_statement_with_ops, adding the invariant that
2183         stmt->code == GIMPLE_DEBUG.
2184         (is_a_helper <gimple_statement_debug>::test): New.
2186         * gdbhooks.py (build_pretty_printer): Add gimple_debug and its
2187         variants, using the gimple printer.
2189         * gimple-pretty-print.c (dump_gimple_debug): Require a gimple_debug
2190         rather than just a gimple.
2191         * tree-inline.c (copy_debug_stmt): Likewise.
2193         * tree-inline.h (struct copy_body_data): Strengthen field
2194         "debug_stmts" from a vec<gimple> to a vec<gimple_debug>.
2196         * gimple.c (gimple_build_debug_bind_stat): Return a gimple_debug
2197         rather than just a gimple.
2198         (gimple_build_debug_source_bind_stat): Likewise.
2199         * gimple.h (gimple_build_debug_bind_stat): Likewise.
2200         (gimple_build_debug_source_bind_stat): Likewise.
2202         * tree-inline.c (remap_gimple_stmt): Update locals to be a
2203         gimple_debug.
2204         (maybe_move_debug_stmts_to_successors): Likewise.
2205         (copy_debug_stmts): Likewise.
2207         * gimple-pretty-print.c (pp_gimple_stmt_1): Add checked cast to
2208         gimple_debug in regions where a stmt is known to have code
2209         GIMPLE_DEBUG.
2211 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
2213         Introduce gimple_label and use it in a few places
2215         * coretypes.h (gimple_label): New typedef.
2216         (const_gimple_label): New typedef.
2218         * gimple.h (struct gimple_statement_label): New subclass of
2219         gimple_statement_with_ops, adding the invariant that
2220         stmt->code == GIMPLE_LABEL.
2221         (is_a_helper <gimple_statement_label>::test): New.
2223         * gdbhooks.py (build_pretty_printer): Add gimple_label and its
2224         variants, reusing the gimple printer.
2226         * gimple-pretty-print.c (dump_gimple_label): Require a gimple_label
2227         rather than just a gimple.
2228         * tree-cfg.c (verify_gimple_label): Likewise.
2230         * gimple.c (gimple_build_label): Return a gimple_label rather than
2231         just a gimple.
2232         * gimple.h (gimple_build_label): Likewise.
2234         * gimplify.c (gimplify_case_label_expr): Update local to be a
2235         gimple_label.
2236         * tree-switch-conversion.c (gen_inbound_check): Likewise.
2238         * gimple-pretty-print.c (pp_gimple_stmt_1): Add checked cast to
2239         gimple_label in regions where a stmt is known to have code
2240         GIMPLE_LABEL.
2241         * tree-cfg.c (verify_gimple_stmt): Likewise.
2243 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
2245         Introduce gimple_assign and use it in various places
2247         * coretypes.h (gimple_assign): New typedef.
2248         (const_gimple_assign): New typedef.
2250         * gimple.h (struct gimple_statement_assign): New subclass of
2251         gimple_statement_with_memory_ops, adding the invariant that
2252         stmt->code == GIMPLE_ASSIGN.
2253         (is_a_helper <gimple_statement_assign>::test): New.
2255         * gdbhooks.py (build_pretty_printer): Add gimple_assign and its
2256         variants, using the gimple printer.
2258         * gimple-builder.c (build_assign): Return a gimple_assign rather
2259         than just a gimple from each of the overloaded variants.
2260         (build_type_cast): Likewise.
2261         * gimple-builder.h (build_assign): Likewise.
2262         (build_type_cast): Likewise.
2263         * gimple.c (gimple_build_assign_stat): Likewise.
2264         (gimple_build_assign_with_ops): Likewise.
2265         * gimple.h (gimple_build_assign_stat): Likewise.
2266         (gimple_build_assign_with_ops): Likewise.
2268         * asan.c (get_mem_ref_of_assignment): Require a const_gimple_assign
2269         rather than just a "const gimple" (the latter is not a
2270         "const_gimple").
2271         * gimple-pretty-print.c (dump_unary_rhs): Require a gimple_assign
2272         rather than just a gimple.
2273         (dump_binary_rhs): Likewise.
2274         (dump_ternary_rhs): Likewise.
2275         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
2276         (verify_gimple_assign_binary): Likewise.
2277         (verify_gimple_assign_ternary): Likewise.
2278         (verify_gimple_assign_single): Likewise.
2279         (verify_gimple_assign): Likewise.
2280         * tree-ssa-sccvn.c (simplify_unary_expression): Likewise.
2281         (try_to_simplify): Likewise.
2282         * tree-tailcall.c (process_assignment): Likewise.
2283         * tree-vect-generic.c (expand_vector_operation): Likewise.
2284         * tree-vrp.c (extract_range_from_cond_expr): Likewise.
2285         (extract_range_from_assignment): Likewise.
2287         * asan.c (has_stmt_been_instrumented_p): Add checked cast to
2288         gimple_assign in regions where a stmt is known to have code
2289         GIMPLE_ASSIGN.
2290         * gimple-pretty-print.c (pp_gimple_stmt_1): Likewise.
2291         * tree-cfg.c (verify_gimple_stmt): Likewise.
2292         * tree-ssa-sccvn.c (visit_use): Likewise.
2293         * tree-tailcall.c (find_tail_calls): Likewise.
2294         * tree-vrp.c (vrp_visit_assignment_or_call): Likewise.
2296         * tree-vrp.c (simplify_stmt_for_jump_threading): Replace a check
2297         against GIMPLE_ASSIGN with a dyn_cast<gimple_assign>, introducing
2298         a gimple_assign local.
2300         * tree-vect-generic.c (expand_vector_condition): Convert local to a
2301         gimple_assign, adding a checked cast when extracting from gsi, since
2302         this is only called when  underlying stmt has code GIMPLE_ASSIGN.
2303         (optimize_vector_constructor): Likewise.
2304         (lower_vec_perm): Likewise.
2305         (expand_vector_operations_1): Convert local to a gimple_assign,
2306         introducing a dyn_cast.
2308 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
2310         Introduce gimple_cond and use it in various places
2312         * coretypes.h (gimple_cond): New typedef.
2313         (const_gimple_cond): Likewise.
2315         * gimple.h (struct gimple_statement_cond): New subclass of
2316         gimple_statement_with_ops, adding the invariant that
2317         stmt->code == GIMPLE_COND.
2318         (is_a_helper <gimple_statement_cond>::test): New.
2319         (gimple_build_cond): Return a gimple_cond, rather than just
2320         a gimple.
2321         (gimple_build_cond_from_tree): Likewise.
2323         * gdbhooks.py (build_pretty_printer): Add gimple_cond and its
2324         variants, using the gimple printer.
2326         * cfgexpand.c (expand_gimple_cond): Require a gimple_cond rather
2327         than just a gimple.
2328         * gimple.h (gimple_cond_set_condition_from_tree): Likewise.
2329         (gimple_cond_true_p): Likewise.
2330         (gimple_cond_false_p): Likewise.
2331         (gimple_cond_set_condition): Likewise.
2332         * gimple.c (gimple_cond_set_condition_from_tree): Likewise.
2333         * gimple-fold.c (fold_gimple_cond): Likewise.
2334         * gimple-pretty-print.c (dump_gimple_cond): Likewise.
2335         * tree-ssa-dom.c (canonicalize_comparison): Likewise.
2336         * tree-ssa-forwprop.c (forward_propagate_into_gimple_cond): Likewise.
2337         * tree-ssa-ifcombine.c (recognize_single_bit_test): Likewise.
2338         (recognize_bits_test): Likewise.
2339         * tree-ssa-threadedge.c (simplify_control_stmt_condition): Likewise.
2340         (thread_around_empty_blocks): Likewise.
2341         (thread_through_normal_block): Likewise.
2342         (thread_across_edge): Likewise.
2343         * tree-ssa-threadedge.h (thread_across_edge): Likewise.
2344         * tree-vrp.c (range_fits_type_p): Likewise.
2346         * cfgexpand.c (expand_gimple_basic_block): Add checked cast to
2347         gimple_cond in regions where a stmt is known to have code GIMPLE_COND.
2348         * gimple-fold.c (fold_stmt_1): Likewise.
2349         * gimple-pretty-print.c (pp_gimple_stmt_1): Likewise.
2350         * tree-ssa-dom.c (optimize_stmt): Likewise.
2351         * tree-ssa-forwprop.c (ssa_forward_propagate_and_combine): Likewise.
2352         * tree-ssa-loop-unswitch.c (tree_unswitch_single_loop): Likewise.
2353         * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
2354         Likewise.
2355         * tree-vrp.c (simplify_stmt_using_ranges): Likewise.
2357         * cfgloopmanip.c (create_empty_loop_on_edge): Update local to be a
2358         gimple_cond.
2359         * tree-vrp.c (identify_jump_threads): Likewise.
2361         * gimple.c (gimple_build_cond): Return a gimple_cond, rather than
2362         just a gimple.
2363         (gimple_build_cond_from_tree): Likewise.
2365         * tree-ssa-dom.c (class dom_opt_dom_walker): Strengthen type of
2366         field "m_dummy_cond" from a plain gimple to a gimple_cond.
2368         * tree-ssa-ifcombine.c (ifcombine_ifandif): Introduce locals
2369         inner_stmt and outer_stmt so that inner_cond and outer_cond can be
2370         of type gimple_cond once we know that we have code == GIMPLE_COND.
2371         * tree-ssa-loop-unswitch.c (tree_may_unswitch_on): Introduce local
2372         "last" so that stmt can be of type gimple_cond.
2374 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
2376         Introduce gimple_bind and use it for accessors.
2378         * coretypes.h (gimple_bind): New typedef.
2379         (const_gimple_bind): New typedef.
2381         * gdbhooks.py (build_pretty_printer): Add gimple_bind
2382         and its variants, using the gimple printer.
2384         * gimple-pretty-print.c (dump_gimple_bind): Update type-signature to
2385         require a gimple_bind rather than just a gimple.
2387         * gimple.c (gimple_build_bind): Return a gimple_bind rather than
2388         just a gimple.
2389         * gimple.h (gimple_build_bind): Likewise.
2391         * gimple.h (gimple_seq_first_stmt_as_a_bind): New.
2393         * gimple.h (gimple_bind_vars): Update type-signature to
2394         require a gimple_bind rather than just a gimple, removing
2395         as_a and hence run-time check.
2396         (gimple_bind_set_vars): Likewise.
2397         (gimple_bind_append_vars): Likewise.
2398         (gimple_bind_body_ptr): Likewise.
2399         (gimple_bind_body): Likewise.
2400         (gimple_bind_set_body): Likewise.
2401         (gimple_bind_add_stmt): Likewise.
2402         (gimple_bind_add_seq): Likewise.
2403         (gimple_bind_block): Likewise.
2404         (gimple_bind_set_block): Likewise.
2405         * gimplify.c (gimple_push_bind_expr): Likewise.
2406         (gimple_current_bind_expr): Likewise.
2407         * tree-inline.c (copy_gimple_bind): Likewise.
2409         * gimplify.h (gimple_current_bind_expr): Return a gimple_bind
2410         rather than a plain gimple.
2411         (gimplify_body): Likewise.
2412         (gimple_bind_expr_stack): Return a vec<gimple_bind> rather than
2413         a vec<gimple>.
2415         * gimplify.c (struct gimplify_ctx): Strengthen field
2416         "bind_expr_stack" from vec<gimple> to vec<gimple_bind>.
2417         (gimple_bind_expr_stack): Likewise for type of returned value.
2419         * gimplify.c (gimplify_body): Strengthen various types from gimple
2420         to gimple_bind, including the return type.
2422         * gimplify.c (declare_vars): Introduce "gs" as a generic gimple,
2423         so that local "scope" can be of type gimple_bind once we've reached
2424         the region where it must be of code GIMPLE_BIND.
2426         * gimple-low.c (lower_gimple_bind): Add checked cast to
2427         gimple_bind, since both callers (lower_function_body and
2428         lower_stmt) have checked the code for us.
2430         * gimple.c (gimple_copy): Add checked cast to gimple_bind in
2431         region guarded by check for code GIMPLE_BIND.
2432         * gimple-low.c (gimple_stmt_may_fallthru): Likewise.
2433         * gimple-pretty-print.c (pp_gimple_stmt_1): Likewise.
2434         * gimple-walk.c (walk_gimple_stmt): Likewise.
2435         * omp-low.c (scan_omp_1_stmt): Likewise.
2436         (lower_omp_1): Likewise.
2437         (lower_omp_for): Likewise.
2438         * tree-cfg.c (verify_gimple_in_seq_2): Likewise.
2439         (do_warn_unused_result): Likewise.
2440         * tree-inline.c (remap_gimple_stmt): Likewise.
2441         (estimate_num_insns): Likewise.
2442         * tree-nested.c (convert_nonlocal_reference_stmt): Likewise.
2444         * gimplify.c (gimplify_bind_expr): Update local(s) to be a
2445         gimple_bind rather than just a gimple.
2446         (gimplify_function_tree): Likewise.
2447         * omp-low.c (lower_omp_sections): Likewise.
2448         (lower_omp_single): Likewise.
2449         (lower_omp_master): Likewise.
2450         (lower_omp_taskgroup): Likewise.
2451         (lower_omp_ordered): Likewise.
2452         (lower_omp_critical): Likewise.
2453         (lower_omp_taskreg): Likewise.
2454         (lower_omp_teams): Likewise.
2455         * omp-low.c (lower_omp_for): Likewise; use
2456         gimple_seq_first_stmt_as_a_bind to encapsulate the checked cast.
2457         (lower_omp_target): Likewise.
2458         * tree-nested.c (finalize_nesting_tree_1): Likewise.
2460         * gimple.c (empty_stmt_p): Add dyn_cast to a gimple_bind.
2461         * tree-inline.c (replace_locals_stmt): Add dyn_cast to gimple_bind.
2463 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
2465         Introduce gimple_switch and use it in various places
2467         * gimple.h (gimple_statement_switch): New subclass of
2468         gimple_statement_with_ops, adding the invariant that
2469         stmt->code == GIMPLE_SWITCH.
2470         (is_a_helper <gimple_statement_switch>::test (gimple)): New.
2472         * coretypes.h (gimple_switch): New typedef
2473         (const_gimple_switch): Likewise.
2475         * gdbhooks.py (build_pretty_printer): Add gimple_switch
2476         and its variants, using the gimple printer.
2478         * gimple.c (gimple_build_switch_nlabels): Return a gimple_switch
2479         rather than just a gimple.
2480         (gimple_build_switch): Likewise.
2481         * gimple.h (gimple_build_switch_nlabels): Likewise.
2482         (gimple_build_switch): Likewise.
2484         * gimple.h (gimple_switch_num_labels): Update type-signature to
2485         require a gimple_switch rather than just a gimple.
2486         (gimple_switch_set_num_labels): Likewise.
2487         (gimple_switch_set_index): Likewise.
2488         (gimple_switch_label): Likewise.
2489         (gimple_switch_set_label): Likewise.
2490         (gimple_switch_default_label): Likewise.
2491         (gimple_switch_set_default_label): Likewise.
2492         * expr.h (expand_case): Likewise.
2493         * gimple-pretty-print.c (dump_gimple_call): Likewise.
2494         * stmt.c (compute_cases_per_edge): Likewise.
2495         (expand_case): Likewise.
2496         * tree-cfg.h (group_case_labels_stmt): Likewise.
2497         * tree-cfg.c (make_gimple_switch_edges): Likewise.
2498         (find_taken_edge_switch_expr) Likewise.
2499         (find_case_label_for_value) Likewise.
2500         (get_cases_for_edge): Likewise.
2501         (group_case_labels_stmt): Likewise.
2502         (verify_gimple_switch): Likewise.
2503         * tree-eh.c (verify_norecord_switch_expr): Likewise.
2504         * tree-eh.c (lower_eh_constructs_2): Likewise.
2505         * tree-loop-distribution.c (generate_loops_for_partition): Likewise.
2506         * tree-ssa-dom.c (record_edge_info): Likewise.
2507         * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
2508         (simplify_gimple_switch): Likewise.
2509         * tree-switch-conversion.c (emit_case_bit_tests): Likewise.
2510         (collect_switch_conv_info): Likewise.
2511         (build_constructors): Likewise.
2512         (array_value_type): Likewise.
2513         (build_one_array): Likewise.
2514         (build_arrays): Likewise.
2515         (gen_inbound_check): Likewise.
2516         * tree-vrp.c (find_switch_asserts): Likewise.
2517         (find_case_label_range): Likewise.
2518         (find_case_label_ranges): Likewise.
2519         (vrp_visit_switch_stmt): Likewise.
2520         (simplify_switch_using_ranges): Likewise.
2522         * tree-vrp.c (switch_update): Strengthen field "stmt" from being
2523         merely a gimple to being a gimple_switch.
2525         * cfgexpand.c (expand_gimple_stmt_1): Add checked cast to
2526         gimple_switch in regions where the stmt code has been tested as
2527         GIMPLE_SWITCH.
2528         * gimple-pretty-print.c (pp_gimple_stmt_1): Likewise.
2529         * tree-cfg.c (make_edges): Likewise.
2530         (end_recording_case_labels): Likewise.
2531         (cleanup_dead_labels): Likewise.
2532         (cleanup_dead_labels): Likewise.
2533         (group_case_labels): Likewise.
2534         (find_taken_edge): Likewise.
2535         (find_case_label_for_value): Likewise.
2536         (verify_gimple_stmt): Likewise.
2537         (gimple_verify_flow_info): Likewise.
2538         (gimple_redirect_edge_and_branch): Likewise.
2539         * tree-inline.c (estimate_num_insns): Likewise.
2540         * tree-ssa-forwprop.c (ssa_forward_propagate_and_combine): Likewise.
2541         * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
2542         * tree-switch-conversion.c (do_switchconv): Likewise.
2543         * tree-vrp.c  (find_assert_locations_1): Likewise.
2544         (vrp_visit_stmt): Likewise.
2545         (simplify_stmt_using_ranges): Likewise.
2547         * ipa-inline-analysis.c (set_switch_stmt_execution_predicate):
2548         Introduce local "lastg" as a generic gimple, so that local "last"
2549         can be of type gimple_switch once lastg's code has been verified.
2551         * omp-low.c (diagnose_sb_2): Introduce switch_stmt local to handle
2552         the GIMPLE_SWITCH case.
2554         * tree-cfg.c (find_taken_edge_switch_expr): Add gimple_switch
2555         argument, since the caller (find_taken_edge) has checked that
2556         last_stmt is a switch.
2558 Copyright (C) 2014 Free Software Foundation, Inc.
2560 Copying and distribution of this file, with or without modification,
2561 are permitted in any medium without royalty provided the copyright
2562 notice and this notice are preserved.