2008-04-24 Doug Kwan <dougkwan@google.com>
[official-gcc.git] / gcc / ChangeLog.tuples
blob17f4089b43608ffd6df5e539b1bd4b1c281a0945
1 2008-04-24  Doug Kwan  <dougkwan@google.com>
3         * Makefile.in (STRICT_WARN): Remove -Wno-format and
4         -Wno-missing-format-attribute.
5         * gimplify.c (gimple_pop_condition): Remove redundant and incorrect
6         gimple_seq_free.
7         (gimplify_init_ctor_eval_range): Add a fall-through label for
8         GIMPLE_COND statement.
10 2008-04-25  Rafael Espindola <espindola@google.com>
12         * tree-ssa-dom.c (avail_expr_eq): Return false if the hashes don't
13         match.
15 2008-04-24  Oleg Ryjkov  <olegr@google.com>
17         * gimplify.c (gimplify_expr): Fix the assertion that verifies validity
18         of parameters.
19         * tree-inline.c (estimate_num_insns): Handle
20         GIMPLE_CHANGE_DYNAMIC_TYPE.
21         * tree-cfg.c (verify_types_in_gimple_stmt): Likewise.
23 2008-04-24  Rafael Espindola <espindola@google.com>
25         * tree-ssa-dom.c (initialize_hash_element): Fix the type of the code
26         variable.
28 2008-04-23  Rafael Espindola <espindola@google.com>
30         * omp-low.c (gate_lower_omp): Return 0.
31         * passes.c (init_optimization_passes): Enable all passes whose
32         corresponding dump options are used in the testsuite.
33         * tree-loop-distribution.c (tree_loop_distribution): Comment body.
34         (gate_tree_loop_distribution): Return 0.
35         * tree-ssa-forwprop.c (tree_ssa_forward_propagate_single_use_vars):
36         Comment body.
37         (gate_forwprop): Return 0.
38         * tree-ssa-loop.c (gate_tree_ssa_loop_unswitch): Return 0.
39         (gate_tree_vectorize): Return 0.
40         (gate_tree_ssa_loop_ivcanon): Return 0.
41         (tree_ssa_empty_loop): Return 0.
42         (gate_tree_complete_unroll): Return 0.
43         * tree-ssa-pre.c (gate_fre): Return 0.
44         * tree-ssa-reassoc.c (execute_reassoc): Comment body.
45         (gate_tree_ssa_reassoc): Return 0.
46         * tree-stdarg.c (gate_optimize_stdarg): Return 0.
47         (execute_optimize_stdarg): Comment body.
48         * tree-vrp.c (execute_vrp): Comment body.
49         (gate_vrp): Return 0.
51 2008-04-22  Aldy Hernandez  <aldyh@redhat.com>
53         * omp-low.c (lower_omp_parallel): Add new argument to
54         gimple_omp_parallel_set_combined_p.
55         (lower_omp_1): Remove debugging code.
56         * gimple.h (gimple_omp_parallel_combined_p): Add new argument.
58 2008-04-22  Rafael Espindola <espindola@google.com>
60         Merge with mainline @134552.
62         * configure.ac (ACX_PKGVERSION): Update revision merge string.
63         * configure: Regenerate.
65 2008-04-21  Doug Kwan  <dougkwan@google.com>
67         * tree-ssa-phiopt.c (FILE): Uncomment all previously disabled code.
68         (tree_ssa_phiopt): Remove FIXME and re-enable code.
69         (tree_ssa_cs_elim): Remove FIXME and re-enable code.
70         (tree_ssa_phiopt_worker): Tuplify.
71         (replace_phi_edge_with_variable): Tuplify.
72         (conditional_replacement): Tuplify and simplify optimization logic.
73         Construct a boolean tree and let fold and force_gimple_operand_gsi
74         do optimization and code genaration.
75         (value_replacement): Tuplify.
76         (minmax_replacement): Tuplify.
77         (abs_replacement): Tuplify.
78         (nt_init_block): Tuplify.
79         (cond_store_replacement): Tuplify.
80         * gimple.h (gimple_seq_singleton_p): Fix empty sequence bug.
81         * passes.c (init_optimization_passes): Re-enable pass_cselim
82         and pass_phiopt.
84 2008-04-21  Diego Novillo  <dnovillo@google.com>
86         * tree.c (make_node_stat): Clear gimple_body() for newly
87         created FUNCTION_DECLs.
88         * tree-gimple.c (rhs_predicate_for): Move to gimplify.c.
89         * tree-gimple.h (rhs_predicate_for): Remove declaration.
90         * gimple-pretty-print.c (dump_gimple_assign): Add support
91         for showing volatile operands.
92         (dump_gimple_call): Likewise.
93         Add support for showing __builtin_va_arg_pack, static
94         chains, return slot optimized and tail calls.
95         (dump_gimple_phi): Remove code to print memory symbols.
96         * gimplify.c (is_gimple_formal_tmp_or_call_rhs): New.
97         (is_gimple_mem_or_call_rhs): New.
98         (rhs_predicate_for): Call them.
99         (internal_get_tmp_var): Use is_gimple_formal_tmp_or_call_rhs as
100         the gimplification predicate.
101         Use the last statement in *PRE_P to get the temporary to
102         be updated when in SSA form.
103         (gimplify_bind_expr): Clear out *EXPR_P before returning.
104         (gimplify_call_expr): Do not build a GIMPLE_CALL if
105         WANT_VALUE is true.
106         Call gimple_build_call_from_tree if WANT_VALUE is false.
107         Remove local variable ARGS.
108         (gimplify_modify_expr): If after gimplification *FROM_P
109         is a CALL_EXPR, create a GIMPLE_CALL instead of a
110         GIMPLE_ASSIGN.
111         Document why the gimplification of the RHS should accept
112         CALL_EXPRs.
113         (gimplify_expr): Document where the generated statement
114         is stored.
115         Accept is_gimple_formal_tmp_or_call_rhs and
116         is_gimple_mem_or_call_rhs as gimplification predicates.
117         When gimplifying statements, clear out *EXPR_P before
118         returning.
119         When generating an rvalue, call is_gimple_formal_tmp_or_call_rhs
120         to test *EXPR_P.
121         * tree-dfa.c (mark_symbols_for_renaming): Remove
122         ATTRIBUTE_UNUSED.
123         * tree-flow.h (stmt_references_memory_p): Remove.
124         * gimple.c (gimple_build_call_from_tree): New.
125         * gimple.h (struct gimple_statement_with_memory_ops): Add
126         bitfield references_memory_p.
127         (gimple_build_call_from_tree): Declare.
128         (gimple_references_memory_p): Rename from
129         stmt_references_memory_p.  Move here.  Update all users.
130         (gimple_set_references_memory): New.
131         (gimple_assign_set_rhs1): When the assignment has more
132         than one operand on the RHS, assert that the operands are
133         gimple values.
134         (gimple_assign_set_rhs2): Assert that the operand is a
135         gimple value.
136         (gimple_call_set_return_slot_opt): Fix mask clearing.
137         (gimple_call_set_from_thunk): Likewise.
138         (gimple_call_set_va_arg_pack): Likewise.
139         * tree-cfg.c (dump_function_to_file): Do not indent when
140         doing a GIMPLE dump.
141         * tree-ssa-operands.c (add_virtual_operand): Call
142         gimple_set_references_memory.
143         (get_addr_dereference_operands): Likewise.
144         (get_tmr_operands): Likewise.
145         (maybe_add_call_clobbered_vops): Likewise.
146         (get_asm_expr_operands): Likewise.
147         (parse_ssa_operands): Likewise.
148         (build_ssa_operands): Likewise.
149         (stmt_references_memory_p): Remove.
151 2008-04-21  Rafael Espindola <espindola@google.com>
153         Cherry pick http://gcc.gnu.org/ml/gcc-patches/2008-04/msg01213.html
155         * params.def (PARAM_MAX_FIELDS_FOR_FIELD_SENSITIVE): Set default
156         to zero, thus disable creation of SFTs.
157         * gcc.dg/tree-ssa/salias-1.c: Remove.
158         * gcc.dg/tree-ssa/pr26421.c: Adjust pattern.
159         * gcc.dg/tree-ssa/alias-15.c: Likewise.
160         * gcc.dg/tree-ssa/ssa-lim-3.c: Run at -O2.
162 2008-04-20  Zdenek Dvorak  <ook@ucw.cz>
164         * passes.c (init_optimization_passes): Enable pass_dce_loop.
166 2008-04-20  Zdenek Dvorak  <ook@ucw.cz>
168         * tree-data-ref.c (split_constant_offset_1): Use POINTER_PLUS_EXPR
169         for pointer addition.
170         (split_constant_offset): Set VAR to EXP before conversions are
171         stripped, when no offset is removed.  Handle chrec_dont_know.
172         * tree-predcom.c: Tuplified.
173         * passes.c (init_optimization_passes): Enable pass_predcom.
175 2008-04-18  Aldy Hernandez  <aldyh@redhat.com>
177         * omp-low.c (lower_rec_input_clauses): Remove fixme and
178         ATTRIBUTE_UNUSED.
179         (lower_lastprivate_clauses): Same.
180         (lower_reduction_clauses): Same.
181         (lower_copyprivate_clauses): Same.
182         (lower_send_clauses): Same.
183         (lower_send_shared_vars): Same.
184         (maybe_catch_exception): Convert to tuples.
185         (lower_omp_sections): Same.
186         (lower_omp_single_simple): Same.
187         (lower_omp_single_copy): Same.
188         (lower_omp_single): Same.
189         (lower_omp_master): Same.
190         (lower_omp_ordered): Same.
191         (lower_omp_critical): Same.
192         (lower_omp_for_lastprivate): Same.
193         (lower_omp_for): Same.
194         (check_combined_parallel): Same.
195         (lower_omp_parallel): Same.
196         (lower_omp_1): Same.
197         (execute_lower_omp): Enable.
198         * gimple-dummy.c: Remove dummy functions for lower_omp_*.
199         * gimple-low.c (lower_omp_directive): Convert to tuples.
200         (lower_stmt): Remove fixme.
201         * gimple.h (gimple_seq_alloc_with_stmt): New.
202         (gimple_omp_section_set_last): New.
203         (gimple_omp_parallel_set_combined_p): New.
204         (gimple_bind_add_stmt): New.
205         (gimple_bind_add_seq): New.
206         * tree-cfg.c (verify_node_sharing): Fix typo in comment.
208 2008-04-17  Oleg Ryjkov  <olegr@google.com>
210         * Reverting forwprop patch.
212         2008-04-16  Oleg Ryjkov  <olegr@google.com>
214                 * tree-ssa-forwprop.c (get_prop_dest_stmtm get_prop_source_stmt,
215                 can_propagate_from, remove_prop_source_from_use,
216                 tidy_after_forward_propagate_addr,
217                 forward_propagate_addr_into_variable_array_index,
218                 forward_propagate_addr_expr_1, forward_propagate_addr_expr,
219                 forward_propagate_comparison, simplify_not_neg_expr,
220                 simplify_switch_expr,
221                 tree_ssa_forward_propagate_single_use_variables): Tuplified.
222                 (forward_propagate_into_cond): Tuplified and moved some functionality
223                 into forward_propagate_into_cond_gimple.
224                 (rhs_to_tree, forward_propagate_into_cond_gimple): New functions.
225                 * passes.c (init_optimization_passes): Enabled pass_forwprop.
226                 * tree-cfg.c (find_taken_edge_cond_expr): Fixed comment.
228 2008-04-16  Oleg Ryjkov  <olegr@google.com>
230         * tree-ssa-forwprop.c (get_prop_dest_stmtm get_prop_source_stmt,
231         can_propagate_from, remove_prop_source_from_use,
232         tidy_after_forward_propagate_addr,
233         forward_propagate_addr_into_variable_array_index,
234         forward_propagate_addr_expr_1, forward_propagate_addr_expr,
235         forward_propagate_comparison, simplify_not_neg_expr,
236         simplify_switch_expr,
237         tree_ssa_forward_propagate_single_use_variables): Tuplified.
238         (forward_propagate_into_cond): Tuplified and moved some functionality
239         into forward_propagate_into_cond_gimple.
240         (rhs_to_tree, forward_propagate_into_cond_gimple): New functions.
241         * passes.c (init_optimization_passes): Enabled pass_forwprop.
242         * tree-cfg.c (find_taken_edge_cond_expr): Fixed comment.
244 2008-04-16  Doug Kwan  <dougkwan@google.com>
246         * Makefile.in (STRICT_WARN): Disable -Wmissing-format-attribute
247         and -Wformat temporarily for bootstrapping.
248         * lambda-code.c (invariant_in_loop_and_outer_loops): Comment out
249         to avoid defined-and-not-used warning.
250         * tree-cfg.c (gather_blocks_in_sese_region): Comment out to avoid
251         defined-and-not-used warning.
253 2008-04-16  Doug Kwan  <dougkwan@google.com>
255         * Makefile.in (GTFILES): Add back ipa-reference.h and ipa-reference.c.
256         * gimple-dummy.c (memory_identifier_string): Remove.
257         * ipa-cp.c (constant_val_insert): Tuplify.
258         * ipa-prop.c (File): Uncomment all previously disabled code.
259         (ipa_method_modify_stmt): Tuplify.
260         (ipa_method_compute_modify): Tuplify.
261         (ipa_callsite_tree): Renamed to ipa_callsite_stmt.  Update callers.
262         (ipa_callsite_stmt): New.
263         (ipa_callsite_compute_count): Tuplify.
264         (ipa_callsite_compute_param): Tuplify.
265         * ipa-reference.c (File): Uncomment all previously disabled code.
266         (get_asm_stmt_operands): Tuplify.
267         (check_call): Tuplify.  Also add code to handle assignment of
268         returned value.
269         (scan_for_static_refs): Remove.  Tuplify body and split into two
270         new functions scan_stmt_for_static_refs and scan_op_for_static_refs.
271         Update callers.
272         (scan_stmt_for_static_refs): New.  Split from scan_for_static_refs.
273         (scan_op_for_static_refs): New.  Split from scan_for_static_refs.
274         (analyze_variable): Update walk_tree call.
275         (analyze_function): Tuplify.
276         * passes.c (init_optimization_passes): Re-enable pass_ipa_reference.
277         * tree-flow.h (struct function_ann_d): Uncomment field
278         ipa_reference_vars_info.
280 2008-04-15  Doug Kwan  <dougkwan@google.com>
282         * tree-eh.c (operation_could_trap_p): Fix filtering logic.
284 2008-04-15  Bill Maddox  <maddox@google.com>
286         * tree-ssa-dom.c: (degenerate_phi_result, remove_stmt_or_phi,
287         get_rhs_or_phi_arg, get_lhs_or_phi_result, propagate_rhs_into_lhs,
288         eliminate_const_or_copy, eliminate_degenerate_phis_1,
289         eliminate_degenerate_phis): Convert to tuples.
290         * passes.c (init_optimization_passes): Enable pass_phi_only_cprop.
291         
292 2008-04-15  Oleg Ryjkov  <olegr@google.com>
294         * tree-ssa-dom.c (record_const_or_copy): Moving a variable declaration to
295         the top of a block.
297 2008-04-15  Doug Kwan  <dougkwan@google.com>
299         * tree-ssa-sink.c (File): Uncomment all previously disabled code.
300         (find_bb_for_arg): Tuplify.
301         (all_immediate_uses_sample_place): Tuplify.
302         (nearest_common_dominator_of_uses): Tuplify.
303         (statement_sink_location): Tuplify.  Remove parameter tobb and update
304         caller.
305         (sink_code_in_bb): Tuplify.
306         * passes.c (init_optimization_passes): Re-enable pass_sink_code.
308 2008-04-14  Bill Maddox  <maddox@google.com>
310         * tree-ssa-threadupdate.c (remove_ctrl_stmt_and_useless_edge,
311         create_edge_and_update_destination_phis, redirection_block_p):
312         Convert to tuples.
313         * tree.c (iterative_hash_exprs_commutative): New function.
314         * tree.h (iterative_hash_exprs_commutative): Declare.
315         * tree-ssa_dom.c (enum expr_kind, struct hashable_expr,
316         struct cond_equivalence): New types.
317         (struct edge_info): Use struct cond_equivalence.
318         (avail_exprs_stack): Stack of expr_hash_elt*, not expressions.
319         (stmts_to_rescan): Use type gimple for statements.
320         (struct expr_hash_elt): Represent statement RHS with hashable_expr,
321         not a tree.  Add unique stamp to each entry for efficient and reliable
322         element removal.
323         (struct eq_expr_value): Delete unused type.
324         (initialize_hash_element): Convert to tuples.  Now applies
325         only to statements.
326         (initialize_expr_from_cond, initialize_hash_element_from_expr):
327         New functions.  Replace former functionality of initialize_hash_element
328         for conditions presented as trees.
329         (hashable_expr_equal_p, iterative_hash_hashable_expr): New functions.
330         (print_expr_hash_elt): New function.
331         (free_expr_hash_elt): New function.
332         (tree_ssa_dominator_optimize): Convert to tuples
333         (canonicalize_comparison): Convert to tuples.
334         (remove_local_expressions_from_table): Use new avail_exprs_stack
335         representation.  Add optional extra diagnostic details.
336         (simplify_stmt_for_jump_threading, dom_thread_across_edge,
337         dom_opt_finalize_block): Convert to tuples.
338         (record_cond, build_and_record_new_cond): Convert to tuples.
339         Use new hashable_expr type.  Extra diagnostic details.
340         (record_const_or_copy_1): Extra diagnostic details.
341         (record_const_or_copy): Add assertion.
342         (simple_iv_increment_p, cprop_into_successor_phis, record_edge_info):
343         Convert to tuples.
344         (eliminate_redundant_computations): Convert to tuples.
345         Additional diagnostic details.
346         (gimple_assign_unary_useless_conversion_p): New function.
347         (record_equivalences_from_statement): Convert to tuples.
348         Additional diagnostic details.
349         (cprop_operand, cprop_into_stmt): Convert to tuples.
350         (optimize_stmt): Convert to tuples.
351         (lookup_avail_expr): Use hashable_expr.  Additional diagnostic details.
352         (avail_expr_hash, avail_expr_eq): Use hashable_expr.
353         * tree-ssa-copy.c (may_propagate_copy_into_stmt,
354         propagate_tree_value_into_stmt): New functions.
355         * tree-flow.h: (may_propagate_copy_into_stmt,
356         propagate_tree_value_into_stmt): Declare.
357         (thread_across_edge): Change declaration of callback to accept a
358         gimple statement.
359         * gimple.c (gimple_call_flags): Declare argument as a constant.
360         (gimple_has_side_effects): Declare argument as a constant.
361         Examine function arguments for side-effects.
362         (gimple_rhs_has_side_effects): New function.
363         * gimple.h (gimple_call_flags): Declare argument as a constant.
364         (gimple_has_side_effects): Declare argument as a constant.
365         (gimple_rhs_has_side_effects): Declare new function.
366         (is_gimple_assign): New inline function.
367         (gimple_switch_index_ptr): New function.
368         * passes.c (init_optimization_passes): Enable pass_dominator.
369         * tree-ssa_threadedge.c (potentially_threadable_block,
370         lhs_of_dominating_assert, record_temporary_equivalences_from_phis):
371         Convert to tuples.
372         (fold_assignment_stmt): New function.
373         (record_temporary_equivalences_from_stmts_at_dest,
374         simplify_control_stmt_condition, thread_across_edge): Convert to tuples.
376 2008-04-14  Doug Kwan  <dougkwan@google.com>
378         * c-typeck.c (convert_for_assignment): Call c_common_unsigned_type
380 2008-04-14  Doug Kwan  <dougkwan@google.com>
382         * gimple-iterator.c (gsi_move_to_bb_end): Use gsi_last_bb
383         instead of calling both gsi_last and bb_seq.
384         * passes.c (init_optimization_passes): Re-eanble second tail-recursion
385         pass.
387 2008-04-14  Doug Kwan  <dougkwan@google.com>
389         * tree-nrv.c (dest_safe_for_nrv_p):  Uncomment.
390         (execute_return_slot_opt): Tuplify.
391         * passes.c (init_optimization_passes): Re-enable pass_return_slot.
393 2008-04-14  Aldy Hernandez  <aldyh@redhat.com>
395         * tree-cfg.c (gimple_can_merge_blocks_p): Fix typo.
396         * omp-low.c (maybe_lookup_ctx): Uncomment and set ATTRIBUTE_UNUSED.
397         (lower_lastprivate_clauses): Same.
398         (lower_reduction_clauses): Same.
399         (lower_send_clauses): Same.
400         (expand_omp_for_generic): Uncomment and convert for tuples.
401         (expand_omp_for): Remove fixme.
402         (expand_omp_sections): Same.
403         (lower_omp_parallel): Partially convert for tuples.
404         (lower_omp_regimplify_p): Rename from lower_omp_2.
405         (lower_omp_1): Convert for tuples.
406         (lower_omp): Same.
407         (gimple-dummy.c): Add lower_omp_parallel, lower_omp_for,
408         lower_omp_sections, lower_omp_single, lower_omp_master,
409         lower_omp_ordered, lower_omp_critical.
411 2008-04-13  Diego Novillo  <dnovillo@google.com>
413         * tree-cfg.c (need_fake_edge_p): Initialize CALL_FLAGS.
415 2008-04-12  Rafael Espindola <espindola@google.com>
417         Merge with mainline @134237.
419         * configure.ac (ACX_PKGVERSION): Update revision merge string.
420         * configure: Regenerate.
422 2008-04-13  Rafael Espindola <espindola@google.com>
424         * config/extensions.m4: Add. Was missing from previous merge.
426 2008-04-12  Rafael Espindola <espindola@google.com>
428         Merge with mainline @133860.
430         * configure.ac (ACX_PKGVERSION): Update revision merge string.
431         * configure: Regenerate.
433 2008-04-11  Oleg Ryjkov  <olegr@google.com>
435         * tree-sra.c (scalarize_use): Moving a variable declaration to
436         the top of a block.
438 2008-04-11  Oleg Ryjkov  <olegr@google.com>
440         * tree-sra.c (insert_edge_copies_seq): Removed unused variable.
442 2008-04-11  Oleg Ryjkov  <olegr@google.com>
444         * tree-sra.c (sra_build_assignment): Tuplified.
445         (mark_all_v_defs): Removed.
446         (mark_all_v_defs_seq, mark_all_v_defs_stmt): New functions.
447         (sra_walk_expr): Tuplified.
448         (sra_walk_tree_list): Removed.
449         (sra_walk_call_expr, sra_walk_gimple_asm,
450         sra_walk_gimple_modifY_stmt, ): Tuplified and renamed.
451         (sra_walk_gimple_call, sra_walk_gimple_asm,
452         sra_walk_gimple_assign): New names for tuplified functions.
453         (sra_walk_function, find_candidates_for_sra, scan_use, scan_copy,
454         scan_ldst, instantiate_element, decide_instantiations,
455         mark_all_v_defs_1, sra_build_assignment, sra_build_bf_assignment,
456         sra_build_elt_assignment, generate_copy_inout,
457         generate_element_copy, generate_element_zero,
458         generate_one_element_init, generate_element_init_1): Tuplified.
459         (insert_edge_copies): Removed.
460         (insert_edge_copies_seq): New function.
461         (sra_insert_before, sra_insert_after, sra_replace,
462         sra_explode_bitfield_assignment, sra_sync_for_bitfield_assignment,
463         scalarize_use, scalarize_copy, scalarize_init, mark_no_trap,
464         scalarize_ldst, scalarize_parms, scalarize_function): Tuplified.
465         (tree_sra, tree_sra_early): Enabled
466         (sra_init_cache): Removed extra space.
467         * tree-flow.h (insert_edge_copies_seq): New declaration.
468         * gimple.h (gimple_asm_input_op_ptr, gimple_asm_output_op_ptr,
469         gimple_return_retval_ptr): New functions.
470         * passes.c (init_optimization_passes): Enabled pass_sra,
471         pass_early_sra.
473 2008-04-11  Doug Kwan  <dougkwan@google.com>
475         * ipa-pure-const.c (get_asm_expr_operands): Tuplify.
476         (get_asm_expr_operands): Tuplify.
477         (check_call): Tuplify. Add code to handle return value assignment.
478         (scan_function): Remove. Original code is tuplified and split into
479         two new functions scan_function_op and scan_function_stmt.
480         (scan_function_op): New function.
481         (scan_function_stmt): New function.
482         (analyze_function): Tuplify and re-enable previously disabled code. 
483         * passes.c (init_optimization_passes): Re-enable pass_ipa_pure_const.
485 2008-04-11 Oleg Ryjkov  <olegr@google.com>
487         * builtins.c (fold_call_stmt): Return the proper value.
488         * tree-ssa-ccp.c (maybe_fold_stmt_addition): Modify arguments to
489         allow this function to be called on a GIMPLE_ASSIGN.
490         (fold_stmt_r): Update the call to maybe_fold_stmt_addition.
491         (fold_gimple_assign): Manually call maybe_fold_stmt_addition to
492         fold a POINTER_PLUS_EXPR.
494 2008-04-11  Doug Kwan  <dougkwan@google.com>
496         * tree-ssa-phiprop.c (File): Uncomment all previously disabled code.
497         (struct phiprop_d): Change type of vop_stmt to gimple.
498         (phivn_valid_p): Tuplify.
499         (phiprop_insert_phi): Tuplify.
500         (propagate_with_phi): Tuplify.
501         (tree_ssa_phiprop_1): Tuplify.
502         (tree_ssa_phiprop): Tuplify.
503         * passes.c (init_optimization_passes): Re-enable pass_phiprop.
505 2008-04-11  Rafael Espindola <espindola@google.com>
507         * tree-ssa-math-opts.c (execute_cse_sincos_1): fix warning.
509 2008-04-10  Diego Novillo  <dnovillo@google.com>
511         http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00913.html
513         * ipa-inline.c (cgraph_clone_inlined_nodes): Change uses
514         of DECL_SAVED_TREE with gimple_body.
515         (cgraph_decide_inlining_incrementally): Likewise.
516         * gimple-iterator.c (gsi_insert_seq_before_without_update):
517         Do nothing if SEQ is NULL.
518         (gsi_insert_seq_after_without_update): Likewise.
519         * tree-ssa-live.c (mark_all_vars_used_1): Do not handle
520         EXPR trees.
521         (remove_unused_locals): Mark the gimple_block of every
522         statement as used.
523         * tree-inline.c (remap_gimple_stmt): Forward declare.
524         (remap_decls): Tidy comments.
525         (remap_gimple_seq): New.
526         (copy_gimple_bind): New.
527         (remap_gimple_stmt): Call it.
528         Handle High GIMPLE statements.
529         (copy_bb): Regimplify operands on COPY_GSI instead of
530         GSI.
531         (copy_cfg_body): Tidy.
532         (copy_generic_body): Remove unused function.
533         (clone_body): Tuplify.
534         * c-common.c (c_warn_unused_result): Remove assertion for
535         FUNCTION_TYPE.
536         * gimple.c (gimple_seq_copy): Rename from
537         gimple_seq_deep_copy.  Update all users.
538         (walk_gimple_stmt): Assert that STMT has no substatements
539         in the default case.
540         (gimple_copy_1): Merge into gimple_copy.
541         (gimple_copy): Always do deep copying.
542         Handle statements with substatements.
543         (gimple_shallow_copy): Remove unused function.
544         (gimple_deep_copy): Remove.  Update all users.
545         * gimple.h: Tidy comments and structure fields
546         everywhere.
547         (gimple_has_substatements): New.
548         (walk_stmt_fn): Change last argument to struct walk_stmt_info *.
549         Update all users.
551 2008-04-10 Oleg Ryjkov  <olegr@google.com>
553         * tree.h (struct tree_base): Added a new flag default_def_flag.
554         (SSA_NAME_IS_DEFAULT_DEF): Changed to use the new flag.
556 2008-04-08  Doug Kwan  <dougkwan@google.com>
558         * gimplify.c (gimple_push_cleanup): Initialize cleanup_stmts to NULL.
560 2008-04-08  Doug Kwan  <dougkwan@google.com>
561         
562         * tree-tailcall.c (struct tailcall): Remove call_block and replace
563         call_bsi by call_gsi.
564         (independent_of_stmt_p): Change type of parameter 'at' to GIMPLE and
565         change all tree using code to GIMPLE using equivalent.
566         Remove parameter block_stmt_iterator type parameter bsi with
567         gimple_stmt_iterator type parameter gsi. Replace uses of bsi with
568         that of gsi in function body as appropriate.
569         (process_assignment):  Remove parameter 'ass' and change type of
570         parameter 'stmt' to GIMPLE.  Change all tree using code to GIMPLE
571         using equivalent.
572         (propagate_through_phis, eliminate_tail_call, optimize_tail_call):
573         Change all tree using code to GIMPLE using equivalent.
574         (find_tail_calls): Change all tree using code to GIMPLE using
575         equivalent.  Remove code that handles GIMPLE_MODIFY_STMT containing
576         a CALL_EXPR.
577         (add_successor_phi_arg, adjust_return_value_with_ops,
578         update_accumulator_with_ops, adjust_accumulator_values,
579         create_tailcall_accumulator): New functions from refactoring of
580         duplicated logic.
581         (adjust_accumulator_values, adjust_return_value): Refactor.
582         (tree_optimize_tail_calls_1): Refactor and change all tree using code
583         to GIMPLE using equivalent.  Remove code to reverse phi list.
584         * passes.c (init_optimization_passes):  Re-enable pass_tail_recursion
585         and pass_tail_calls.
587 2008-04-04  Doug Kwan  <dougkwan@google.com>
589         * tree-ssa-math-opts.c (struct occurrence): Change field type of
590         recip_def_stmt to gimple.
591         (is_division_by): Tuplify.
592         (insert_reciprocals): Tuplify.
593         (replace_reciprocals): Tuplify.
594         (execute_cse_reciprocals_1): Tuplify.
595         (execute_cse_reciprocals): Tuplify.
596         (maybe_record_sincos): Use vector of gimples instead of vector of
597         trees.
598         (execute_cse_sincos_1): Tuplify.  When adjusting recorded old call
599         sites, generate new gimple assign statements and remove old gimple
600         call statements.
601         (execute_cse_sincos): Tuplify.
602         (execute_convert_to_rsqrt): Tuplify.
603         * passes.c (init_optimization_passes): Enable pass_cse_sincos,
604         pass_cse_reciprocals and pass_convert_to_rsqrt.
606 2008-04-04  Aldy Hernandez  <aldyh@redhat.com>
608         * omp-low.c (gimple_build_cond_empty): New.
609         (expand_parallel_call): Convert COND_EXPR to GIMPLE_COND.
610         (expand_omp_for_generic): Same.
611         (expand_omp_for_static_nochunk): Same. 
612         (expand_omp_for_static_chunk): Same.
613         (expand_omp_atomic_pipeline): Same.
615 2008-04-04  Diego Novillo  <dnovillo@google.com>
617         http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00413.html
619         * tree-ssa-loop-im.c (movement_possibility): Return
620         MOVE_IMPOSSIBLE if that statement makes no assignment.
621         * tree-complex.c (get_component_ssa_name): Fix comment.
622         (set_component_ssa_name): Assert that COMP's definition
623         is LAST.
624         * cgraph.c (cgraph_update_edges_for_call_stmt): Tuplify.
625         (dump_cgraph_node): Likewise.
626         * tree.c (auto_var_in_fn_p): Fix comment.
627         * cgraphunit.c (verify_cgraph_node): Remove tuples hack
628         that avoided verifying nodes.
629         * gimple-pretty-print.c (dump_gimple_asm): Show the
630         volatile flag.
632         * gimple-dummy.c (optimize_inline_calls): Remove.
633         (tree_function_versioning): Remove.
634         (tree_versionalbe_function_p): Remove.
635         * ipa-inline.c (cgraph_clone_inlined_bodies): Re-format.
636         (cgraph_decide_inlining): Re-format.
637         (cgraph_decide_inlining_incrementally): Re-format.
638         (pass_ipa_inline): Re-format.
639         * gimplify.c (gimplify_call_expr): Carry all the
640         CALL_EXPR flags to the newly created GIMPLE_CALL.
641         (gimplify_asm_expr): Carry ASM_VOLATILE_P and ASM_INPUT_P
642         over to the new GIMPLE_ASM.
643         * tree-dfa.c (find_new_referenced_vars): Change argument
644         to gimple.  Update all callers.
645         * cfgexpand.c (set_expr_location_r): New private.
646         (gimple_to_tree): Call it.
647         Set ASM_VOLATILE_P and ASM_INPUT_P for ASM_EXPRs.
648         Carry flags from GIMPLE_CALL for CALL_EXPRs.
649         Set TREE_BLOCK on the newly created expression.
650         * tree-inline.c: Tuplify.
651         * tree-inline.h: Tuplify.
652         * tree-optimize.c (execute_fixup_cfg): Tuplify.
653         * gimple.c (gimple_build_call_vec): Change second
654         argument type to VEC(tree, heap).  Update all callers.
655         (gimple_build_assign_with_ops): If the LHS is an
656         SSA_NAME, set SSA_NAME_DEF_STMT on it.
657         (walk_gimple_seq): Change return type to gimple.  Update
658         all users.
659         If walk_gimple_stmt returned a value, store it in
660         WI->CALLBACK_RESULT.
661         (walk_gimple_op): Walk gimple_call_chain_ptr() and
662         gimple_call_fn_ptr() for GIMPLE_CALL.
663         (walk_gimple_stmt): Add new local HANDLED_OPS.
664         If callback_stmt() sets HANDLED_OPS, return its return
665         value.
666         If any call to walk_gimple_seq returns a non-NULL value,
667         return WI->CALLBACK_RESULT.
668         (gimple_copy_1): New function.
669         (gimple_deep_copy): Rename from gimple_copy.  Update all
670         users.
671         Call gimple_copy_1.
672         (gimple_shallow_copy): New.
673         (gimple_regimplify_operands): New.
674         * gimple.h (GF_ASM_INPUT): Define.
675         (GF_ASM_VOLATILE): Define.
676         (GF_CALL_CANNOT_INLINE): Define.
677         (GF_CALL_FROM_THUNK): Define.
678         (GF_CALL_RETURN_SLOT_OPT): Define.
679         (GF_CALL_VA_ARG_PACK): Define.
680         (gimple_stmt_iterator): Move earlier in the file.
681         (gimple_omp_return_nowait_p): Fix return expression.
682         (gimple_omp_section_last_p): Likewise.
683         (gimple_omp_parallel_combined_p): Likewise.
684         (gimple_call_noreturn_p): Likewise.
685         (gimple_call_nothrow_p): Likewise.
686         (gimple_asm_volatile_p): Likewise.
687         (gimple_try_catch_is_cleanup): Likewise.
688         (gimple_assign_set_rhs1): assert that RHS is a gimple
689         operand.
690         (is_gimple_call): New.  Change all users that tested
691         gimple_code() == GIMPLE_CALL.
692         (gimple_call_fn_ptr): New.
693         (gimple_call_chain_ptr): New.
694         (gimple_call_set_chain): Accept NULL values for CHAIN.
695         (gimple_call_set_tail): Add bool argument specifying the
696         value of the flag.  Update all users.
697         (gimple_asm_set_volatile): Likewise.
698         (gimple_call_set_cannot_inline): Rename from
699         gimple_call_mark_uninlinable.  Add bool argument
700         specifying the value of the flag.  Update all users.
701         (gimple_call_set_return_slot_opt): New.
702         (gimple_call_return_slot_opt_p): New.
703         (gimple_call_set_from_thunk): New.
704         (gimple_call_from_thunk_p): New.
705         (gimple_call_va_arg_pack_p): New.
706         (gimple_call_copy_flags): New.
707         (gimple_asm_set_input): New.
708         (gimple_asm_input_p): New.
709         (gimple_asm_clear_volatile): Remove.
710         (walk_stmt_fn): Add second argument bool *.  Update all
711         users.
712         (struct walk_stmt_info): Add new field callback_result.
713         * tree-cfg.c (gimple_split_block): Tuplify.
714         (gimple_block_ends_with_condjump_p): Tuplify.
715         (need_fake_edge_p): Tuplify.
716         (gimple_flow_call_edges_add): Tuplify.
717         (gimple_purge_dead_abnormal_call_edges): Tuplify.
718         (gimple_purge_dead_eh_edges): Remove ATTRIBUTE_UNUSED.
719         (gimple_cfg_hooks): Add gimple_block_ends_with_condjump_p
720         and gimple_flow_call_edges_add
721         * passes.c (init_optimization_passes): Enable
722         pass_cleanup_cfg, pass_inline_parameters,
723         pass_ipa_inline and pass_apply_inline.
724         (execute_todo): Re-enable check for TODO_update_ssa_any
725         if need_ssa_update_p() returns true.
726         * tree-ssa-operands.c (ssa_operands_active): Return false
727         if cfun is NULL.
730 2008-04-04  Rafael Espindola <espindola@google.com>
732         Merge with mainline @133632.
734         * configure.ac (ACX_PKGVERSION): Update revision merge string.
735         * configure: Regenerate.
737 2008-04-04  Rafael Espindola <espindola@google.com>
739         Merge with mainline @133631.
741         * configure.ac (ACX_PKGVERSION): Update revision merge string.
742         * configure: Regenerate.
744 2008-04-04  Rafael Espindola <espindola@google.com>
746         Merge with mainline @133630.
748         * configure.ac (ACX_PKGVERSION): Update revision merge string.
749         * configure: Regenerate.
751 2008-04-03  Aldy Hernandez  <aldyh@redhat.com>
753         * omp-low.c (expand_omp_sections): Use
754         gimple_omp_sections_control.
755         (lower_omp_sections): Same.
756         * gimplify.c (gimplify_omp_workshare): Adjust OMP clauses before
757         creating gimple tuple.
758         Add gimple tuple to sequence.
759         Set OMP_SECTIONS_CONTROL in newly created tuple.
760         * gimple.h (gimple_statement_omp_sections): Add control.
761         (gimple_omp_sections_control): New.
762         (gimple_omp_sections_control_ptr): New.
763         (gimple_omp_sections_set_control): New.
765 2008-04-03  Oleg Ryjkov  <olegr@google.com>
767         * tree-nested.c (convert_nl_goto_receiver): Changed to hadle gimple
768         statements instead of trees.
769         (lower_nested_functions): Pass convert_nl_goto_receiver as the first
770         parameter to walk_all_functions.
772 2008-04-03  Rafael Espindola <espindola@google.com>
774         Merge with mainline @133624.
776         * configure.ac (ACX_PKGVERSION): Update revision merge string.
777         * configure: Regenerate.
779 2008-04-03  Rafael Espindola <espindola@google.com>
781         Merge with mainline @133612.
783         * configure.ac (ACX_PKGVERSION): Update revision merge string.
784         * configure: Regenerate.
786 2008-04-03  Aldy Hernandez  <aldyh@redhat.com>
788         * tree-pretty-print.c (dump_generic_node): Remove
789         OMP_{RETURN,CONTINUE} cases.
790         * tree.h (OMP_RETURN_NOWAIT): Remove.
791         * omp-low.c (dump_omp_region): Rename OMP_{CONTINUE,RETURN} to
792         GIMPLE_OMP_{CONTINUE,RETURN}.
793         (expand_omp_for_generic): Handle new arguments to
794         GIMPLE_OMP_CONTINUE.
795         (expand_omp_for_static_nochunk): Same.
796         (expand_omp_for_static_chunk): Same.
797         (expand_omp_sections): Same.
798         (expand_omp): Rename all OMP_* to GIMPLE_OMP_*.
799         (lower_omp_sections): Rename OMP_CONTINUE to GIMPLE_OMP_CONTINUE.
800         (lower_omp_for): Same.
801         * tree-gimple.c (is_gimple_stmt): Remove OMP_{RETURN,CONTINUE}
802         cases.
803         * gsstruct.def: Add GSS_OMP_CONTINUE.
804         * gimple-pretty-print.c (dump_gimple_omp_continue): New.
805         (dump_gimple_omp_return): New.
806         (dump_gimple_stmt): Add cases for GIMPLE_OMP_{CONTINUE,RETURN}.
807         * gimplify.c (gimplify_expr): Remove cases for
808         OMP_{CONTINUE,RETURN}.
809         * tree.def (DEFTREECODE): Remove OMP_{RETURN,CONTINUE}.
810         * tree-cfgcleanup.c (cleanup_omp_return): Rename
811         OMP_SECTIONS_SWITCH to GIMPLE_OMP_SECTIONS_SWITCH.
812         * gimple.c (gss_for_code): GIMPLE_OMP_RETURN returns GSS_BASE.
813         GIMPLE_OMP_CONTINUE return GSS_OMP_CONTINUE.
814         (gimple_size): Adjust size of GIMPLE_OMP_{RETURN,CONTINUE}.
815         (gimple_build_omp_continue): Change arguments.
816         (walk_gimple_op): Walk GIMPLE_OMP_CONTINUE operands.
817         (walk_gimple_stmt): Remove GIMPLE_OMP_CONTINUE case.
818         * gimple.h (struct gimple_statement_omp_continue): New.
819         (union gimple_statement_d): Add gimple_omp_continue.
820         (gimple_build_omp_continue): Change argument types in prototype.
821         (gimple_omp_return_set_nowait): Rename OMP_RETURN to
822         GIMPLE_OMP_RETURN.
823         (gimple_omp_continue_control_def): New.
824         (gimple_omp_continue_control_def_ptr): New.
825         (gimple_omp_continue_set_control_def): New.
826         (gimple_omp_continue_control_use): New.
827         (gimple_omp_continue_control_use_ptr): New.
828         (gimple_omp_continue_set_control_use): New.
829         * tree-cfg.c (make_edges): Rename OMP_ to GIMPLE_OMP_.
830         (gimple_redirect_edge_and_branch): Same.
831         * tree-ssa-operands.c (get_expr_operands): Remove OMP_CONTINUE
832         case.
834 2008-04-02  Doug Kwan  <dougkwan@google.com>
836         * tree-complex.c (expand_complex_comparison): Set condition code
837         correctly for the NE_EXPR case.
838         * cfgexpand.c (gimple_to_tree): Generate assignment to return value
839         if necessary.
841 2008-04-02  Rafael Espindola <espindola@google.com>
843         Merge with mainline @133597.
845         * configure.ac (ACX_PKGVERSION): Update revision merge string.
846         * configure: Regenerate.
848 2008-04-02  Rafael Espindola <espindola@google.com>
850         Merge with mainline @133527.
852         * configure.ac (ACX_PKGVERSION): Update revision merge string.
853         * configure: Regenerate.
855 2008-04-02  Rafael Espindola <espindola@google.com>
857         Merge with mainline @133519.
859         * configure.ac (ACX_PKGVERSION): Update revision merge string.
860         * configure: Regenerate.
862 2008-04-02  Rafael Espindola <espindola@google.com>
864         Merge with mainline @133453.
866         * configure.ac (ACX_PKGVERSION): Update revision merge string.
867         * configure: Regenerate.
869 2008-04-01  Doug Kwan  <dougkwan@google.com>
870             Bill Maddox  <maddox@google.com>.
872         * value-prof.c (interesting_stringop_to_profile_p) Call
873         validate_gimple_arglist instead of validate_arglist.
874         * tree.h (validate_arglist): New declaration.
875         * builtins.c (expand_builtin_setjmp_receiver, expand_builtin_longjmp,
876         expand_builtin_nonlocal_goto, expand_builtin_nonlocal_goto,
877         expand_builtin_update_setjmp_buf, expand_builtin_prefetch,
878         expand_builtin_apply, expand_builtin_return, expand_builtin_mathfn,
879         expand_builtin_mathfn_2, expand_builtin_mathfn_3,
880         expand_builtin_interclass_mathfn, expand_builtin_sincos,
881         expand_builtin_cexpi, expand_builtin_int_roundingfn,
882         expand_builtin_int_roundingfn_2, expand_builtin_pow,
883         expand_builtin_powi, expand_builtin_strlen, expand_builtin_strlen,
884         expand_builtin_strstr, expand_builtin_strchr, expand_builtin_strrchr,
885         expand_builtin_memcpy, expand_builtin_memcpy,
886         expand_builtin_mempcpy_args, expand_builtin_bcopy, expand_movstr,
887         expand_builtin_stpcpy, expand_builtin_strncpy, builtin_memset_gen_str,
888         expand_builtin_bzero, expand_builtin_memchr, expand_builtin_memcmp,
889         expand_builtin_strcmp, expand_builtin_strncmp, expand_builtin_strcat,
890         expand_builtin_strncat, expand_builtin_strspn, expand_builtin_alloca,
891         expand_builtin_bswap, expand_builtin_unop, expand_builtin_fputs,
892         expand_builtin_fabs, expand_builtin_copysign,
893         expand_builtin___clear_cache, expand_builtin_init_trampoline,
894         expand_builtin_adjust_trampoline, expand_builtin_signbit,
895         expand_builtin, validate_arg, expand_builtin_object_size,
896         expand_builtin_object_size, expand_builtin_memory_chk) Re-enable code
897         previously disabled for GIMPLE.
898         (expand_builtin_memcpy, expand_builtin_memset_args): Re-enable code
899         previously disabled for GIMPLE.  Look up tree attribute for original
900         GIMPLE statement.
901         (validate_arglist): Use old interface of tree node instead of GIMPLE
902         statement.
903         (validate_gimple_arglist):  New function.
904         * cfgexpand.c (gimple_to_tree): Set GIMPLE statement tree attribute
905         for builtin function calls.
906         * tree-flow.h (struct tree_ann_common_d): New field stmt.
907         * gimple.h (validate_gimple_arglist): New declaration.
908         (validate_arglist): Moved to tree.h.
910 2008-03-31  Oleg Ryjkov  <olegr@google.com>
912         * gimplify.c (gimplify_switch_expr): Verify the return value from
913         gimplify_expr.
915 2008-03-31  Rafael Espindola <espindola@google.com>
917         Merge with mainline @133452.
919         * configure.ac (ACX_PKGVERSION): Update revision merge string.
920         * configure: Regenerate.
922 2008-03-31  Rafael Espindola <espindola@google.com>
924         Merge with mainline @133440.
926         * configure.ac (ACX_PKGVERSION): Update revision merge string.
927         * configure: Regenerate.
929 2008-03-31  Rafael Espindola <espindola@google.com>
931         Merge with mainline @133423.
933         * configure.ac (ACX_PKGVERSION): Update revision merge string.
934         * configure: Regenerate.
936 2008-03-30  Rafael Espindola <espindola@google.com>
938         Merge with mainline @133342.
940         * configure.ac (ACX_PKGVERSION): Update revision merge string.
941         * configure: Regenerate.
943 2008-03-28  Rafael Espindola <espindola@google.com>
945         Merge with mainline @133341.
947         * configure.ac (ACX_PKGVERSION): Update revision merge string.
948         * configure: Regenerate.
950 2008-03-28  Oleg Ryjkov  <olegr@google.com>
952         * tree-eh.c (replace_goto_queue_1): Do a deep copy of the replacement
953         sequence.
954         (maybe_record_in_goto_queue): Set is_label flag when recording
955         GIMPLE_GOTOs.
956         (do_return_redirection, do_return_redirection): Changed to set
957         cont_stmt.
958         (lower_try_finally_onedest): Fix the code that assumes that gotos
959         themselves(instead of the labels) are recorded in the goto_queue.
960         (lower_try_finally_copy): Likewise.
961         (lower_try_finally_switch): Likewise, also fix the VEC_* operations.
962         * gimple.h (gimple_build_switch): Fixed comment.
964 2008-03-28  Doug Kwan  <dougkwan@google.com>
966         * omp-low.c (expand_omp_sections): Fix build breakage due to an
967         uninitialized variable.
969 2008-03-28  Rafael Espindola <espindola@google.com>
971         Merge with mainline @133315.
973         * configure.ac (ACX_PKGVERSION): Update revision merge string.
974         * configure: Regenerate.
976 2008-03-28  Diego Novillo  <dnovillo@google.com>
978         * omp-low.c (expand_omp_for_static_chunk): Initialize
979         V_MAIN and V_BACK.
980         (expand_omp_for): Initialize VIN.
982 2008-03-28  Rafael Espindola <espindola@google.com>
984         Merge with mainline @133313.
986         * configure.ac (ACX_PKGVERSION): Update revision merge string.
987         * configure: Regenerate.
989 2008-03-27  Doug Kwan  <dougkwan@google.com>
991         * c-decl.c (merge_decls): Also copy gimple bodies of decls.
992         * gimplify.c (gimplify_call_expr): Do not exit early when
993         gimplifying __builtin_va_start().
995 2008-03-27  Oleg Ryjkov  <olegr@google.com>
997         * gimple.c (walk_gimple_op): Add a check for assignments with more
998         than one operand on the LHS.
1000 2008-03-27  Aldy Hernandez  <aldyh@redhat.com>
1002         * tree.c (empty_body_p): Remove.
1003         * tree.h (empty_body_p): Remove prototype.
1004         * omp-low.c (struct omp_context): Convert to tuples.
1005         (struct omp_context): Comment and convert to tuples.
1006         (scan_omp_op): New.
1007         (is_parallel_ctx): Convert to tuples.
1008         (extract_omp_for_data): Same.
1009         (workshare_safe_to_combine_p): Same.
1010         (get_ws_args_for): Same.
1011         (determine_parallel_type): Same.
1012         (use_pointer_for_field): Same.
1013         (dump_omp_region): Same.
1014         (debug_all_omp_regions): Same.
1015         (new_omp_region): Same.
1016         (new_omp_context): Same.
1017         (scan_sharing_clauses): Same.
1018         (create_omp_child_function): Same.
1019         (scan_omp_parallel): Same.
1020         (scan_omp_for): Same.
1021         (scan_omp_sections): Same.
1022         (scan_omp_single): Same.
1023         (check_omp_nesting_restrictions): Same.
1024         (scan_omp_1_op): New.
1025         (scan_omp_1_stmt): Rename from scan_omp_1.  Rewrite for tuples.
1026         (scan_omp): Convert to tuples.
1027         (build_omp_barrier): Same.
1028         (maybe_lookup_ctx): Same.
1029         (lower_rec_input_clauses): Same.
1030         (lower_lastprivate_clauses): Same.
1031         (lower_reduction_clauses): Same.
1032         (lower_copyprivate_clauses): Same.
1033         (lower_send_clauses): Same.
1034         (lower_send_shared_vars): Same.
1035         (expand_parallel_call): Same.
1036         (remove_exit_barrier): Same.
1037         (remove_exit_barriers): Same.
1038         (optimize_omp_library_calls): Same.
1039         (expand_omp_parallel): Same.
1040         (expand_omp_for_generic): Comment out, and convert to tuples.
1041         (expand_omp_for_static_nochunk): Convert to tuples.
1042         (expand_omp_for_static_chunk): Same.
1043         (expand_omp_for): Same.
1044         (expand_omp_sections): Same.
1045         (expand_omp_synch): Same.
1046         (expand_omp_atomic_fetch_op): Same.
1047         (expand_omp_atomic_pipeline): Same.
1048         (expand_omp_atomic_mutex): Same.
1049         (expand_omp_atomic): Same.
1050         (expand_omp): Same.
1051         (build_omp_regions_1): Same. 
1052         (execute_expand_omp): Enable.
1053         (execute_lower_omp): Enable and convert to tuples.
1054         * gimple-dummy.c (omp_reduction_init): Remove.
1055         * tree-flow.h (struct omp_region): Convert 'type' to tuples.
1056         (new_omp_region): Adjust prototype for tuples.
1057         * gimple.c (empty_stmt_p): New.
1058         (empty_body_p): New.
1059         * gimple.h (empty_body_p): New prototype.
1060         (gimple_has_location): Remove fixmes.
1061         * tree-cfg.c (gimple_block_label): Remove ATTRIBUTE_UNUSED.
1063 2008-03-27  Rafael Espindola <espindola@google.com>
1065         Merge with mainline @133311.
1067         * configure.ac (ACX_PKGVERSION): Update revision merge string.
1068         * configure: Regenerate.
1070 2008-03-27  Rafael Espindola <espindola@google.com>
1072         * gcc/tree-nested.c (save_tmp_var): Use gsi_insert_after_without_update
1073         instead of gsi_insert_after.
1075 2008-03-26 Jakub Staszak <kuba@et.pl>
1077         * gimple.h (gimple_uid, gimple_set_uid): Defined.
1078         (gimple_statement_base): Field UID added.
1079         * tree-ssa-dse.c (execute_simple_dse): #if 0 removed, bitmap_empty_p
1080         condition added. (memory_ssa_name_same, memory_address_same,
1081         get_kill_of_stmt_lhs, dse_possible_dead_store_p, dse_optimize_stmt,
1082         dse_record_phis, dse_finalize_block, tree_ssa_dse): Tuplified.
1083         * passes.c (init_optimization_passes): pass_simple_dse and pass_dse
1084         enabled.
1085         * testsuite/gcc.dg/tree-ssa/ssa-dse-10.c: {dg-final} changed.
1086         * testsuite/gcc.dg/tree-ssa/pr30375.c: {dg-final} changed.
1088 2008-03-26  Rafael Espindola <espindola@google.com>
1089         * gcc/tree-ssa-operands.c (ssa_operands_active): Assert that cfun is
1090         not NULL.
1091         * gcc/tree-nested.c (init_tmp_var): Use
1092         gsi_insert_before_without_update instead of gsi_insert_before.
1094 2008-03-25  Rafael Espindola <espindola@google.com>
1096         Merge with mainline @133309.
1098         * configure.ac (ACX_PKGVERSION): Update revision merge string.
1099         * configure: Regenerate.
1101 2008-03-25  Rafael Espindola <espindola@google.com>
1103         Merge with mainline @133306.
1105         * configure.ac (ACX_PKGVERSION): Update revision merge string.
1106         * configure: Regenerate.
1108 2008-03-25  Bill Maddox  <maddox@google.com>
1110         * tree-ssa-dom.c (loop_depth_of_name): Tuplify.
1111         * tree-ssa-copy.c (stmt_may_generate_copy,
1112         copy_prop_visit_assignment, copy_prop_visi_cond_stmt,
1113         copy_prop_visit_stmt, copy_prop_visit_phi_node,
1114         init_copy_prop, execute_copy_prop): Tuplify.
1115         * passes.c (init_optimization_passes):
1116         Enable pass_copy_prop.
1118 2008-03-25  Rafael Espindola <espindola@google.com>
1120         Merge with mainline @133257.
1122         * configure.ac (ACX_PKGVERSION): Update revision merge string.
1123         * configure: Regenerate.
1125 2008-03-25  Oleg Ryjkov  <olegr@google.com>
1127         * gimple.c (gimple_build_bind): Added a new parameter - the 
1128         containing block.
1129         * gimple.h (gimple_build_bind): Changed the header accordingly.
1130         * gimplify.c (gimplify_bind_expr, gimplify_function_tree): Updated
1131         the callers of gimple_build_bind.
1132         (gimplify_body): Updated the call to gimple_build_bind and moved
1133         the copying of block information into gimplify_bind_expr.
1135 2008-03-25  Rafael Espindola <espindola@google.com>
1137         Merge with mainline @133255.
1139         * configure.ac (ACX_PKGVERSION): Update revision merge string.
1140         * configure: Regenerate.
1142 2008-03-25  Rafael Espindola <espindola@google.com>
1144         Merge with mainline @133251.
1146         * configure.ac (ACX_PKGVERSION): Update revision merge string.
1147         * configure: Regenerate.
1149 2008-03-25  Rafael Espindola <espindola@google.com>
1151         Merge with mainline @133250.
1153         * configure.ac (ACX_PKGVERSION): Update revision merge string.
1154         * configure: Regenerate.
1156 2008-03-24  Rafael Espindola <espindola@google.com>
1158         Merge with mainline @133246.
1160         * configure.ac (ACX_PKGVERSION): Update revision merge string.
1161         * configure: Regenerate.
1163 2008-03-24  Rafael Espindola <espindola@google.com>
1165         Merge with mainline @133222.
1167         * configure.ac (ACX_PKGVERSION): Update revision merge string.
1168         * configure: Regenerate.
1170 2008-03-24  Andrew Pinski  <pinskia@gmail.com>
1172         * passes.c (init_optimization_passes): Enable pass_split_crit_edges.
1174 2008-03-24  Rafael Espindola <espindola@google.com>
1176         Merge with mainline @133169.
1178         * configure.ac (ACX_PKGVERSION): Update revision merge string.
1179         * configure: Regenerate.
1181 2008-03-21  Rafael Espindola <espindola@google.com>
1183         Merge with mainline @133168.
1185         * configure.ac (ACX_PKGVERSION): Update revision merge string.
1186         * configure: Regenerate.
1188 2008-03-21  Rafael Espindola <espindola@google.com>
1190         Merge with mainline @133167.
1192         * configure.ac (ACX_PKGVERSION): Update revision merge string.
1193         * configure: Regenerate.
1195 2008-03-20  Oleg Ryjkov  <olegr@google.com>
1197         * tree-eh.c (lower_try_finally): Correctly set the lowered sequence.
1199 2008-03-20  Jakub Staszak  <kuba@et.pl>
1200             Oleg Ryjkov  <olegr@google.com>
1202         * tree-ssa-sink.c (is_hidden_global_store): Tuplified.
1203         * tree-ssa-dce.c (mark_stmt_necessary, mark_operand_necessary,
1204         mark_stmt_if_obviously_necessary,
1205         mark_control_dependent_edges_necessary,
1206         find_obviously_necessary_stmts, propagate_necessity,
1207         remove_dead_phis, eliminate_unnecessary_stmts, tree_dce_init,
1208         tree_dce_done): Tuplified.
1209         * tree-flow.h (is_hidden_global_store): Tuplified the declaration.
1210         * passes.c (init_optimization_passes): Enabled pass_dce and
1211         pass_cd_dce.
1213 2008-03-20  Oleg Ryjkov <olegr@google.com>
1215         * tree-complex.c (init_dont_simulate_again, complex_visit_stmt,
1216         update_complex_components, expand_complex_operations_1): Consider
1217         GIMPLE_CALLs with a lhs, not only GIMPLE_ASSIGNs.
1218         * gimplify.c (get_tmp_var_for): Removed.
1219         (gimplify_call_expr): Remove call to get_tmp_var_for, set
1220         gimple_register on a new lhs in some cases.
1222 2008-03-20  Rafael Espindola <espindola@google.com>
1224         Merge with mainline @133162.
1226         * configure.ac (ACX_PKGVERSION): Update revision merge string.
1227         * configure: Regenerate.
1229 2008-03-20  Rafael Espindola <espindola@google.com>
1231         Merge with mainline @133161.
1233         * configure.ac (ACX_PKGVERSION): Update revision merge string.
1234         * configure: Regenerate.
1236 2008-03-20  Rafael Espindola <espindola@google.com>
1238         Merge with mainline @133140.
1240         * configure.ac (ACX_PKGVERSION): Update revision merge string.
1241         * configure: Regenerate.
1243 2008-03-20  Rafael Espindola <espindola@google.com>
1245         Merge with mainline @133138.
1247         * configure.ac (ACX_PKGVERSION): Update revision merge string.
1248         * configure: Regenerate.
1250 2008-03-18  Bill Maddox  <maddox@google.com>
1252         * builtins.c (fold_builtin_object_size):
1253         Enable call to compute_builtin_object_size, previously
1254         stubbed out awaiting tuplification.
1255         * tree-ssa-ccp.c (valid_gimple_rhs_p, valid_gimple_call_p,
1256         move_ssa_defining_stmt_for_defs, update_call_from_tree):
1257         Deleted, moved to tree-ssa-propagate.c.
1258         (get_maxval_strlen): Use gimple_assign_single_p.
1259         Handle assignment with unary NOP correctly.
1260         * tree-ssa-propagate.c (valid_gimple_rhs_p, valid_gimple_call_p,
1261         move_ssa_defining_stmt_for_defs, update_call_from_tree):
1262         Moved here from tree-ssa-ccp.c.
1263         * tree-ssa-propagate.h (valid_gimple_rhs_p, valid_gimple_call_p,
1264         move_ssa_defining_stmt_for_defs, update_call_from_tree): Declared.
1265         * gimple-dummy.c (compute_builtin_object_size): Removed dummy.
1266         * tree_object_size.c (addr_object_size, alloc_object_size)
1267         Tuplified.
1268         (pass_through_call, compute_builtin_object_size): Tuplified.
1269         (expr_object_size): Tuplified.  Some cases broken out.
1270         (plus_expr_object_size): Deleted.
1271         (call_object_size, unknown_object_size, plus_stmt_object_size):
1272         New functions.  Handle cases broken out from expr_object_size.
1273         (cond_expr_object_size): Fix comment.
1274         (collect_object_sizes_for): Tuplify.
1275         (check_for_plus_in_loops_1, check_for_plus_in_loops): Tuplify.
1276         (compute_object_sizes): Tuplify.
1277         * gimple.c (gimple_assign_single_p, gimple_assign_unary_nop_p):
1278         New functions.
1279         * gimple.h (gimple_assign_single_p, gimple_assign_unary_nop_p):
1280         Declare.
1281         * passes.c (init_optimization_passes): Enable pass_object_sizes.
1283 2008-03-18  Diego Novillo  <dnovillo@google.com>
1284             Oleg Ryjkov  <olegr@google.com>
1286         * gimplify.c (gimplify_body): Copy the block information from
1287         the tree function body to gimple function body.
1288         (gimplify_function_tree): Correctly wrap the function body
1289         into the try/finally block if creating one.
1290         * gimple.c (gimple_seq_has_side_effects): Removed.
1291         * gimple.h (gimple_seq_has_side_effects): Removed declaration.
1292         * tree-cfg.c (remove_useless_stmts_tf, remove_useless_stmts_tc):
1293         Modified to use gimple_seq_empty_p instead of
1294         gimple_seq_has_side_effects.
1296 2008-03-18  Aldy Hernandez  <aldyh@redhat.com>
1298         * gimple.c (walk_gimple_stmt): Collapse common code.
1299         Add case for GIMPLE_WITH_CLEANUP_EXPR.
1301 2008-03-17  Zdenek Dvorak  <ook@ucw.cz>
1303         * gimple-iterator.c (gsi_for_stmt): Use gsi_start_phis.
1304         (gsi_start_phis): New function.
1305         * gimple.h (gsi_start_phis): Declare.
1306         * tree-into-ssa.c (initialize_flags_in_bb, rewrite_initialize_block,
1307         rewrite_add_phi_arguments, rewrite_update_init_block,
1308         prepare_block_for_update): Use gsi_start_phis.
1309         * tree-complex.c (init_dont_simulate_again, update_phi_components):
1310         Ditto.
1311         * tree-ssa-loop-manip.c (find_uses_to_rename_bb,
1312         verify_loop_closed_ssa, split_loop_exit_edge,
1313         tree_transform_and_unroll_loop): Ditto.
1314         * tree-scalar-evolution.c (loop_closed_phi_def,
1315         analyze_scalar_evolution_for_all_loop_phi_nodes, scev_const_prop):
1316         Ditto.
1317         * tree-phinodes.c (reserve_phi_args_for_new_edge, remove_phi_args):
1318         Ditto.
1319         * tree-ssa-copyrename.c (rename_ssa_copies): Ditto.
1320         * tree-ssa-ccp.c (ccp_initialize): Ditto.
1321         * tree-ssa-loop-ivopts.c (find_bivs, mark_bivs,
1322         find_interesting_uses_outside, find_interesting_uses,
1323         determine_set_costs): Ditto.
1324         * tree-ssa-propagate.c (simulate_block, ssa_prop_init,
1325         substitute_and_fold): Ditto.
1326         * tree-ssa-alias.c (dump_points_to_info, create_structure_vars): Ditto.
1327         * gimple-pretty-print.c (dump_phi_nodes): Ditto.
1328         * tree-data-ref.c (stmts_from_loop): Ditto.
1329         * tree-ssa-coalesce.c (build_ssa_conflict_graph,
1330         create_outofssa_var_map, coalesce_partitions): Ditto.
1331         * tree-dfa.c (collect_dfa_stats): Ditto.
1332         * tree-cfgcleanup.c (phi_alternatives_equal, remove_forwarder_block,
1333         remove_forwarder_block_with_phi, merge_phi_nodes): Ditto.
1334         * tree-ssa-live.c (remove_unused_locals, calculate_live_on_exit,
1335         verify_live_on_entry): Ditto.
1336         * tree-ssa.c (ssa_redirect_edge, flush_pending_stmts, verify_ssa,
1337         execute_late_warn_uninitialized, execute_update_addresses_taken):
1338         Ditto.
1339         * tree-outof-ssa.c (eliminate_build, eliminate_virtual_phis,
1340         rewrite_trees, remove_ssa_form, insert_backedge_copies):
1341         Ditto.
1342         * cfgloop.c (find_subloop_latch_edge_by_ivs): Ditto.
1343         * tree-ssa-structalias.c (compute_points_to_sets, ipa_pta_execute):
1344         Ditto.
1345         * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block,
1346         reinstall_phi_args, verify_stmts, gimple_make_forwarder_block,
1347         add_phi_args_after_copy_edge, gimple_lv_adjust_loop_header_phi):
1348         Ditto.
1350 2008-03-16  Zdenek Dvorak  <ook@ucw.cz>
1352         * tree-ssa-loop-ivopts.c: Tuplify.
1353         * gimple-dummy.c (multiplier_allowed_in_address_p, multiply_by_cost,
1354         tree_ssa_iv_optimize): Removed.
1355         * tree-ssa-phiopt.c (empty_block_p): Tuplify.
1356         * gimple.h (gimple_cond_lhs_ptr, gimple_cond_rhs_ptr): New.
1357         * passes.c (init_optimization_passes): Enable pass_iv_optimize.
1359         * gimplify.c (gimplify_omp_workshare, gimplify_expr): Avoid using
1360         uninitialized sequence.
1362 2008-03-13  Bill Maddox  <maddox@google.com>
1364         * tree.h (fold_call_stmt, gimple_fold_builtin_snprintf_chk):
1365         Declare new functions.
1366         * builtins.c (fold_builtin_object_size): Disable call to
1367         compute_builtin_object_size, which has not been converted.
1368         (gimple_rewrite_call_expr, gimple_fold_builtin_sprintf_chk,
1369         gimple_fold_builtin_snprintf_chk, gimple_fold_builtin_varargs,
1370         fold_call_stmt): New functions.
1371         * tree-chrec.h (build_polynomial_chrec): Silence uninitialized
1372         variable warning.
1373         * tree-ssa-ccp.c (likely_value): Recognize additional cases
1374         of constant values.
1375         (surely_varying_stmt_p): Note that return statements are not
1376         interesting to CCP as they no longer contain assignments.
1377         (ccp_fold): Add missing spaces.
1378         (valid_gimple_call_p): New function.
1379         (get_maxval_strlen): Don't trip over unary operator.
1380         (ccp_fold_builtin): Use fold_call_stmt and
1381         gimple_fold_builtin_snprintf_chk.  Enable disabled
1382         call now that target has been converted for tuples.
1383         Add missing spaces.
1384         (move_ssa_defining_stmt_for_defs): New function.
1385         (update_call_from_tree): New function.
1386         (fold_gimple_call): Use update_call_from_tree.
1387         (fold_stmt_inplace): Assert that operand folding tree
1388         walk goes to completion, i.e., does not return non-null.
1389         (optimize_stack_restore, optimize_stdarg_builtin):
1390         Convert to tuples
1391         (convert_to_gimple_builtin): Removed.
1392         (gimplify_and_update_call_from_tree): New function.
1393         Replaces convert_to_gimple_builtin.
1394         (execute_fold_all_builtins): Convert to tuples.
1395         * tree-ssa-propagate.c (replace_uses_in): Removed
1396         replaced_address argument.  Made function static.
1397         (replace_vuses_in): Removed replaced_address argument.
1398         (substitute_and_fold): Removed replaced_address boolean,
1399         which was set but never examined.
1400         * tree-ssa-propagate.h (replace_uses_in): Removed declaration.
1401         * gimple-iterator.c (update_modified_stmt): Moved to
1402         head of file to avoid a forward declaration.
1403         (update_modified_stmts): New function.
1404         (gsi_insert_seq_before_without_update,
1405         gsi_insert_before_without_update,
1406         gsi_insert_seq_after_without_update,
1407         gsi_insert_after_without_update): New functions.
1408         (gsi_insert_before, gsi_insert_seq_before,
1409         gsi_insert_after, gsi_insert_seq_after): Call the
1410         _without_update variants.
1411         * gimplify.c (gimplify_seq_add_stmt, gimplify_seq_add_seq):
1412         New functions.
1413         (gimple_pop_condition, gimplify_return_expr, gimplify_loop_expr,
1414         gimplify_switch_expr, gimplify_case_label_expr,
1415         gimplify_self_mod_expr, gimplify_call_expr,
1416         gimplify_modify_expr_to_memcpy, gimplify_modify_expr_to_memset,
1417         gimplify_init_ctor_eval_range, gimpllify_modify_expr_complex_part,
1418         gimplify_modify_expr, gimplify_asm_expr, gimplify_cleanup_point_expr,
1419         gimple_push_cleanup, gimplify_omp_parallel, gimplify_omp_atomic,
1420         gimplify_expr, gimplify_body, gimplify_function_tree): When adding
1421         to statement sequences in the gimplifier, do not update operands.
1422         * tree-dfa.c (find_new_referenced_vars): Convert to tuples.
1423         * tree-flow.h (find_new_referenced_vars): Declare with new signature.
1424         * gimple.h (gimple_return_set_retval): Fix argument validation.
1425         (gsi_insert_seq_before_without_update,
1426         gsi_insert_before_without_update,
1427         gsi_insert_seq_after_without_update,
1428         gsi_insert_after_without_update): Declare new functions.
1429         * gimple.c (gimple_build_return): Rely on gimple_return_set_retval
1430         to perform argument validation.
1431         * passes.c (init_optimization_passes): Enable pass_fold_builtins.
1432         
1433 2008-03-13  Oleg Ryjkov  <olegr@google.com>
1435         * tree-cfg.c (gimplify_val): Removed.
1436         (gimplify_build1, gimplify_build2, gimplify_build3): Use
1437         force_gimple_operand_gsi instead of gimplify_val.
1438         * tree-complex.c (extract_component): Use force_gimple_operand_gsi
1439         instead of gimplify_val.
1440         * tree-vect-generic.c (expand_vector_parallel): Ditto.
1442 2008-03-13  Diego Novillo  <dnovillo@google.com>
1443             Oleg Ryjkov  <olegr@google.com>
1445         * tree-ssa-operands.c (get_expr_operands): Handle FILTER_EXPR and
1446         EXC_PTR_EXPR.
1448 2008-03-12  Diego Novillo  <dnovillo@google.com>
1449             Oleg Ryjkov  <olegr@google.com>
1451         * cfgexpand.c (gimple_to_tree): Record the correct type when
1452         converting GIMPLE_CALL.
1454 2008-03-12  Zdenek Dvorak  <ook@ucw.cz>
1456         * tree-ssa-loop-im.c (stmt_cost, rewrite_bittest,
1457         determine_invariantness_stmt, gather_mem_refs_stmt):
1458         Use gimple_assign_rhs_code.
1459         * cfgexpand.c (gimple_to_tree): Ditto.
1460         * tree-inline.c (estimate_num_insns): Ditto.
1461         * tree-vect-generic.c (expand_vector_operations_1): Ditto.
1462         * tree-ssa-ccp.c (likely_value, ccp_fold, evaluate_stmt,
1463         * gimple.c (gimple_fold, gimple_assign_set_rhs_with_ops): Ditto.
1464         * tree-ssa-structalias.c (handle_ptr_arith): Ditto.
1465         fold_gimple_assign): Ditto.
1466         * value-prof.c (gimple_divmod_fixed_value_transform): Ditto.
1467         * tree-ssa-loop-ch.c (copy_loop_headers): Ditto.
1468         * tree-ssa-propagate.c (stmt_makes_single_load,
1469         substitute_and_fold): Ditto.
1470         * tree-ssa-loop-niter.c (chain_of_csts_start): Exclude memory loads.
1471         (get_val_for): Assert that the statement is an assignment.
1472         (derive_constant_upper_bound_assign,
1473         expand_simple_operations): Use gimple_assign_rhs_code.
1474         * tree-ssa-loop-manip.c (create_iv, ip_normal_pos,
1475         standard_iv_increment_position, determine_exit_conditions,
1476         tree_transform_and_unroll_loop): Tuplify.
1477         * tree-scalar-evolution.c (interpret_expr): Fail for chrecs.
1478         (interpret_gimple_assign, follow_ssa_edge_in_rhs): Use
1479         gimple_assign_rhs_code.
1480         * tree-gimple.c (gimple_assign_rhs_code): New function.
1481         * tree-gimple.h (gimple_assign_rhs_code): Declare.
1482         * tree-ssa-loop-ivopts.c (single_dom_exit): Enable.
1483         * gimple-dummy.c (compute_data_dependences_for_loop, dump_ddrs,
1484         free_data_refs, free_dependence_relations,
1485         gimple_duplicate_loop_to_header_edge, tree_ssa_prefetch_arrays,
1486         estimated_loop_iterations_int): Removed.
1487         * tree-ssa-loop-ivcanon.c (tree_num_loop_insns): Tuplify.
1488         * predict.c, tree-data-ref.c, tree-ssa-loop-prefetch.c: Tuplify.
1489         * tree-data-ref.h (struct data_reference, struct rdg_vertex): Change
1490         the type of stmt to gimple.
1491         (get_references_in_stmt, create_data_ref, rdg_vertex_for_stmt,
1492         stores_from_loop, remove_similar_memory_refs,
1493         have_similar_memory_accesses): Declaration changed.
1494         * gimple-iterator.c (gsi_insert_seq_on_edge_immediate): New.
1495         * gimple-pretty-print.c (dump_gimple_assign): Dump nontemporal
1496         move.  Use gimple_assign_rhs_code.
1497         (dump_unary_rhs, dump_binary_rhs): Use gimple_assign_rhs_code.
1498         * gimplify.c (gimplify_modify_expr): Set lhs of the assignment to
1499         the new SSA name.
1500         * tree-ssa-coalesce.c (build_ssa_conflict_graph,
1501         create_outofssa_var_map): Use gimple_assign_copy_p.
1502         * tree-predcom.c (mark_virtual_ops_for_renaming): Enable.
1503         * tree-inline.c (estimate_num_insns): Use gimple_assign_rhs_code.
1504         * tree-flow.h (mark_virtual_ops_for_renaming): Declaration changed.
1505         * gimple.h (struct gimple_statement_base): Change unused_4 flag
1506         to nontemporal_move flag.
1507         (gimple_assign_nontemporal_move_p, gimple_assign_set_nontemporal_move):
1508         New functions.
1509         (gsi_insert_seq_on_edge_immediate): Declare.
1510         (gimple_assign_rhs2): Return NULL if the statement does not have two
1511         operands.
1512         (gimple_assign_subcode): Removed.
1513         * tree-cfg.c (verify_types_in_gimple_assign): Use
1514         gimple_assign_rhs_code.
1515         (gimple_lv_adjust_loop_header_phi, gimple_lv_add_condition_to_bb):
1516         Tuplify.
1517         (gimple_cfg_hooks): Enable lv_add_condition_to_bb and
1518         lv_adjust_loop_header_phi hooks.
1519         * passes.c (init_optimization_passes): Enable pass_profile,
1520         pass_check_data_deps and pass_loop_prefetch.
1522 2008-03-11  Diego Novillo <dnovillo@google.com>
1524         * tree-ssa-operands.h: Added declaration of add_to_addressable_set.
1525         * tree-ssa-operands.h (add_to_addressable_set): New function.
1526         (gimple_add_to_addresses_taken): Moved most of the logic to
1527         add_addressable_set.
1528         * tree-ssa-structalias.c (update_alias_info): Record the variables
1529         whose address is taken inside a phi node.
1531 2008-03-11  Aldy Hernandez  <aldyh@redhat.com>
1533         * tree-phinodes.c (allocate_phi_node): Update for tuples.
1534         * gimplify.c (gimplify_function_tree): Dump memory stats.
1535         * gimple.c:  Declare gimple_alloc_counts, gimple_alloc_sizes,
1536         and gimple_alloc_kind_names.
1537         (gimple_alloc): Gather statistics for tuples.
1538         (gimple_build_asm_1): Same.
1539         (gimple_seq_alloc): Same.
1540         (dump_gimple_statistics): New.
1541         * gimple.h: Define gimple_alloc_kind.
1542         (gimple_alloc_kind): New.
1543         (dump_gimple_statistics): Protoize.
1544         * tree-ssa-copy.c (replace_exp_1): Mark for_propagation as unused
1545         (merged from mainline).
1547 2008-03-11  Diego Novillo  <dnovillo@google.com>
1549         Merge with mainline @133081.
1551         * configure.ac (ACX_PKGVERSION): Update revision merge string.
1552         * configure: Regenerate.
1554 2008-03-06  Diego Novillo  <dnovillo@google.com>
1556         Merge with mainline @132948
1558         * configure.ac (ACX_PKGVERSION): Update revision merge string.
1559         * configure: Regenerate.
1561 2008-03-06  Diego Novillo  <dnovillo@google.com>
1563         * config/rs6000/rs6000.c (rs6000_alloc_sdmode_stack_slot):
1564         Call walk_gimple_op.
1565         * tree-complex.c (expand_complex_div_wide): Call
1566         split_block with STMT.
1568 2008-03-06  Diego Novillo  <dnovillo@google.com>
1570         * gimple.h (struct gimple_statement_base): Rename field
1571         'locus' to 'location'.  Update all users.
1572         (gimple_location): Rename from gimple_locus.  Update all
1573         users.
1574         (gimple_set_location): Rename from gimple_set_locus.
1575         Update all users.
1576         (gimple_has_location): Rename from gimple_location_empty_p.
1577         Change sign of return value.  Update all users.
1578         * gimplify.c (tree_annotate_all_with_location): Rename
1579         from tree_annotate_all_with_locus.
1580         (annotate_all_with_location): Rename from
1581         annotate_all_with_locus.
1583 2008-03-05  Diego Novillo  <dnovillo@google.com>
1585         * gimple.c (gimple_set_lhs): Remove return keywords.
1587 2008-03-05  David Daney  <ddaney@avtrex.com>
1589         * builtins.c (expand_builtin___clear_cache): Disable call to
1590         validate_arglist.
1591         * config/mips/mips.c (mips_gimplify_va_arg_expr): Tuplify.
1593 2008-03-05  Bill Maddox  <maddox@google.com>
1595         * tree-ssa-ccp.c (dump_lattice_value, debug_lattice_value):
1596         Re-enable functions #if'd out.
1597         (test_default_value, likely_value, surely_varying_stmt_p,
1598         ccp_initialize, ccp_visit_phi_node, ccp_fold, evaluate_stmt,
1599         visit_assignment, visit_cond_stmt, ccp_visit_stmt):
1600         Convert to tuples.
1601         (fold_gimple_call):  Don't trip over call that simplifies to
1602         another call, not a constant.
1603         * tree-ssa-propagate.c (ssa_prop_init): Initialize in-worklist
1604         flag for phi nodes as well as statements.
1605         (valid_gimple_expression_p): Add fixme comment to remove this.
1606         function.  It currently has static uses, but asserts when called.
1607         (stmt_makes_single_load, stmt_makes_single_store):
1608         Convert to tuples
1609         (replace_phi_args_in): Convert to tuples.  Fix typo in comment.
1610         * gimple.c (gimple_copy_no_def_use, gimple_get_lhs,
1611         gimple_set_lhs): New function.
1612         * gimple.h (gimple_copy_no_def_use, gimple_get_lhs,
1613         gimple_set_lhs): Declare new function.
1614         * tree-cfg.c (replace_uses_by): Add comment regarding empty
1615         operands.
1616         * passes.c (init_optimization_passes): Enable pass_ccp and
1617         pass_store_ccp.
1618         
1619 2008-03-05  David Daney  <ddaney@avtrex.com>
1621         * tree-phinodes.c (allocate_phi_node): Fix syntax errors from
1622         previous commit.
1624 2008-03-05  Rafael Espindola  <espindola@google.com>
1626         * tree-phinodes.c (allocate_phi_node): free free_phinodes[bucket]
1627         if empty.
1629 2008-03-05  Diego Novillo  <dnovillo@google.com>
1631         http://gcc.gnu.org/ml/gcc/2008-03/msg00256.html
1633         * fold-const.c (tree_binary_nonnegative_warnv_p): Fix
1634         invalid C90 declaration.
1635         (tree_single_nonnegative_warnv_p): Likewise.
1636         * gimplify.c (gimplify_bind_expr): Likewise.
1637         (gimplify_return_expr): Likewise.
1639 2008-03-04  Zdenek Dvorak  <ook@ucw.cz>
1641         * tree-ssa-loop-niter.c, tree-scalar-evolution.c: Tuplified.
1642         * tree-ssa-loop-manip.c (split_loop_exit_edge): Ditto.
1643         * tree-chrec.c (chrec_fold_plus, chrec_apply, chrec_convert_1,
1644         convert_affine_scev, chrec_convert_rhs, chrec_convert,
1645         chrec_convert_aggressive): Pass statements as gimple.
1646         * tree-scalar-evolution.h (get_loop_exit_condition, simple_iv):
1647         Type changed.
1648         * tree-chrec.h (chrec_convert, chrec_convert_rhs): Ditto.
1649         * tree-ssa-loop-ivopts.c (abnormal_ssa_name_p,
1650         idx_contains_abnormal_ssa_name_p, contains_abnormal_ssa_name_p,
1651         expr_invariant_in_loop_p, tree_int_cst_sign_bit): Enabled.
1652         * gimple-dummy.c (chrec_dont_know, chrec_known, chrec_not_analyzed_yet,
1653         analyze_scalar_evolution, chrec_contains_symbols_defined_in_loop,
1654         estimate_numbers_of_iterations, expr_invariant_in_loop_p,
1655         free_numbers_of_iterations_estimates,
1656         free_numbers_of_iterations_estimates_loop, get_loop_exit_condition,
1657         instantiate_parameters, nowrap_type_p. scev_const_prop. scev_finalize,
1658         scev_initialize, scev_probably_wraps_p, scev_reset,
1659         tree_int_cst_sign_bit, number_of_iterations_exit, loop_niter_by_eval,
1660         substitute_in_loop_info): Removed.
1661         * tree-ssa-loop.c (tree_loop_optimizer_init): Merged into...
1662         (tree_ssa_loop_init): ... here.  Enable scev_initialize call.
1663         (tree_ssa_loop_done): Enable scev finalization.
1664         * gimple-iterator.c (gsi_insert_seq_nodes_before): Allow inserting
1665         at the end of basic block.
1666         (gsi_for_stmt): Handle phi nodes.
1667         * cfgloop.h (struct nb_iter_bound): Change type of stmt field to gimple.
1668         * tree-flow.h (scev_probably_wraps_p, convert_affine_scev,
1669         stmt_dominates_stmt_p): Types changed.
1670         * Makefile.in (gt-tree-scalar-evolution.h): Enable.
1671         * gimple.c (extract_ops_from_tree): Export.
1672         (gimple_copy): Do not share bitmaps.
1673         * gimple.h (extract_ops_from_tree): Declare.
1674         (gimple_call_set_lhs): Allow lhs to be NULL.
1675         * tree-cfg.c (add_phi_args_after_copy_edge,
1676         add_phi_args_after_copy_bb): Tuplify.
1677         * passes.c (init_optimization_passes): Enable pass_ch, pass_scev_cprop.
1679 2008-03-04  Oleg Ryjkov  <olegr@google.com>
1681         * tree-ssa-dse.c (execute_simple_dse): Commented out.
1682         * passes.c (init_optimization_passes): Disabling pass_simple_dse.
1684 2008-03-04  Bill Maddox  <maddox@google.com>
1686         * tree-cfg.c (remove_useless_stmts_1):
1687         Correctly distinguish try-catch and try-finally.
1688         
1689 2008-03-04  Oleg Ryjkov  <olegr@google.com>
1691         * tree-ssa-dse.c (execute_simple_dse): Tuplified.
1692         * gimplify.c (gimplify_return_expr): Copy the NO_WARNING flag
1693         to the newly created expr from the tree.
1694         * tree-cfg.c (gimplify_build1): Tuplified.
1695         * passes.c (init_optimization_passes): Enabled
1696         pass_warn_function_return, pass_update_address_taken,
1697         pass_simple_dse and pass_build_alias passes.
1699 2008-03-04  Rafael Espindola  <espindola@google.com>
1701         * fold-const.c (tree_simple_nonnegative_warnv_p): New.
1702         (tree_unary_nonnegative_warnv_p): New.
1703         (tree_binary_nonnegative_warnv_p): New.
1704         (tree_single_nonnegative_warnv_p): New.
1705         (tree_invalid_nonnegative_warnv_p): New.
1706         (tree_expr_nonnegative_warnv_p): Redefine in term of the new functions.
1708 2008-03-04  Aldy Hernandez  <aldyh@redhat.com>
1710         * gimple.c (walk_gimple_seq): Do not set wi->gsi.
1711         (walk_gimple_stmt): Set wi->gsi.
1712         * tree-cfg.c (verify_stmt): Use walk_gimple_op instead of
1713         walk_gimple_stmt.
1714         (verify_stmts): Same.
1716 2008-03-04  Diego Novillo  <dnovillo@google.com>
1718         http://gcc.gnu.org/ml/gcc-patches/2008-03/msg00219.html
1720         * expr.c (expand_expr_real): Call lookup_expr_eh_region.
1721         * tree-eh.c (lookup_stmt_eh_region_fn):
1722         (lookup_stmt_eh_region): Fix comment.
1723         (lookup_expr_eh_region): Handle missing cfun and missing
1724         EH table.
1725         (record_in_finally_tree): Fix comment.
1726         (collect_finally_tree_1): Remove handler for
1727         GIMPLE_SWITCH.
1728         (maybe_record_in_goto_queue): Remove local variable
1729         NEW_IS_LABEL.
1730         Record GIMPLE_GOTOs instead of their label.
1731         (verify_norecord_switch_expr): Retrieve the CASE_LABEL
1732         from the case label expression.
1733         (do_return_redirection): Change sign of assertion.
1734         (lower_try_finally_onedest): Assert that
1735         TF->GOTO_QUEUE[0] contains a GIMPLE statement.
1736         (lower_try_finally_copy): Assert that Q contains a GIMPLE
1737         statement.
1738         (lower_try_finally_switch): Build a new GIMPLE label for
1739         CONT_STMT.
1740         (mark_eh_edge): Tuplify.
1741         (verify_eh_edges): Tuplify.
1742         (tree_can_throw_external): Remove unused function.
1743         (optimize_double_finally): Remove #if 0.
1744         * gimple-pretty-print.c (GIMPLE_NIY): Tidy.
1745         (dump_gimple_resx): Fix format string for
1746         dump_gimple_fmt.
1747         * gimplify.c (gimplify_cleanup_point_expr): Initialize
1748         BODY_SEQUENCE.
1749         * calls.c (emit_call_1): Remove ATTRIBUTE_UNUSED markers.
1750         * cfgexpand.c (gimple_to_tree) <GIMPLE_NOP>: Assign new
1751         expression to T.
1752         <GIMPLE_RESX>: Handle.
1753         Always assign the value from lookup_stmt_eh_region to
1754         ANN->RN.
1755         * tree-cfg.c (start_recording_case_labels):
1756         (recording_case_labels_p): Re-enable.
1757         (get_cases_for_edge): Likewise.
1758         (gimple_verify_flow_info): Re-enable call to
1759         verify_eh_edges.
1760         (gimple_redirect_edge_and_branch): Re-enable handling of
1761         GIMPLE_SWITCH.
1762         (gimple_block_ends_with_call_p): Tuplify.
1763         (struct gimple_cfg_hooks): Enable block_ends_with_call_p
1764         callback.
1766 2008-03-04  Rafael Espindola  <espindola@google.com>
1768         * fold-const.c (tree_unary_nonzero_warnv_p): New.
1769         (tree_binary_nonzero_warnv_p): New.
1770         (tree_single_nonzero_warnv_p): New.
1771         (tree_expr_nonzero_warnv_p): Redefine using the new functions.
1773 2008-03-04  Aldy Hernandez  <aldyh@redhat.com>
1775         * gimple.c (walk_gimple_op): Update comment.
1776         (walk_gimple_stmt): Same.
1778 2008-03-03  Aldy Hernandez  <aldyh@redhat.com>
1780         * cgraphbuild.c (build_cgraph_edges): Use walk_gimple_op instead of
1781         walk_gimple_stmt.
1782         * tree-ssa-alias-warnings.c (find_references_in_function): Same.
1783         * tree-ssa-ccp.c (fold_stmt): Change walk_gimple_stmt call to
1784         walk_gimple_op.
1785         * tree-nrv.c (tree_nrv): Same.
1786         * tree-ssa-alias.c (count_uses_and_derefs): Same.
1787         * cfgexpand.c (discover_nonconstant_array_refs_r): Same.
1788         * tree-nested.c (convert_nonlocal_reference_stmt): Make first
1789         argument a GSI.
1790         (convert_local_reference_op): Same.
1791         (convert_nl_goto_reference): Same.
1792         (convert_tramp_reference_stmt): Same.
1793         (convert_gimple_call): Same.
1794         * tree-inline.c (inline_forbidden_p_stmt): Same.
1795         * tree-ssa.c (execute_early_warn_uninitialized): Change
1796         walk_gimple_stmt call to walk_gimple_op.
1797         * gimple.c (walk_gimple_seq): Pass GSI to walk_gimple_stmt.
1798         (walk_gimple_stmt): Move operand walking code to...
1799         (walk_gimple_op): ...here.
1800         (walk_gimple_stmt): First argument is now a GSI.
1801         * gimple.h: Change walk_stmt_fn argument to a GSI.
1802         (walk_gimple_stmt): Make first argument is a GSI.
1803         (walk_gimple_op): New prototype.
1804         * tree-cfg.c (verify_stmt): Change argument to a GSI.  Adjust
1805         accordingly.
1807 2008-02-29  Zdenek Dvorak  <ook@ucw.cz>
1809         * tree-ssa-alias.c (is_escape_site): Detect pure/const functions
1810         correctly.
1812 2008-02-28  Zdenek Dvorak  <ook@ucw.cz>
1814         * tree-ssa-loop-im.c: Tuplify.
1815         * tree-ssa-loop-manip.c (add_exit_phis_edge, find_uses_to_rename_stmt,
1816         find_uses_to_rename_bb, check_loop_closed_ssa_use,
1817         check_loop_closed_ssa_stmt, verify_loop_closed_ssa): Ditto.
1818         * gimple-dummy.c (rewrite_into_loop_closed_ssa, tree_ssa_lim,
1819         verify_loop_closed_ssa, replace_exp): Removed.
1820         * tree-ssa-loop.c (tree_ssa_loop_init, tree_ssa_loop_done): Comment
1821         out scev initialization and finalization.
1822         * gimple-iterator.c (gsi_remove): Rename remove_eh_info to
1823         remove_permanently.  Do not free operands if remove_permanently
1824         is false.
1825         (gimple_find_edge_insert_loc): Use gsi_last_bb.
1826         * tree-eh.c (operation_could_trap_p): Factored out of ...
1827         (tree_could_trap_p): ... here.
1828         * tree-ssa-copy.c (replace_exp): Enable.
1829         * tree-flow.h (movement_possibility): Declaration changed.
1830         (operation_could_trap_p): Declare.
1831         * Makefile.in (tree-ssa-loop-im.o): Add pointer-set.h dependency.
1832         (gimple.o): Add FLAGS_H dependency.
1833         * gimple.c: Include flags.h.
1834         (gimple_could_trap_p): New function.
1835         * gimple.h (gimple_could_trap_p): Declare.
1836         * tree-cfg.c (replace_uses_by): Check that op is not null.
1837         * passes.c (init_optimization_passes): Enable pass_lim.
1839 2008-02-28  Rafael Espindola  <espindola@google.com>
1841         * tree-outof-ssa.c (insert_backedge_copies): Don't build
1842         uninitialized assignment.
1844 2008-02-28  Rafael Espindola  <espindola@google.com>
1846         * tree-dfa.c (dump_dfa_stats): cast dfa_stats.max_num_phi_args to long.
1848 2008-02-26  Diego Novillo  <dnovillo@google.com>
1850         * tree-ssa-copyrename.c (rename_ssa_copies): Do not mix
1851         declarations with code.
1852         * tree-ssa-coalesce.c (create_outofssa_var_map): Likewise.
1853         * tree-dfa.c (dump_dfa_stats): Use %ld for
1854         dfa_stats.max_num_phi_args.
1856 2008-02-26  Bill Maddox  <maddox@google.com>
1857         
1858         * tree-ssa-ccp.c (maybe_fold_stmt_addition):
1859         Reinstated this function for tuples as-is.
1860         (valid_gimple_rhs_p): New function.  Mostly lifted from
1861         valid_gimple_epxression_p, which is likely obsolete.
1862         (fold_stmt_r): Reinstated commented-out cases for
1863         tuples. Replaced call to obsolete function set_rhs.
1864         (get_maxval_strlen): Convert to tuples.
1865         (ccp_fold_builtin): Partial conversion to tuples.
1866         (fold_gimple_assign): New function.
1867         (fold_gimple_cond): New function.
1868         (fold_gimple_call): New function.
1869         (fold_stmt): Convert to tuples.
1870         (fold_stmt_inplace): Convert to tuples.
1871         * tree-ssa-propagate.c (substitute_and_fold):
1872         Update call to fold_stmt for revised argument signature.
1873         * gimple-dummy.c (fold_stmt): Removed dummy definition.
1874         * gimplify.c (gimplify_call_expr): Removed obsolete
1875         manipulation of TREE_NOTHROW flag.
1876         * cfgexpand.c (gimple_to_tree): Set nothrow flag
1877         of call expression based on call statement flags.
1878         Handle GIMPLE_NOP statement.
1879         * tree-flow.h (notice_special_calls, fold_stmt):
1880         Update prototypes for tuples.
1881         * gimple.c (gimple_cond_set_condition_from_tree):
1882         New function.
1883         (gimple_seq_has_side_effects): New function.
1884         * gimple.h (gimple_cond_set_condition_from_tree,
1885         gimple_seq_has_side_effects): New prototypes.
1886         (gimple_call_nothrow_p): New function.
1887         (gsi_stmt_ptr): Add comment regarding usage of this
1888         function vs. gsi_replace.
1889         * tree-cfg.c (struct rus_data): Convert to tuples.
1890         (remove_useless_stmts_1, remove_useless_stmts_warn_notreached,
1891         remove_useless_stmts_cond, remove_useless_stmts_tf,
1892         remove_useless_stmts_tc, remove_useless_stmts_goto,
1893         remove_useless_stmts_label, notice_special_calls,
1894         remove_useless_stmts): Convert to tuples.
1895         (update_call_expr_flags): Removed.
1896         * passes.c (init_optimization_passes): Enable
1897         pass_remove_useless_stmts.
1898         
1899 2008-02-25  Bill Maddox  <maddox@google.com>
1901         * tree-into-ssa.c (rewrite_initialize_block):
1902         Avoid declaration following statement in block.
1903         * tree-nrv.c (tree_nrv):
1904         Avoid declaration following statement in block.
1905         * tree-eh.c (collect_finally_tree): Fix typo in comment.
1906         Avoid cast to union type.
1907         (replace_goto_queue_cond_clause, replace_goto_queue_1,
1908         maybe_record_in_goto_queue, verify_norecord_switch_expr,
1909         lower_try_finally_fallthru_label): Avoid cast to union type.
1910         * fortran/Make-lang.in: Add -Wno-missing-format-attribute
1911         to fortran-warn options to avoid conflict with -Wno-format.
1912         * gimplify.c (gimplify_switch_expr):  Change assignment
1913         to initialiation.
1914         (gimplify_case_label_expr): Avoid declaration following
1915         statement in block.
1916         * tree-ssa-coalesce.c (create_outofssa_var_map): Avoid
1917         declaration following statement in block.
1918         * tree-ssa.c (ssa_redirect_edge, flush_pending_stmts):
1919         Avoid declaration following statements in block.
1920         * Makefile.in: Add -Wno-missing-format-attribute
1921         to builtins.o-warn and expr.o-warn options to avoid conflict
1922         with -Wno-format.  Removed fortran/*-warn options, -Wno-format
1923         and -Wno-uninitialized, which belong in fortran/Make-lang.in,
1924         and are applied to all fortran files there.
1926 2008-02-25  Oleg Ryjkov  <olegr@google.com>
1928         http://gcc.gnu.org/ml/gcc-patches/2008-02/msg01236.html
1930         * tree-ssa-copyrename.c: Include gimple.h
1931         Tuplify.
1932         * tree-ssa.c (warn_uninit): Pass &LOCUS to warning().
1933         * passes.c (init_optimization_passes): Enable
1934         pass_early_warn_uninitialized, pass_rebuild_cgraph_edges
1935         and pass_early_inline.
1937 2008-02-25  Diego Novillo  <dnovillo@google.com>
1939         * Makefile.in (tree-ssa-copyrename.o): Add dependency on
1940         gimple.h.
1942 2008-02-25  Diego Novillo  <dnovillo@google.com>
1944         * tree-cfgcleanup.c (tree_forwarder_block_p): Revert
1945         previous change.
1947 2008-02-25  Diego Novillo  <dnovillo@google.com>
1949         http://gcc.gnu.org/ml/gcc-patches/2008-02/msg01217.html
1951         * tree-ssa-alias-warnings.c: Tuplify.
1952         * cgraphunit.c (cgraph_process_new_functions): Remove
1953         calls to gimple_unreachable.
1954         (cgraph_expand_function): Likewise.
1955         * omp-low.c (execute_expand_omp): Return 0 after call to
1956         gimple_unreachable.
1957         * tree-scalar-evolution.c (scev_const_prop): Likewise.
1958         (execute_lower_omp): Likewise.
1959         * tree-ssa-dse.c (execute_simple_dse): Likewise.
1960         * tree-ssa-dom.c (tree_ssa_dominator_optimize): Likewise.
1961         (eliminate_degenerate_phis): Likewise.
1962         * tree-ssa-propagate.c (get_rhs): Likewise.
1963         (valid_gimple_expression_p): Likewise.
1964         (set_rhs): Likewise.
1965         (fold_predicate_in): Likewise.
1966         * tree-nrv.c (execute_return_slot_opt): Likewise.
1967         * predict.c (tree_estimate_probability): Likewise.
1968         * tree-parloops.c (parallelize_loops): Likewise.
1969         * tree-if-conv.c (main_tree_if_conversion): Likewise.
1970         * tree-ssa-phiopt.c (tree_ssa_phiopt): Likewise.
1971         (tree_ssa_cs_elim): Likewise.
1972         * tree-sra.c (tree_sra): Likewise.
1973         (tree_sra_early): Likewise.
1974         * tree-predcom.c (tree_predictive_commoning): Likewise.
1975         * tree-ssa-copy.c (execute_copy_prop): Likewise.
1976         * lambda-code.c (gcc_loop_to_lambda_loop): Likewise.
1977         (perfect_nest_p): Likewise.
1978         (can_convert_to_perfect_nest): Likewise.
1979         (perfect_nestify): Likewise.
1980         * tree-optimize.c (execute_fixup_cfg): Likewise.
1981         * tree-object-size.c (compute_object_sizes): Likewise.
1982         * tree-cfg.c (remove_useless_stmts): Likewise.
1983         (gimple_duplicate_sese_tail): Likewise.
1984         (move_sese_region_to_fn): Likewise.
1985         (gimple_purge_dead_abnormal_call_edges): Likewise.
1986         (execute_warn_function_return): Likewise.
1987         * value-prof.c (gimple_histogram_value): Remove calls to
1988         gimple_unreachable.
1989         (gimple_stringop_fixed_value): Likewise.
1990         * tree-flow-inline.h (op_iter_next_use): Likewise.
1991         * tree-dfa.c (dump_variable): Likewise.
1992         * tree-ssa-copy.c (may_propagate_copy): Likewise.
1993         (may_propagate_copy_into_asm): Likewise.
1994         (merge_alias_info): Likewise.
1995         (replace_exp_1): Likewise.
1996         * tree-ssa.c (delete_tree_ssa): Likewise.
1997         * tree-cfg.c (make_edges): Likewise.
1998         (remove_useless_stmts): Likewise.
1999         (gimple_duplicate_sese_tail): Likewise.
2000         (move_sese_region_to_fn): Likewise.
2001         (gimple_purge_dead_abnormal_call_edges): Likewise.
2002         (execute_warn_function_return): Likewise.
2003         * passes.c (finish_optimization_passes): Likewise.
2004         (init_optimization_passes): Likewise.
2005         * tree-ssa-operands.c (add_call_clobber_ops): Likewise.
2006         * tree-eh.c (lookup_expr_eh_region): New.
2007         (tree_can_throw_external): Return false after call to
2008         gimple_unreachable.
2009         (maybe_clean_or_replace_eh_stmt): Re-enable.
2010         Call stmt_could_throw_p.
2011         * expr.c (expand_expr_real): Call lookup_expr_eh_region.
2012         * profile.c: Tuplify.
2013         * calls.c: Include tree-flow.h.
2014         (emit_call_1): Call lookup_expr_eh_region.
2015         (expand_call): Likewise.
2016         * cfgexpand.c (gimple_to_tree): Call SET_EXPR_LOCATION on
2017         generated expression tree T.
2018         Set EH region number on T's annotation.
2019         * common.opt (fgimple-conversion=): Add RejectNegative
2020         and Joined attributes.
2021         * tree-inline.c (unsave_r): Abort if *TP is a
2022         STATEMENT_LIST.
2023         (unsave_expr_now): Re-enable.
2024         * tree-flow.h (struct tree_ann_common_d): Add field RN.
2025         * Makefile.in (builtins.o-warn): Add -Wno-format.
2026         (expr.o-warn): Likewise.
2027         (fortran/check.o-warn): Likewise.
2028         (fortran/interface.o-warn): Likewise.
2029         (fortran/resolve.o-warn): Likewise.
2030         (fortran/simplify.o-warn): Likewise.
2031         (fortran/target-memory.o-warn): Likewise.
2032         (calls.o): Add dependency on tree-flow.h
2033         * gimple.c (gimple_build_asm_1): Call ggc_alloc_string to
2034         copy STRING.
2035         * gimple.h (gimple_filename): New.
2036         (gimple_lineno): New.
2037         * passes.c (init_optimization_passes): Disable
2038         pass_remove_useless_stmts pass_mudflap_1,
2039         pass_warn_function_return and pass_lower_omp.
2040         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Tuplify.
2041         (rs6000_alloc_sdmode_stack_slot): Likewise.
2042         * tree-cfgcleanup.c (tree_forwarder_block_p): Fix test
2043         for PHI_WANTED.
2045 2008-02-25  Rafael Espindola  <espindola@google.com>
2047         * tree-cfgcleanup.c (tree_forwarder_block_p): fix thinko.
2049 2008-02-24  Rafael Espindola  <espindola@google.com>
2051         * gimple-iterator.c (gsi_split_seq_before): Don't abort if at the
2052         beginning.
2054 2008-02-23  Diego Novillo  <dnovillo@google.com>
2056         http://gcc.gnu.org/ml/gcc-patches/2008-02/msg01025.html
2058         * gimplify.c (gimplify_one_sizepos): Call gimplify_expr with
2059         STMT_P.
2061 2008-02-22  Zdenek Dvorak  <ook@ucw.cz>
2063         * gimple.c (gimple_assign_copy_p): Do not consider unary operations
2064         to be copies.
2066 2008-02-22  Diego Novillo  <dnovillo@google.com>
2068         * Makefile.in (fortran/parse.o-warn,
2069         fortran/simplify.o-warn): New.
2071 2008-02-22  Diego Novillo  <dnovillo@google.com>
2073         http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00961.html
2075         Revert
2077         2008-02-20  Zdenek Dvorak  <ook@ucw.cz>
2079                 * tree-tailcall.c: Tuplify.
2080                 * gimplify.c (force_gimple_operand): Remove ATTRIBUTE_UNUSED.
2081                 * gimple.c (gimple_assign_copy_p): Do not
2082                 consider unary operations to be copies.
2083                 (copy_or_nop_cast_stmt_rhs): New.
2084                 * gimple.h (copy_or_nop_cast_stmt_rhs): Declare.
2086 2008-02-21  Rafael Espindola  <espindola@google.com>
2088         * gimple.h (gimple_cond_true_p): Define.
2089         (gimple_cond_false_p): Define.
2090         (gimple_cond_single_var_p): Define.
2092 2008-02-21  Rafael Espindola  <espindola@google.com>
2094         * tree-tailcall.c (adjust_accumulator_values): Check that a phi was
2095         found.
2097 2008-02-21  Rafael Espindola  <espindola@google.com>
2099         * tree-tailcall.c (adjust_accumulator_values): Initialize phi.
2101 2008-02-20  Zdenek Dvorak  <ook@ucw.cz>
2103         * tree-tailcall.c: Tuplify.
2104         * gimplify.c (force_gimple_operand): Remove ATTRIBUTE_UNUSED.
2105         * gimple.c (gimple_assign_copy_p): Do not consider unary operations
2106         to be copies.
2107         (copy_or_nop_cast_stmt_rhs): New.
2108         * gimple.h (copy_or_nop_cast_stmt_rhs): Declare.
2110 2008-02-20  Oleg Ryjkov  <olegr@google.com>
2112         * gimplify.c (gimplify_expr): Save locus into the right
2113         sequence.
2115 2008-02-20  Rafael Espindola  <espindola@google.com>
2117         * passes.c (init_optimization_passes): Enable pass_mark_used_blocks
2118         and pass_cleanup_cfg_post_optimizing.
2119         * tree-optimize.c (execute_cleanup_cfg_post_optimizing): call cleanup_tree_cfg.
2121 2008-02-20  Rafael Espindola  <espindola@google.com>
2123         * passes.c (init_optimization_passes):  Enable pass_nrv.
2124         * tree-nrv.c (finalize_nrv_r): data is now a walk_stmt_info.
2125         (tree_nrv): port to gimple.
2127 2008-02-19  Oleg Ryjkov  <olegr@google.com>
2129         * gimple-pretty-print.c: Introduce support for TDF_RAW
2130         flag.
2131         (dump_gimple_fmt): New function.
2132         (dump_gimple_assign, dump_gimple_return): Update to print
2133         RAW gimple.
2134         (dump_gimple_call_args): New function.
2135         (dump_gimple_call, dump_gimple_switch, dump_gimple_cond,
2136         dump_gimple_label, dump_gimple_bind, dump_gimple_try):
2137         Update to print RAW gimple.
2138         (dump_gimple_catch, dump_gimple_eh_filter,
2139         dump_gimple_resx): New functions.
2140         (dump_gimple_omp_for, dump_gimple_asm, dump_gimple_phi):
2141         Update to print RAW gimple.
2142         (dump_gimple_omp_parallel, dump_gimple_omp_atomic_load,
2143         dump_gimple_omp_atomic_store): New, code moved from 
2144         dump_gimple_stmt, then added support to print RAW gimple.
2145         (gimple_dump_stmt): Some code refactored into helper
2146         subroutines.
2147         * tree-cfg.c(dump_function_to_file): Print RAW gimple when
2148         TDF_RAW is set.
2150 2008-02-19  Diego Novillo  <dnovillo@google.com>
2152         http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00793.html
2154         * tree-complex.c (expand_complex_div_wide): Call gsi_bb.
2155         * tree.h (std_gimplify_va_arg_expr): Change gimple_seq
2156         arguments to gimple_seq *.
2157         Update all users.
2158         (gimplify_parameters): Change return type to gimple_seq.
2159         Update all users.
2160         * target.h (struct gcc_target)<gimplify_va_arg_expr>:
2161         Change gimple_seq arguments to gimple_seq *.
2162         Update all users.
2163         * tree-phinodes.c (free_phinodes): Convert to VEC.
2164         Update all users.
2165         * omp-low.c (lower_rec_input_clauses): Change gimple_seq
2166         arguments to gimple_seq *.  Update all users.
2167         (lower_reduction_clauses): Convert sub_list to
2168         gimple_seq.
2169         (lower_regimplify): Convert PRE to gimple_seq.
2170         (lower_regimplify): Call gimple_seq_insert_before instead
2171         of tsi_link_before.
2172         * tree-gimple.h (get_initialized_tmp_var,
2173         get_formal_tmp_var, gimplify_expr, gimplify_type_sizes,
2174         gimplify_one_sizepos, gimplify_stmt, gimplify_and_add,
2175         gimplify_va_arg_expr): Change gimple_seq arguments to
2176         gimple_seq *.  Update all users.
2177         * gimple-iterator.c: Include value-prof.h.
2178         (gsi_link_seq_before): Remove.  Update all users.
2179         (gsi_link_seq_after): Remove.  Update all users.
2180         (gsi_link_after): Remove.  Update all users.
2181         (gsi_link_before): Remove.  Update all users.
2182         (update_bb_for_stmts): New.
2183         (gsi_insert_seq_nodes_before): New.
2184         (gsi_insert_seq_nodes_after): New.
2185         (gsi_insert_seq_before): Re-write.  Call
2186         gsi_insert_seq_nodes_before.
2187         (gsi_insert_seq_after): Re-write.  Call
2188         gsi_insert_seq_nodes_after.
2189         (gsi_replace): Re-enable EH updating.
2190         (update_modified_stmt): Move earlier in the file.
2191         (gsi_insert_after): Re-write.  Call
2192         gsi_insert_seq_nodes_after.
2193         (gsi_insert_before): Re-write.  Call
2194         gsi_insert_seq_nodes_before.
2195         (gsi_remove): Move from gimple.h.  Re-write.
2196         * langhooks.h (struct lang_hooks): Change gimple_seq
2197         arguments for gimplify_expr to gimple_seq *.
2198         Update all users.
2199         * coretypes.h (struct gimple_seq_d): Rename from struct
2200         gimple_sequence.  Update all users.
2201         (struct gimple_seq_node_d): New.
2202         (gimple_seq_node): New.
2203         (const_gimple_seq_node): New.
2204         * tree-flow.h (force_gimple_operand): Change gimple_seq
2205         argument to gimple_seq *.  Update all users.
2206         * c-common.h (c_gimplify_expr): Change gimple_seq
2207         argument to gimple_seq *.  Update all users.
2208         * Makefile.in (build):
2209         * gimple.c (gimple_seq_cache): New.
2210         (gimple_seq_alloc): Take sequences from gimple_seq_cache,
2211         if possible.
2212         (gimple_seq_free): New.
2213         (gimple_seq_add_stmt): Rename from gimple_seq_add.
2214         Change gimple_seq argument to gimple_seq *.  Update all users.
2215         (gimple_seq_add_seq): Rename from gimple_seq_append.
2216         Update all users.
2217         (gimple_remove): Remove.  Update all users.
2218         (gimple_seq_reverse): Remove unused function.
2219         (gimple_set_bb): Only update block-to-labels map if
2220         CFUN->CFG exists.
2221         * gimple.h (struct gimple_seq_node_d): New.
2222         (struct gimple_seq_d): Change fields 'first' and 'last'
2223         to type gimple_seq_node.  Update all users.
2224         Add field 'next_free'.
2225         (gimple_seq_first): Change return type to
2226         gimple_seq_node.  Update all users.
2227         (gimple_seq_first_stmt): New.
2228         (gimple_seq_last): Change return type to gimple_seq_node.
2229         Update all users.
2230         (gimple_seq_last_stmt): New.
2231         (gimple_seq_set_first): Change second argument to type
2232         gimple_seq_node.  Update all users.
2233         (gimple_seq_set_last): Change second argument to type
2234         gimple_seq_node.  Update all users.
2235         (gimple_seq_init): Remove.  Update all users.
2236         (struct gimple_statement_base): Remove field 'next' and
2237         'prev'.  Update all users.
2238         (struct gimple_statement_omp): Change fields of type
2239         struct gimple_sequence to type gimple_seq.  Update all
2240         users.
2241         (struct gimple_statement_bind): Likewise.
2242         (struct gimple_statement_catch): Likewise.
2243         (struct gimple_statement_eh_filter): Likewise.
2244         (struct gimple_statement_try): Likewise.
2245         (struct gimple_statement_wce): Likewise.
2246         (struct gimple_statement_omp_for): Likewise.
2247         (gimple_set_prev): Remove.  Update all users.
2248         (gimple_set_next): Remove.  Update all users.
2249         (gimple_next): Remove.  Update all users.
2250         (gimple_prev): Remove.  Update all users.
2251         (gimple_seq_bb): New.
2252         (gimple_catch_handler_ptr): New.
2253         (gimple_stmt_iterator): Remove field 'stmt'.
2254         Add field 'ptr'.  Update all users.
2255         (gsi_remove): Move to gimple-iterator.c
2256         * tree-cfg.c (pass_build_cfg): Re-enable PROP_gimple_leh.
2257         * Makefile.in (builtins.o-warn, expr.o-warn, dse.o-warn,
2258         ebitmap.o-warn, lower-subreg.o-warn, tree-chrec.o-warn):
2259         Change -Wno-error to -Wno-uninitialized.
2261 2008-02-19  Rafael Espindola  <espindola@google.com>
2263         * tree-eh.c (collect_finally_tree): handle GIMPLE_SWITCH.
2265 2008-02-19  Aldy Hernandez  <aldyh@redhat.com>
2267         * gimple.h (gimple_cond_invert): Remove prototype.
2268         (update_stmt_if_modified): Fix typo in comment.
2269         * gimple.c (walk_gimple_asm): Fix typo in comment.
2271 2008-02-13  Bill Maddox  <maddox@google.com>
2273         * tree-inline.c (estimate_operator_cost): 
2274         Removed operators superseded by tuplified statement forms.
2275         Small cosmetic reordering of a few switch cases.
2277 2008-02-13  Oleg Ryjkov  <olegr@google.com>
2279         * tree.h: New function declaration.
2280         * gimple-dummy.c (tree_inlinable_function_p): Removed.
2281         * ipa-inline.c (compute_inline_parameters): Removed
2282         gcc_unreachable ().
2283         * calls.c (gimple_alloca_call_p): New function.
2284         * tree-inline.c (inline_forbidden_p_1): Split in two and removed.
2285         (inline_forbidden_p_op, inline_forbidden_p_stmt): New functions.
2286         (inline_forbidden_p): Tuplified.
2287         (estimate_operator_cost): Added missing cases.
2288         * passes.c (init_optimization_passes): Enabled pass_inline_parameters,
2289         pass_ipa_function_and_variable_visibility, pass_ipa_early_inline,
2290         pass_inline_parameters, pass_rebuild_cgraph_edges passes.
2292 2008-02-13  Diego Novillo  <dnovillo@google.com>
2294         http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00459.html
2296         * gimple.def (GIMPLE_TRY): Tidy comment.
2297         * gimple-pretty-print.c (dump_gimple_stmt): Handle TDF_VOPS and
2298         TDF_MEMSYMS.
2300 2008-02-13  Diego Novillo  <dnovillo@google.com>
2302         http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00455.html
2304         * tree-complex.c (update_complex_components): Handle
2305         GIMPLE_CALL and GIMPLE_ASSIGN.
2306         (expand_complex_libcall): Set SSA_NAME_DEF_STMT on LHS.
2307         * tree-ssa-operands.c (maybe_add_call_clobbered_vops):
2308         Rename from get_call_expr_operands.  Update all users.
2309         Convert to handle GIMPLE_CALL instead of CALL_EXPR.
2310         (get_modify_stmt_operands): Remove.  Update all users.
2311         (get_expr_operands): Do not handle CALL_EXPR, COND_EXPR,
2312         VEC_COND_EXPR, GIMPLE_MODIFY_STMT, BLOCK, EXC_PTR_EXPR
2313         and FILTER_EXPR.
2314         (parse_ssa_operands): Call maybe_add_call_clobbered_vops
2315         after parsing operands if STMT is a GIMPLE_CALL.
2317 2008-02-12  Zdenek Dvorak  <ook@ucw.cz>
2318             Bill Maddox  <maddox@google.com>
2320         http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00429.html
2322         * tree-inline.h (estimate_num_insns_fn): Declare.
2323         * cgraphunit.c (cgraph_process_new_functions):
2324         Use estimate_num_insns_fn.
2325         * ipa-inline.c (compute_inline_parameters): Ditto.
2326         * gimple-dummy.c (estimate_move_cost, estimate_num_insns):
2327         Removed.
2328         * tree-inline.c (struct eni_data, estimate_num_insns_1):
2329         Removed.
2330         (estimate_num_insns): Rewritten.
2331         (operation_cost, estimate_num_insns_fn): New functions.
2332         * gimple.c (gimple_copy): Unshare operands.  Update
2333         operand caches.
2334         * gimple.h (gimple_set_no_warning): New.
2335         (gimple_cond_set_true_label, gimple_cond_set_false_label):
2336         Allow setting the label to NULL.
2337         * tree-ssa-operands.c (copy_virtual_operands): Handle statements
2338         without virtual operands.
2340 2008-02-12  Zdenek Dvorak  <ook@ucw.cz>
2342         http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00429.html
2344         * tree-into-ssa.c (update_ssa): Remove ATTRIBUTE_UNUSED.
2345         * tree-ssa-loop-ch.c: Tuplified.
2346         * gimple-iterator.c (gsi_commit_one_edge_insert): Ditto.
2347         * tree-cfg.c (gimple_redirect_edge_and_branch,
2348         gimple_try_redirect_by_replacing_jump, gimple_merge_blocks,
2349         gimple_block_label, gimple_redirect_edge_and_branch_force,
2350         gimple_duplicate_bb): Ditto.
2351         (make_cond_expr_edges): Remove the labels.
2352         (cleanup_dead_labels): Handle conditions without labels.
2353         (gimple_make_forwarder_block): Do not reverse the list
2354         of phi nodes.
2355         (gimple_duplicate_sese_region): Enable ssa updates.
2356         (gimple_cfg_hooks): Enable edge redirection and bb duplication.
2357         * gimple-pretty-print.c (dump_gimple_cond): Do not dump
2358         branches if labels are null.
2359         (dump_implicit_edges): Dump implicit GIMPLE_COND edges.
2361 2008-02-12  Diego Novillo  <dnovillo@google.com>
2363         http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00429.html
2365         * tree-vrp.c (range_includes_zero_p): Partially re-enable.
2366         (ssa_name_nonnegative_p): Partially re-enable.
2367         (ssa_name_nonzero_p): Likewise.
2368         * gimple-dummy.c (ssa_name_nonzero_p): Remove.
2369         (ssa_name_nonnegative_p): Remove.
2370         * tree-cfg.c (gimple_split_block): Convert to tuples.
2372 2008-02-12  Aldy Hernandez  <aldyh@redhat.com>
2374         Merge with mainline @132177
2376         * configure.ac (ACX_PKGVERSION): Update revision merge string.
2377         * configure: Regenerate.
2379 2008-02-08  Diego Novillo  <dnovillo@google.com>
2381         http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00273.html
2382         
2383         * gimplify.c (gimplify_call_expr): Remove code to set
2384         TREE_SIDE_EFFECTS.
2385         * gimple.c (gimple_has_side_effects): New.
2386         * gimple.h (gimple_has_side_effects): Declare.
2387         * tree-cfg.c (stmt_can_make_abnormal_goto): Call.
2389 2008-02-07  Diego Novillo  <dnovillo@google.com>
2391         * gimple.h (gimple_call_num_args): Rename from
2392         gimple_call_nargs.  Update all users.
2394 2008-02-07  Aldy Hernandez  <aldyh@redhat.com>
2396         * gimplify.c: Remove various FIXMEs that have been resolved.
2398 2008-02-06  Aldy Hernandez  <aldyh@redhat.com>
2400         * gimple.def: Add GIMPLE_OMP_ATOMIC_{LOAD,STORE} entires.
2401         * gsstruct.def: Add GSS_OMP_ATOMIC_{LOAD,STORE} entries.
2402         * gimple-pretty-print.c (dump_gimple_stmt): Add case for
2403         GIMPLE_OMP_ATOMIC_{LOAD,STORE}.
2404         * gimplify.c (gimplify_omp_atomic): Enable and convert to tuples.
2405         * tree.def: Add FIXME notes.
2406         * gimple.c (gss_for_code): Add cases for
2407         GIMPLE_OMP_ATOMIC_{LOAD,STORE}.
2408         (gimple_size): Same.
2409         (gimple_build_omp_atomic_load): New.
2410         (gimple_build_omp_atomic_store): New.
2411         * gimple.h (struct gimple_statement_omp_atomic_{load,store}): New.
2412         (union gimple_statement_d): Add gimple_omp_atomic_{load,store}.
2413         (gimple_omp_atomic_store_set_val): New.
2414         (gimple_omp_atomic_store_val): New.
2415         (gimple_omp_atomic_load_set_lhs): New.
2416         (gimple_omp_atomic_load_lhs): New.
2417         (gimple_omp_atomic_load_set_rhs): New.
2418         (gimple_omp_atomic_load_rhs): New.
2419         * tree-cfg.c (verify_types_in_gimple_seq_2): Add cases for
2420         GIMPLE_OMP_ATOMIC_{LOAD,STORE}.
2422 2008-02-05  Diego Novillo  <dnovillo@google.com>
2424         http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00161.html
2426         * gimple-iterator.c (gsi_split_seq_after): Change
2427         argument type to gimple_stmt_iterator.  Update all users.
2428         (gsi_for_stmt): Return gimple_stmt_iterator.  Update all users.
2429         (gimple_find_edge_insert_loc): Change GSI argument to
2430         gimple_stmt_iterator.  Update all users.
2431         * gimple.c (gimple_seq_deep_copy): Change argument to gimple_seq.
2432         Update all users.
2433         * gimple.h (gsi_alloc): Remove.  Update all users.
2434         (gsi_start): Return gimple_stmt_iterator.  Update all users.
2435         (gsi_start_bb): Likewise.
2436         (gsi_last): Likewise.
2437         (gsi_last_bb): Likewise.
2438         (gsi_end_p): Change argument to gimple_stmt_iterator.
2439         Update all users.
2440         (gsi_one_before_end_p): Likewise.
2441         (gsi_stmt): Likewise.
2442         (gsi_bb): Likewise.
2443         (gsi_seq): Likewise.
2444         (gsi_split_seq_after): Likewise.
2445         (gsi_for_stmt): Likewise.
2446         (gsi_after_labels): Return gimple_stmt_iterator.  Update all users.
2448 2008-02-05  Aldy Hernandez  <aldyh@redhat.com>
2450         * gimple-pretty-print.c (dump_gimple_stmt): Print clauses for
2451         GIMPLE_OMP_PARALLEL.
2452         Handle GIMPLE_OMP_FOR.
2453         (dump_gimple_omp_for): New.
2454         * tree-pretty-print.c (dump_omp_clauses): Remove static.
2455         * diagnostic.h (dump_omp_clauses): Add prototype.
2456         * gimplify.c (gimplify_omp_for): Convert to tuples and enable.
2457         (gimplify_omp_workshare): Same.
2458         (gimplify_expr) [OMP_MASTER, OMP_ORDERED, OMP_CRITICAL]: Same.
2460 2008-02-04  Oleg Ryjkov <olegr@google.com>
2462         * tree-gimple.c (get_gimple_rhs_class): Handle
2463         FILTER_EXPR.
2464         * tree-eh.c (union treemple): Declare.
2465         Convert to tuples.
2466         * except.c:
2467         * except.h (lang_protect_cleanup_actions): Change return
2468         type to 'gimple'.  Update all users.
2469         * tree-inline.c (count_insns_seq): New.
2470         * tree-inline.h (count_insns_seq): Declare.
2471         * gimple.c (gimple_seq_deep_copy): New.
2472         * gimple.h (gimple_seq_deep_copy): Declare.
2473         (gimple_singleton_p): New.
2474         * passes.c (init_optimization_passes): Enable
2475         pass_lower_eh.
2477 2008-02-02  Aldy Hernandez  <aldyh@redhat.com>
2479         * tree.h (OMP_CLAUSE_REDUCTION_GIMPLE_INIT): New.
2480         (OMP_CLAUSE_REDUCTION_GIMPLE_MERGE): New.
2481         (struct tree_omp_clause): Add gimple_reduction_{init,merge} fields.
2482         * gimplify.c (gimplify_scan_omp_clauses): Gimplify reduction
2483         init/merge fields into separate sequences.
2484         (gimplify_and_add): Use gimplify_expr directly.
2485         * omp-low.c (lower_rec_input_clauses): Extract reduction info from
2486         gimple tuples in structure.
2487         (lower_reduction_clauses): Same.
2489 2008-02-01  Diego Novillo  <dnovillo@google.com>
2491         http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00036.html
2493         * tree-complex.c (expand_complex_comparison): Set the RHS
2494         of the new comparison to boolean_true_node.
2495         * gimplify.c (gimplify_call_expr): Fix creation of new
2496         GIMPLE_CALL.  Create the vector of arguments in the same
2497         order as the original expression.
2499 2008-02-01  Diego Novillo  <dnovillo@google.com>
2501         http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00032.html
2503         * tree-pas.h (struct tree_opt_pass): Remove field
2504         WORKS_WITH_TUPLES_P.  Adjust all users.
2505         * opts.c (decode_options): Force -O0.
2506         * cfgexpand.c (gimple_to_tree): Handle GIMPLE_RETURN,
2507         GIMPLE_ASM, GIMPLE_CALL and GIMPLE_SWITCH.
2508         Show unrecognized tuple when failing.
2509         (expand_gimple_basic_block): Do not use
2510         gimple_stmt_iterator to go through the statements in BB.
2511         Handle GIMPLE_CALL instead of CALL_EXPR.
2512         (gimple_expand_cfg): Rename from tree_expand_cfg.  Update
2513         all users.
2514         Remove PROP_gimple_leh.
2515         * gimple.c (walk_gimple_seq): Guard against WI == NULL.
2516         * tree-cfg.c (execute_warn_function_return): Move #if 0
2517         markers.
2518         * passes.c (init_optimization_passes): Adjust #if 0
2519         markers to execute pass_expand.
2520         Guard more passes under #if 0.
2522 2008-02-01  Rafael Espindola  <espindola@google.com>
2524         * passes.c (init_optimization_passes): Enable pass_del_ssa.
2526         * tree-outof-ssa.c (insert_copy_on_edge): Port to tuples.
2527         (eliminate_build): Likewise.
2528         (eliminate_virtual_phis): Likewise.
2529         (rewrite_trees): Likewise. Remove stmt_ann_t ann.
2530         (stmt_list): Changed from tree to gimple_seq.
2531         (identical_copies_p): Port to tuples.
2532         (identical_stmt_lists_p): Likewise.
2533         (init_analyze_edges_for_bb): Likewise.
2534         (fini_analyze_edges_for_bb): Likewise.
2535         (process_single_block_loop_latch): Likewise.
2536         (analyze_edges_for_bb): LIkewise.
2537         (remove_ssa_form): Likewise.
2538         (insert_backedge_copies):
2539         (rewrite_out_of_ssa):Likewise.
2540         (pass_del_ssa): flip works_with_tuples_p. Don't require PROP_alias.
2542         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Port to tuples.
2543         (abnormal_corrupt): Port to tuples.
2544         (fail_abnormal_edge_coalesce): Port to tuples.
2545         (create_outofssa_var_map):Port to tuples.
2546         (coalesce_partitions): Port to tuples.
2548 2008-02-01  Rafael Espindola  <espindola@google.com>
2550         * tree-ssa-operands.c (free_stmt_operands): Only free
2551         with_ops.addresses_taken if stmt has ops.
2553 2008-01-31  Rafael Espindola  <espindola@google.com>
2555         * tree-optimize.c (pass_free_cfg_annotations): Flip
2556         works_with_tuples_p.
2557         * passes.c (init_optimization_passes): Enable
2558         pass_free_cfg_annotations.
2560 2008-01-30  Diego Novillo  <dnovillo@google.com>
2562         http://gcc.gnu.org/ml/gcc-patches/2008-01/msg01461.html
2564         * tree-into-ssa.c (compute_global_livein): Initialize
2565         PHI with call to gsi_stmt.
2566         (rewrite_update_init_block): Likewise.
2567         * tree-complex.c (expand_complex_comparison): Initialize
2568         TYPE.
2569         (expand_complex_operations_1): Initialize BR and BI.
2570         * ebitmap.h (ebitmap_iter_init): Initialize OURN.
2571         * Makefile.in (dse.o-warn, ebitmap.o-warn,
2572         lower-subreg.o-warn, tree-chrec.o-warn, varasm.o-warn):
2573         New.
2575 2008-01-30  Rafael Espindola  <espindola@google.com>
2577         * gimplify.c (gimplify_scan_omp_clauses): Comment out
2578         pop_gimplify_context calls
2580 2008-01-30  Rafael Espindola  <espindola@google.com>
2582         * gimple.h (gsi_after_labels): Add.
2584 2008-01-30  Rafael Espindola  <espindola@google.com>
2586         * Makefile.in (tree-complex.o): Uncomment gt-tree-vect-generic.h.
2587         (GTFILES): Add tree-vect-generic.c.
2588         * passes.c (init_optimization_passes): Enable pass_lower_vector.
2589         * tree-vect-generic.c: uncomment all the file.
2590         (elem_op_func): Use gimple_stmt_iterator instead of
2591         block_stmt_iterator.
2592         (tree_vec_extract): Likewise. Rename bsi to gsi.
2593         (do_unop): Likewise.
2594         (do_binop): Likewise.
2595         (do_plus_minus): Likewise.
2596         (do_negate): Likewise.
2597         (expand_vector_piecewise): Likewise.
2598         (expand_vector_parallel): Likewise.
2599         (expand_vector_addition): Likewise.
2600         (expand_vector_operation): Likewise. Remove "tree rhs" param. Add
2601         "gimple assign" param. Use gimple_assign_rhs1|2 instead of
2602         TREE_OPERAND.
2603         (expand_vector_operations_1): Use gimple_stmt_iterator instead of
2604         block_stmt_iterator. Rename bsi to gsi. Use gsi_stmt instead of
2605         bsi_stmt. Use gimple_assign_* instead of GIMPLE_STMT_OPERAND. Use
2606         gimple_assign_set_rhs_from_tree instead of setting *p_rhs.
2607         (gate_expand_vector_operations): Use gimple_stmt_iterator instead
2608         of block_stmt_iterator. Use gsi_* instead of bsi_*
2609         (pass_lower_vector): flip works_with_tuples_p
2610         (pass_lower_vector_ssa) flip works_with_tuples_
2612 2008-01-29  Rafael Espindola  <espindola@google.com>
2614         http://gcc.gnu.org/ml/gcc-patches/2008-01/msg01434.html
2616         * gimple.c (gimple_assign_set_rhs_with_ops): Fix
2617         allocation of operand vector.
2619 2008-01-29  Diego Novillo  <dnovillo@google.com>
2621         http://gcc.gnu.org/ml/gcc-patches/2008-01/msg01434.html
2623         * tree-into-ssa.c (prepare_block_for_update): Initialize
2624         PHI.
2625         * tree.c (build_gimple_modify_stmt): Fix documentation.
2627         * tree-complex.c: Convert to tuples.
2628         (pass_lower_complex_O0): Re-enable.
2630         * ipa-cp.c (constant_val_insert): Disable.
2631         * tree-gimple.c (get_gimple_rhs_class): Handle SSA_NAME.
2633         * tree-ssa-propagate.c: Fix documentation to refer to
2634         prop_simulate_again_p.
2635         (add_ssa_edge): Call prop_simulate_again_p.
2636         (simulate_stmt): Likewise.
2637         (simulate_block): Fix loop iterating over PHI nodes.
2638         * tree-ssa-propagate.h (prop_set_simulate_again): New.
2639         (prop_simulate_again_p): New.
2640         * gimple-iterator.c (gsi_insert_seq_after): Re-write to
2641         avoid use of gimple_stmt_iterator.
2642         (gimple_find_edge_insert_loc): Move from tree-cfg.c.
2643         Re-enable.
2644         (gsi_commit_edge_inserts): Likewise.
2645         (gsi_commit_one_edge_insert): Likewise.
2646         (gsi_insert_on_edge): Likewise.
2647         (gsi_insert_on_edge_immediate): Likewise.
2648         (gsi_insert_seq_on_edge): New.
2649         * gimplify.c (gimplify_cond_expr): Call
2650         gimple_cond_get_ops_from_tree.
2651         * tree-optimize.c (pass_all_optimizations): Enable.
2652         * gimple.c (gimple_cond_get_ops_from_tree): New.
2653         (gimple_build_cond_from_tree): New.
2654         * basic-block.h (struct edge_def): Replace field
2655         edge_def_insns.t with gimple_seq edge_def_insns.g.
2656         Update all users.
2657         * gimple.h (gimple_stmt_iterator):
2658         * tree-cfg.c (change_bb_for_stmt):
2659         * passes.c (init_optimization_passes): Move #if0 around
2660         to disable passes in groups instead of individually.
2661         (execute_function_todo): Re-enable call to update_ssa.
2663 2008-01-25  Aldy Hernandez  <aldyh@redhat.com>
2665         * gimple-pretty-print.c (dump_gimple_stmt): Handle
2666         GIMPLE_OMP_PARALLEL.
2667         * gimplify.c (pop_gimplify_context): Add comment.
2668         (gimplify_and_return_first): New.
2669         (gimplify_scan_omp_clauses): Remove unused 'gs'.
2670         Remove #if 0.
2671         (gimplify_omp_parallel): Convert to tuples.
2672         (gimplify_omp_workshare): Remove redundant retval.
2673         (gimplify_expr): Adapt to lack of retval for gimplify_omp_variable and
2674         gimplify_omp_workshare.
2675         Abort on OMP_ATOMIC_{LOAD,STORE} case.
2677 2008-01-21  Diego Novillo  <dnovillo@google.com>
2679         Merge with mainline @131695
2681         * configure.ac (ACX_PKGVERSION): Update revision merge
2682         string.
2683         * configure: Regenerate.
2685 2008-01-15  Diego Novillo  <dnovillo@google.com>
2687         http://gcc.gnu.org/ml/gcc-patches/2008-01/msg00674.html
2689         * tree-into-ssa.c (mark_def_sites): Force operand scan.
2690         * gimple.def (GIMPLE_ASSIGN): Move into section of
2691         statements with memory operands.
2692         * gimple-dummy.c (remove_unused_locals): Remove.
2693         * tree-flow-inline.h (noreturn_call_p,
2694         mark_stmt_modified, update_stmt, update_stmt_if_modified,
2695         stmt_modified_p): Remove.
2696         * tree-ssa-live.c: Convert to tuples.
2697         * gimple.c (gimple_set_modified): Replace
2698         mark_stmt_modified.  Update all callers.
2699         (gimple_remove): Call free_stmt_operands.
2700         * gimple.h: Include tree-ssa-operands.h
2701         Move extern function declarations earlier in the file.
2702         (GIMPLE_CHECK2): Remove.
2703         (GIMPLE_RANGE_CHECK): Remove.
2704         (struct gimple_statement_with_ops): Fix GTY markers.
2705         (struct gimple_statement_with_memory_ops): Likewise.
2706         (gimple_modified_p): Replace stmt_modifed_p.  Update all
2707         users.
2708         (update_stmt): Move from tree-flow-inline.h.  Update all
2709         users.
2710         (update_stmt_if_modified): Likewise.
2711         (gimple_has_ops): Use range GIMPLE_COND ... GIMPLE_RETURN
2712         (gimple_has_mem_ops): Use range GIMPLE_ASSIGN ... GIMPLE_RETURN
2713         (gimple_num_ops): Call gimple_has_ops.
2714         (gimple_ops): Likewise.
2715         (gimple_op): Likewise.
2716         (gimple_op_ptr): Likewise.
2717         (gimple_set_op): Likewise.
2718         (gimple_set_addresses_taken): Remove.  Update all users.
2719         (gimple_add_to_addresses_taken): Likewise.
2720         (gimple_call_noreturn_p): Replace noreturn_call_p.
2721         Update all users.
2722         (gimple_phi_arg): Assert that INDEX is smaller than
2723         CAPACITY.
2724         * passes.c (init_optimization_passes): Enable
2725         pass_referenced_vars, pass_reset_cc_flags and pass_build_ssa.
2726         * tree-ssa-operands.c (gimple_set_stored_syms): Do not
2727         free the STORES field if SYMS is empty.
2728         (gimple_set_loaded_syms): Likewise.
2729         (finalize_ssa_stmt_operands): Only call
2730         finalize_ssa_vdefs and finalize_ssa_vuses if STMT has
2731         memory operands.
2732         (get_expr_operands): Handle CASE_LABEL_EXPR.
2733         (free_stmt_operands): Free bitmaps ADDRESSES_TAKEN,
2734         STORES and LOADS.
2735         (gimple_add_to_addresses_taken): Rename from
2736         add_to_addressable_set.
2738 2008-01-14  Aldy Hernandez  <aldyh@redhat.com>
2740         * tree-dfa.c (dump_dfa_stats): Add %z modifier to size_t argument.
2742 2008-01-11  Andrew MacLeod  <amacleod@redhat.com>
2743             Diego Novillo  <dnovillo@google.com>
2745         http://gcc.gnu.org/ml/gcc-patches/2008-01/msg00493.html
2747         * tree.h (struct ssa_use_operand_d): Replace field STMT
2748         with a union field LOC containing the fields STMT and
2749         SSA_NAME.
2750         Update all users.
2751         * tree-flow.h (struct immediate_use_iterator_d): Document
2752         how immediate use iteration works.
2754 2008-01-10  Diego Novillo  <dnovillo@google.com>
2756         http://gcc.gnu.org/ml/gcc-patches/2008-01/msg00444.html
2758         * Makefile.in (tree-complex.o): Remove gt-tree-vect-generic.h
2760 2008-01-10  Diego Novillo  <dnovillo@google.com>
2762         http://gcc.gnu.org/ml/gcc-patches/2008-01/msg00436.html
2764         * tree-ssa-operands.h (PHI_RESULT_PTR): Call
2765         gimple_phi_result_ptr.
2766         (PHI_ARG_DEF_PTR): Call gimple_phi_arg_imm_use_ptr.
2767         (free_ssa_operands): Remove.
2768         (copy_virtual_operands, create_ssa_artificial_load_stmt,
2769         add_to_addressable_set, discard_stmt_changes,
2770         FOR_EACH_PHI_OR_STMT_USE, FOR_EACH_PHI_OR_STMT_DEF): Convert
2771         to use 'gimple'.
2772         * tree-into-ssa.c: Convert to use 'gimple'.
2773         (rewrite_uses_p): New.  Use instead of REWRITE_THIS_STMT.
2774         (set_rewrite_uses): New.  Use instead of REWRITE_THIS_STMT.
2775         (register_defs_p): New.  Use instead of
2776         REGISTER_DEFS_IN_THIS_STMT.
2777         (set_register_defs): New.  Use instead of
2778         REGISTER_DEFS_IN_THIS_STMT.
2779         (REWRITE_THIS_STMT): Remove.
2780         (REGISTER_DEFS_IN_THIS_STMT): Remove.
2781         * tree-pretty-print.c (dump_vops): Remove.  Update all
2782         users.
2783         (dump_generic_node): Do not handle PHI_NODE.
2784         * tree.c (tree_node_kind): Remove "phi_nodes" entry.
2785         (tree_code_size): Do not handle PHI_NODE.
2786         (tree_size): Likewise.
2787         (make_node_stat): Likewise.
2788         (tree_node_structure): Likewise.
2789         (phi_node_elt_check_failed): Remove.
2790         * tree.h (PHI_NODE_ELT_CHECK): Remove.
2791         (PHI_RESULT_TREE): Remove.
2792         (PHI_ARG_DEF_TREE): Remove.
2793         (PHI_CHAIN): Remove.
2794         (PHI_NUM_ARGS): Remove.
2795         (PHI_ARG_CAPACITY): Remove.
2796         (PHI_ARG_ELT): Remove.
2797         (PHI_ARG_EDGE): Remove.
2798         (PHI_BB): Remove.
2799         (PHI_ARG_IMM_USE_NODE): Remove.
2800         (struct tree_phi_node): Remove.
2801         (union tree_node): Remove field 'phi'.
2802         (release_phi_node): Change argument to gimple.
2803         (duplicate_ssa_name): Change second argument to gimple.
2804         (swap_tree_operands): Remove.
2805         (enum tree_node_kind): Remove phi_kind entry.
2806         * tree-phinodes.c: Convert to use gimple.
2807         * tree-gimple.c (is_gimple_stmt): Do not handle PHI_NODE.
2808         * cgraphunit.c (cgraph_process_new_functions): Call
2809         gimple_unreachable to mark unconverted sections.
2810         (verify_cgraph_node): Do not ICE if THIS_CFUN is NULL.
2811         Convert statement verification to use gimple.
2812         (cgraph_expand_function): Call gimple_unreachable to mark
2813         unconverted sections.
2814         * tree-ssa-propagate.c: Convert to use gimple.
2815         (STMT_IN_SSA_EDGE_WORKLIST): Use flag GF_PLF_1 as marker.
2816         (DONT_SIMULATE_AGAIN): Remove.  Use gimple_visited.
2817         * gimple-dummy.c: Remove converted functions.
2818         * tree-ssa-alias.c (may_be_aliased): Re-enable.
2819         * tree-flow-inline.h (gimple_phi_arg_imm_use_ptr): Rename
2820         from get_phi_arg_def_ptr.
2821         (bsi_start, bsi_after_labels, bsi_last, bsi_end_p,
2822         bsi_next, bsi_prev, bsi_stmt, bsi_stmt_ptr): Remove.
2823         * tree.def (PHI_NODE): Remove.  Update most users.
2824         * tree-dfa.c: Convert to use gimple.
2825         * common.opt (fgimple-conversion): Default to 0.
2826         * tree-ssa.c: Convert to use gimple.
2827         * tree-optimize.c (pass_early_local_passes,
2828         pass_all_early_optimization, pass_init_datastructures):
2829         Enable.
2830         * tree-flow.h (tree_ann_type): Remove STMT_ANN.  Update
2831         all users.
2832         (struct stmt_ann_d): Remove.  Update all users.
2833         * Makefile.in (GIMPLE_H): Add tree-ssa-operands.h.
2834         (tree-ssa-copy.o, tree-phi-nodes.o, tree-complex.o):
2835         Re-enable.
2836         * gimple.h (enum plf_mask): Define.
2837         (GF_NO_WARNING): Remove
2838         (bb_seq): Return NULL if BB->il.gimple is NULL.
2839         (struct gimple_statement_base): Add bitfields no_warning,
2840         visited, unused_1, unused_2, unused_3, unused_4 and plf.
2841         (gimple_flags, gimple_set_flags, gimple_add_flag):
2842         Remove.  Update all users.
2843         (gimple_set_visited): New.
2844         (gimple_visited_p): New.
2845         (gimple_set_plf): New.
2846         (gimple_plf): New.
2847         (gimple_has_volatile_ops): New.
2848         (gimple_set_has_volatile_ops): New.
2849         (gimple_addresses_taken): New.
2850         (gimple_set_addresses_taken): New.
2851         (gimple_add_to_addresses_taken): New.
2852         (gimple_phi_result_ptr): New.
2853         (gsi_stmt_ptr): New.
2854         (gsi_bb): New.
2855         (gsi_seq): New.
2856         * tree-cfg.c (execute_build_cfg): Do not call
2857         gimple_set_body after building the CFG.
2858         (pass_build_cfg): Do not require PROP_gimple_leh.
2859         (gimplify_val): Convert to gimple.
2860         * passes.c (init_optimization_passes): Disable all of
2861         pass_all_early_optimizations.
2862         * tree-ssanames.c: Convert to gimple.
2863         * tree-ssa-operands.c: Convert to gimple.
2864         (gimple_set_stored_syms): New.
2865         (gimple_set_loaded_syms): New.
2867 2008-01-03  Diego Novillo  <dnovillo@google.com>
2869         Merge with mainline @131303
2871         * configure.ac (ACX_PKGVERSION): Update revision merge
2872         string.
2873         * configure: Regenerate.
2875 2007-12-20  Diego Novillo  <dnovillo@google.com>
2877         * Makefile.in (builtins.o-warn, expr.o-warn): Add
2878         -Wno-error.
2880 2007-12-05  Diego Novillo  <dnovillo@google.com>
2882         http://gcc.gnu.org/ml/gcc-patches/2007-12/msg00221.html
2884         * gimple.c (walk_gimple_asm): Guard against WI being
2885         NULL.
2886         (walk_gimple_stmt): Likewise.
2888 2007-12-05  Diego Novillo  <dnovillo@google.com>
2890         http://gcc.gnu.org/ml/gcc-patches/2007-12/msg00216.html
2892         * tree.h (gimple_unreachable_1): Declare.
2893         (gimple_unreachable): Define.
2894         Replace calls to gcc_unreachable with gimple_unreachable
2895         in unconverted code.
2896         * gimple-dummy.c (gimple_unreachable_1): New function.
2897         * common.opt (fgimple-only): Remove.
2898         (fgimple-conversion): Define.
2899         * Makefile.in (STRICT_WARN): Add -Wno-return-type.
2901 2007-11-30  Diego Novillo  <dnovillo@google.com>
2903         Merge with mainline @130470
2905         * configure.ac (ACX_PKGVERSION): Update revision merge
2906         string.
2907         * configure: Regenerate.
2908         * tree-inline.c (copy_decl_no_change,
2909         copy_decl_for_dup_finish): Re-enable.
2911 2007-11-26  Aldy Hernandez  <aldyh@redhat.com>
2913         * gimple.h (gimple_bind_block): Update comment.
2914         
2915 2007-11-19  Diego Novillo  <dnovillo@google.com>
2917         Merge with mainline @130291.
2919         * configure.ac (ACX_PKGVERSION): Update revision merge string.
2920         * configure: Regenerate.
2922 2007-11-19  Diego Novillo  <dnovillo@google.com>
2924         * tree-flow-inline.h (get_lineno): Call IS_LOCATION_EMPTY
2925         and LOCATION_LINE instead of accessing location fields
2926         directly.
2927         * gimple-low.c (lower_function_body): Use
2928         UNKNOWN_LOCATION instead of unknown_location.
2930 2007-11-16  Diego Novillo  <dnovillo@google.com>
2932         * cgraph.c (cgraph_create_edge): Call gimple_body
2933         instead of DECL_SAVED_TREE.
2934         (dump_cgraph_node): Likewise.
2935         * cgraphunit.c (verify_cgraph_node): Likewise.
2936         (cgraph_analyze_functions): Likewise.
2937         (cgraph_mark_functions_to_output): Likewise.
2938         (cgraph_optimize): Likewise.
2939         * tree-eh.c (lower_eh_constructs): Add notes for future
2940         changes to calls to DECL_SAVED_TREE.
2941         (refactor_eh_r): Likewise.
2942         * cfgexpand.c (gimple_to_tree): New function.
2943         (maybe_dump_rtl_for_gimple_stmt): Rename from
2944         maybe_dump_rtl_for_tree_stmt.  Convert to tuples.
2945         (label_rtx_for_bb): Convert to tuples.
2946         (expand_gimple_cond): Rename from
2947         expand_gimple_cond_expr.  Convert to tuples.
2948         (expand_gimple_tailcall): Convert to tuples.
2949         (expand_gimple_basic_block): Convert to tuples.
2950         (discover_nonconstant_array_refs_r): Convert to tuples.
2951         (discover_nonconstant_array_refs): Convert to tuples.
2952         * tree-mudflap.c (execute_mudflap_function_decls): Add
2953         deprecation comment for DECL_SAVED_TREE call.
2954         * tree-inline.c (copy_generic_body): Call gimple_body
2955         instead of DECL_SAVED_TREE.
2956         (inlinable_function_p): Likewise.
2957         (clone_body): Add deprecation comment for DECL_SAVED_TREE
2958         call.
2959         * tree-cfg.c (remove_useless_stmts_bind): Call
2960         gimple_body instead of DECL_SAVED_TREE.
2961         (remove_useless_stmts): Likewise.
2963 2007-11-10  Aldy Hernandez  <aldyh@redhat.com>
2965         * tree-cfg.c (verify_types_in_gimple_call): OBJ_TYPE_REF are allowed
2966         as function types.
2968         [objc]
2969         * objc-act.c (objc_gimplify_expr): Change pre and post to sequences.
2970         * objc-act.h (objc_gimplify_expr): Change prototype accordingly.
2971         
2972         [testsuite]
2973         * lib/objc.exp: Set -I regardless of libobjc.
2975 2007-11-10  Aldy Hernandez  <aldyh@redhat.com>
2977         * tree-gimple.h (tree_annotate_all_with_locus): New.
2978         * gimple-dummy.c: Add omp_reduction_init and
2979         diagnose_omp_structured_block_errors.
2980         * gimplify.c (tree_should_carry_locus_p): New.
2981         (tree_annotate_one_with_locus): New.
2982         (tree_annotate_all_with_locus): New.
2984 2007-11-08  Diego Novillo  <dnovillo@google.com>
2986         Merge with mainline @129982
2988         * configure.ac (ACX_PKGVERSION): Update revision merge string.
2989         * configure: Regenerate.
2991 2007-11-01  Diego Novillo  <dnovillo@google.com>
2993         * cgraphbuild.c (initialize_inline_failed): Re-enable.
2994         (build_cgraph_edges): Adapt to use tuples.
2995         (pass_build_cgraph): Re-enable.
2996         (rebuild_cgraph_edges): Adapt to use tuples.
2997         * cgraph.c (cgraph_release_function_body): Also NULLify the
2998         gimple body.
2999         (debug_cgraph_node): New.
3000         (debug_cgraph): New.
3001         * cgraph.h (struct cgraph_edge): Change field CALL_STMT to
3002         type gimple.  Update all users.
3003         * cgraphunit.c (cgraph_analyze_functions): If DECL does not
3004         have a struct function entry, discard it.
3005         * gimple.h (GF_CALL_CANNOT_INLINE): New.
3006         (gimple_call_lhs_ptr): New.
3007         (gimple_call_mark_uninlinable): New.
3008         (gimple_call_cannot_inline_p): New.
3009         (struct walk_stmt_info): Add field PSET.
3011 2007-11-01  Diego Novillo  <dnovillo@google.com>
3013         * tree-optimize.c (tree_rest_of_compilation): Call
3014         gimple_set_body to remove the body if not inlining.
3015         * gimple.c (walk_gimple_stmt): Update documentation.
3016         Pass WI->PSET to every call to walk_tree.
3018 2007-11-01  Diego Novillo  <dnovillo@google.com>
3020         * langhooks.h (struct lang_hooks_for_callgraph): Remove third
3021         argument from function pointer ANALYZE_EXPR.  Update all
3022         users.
3024 2007-10-30  Diego Novillo  <dnovillo@google.com>
3026         * gimple.c (gimple_build_omp_return): Call
3027         gimple_omp_return_set_nowait if needed.
3028         * gimple.h (GIMPLE_CHECK, GIMPLE_CHECK2, GIMPLE_RANGE_CHECK):
3029         Move earlier in the file.
3030         (GF_NO_WARNING): Change to static const unsigned.
3031         (GF_CALL_TAILCALL): New.
3032         (GF_OMP_PARALLEL_COMBINED): Rename from
3033         OMP_PARALLEL_COMBINED_FLAG.  Change to static const unsigned.
3034         Update all users.
3035         (GF_OMP_RETURN_NOWAIT): Rename from OMP_RETURN_NOWAIT_FLAG.
3036         Change to static const unsigned.
3037         Update all users.
3038         (GF_OMP_SECTION_LAST): Rename from OMP_SECTION_LAST_FLAG.
3039         Change to static const unsigned.
3040         Update all users.
3041         (gimple_omp_return_set_nowait): New.
3042         (gimple_call_set_tail): New.
3043         (gimple_call_tail_p): New.
3045 2007-10-30  Aldy Hernandez  <aldyh@redhat.com>
3047         * gimplify.c (get_tmp_var_for): Remove reference to IS_FORMAL in
3048         opening comment.
3049         (gimplify_return_expr): Return GS_ERROR if we have errored.
3050         (gimplify_statement_list): Handle case where voidify_wrapper returns a
3051         temporary.
3052         (gimplify_call_expr): Return gracefully on error.
3053         (gimplify_cond_expr): Same.
3054         * gimple.h (gimple_call_return_type): Do not error on methods.
3056 2007-10-29  Diego Novillo  <dnovillo@google.com>
3057             Tom Tromey  <tromey@redhat.com>
3059         * gimple.h (gimple_locus): Update comment.
3060         (gimple_set_locus): Likewise.
3061         (gimple_locus_empty_p): Add support for mapped locations.
3063 2007-10-29  Diego Novillo  <dnovillo@google.com>
3065         * tree-optimize.c (execute_cleanup_cfg_pre_ipa): Re-enable.
3066         * gimple.c (walk_gimple_asm): Tidy comment.
3068 2007-10-29  Aldy Hernandez  <aldyh@redhat.com>
3070         * tree-gimple.h (build_gimple_eh_filter_tree): Remove.
3071         * gimplify.c (build_gimple_eh_filter_tree): Move from here...
3072         * cp/cp-gimplify.c: ...to here.
3073         (cp_gimplify_init_expr): Convert to tuples.
3074         (gimplify_must_not_throw_expr): Make function return a
3075         gimplify_status and convert to tuples.
3076         (cp_gimplify_expr): Convert MUST_NOT_THROW_EXPR, INIT_EXPR, and
3077         USING_STMT to tuples.
3079 2007-10-28  Aldy Hernandez  <aldyh@redhat.com>
3081         * gimplify.c (gimplify_body): Make work when body contains more than
3082         a GIMPLE_BIND statement.
3084 2007-10-26  Diego Novillo  <dnovillo@google.com>
3086         Merge with mainline @129659.
3088         * configure.ac (ACX_PKGVERSION): Update revision merge string.
3089         * configure: Regenerate.
3091 2007-10-26  Diego Novillo  <dnovillo@google.com>
3093         * gimple-low.c (lower_builtin_setjmp): Pass ARG to first
3094         call to gimple_build_call.
3096 2007-10-17  Aldy Hernandez  <aldyh@redhat.com>
3098         * tree-gimple.c (get_gimple_rhs_class): Add case for EXC_PTR_EXPR.
3099         * gimplify.c (gimple_conditional_context): Enable.
3100         (gimplify_cleanup_point_expr): Enable.  Adjust for tuples.
3101         (gimple_push_cleanup): Enable.
3102         (gimplify_target_expr): Do not gimplify TARGET_EXPR_CLEANUP before
3103         calling gimple_push_cleanup.
3104         (gimplify_expr): Rename `try' to `try_'.
3105         Enable CLEANUP_POINT_EXPR case.
3106         Gimplify CATCH_EXPR and EH_FILTER_EXPR cases correctly.
3108 2007-10-17  Aldy Hernandez  <aldyh@redhat.com>
3110         * gimple.c (gimple_size): Handle GIMPLE_WITH_CLEANUP_EXPR.
3111         * gimple.h (struct gimple_statement_catch): Make handler a structure,
3112         not a pointer.
3113         (struct gimple_statement_eh_filter): Make failure a structure, not a
3114         pointer.
3115         document EH_FILTER_MUST_NOT_THROW subcode flag.
3116         (gimple_catch_handler): Handler is now a struct.
3117         (gimple_catch_set_handler): Same.
3118         (gimple_eh_filter_failure): Failure is now a struct.
3119         (gimple_eh_filter_set_failure): Same.
3120         (gimple_eh_filter_must_not_throw): New.
3121         (gimple_eh_filter_set_must_not_throw): New.
3122         (gsi_next): Update comment.
3123         (gsi_prev): Same.
3124         * tree-cfg.c (verify_types_in_gimple_seq_2): Handle GIMPLE_EH_FILTER.
3126 2007-10-18  Diego Novillo  <dnovillo@google.com>
3128         * gimple-iterator.c (gsi_delink): Remove.
3129         * gimple.h (gsi_delink): Remove.
3131 2007-10-17  Diego Novillo  <dnovillo@google.com>
3133         * coretypes.h (const_gimple_seq): New typedef.
3134         * gimple.h (gimple_seq_first): Constify argument.
3135         (gimple_seq_last): Likewise.
3136         (gimple_seq_copy): Likewise.
3137         (gimple_seq_empty_p): Likewise.
3138         (gimple_set_prev): Rename from set_gimple_prev.
3139         Update all users.
3140         (gimple_set_next): Rename from set_gimple_next.
3141         Update all users.
3142         (gimple_set_flags): Rename from set_gimple_flags.
3143         Update all users.
3144         (gimple_add_flag): Rename from add_gimple_flag.
3145         Update all users.
3146         (gimple_set_subcode): Rename from set_gimple_subcode.  
3147         Update all users.
3148         (gimple_set_block): Rename from set_gimple_block.
3149         Update all users.
3150         (gimple_set_locus): Rename from set_gimple_locus.
3151         Update all users.
3152         (gimple_locus_empty_p): Constify argument.
3153         (gimple_has_ops): Likewise.
3154         (gimple_has_mem_ops): Likewise.
3155         (gimple_def_ops): Likewise.
3156         (gimple_set_def_ops): Rename from set_gimple_def_ops.
3157         Update all users.
3158         (gimple_use_ops): Constify argument.
3159         (gimple_set_use_ops): Rename from set_gimple_use_ops.
3160         Update all users.
3161         (gimple_vuse_ops): Constify argument.
3162         (gimple_set_vuse_ops): Rename from set_gimple_vuse_ops.
3163         Update all users.
3164         (gimple_vdef_ops): Constify argument.
3165         (gimple_set_vdef_ops): Rename from set_gimple_vdef_ops.
3166         Update all users.
3167         (gimple_loaded_syms): Constify argument.
3168         (gimple_stored_syms): Constify argument.
3169         (gimple_modified): Constify argument.
3170         (gimple_set_modified): Rename from set_gimple_modified.
3171         Update all users.
3172         (gimple_omp_return_nowait_p): Constify argument.
3173         (gimple_omp_section_last_p): Constify argument.
3174         (gimple_omp_parallel_combined_p): Constify argument.
3175         (gimple_build_return): Rename from build_gimple_return.
3176         Update all users.
3177         (gimple_build_assign): Rename from build_gimple_assign.
3178         Update all users.
3179         (gimple_build_assign_with_ops): Rename from
3180         build_gimple_assign_with_ops.
3181         Update all users.
3182         (gimple_build_call_vec): Rename from build_gimple_call_vec.
3183         Update all users.
3184         (gimple_build_call): Rename from build_gimple_call.
3185         Update all users.
3186         (gimple_build_cond): Rename from build_gimple_cond.
3187         Update all users.
3188         (gimple_build_label): Rename from build_gimple_label.
3189         Update all users.
3190         (gimple_build_goto): Rename from build_gimple_goto.
3191         Update all users.
3192         (gimple_build_nop): Rename from build_gimple_nop.
3193         Update all users.
3194         (gimple_build_asm): Rename from build_gimple_asm.
3195         Update all users.
3196         (gimple_build_asm_vec): Rename from build_gimple_asm_vec.
3197         Update all users.
3198         (gimple_build_catch): Rename from build_gimple_catch.
3199         Update all users.
3200         (gimple_build_eh_filter): Rename from build_gimple_eh_filter.
3201         Update all users.
3202         (gimple_build_try): Rename from build_gimple_try.
3203         Update all users.
3204         (gimple_build_wce): Rename from build_gimple_wce.
3205         Update all users.
3206         (gimple_build_resx): Rename from build_gimple_resx.
3207         Update all users.
3208         (gimple_build_switch): Rename from build_gimple_switch.
3209         Update all users.
3210         (gimple_build_switch_vec): Rename from
3211         build_gimple_switch_vec.  Update all users.
3212         (gimple_build_omp_parallel): Rename from
3213         build_gimple_omp_parallel.  Update all users.
3214         (gimple_build_omp_for): Rename from build_gimple_omp_for.
3215         Update all users.
3216         (gimple_build_omp_critical): Rename from
3217         build_gimple_omp_critical.
3218         Update all users.
3219         (gimple_build_omp_section): Rename from
3220         build_gimple_omp_section.  Update all users.
3221         (gimple_build_omp_continue): Rename from
3222         build_gimple_omp_continue.  Update all users.
3223         (gimple_build_omp_master): Rename from
3224         build_gimple_omp_master.  Update all users.
3225         (gimple_build_omp_ordered): Rename from
3226         build_gimple_omp_ordered.  Update all users.
3227         (gimple_build_omp_sections): Rename from
3228         build_gimple_omp_sections.  Update all users.
3229         (gimple_build_omp_single): Rename from
3230         build_gimple_omp_single.  Update all users.
3231         (gimple_set_body): Rename from set_gimple_body.  Update all
3232         users.
3233         (gimple_set_bb): Rename from set_gimple_bb.  Update all users.
3234         (is_gimple_operand): Constify argument.
3235         (gimple_ops): Likewise.
3236         (gimple_op_ptr): Likewise.
3237         (gimple_call_lhs): Likewise.
3238         (gimple_call_return_type): Likewise.
3239         (gimple_call_chain): Likewise.
3240         (gimple_call_arg_ptr): Likewise.
3241         (gimple_cond_true_label): Likewise.
3242         (gimple_bind_vars): Likewise.
3243         (gimple_bind_set_body): Likewise.
3244         (gimple_bind_block): Likewise.
3245         (gimple_asm_ninputs): Likewise.
3246         (gimple_asm_noutputs): Likewise.
3247         (gimple_asm_nclobbers): Likewise.
3248         (gimple_asm_input_op): Likewise.
3249         (gimple_asm_output_op): Likewise.
3250         (gimple_asm_clobber_op): Likewise.
3251         (gimple_asm_string): Likewise.
3252         (gimple_asm_volatile_p): Likewise.
3253         (gimple_catch_types): Likewise.
3254         (gimple_catch_handler): Likewise.
3255         (gimple_eh_filter_types): Likewise.
3256         (gimple_eh_filter_failure): Likewise.
3257         (gimple_try_kind): Likewise.
3258         (gimple_try_set_eval): Likewise.
3259         (gimple_try_set_cleanup): Likewise.
3260         (gimple_wce_set_cleanup): Likewise.
3261         (gimple_wce_cleanup_eh_only): Likewise.
3262         (gimple_phi_capacity): Likewise.
3263         (gimple_phi_num_args): Likewise.
3264         (gimple_phi_result): Likewise.
3265         (gimple_resx_region): Likewise.
3266         (gimple_switch_num_labels): Likewise.
3267         (gimple_switch_label): Likewise.
3268         (gimple_switch_default_label): Likewise.
3269         (gimple_omp_set_body): Likewise.
3270         (gimple_omp_critical_name): Likewise.
3271         (gimple_omp_for_clauses): Likewise.
3272         (gimple_omp_for_index): Likewise.
3273         (gimple_omp_for_initial): Likewise.
3274         (gimple_omp_for_final): Likewise.
3275         (gimple_omp_for_incr): Likewise.
3276         (gimple_omp_for_set_pre_body): Likewise.
3277         (gimple_omp_parallel_clauses): Likewise.
3278         (gimple_omp_parallel_child_fn): Likewise.
3279         (gimple_omp_parallel_data_arg): Likewise.
3280         (gimple_omp_single_clauses): Likewise.
3281         (gimple_omp_sections_clauses): Likewise.
3282         (gimple_omp_for_cond): Likewise.
3283         (gimple_return_retval): Likewise.
3284         (is_gimple_omp): Likewise.
3285         (gimple_nop_p): Likewise.
3286         (gimple_expr_type): Likewise.
3288 2007-10-17  Diego Novillo  <dnovillo@google.com>
3290         * tree-ssa-loop-manip.c (gimple_duplicate_loop_to_header_edge): Rename
3291         from tree_duplicate_loop_to_header_edge.
3292         Update all users.
3293         * value-prof.c: Convert and enable all functions in the file.
3294         (gimple_divmod_fixed_value): Rename from
3295         tree_divmod_fixed_value.
3296         (gimple_mod_pow2): Rename from tree_mod_pow2.
3297         (gimple_mod_subtract): Rename from tree_mod_subtract.
3298         (gimple_divmod_fixed_value_transform): Rename from
3299         tree_divmod_fixed_value_transform.
3300         (gimple_mod_pow2_value_transform): Rename from
3301         tree_mod_pow2_value_transform.
3302         (gimple_mod_subtract_transform): Rename from
3303         tree_mod_subtract_transform.
3304         (gimple_stringops_transform): Rename from tree_stringops_transform.
3305         (gimple_ic_transform): Rename from tree_ic_transform.
3306         Update all users.
3307         * value-prof.h (gimple_register_value_prof_hooks): Rename from
3308         tree_register_value_prof_hooks.  Update all users.
3309         * tree.h (OMP_DIRECTIVE_P): Remove.  Update all users.
3310         (validate_arglist): Move to gimple.h.
3311         * builtins.c: (validate_arglist): Change first argument to
3312         const_gimple.  Disable most callers.
3313         * gimple.def: Document all GIMPLE codes.
3314         * tree-gimple.c (is_gimple_operand): New.
3315         (get_gimple_rhs_class)<ADDR_EXPR>: Accept as a
3316         GIMPLE_SINGLE_RHS.
3317         <WITH_SIZE_EXPR>: Likewise.
3318         (get_gimple_rhs_num_ops): New.
3319         (is_gimple_call_addr): Tidy.
3320         * tree-gimple.h (get_gimple_rhs_num_ops): Declare.
3321         * gimple-dummy.c (free_histograms, stringop_block_profile):
3322         Remove.
3323         * gimple-low.c (lower_function_body): Tidy.
3324         * predict.c (gimple_predicted_by_p): Rename from
3325         tree_predicted_by_p.  Update all users.
3326         (gimple_predict_edge): Rename from tree_predict_edge.  Update
3327         all users.
3328         * gimple-iterator.c (gsi_link_seq_after): Update documentation.
3329         (gsi_link_after): Likewise.
3330         * tree-eh.c (stmt_could_throw_1_p): New.
3331         (stmt_could_throw_p): New.
3332         * gimple-pretty-print.c (dump_unary_rhs): Print ADDR_EXPR as
3333         a single operand.
3334         (dump_gimple_switch): Support NULL case labels.
3335         (dump_gimple_asm): Dump outputs first.
3336         * gimplify.c (compare_case_labels): Make the default label
3337         sort first.
3338         (sort_case_labels): Do not special case the default label.
3339         (gimplify_init_ctor_eval): Gimplify initializer expressions.
3340         (gimplify_modify_expr): Unshare the operands before setting
3341         them on the new GIMPLE_ASSIGN statement.
3342         (gimplify_asm_expr): NULLify the chain on operands before
3343         putting them on the input/output vectors.
3344         * tree-cfgcleanup.c: Convert and enable CFG cleanup functions.
3345         (cleanup_control_expr_graph): Call gimple_fold.
3346         * tree-flow.h (gimple_block_label): Rename from
3347         tree_block_label.  Update all users.
3348         (gimple_duplicate_sese_region): Rename from
3349         tree_duplicate_sese_region.  Update all users.
3350         (gimple_duplicate_sese_tail): Rename from
3351         tree_duplicate_sese_tail.  Update all users.
3352         (gimple_purge_dead_abnormal_call_edges): Rename from
3353         tree_purge_dead_abnormal_call_edges.  Update all users.
3354         (gimple_purge_all_dead_eh_edges): Rename from
3355         tree_purge_all_dead_eh_edges.  Update all users.
3356         (stmt_could_throw_p): Declare.
3357         (add_stmt_to_eh_region_fn): Move from except.h.
3358         (remove_stmt_from_eh_region_fn): Likewise.
3359         (lookup_stmt_eh_region_fn): Likewise.
3360         (lookup_stmt_eh_region): Likewise.
3361         (verify_eh_edges): Likewise.
3362         * Makefile.in (GIMPLE_H): Add dependencies on GGC_H, TM_H and
3363         TARGET_H.
3364         (ipa-inline.o): Add dependency on TREE_FLOW_H.
3365         (out_object_file): Add dependency on TREE_GIMPLE_H.
3366         * gimple.c (gimple_set_code): Rename from set_gimple_code.
3367         (gimple_size): New.
3368         (gimple_alloc): New.
3369         (gimple_alloc_ops): New.
3370         (build_gimple_with_ops): Call them.
3371         (build_gimple_return): Only call gimple_return_set_retval if
3372         RETVAL is not NULL.
3373         (build_gimple_call): Validate argument FN.
3374         (extract_ops_from_tree): New.
3375         (build_gimple_assign_with_ops): New.
3376         (build_gimple_assign): Call them.
3377         (build_gimple_nop):  Call gimple_alloc.
3378         (build_gimple_bind): Likewise.
3379         (build_gimple_asm_1): Tidy.
3380         (build_gimple_asm_vec): Tidy.
3381         (build_gimple_asm): Tidy.
3382         (build_gimple_catch): Call gimple_alloc.
3383         (build_gimple_eh_filter): Likewise.
3384         (build_gimple_try): Likewise.
3385         (build_gimple_wce): Likewise.
3386         (build_gimple_phi): Remove.
3387         (build_gimple_resx): Call gimple_alloc.
3388         (build_gimple_switch_1): Tidy.
3389         (build_gimple_switch): Tidy.
3390         (build_gimple_omp_critical): Call gimple_alloc.
3391         (build_gimple_omp_for): Likewise.
3392         (build_gimple_omp_parallel): Likewise.
3393         (build_gimple_omp_section): Likewise.
3394         (build_gimple_omp_master): Likewise.
3395         (build_gimple_omp_continue): Likewise.
3396         (build_gimple_omp_ordered): Likewise.
3397         (build_gimple_omp_return): Likewise.
3398         (build_gimple_omp_sections): Likewise.
3399         (build_gimple_omp_single): Likewise.
3400         (gimple_check_failed): Change GS to const_gimple.  Update all
3401         users.
3402         (gimple_range_check_failed): Likewise.
3403         (walk_gimple_seq): Change return type to tree.  Update all
3404         users.
3405         If the call to walk_gimple_stmt returns non-NULL,
3406         return it immediately.
3407         (walk_gimple_asm): Change return type to tree.  Update all
3408         users.
3409         If the call to walk_tree returns non-NULL, return it.
3410         (walk_gimple_stmt): Likewise.
3411         (gimple_fold): New.
3412         (gimple_assign_set_rhs_from_tree): New.
3413         (gimple_assign_set_rhs_with_ops): New.
3414         (gimple_copy): New.
3415         * basic-block.h (gimple_predicted_by_p): Rename from
3416         tree_predicted_by_p.  Update all users.
3417         (gimple_predict_edge): Rename from tree_predict_edge.  Update
3418         all users.
3419         * gimple.h: Add documentation to all inline functions.
3420         (gimple_seq_first): Return NULL if S is NULL.
3421         (gimple_seq_last): Likewise.
3422         (GF_ASM_VOLATILE): Define.
3423         (GF_NO_WARNING): Rename from GIMPLE_NO_WARNING.  Update all
3424         users.
3425         (build_gimple_assign_with_ops): Declare.
3426         (build_gimple_asm): Change unsigned arguments to size_t.
3427         Update all users.
3428         (build_gimple_switch): Likewise.
3429         (build_gimple_phi): Remove.
3430         (validate_arglist): Declare.
3431         (gimple_fold): Declare.
3432         (gimple_assign_set_rhs_from_tree): Declare.
3433         (gimple_assign_set_rhs_with_ops): Declare.
3434         (gimple_copy): Declare.
3435         (is_gimple_operand): Declare.
3436         (gimple_num_ops): Change argument to const_gimple.
3437         Return 0 if GS is not one of the statements that has tree
3438         operands.
3439         (gimple_ops): New.
3440         (gimple_op): Change argument to const_gimple.
3441         If GS is not a statement that has tree operands, return NULL.
3442         (gimple_op_ptr): Likewise.
3443         (gimple_assign_subcode): Change argument to const_gimple.
3444         (gimple_assign_operand): Remove.  Update all users.
3445         (gimple_assign_set_operand): Remove.  Update all users.
3446         (gimple_assign_lhs): Change argument type to const_gimple.
3447         (gimple_assign_rhs1): Likewise.
3448         (gimple_assign_rhs2): Likewise.
3449         (gimple_assign_set_rhs1): Assert that RHS is a valid operand.
3450         (gimple_assign_set_rhs2): Likewise.
3451         (gimple_call_lhs): Call gimple_op.
3452         (gimple_call_set_lhs): Assert that LHS is a valid operand.
3453         Call gimple_set_op.
3454         (gimple_call_set_fn): New.
3455         (gimple_call_fndecl): Change argument type to const_gimple.
3456         Call gimple_call_fn.
3457         (gimple_call_chain): Call gimple_op.
3458         (gimple_call_set_chain): Assert that CHAIN is valid.
3459         Call gimple_set_op.
3460         (gimple_call_nargs): Change argument to const_gimple.
3461         Call gimple_op.
3462         (gimple_call_arg_ptr): Call gimple_op_ptr.
3463         (gimple_call_set_arg): Assert that ARG is valid.
3464         Call gimple_set_op.
3465         (gimple_cond_code): Change argument to const_gimple.
3466         (gimple_cond_lhs): Change argument to const_gimple.
3467         (gimple_cond_set_lhs): Assert that the operand is valid.
3468         Call gimple_set_op.
3469         (gimple_cond_rhs): Change argument to const_gimple.
3470         Call gimple_op.
3471         (gimple_cond_true_label): Call gimple_op.
3472         (gimple_cond_false_label): Likewise.
3473         (gimple_label_label): Likewise.
3474         (gimple_cond_set_true_label): Assert that the operand is
3475         valid.
3476         Call gimple_set_op.
3477         (gimple_cond_set_false_label): Likewise.
3478         (gimple_goto_dest): Change argument to const_gimple.
3479         Call gimple_set_op.
3480         (gimple_goto_set_dest): Assert that the operand is valid.
3481         Call gimple_set_op.
3482         (gimple_asm_ninputs): Change return type to size_t.  Update
3483         all users.
3484         (gimple_asm_noutputs): Likewise.
3485         (gimple_asm_nclobbers): Rename from gimple_asm_nclobbered.
3486         Change return type to size_t.
3487         Update all users.
3488         (gimple_asm_set_input_op): Assert that the argument is
3489         valid.
3490         (gimple_asm_set_output_op): Likewise.
3491         (gimple_asm_set_clobber_op): Likewise.
3492         (gimple_asm_volatile_p): New.
3493         (gimple_asm_set_volatile): New.
3494         (gimple_asm_clear_volatile): New.
3495         (gimple_phi_set_capacity): Remove.
3496         (gimple_phi_set_nargs): Remove.
3497         (gimple_expr_type): New.
3498         (struct walk_stmt_info): Remove fields want_bind_expr and
3499         want_return_expr.  Update all users.
3500         * tree-cfg.c: Convert all functions for CFG cleanup and
3501         verification.
3502         (gimple_redirect_edge_and_branch): Rename from
3503         tree_redirect_edge_and_branch.
3504         (gimple_try_redirect_by_replacing_jump): Rename from
3505         tree_try_redirect_by_replacing_jump.
3506         (gimple_verify_flow_info): Rename from tree_verify_flow_info.
3507         (gimple_make_forwarder_block): Rename from
3508         tree_make_forwarder_block.
3509         (gimple_cfg2vcg): Rename from tree_cfg2vcg.
3510         (gimple_merge_blocks): Rename from tree_merge_blocks.
3511         (gimple_can_merge_blocks_p): Rename from tree_merge_blocks_p.
3512         (gimple_can_remove_branch_p): Rename from tree_can_remove_branch_p.
3513         (gimple_redirect_edge_and_branch): Rename from
3514         tree_redirect_edge_and_branch.
3515         (gimple_move_block_after): Rename from tree_move_block_after.
3516         (gimple_predict_edge): Rename from tree_predict_edge.
3517         (gimple_predicted_by_p): Rename from tree_predicted_by_p.
3518         (gimple_duplicate_bb): Rename from tree_duplicate_bb.
3519         (gimple_can_duplicate_bb_p): Rename from tree_can_duplicate_bb_p.
3520         (gimple_split_edge): Rename from tree_split_edge.
3521         (gimple_make_forwarder_block): Rename from tree_make_forwarder_block.
3522         (gimple_block_ends_with_call_p): Rename from
3523         tree_block_ends_with_call_p.
3524         (gimple_block_ends_with_condjump_p): Rename from
3525         tree_block_ends_with_condjump_p.
3526         (gimple_flow_call_edges_add): Rename from
3527         tree_flow_call_edges_add.
3528         (gimple_execute_on_growing_pred): Rename from
3529         tree_execute_on_growing_pred.
3530         (gimple_execute_on_shrinking_pred): Rename from
3531         tree_execute_on_shrinking_pred.
3532         (gimple_duplicate_loop_to_header_edge): Rename from
3533         tree_duplicate_loop_to_header_edge.
3534         (gimple_lv_add_condition_to_bb): Rename from
3535         tree_lv_add_condition_to_bb.
3536         (gimple_lv_adjust_loop_header_phi): Rename from
3537         tree_lv_adjust_loop_header_phi.
3538         (struct pass_build_cfg): Enable TODO_verify_stmts and
3539         TODO_cleanup_cfg.
3540         * passes.c (execute_function_todo): Enable call to
3541         cleanup_tree_cfg.
3543 2007-10-17  Aldy Hernandez  <aldyh@redhat.com>
3545         * gimple.def: Add GIMPLE_WITH_CLEANUP_EXPR.
3546         * gsstruct.def: Add GSS_WCE.
3547         * gimple-iterator.c (gsi_delink): New.
3548         (gsi_split_seq_*): Update comment.
3549         * gimple.c (gss_for_code): Handle GIMPLE_WCE.  Adjust whitespace.
3550         (build_gimple_wce): New.
3551         * gimple.h (struct gimple_statement_wce): New.
3552         (union gimple_statement_d): Add gimple_wce.
3553         (build_gimple_wce): Protoize.
3554         (gimple_wce_cleanup): New.
3555         (gimple_wce_set_cleanup): New.
3556         (gimple_wce_cleanup_eh_only): New.
3557         (gimple_wce_set_cleanup_eh_only): New.
3558         (gsi_delink): Protoize.
3560 2007-10-12  Aldy Hernandez  <aldyh@redhat.com>
3562         * Makefile.in (GIMPLE_H): Depend on TARGET_H.
3563         * gimple.h (gsi_alloc): New.
3564         (_ALLOC_GSI): Remove.
3565         Replace _ALLOC_GSI uses by gsi_alloc.
3567 2007-10-12  Aldy Hernandez  <aldyh@redhat.com>
3569         * gimple.h (_ALLOC_GSI): New.
3570         Use it throughout when allocating a new gimple_stmt_iterator.
3572 2007-10-11  Aldy Hernandez  <aldyh@redhat.com>
3574         Merge with mainline @129233.
3576         * configure.ac (ACX_PKGVERSION): Update revision merge string.
3577         * configure: Regenerate.
3579 2007-10-11  Aldy Hernandez  <aldyh@redhat.com>
3581         * cfg.c: Include tree-flow.h.
3582         (remove_edge_raw): Call redirect_edge_var_map_clear.
3583         (redirect_edge_succ_nodup): Call redirect_edge_var_map_dup.
3584         * tree-flow-inline.h (redirect_edge_var_map_def): New.
3585         (redirect_edge_var_map_result): New.
3586         * tree-cfgcleanup.c (remove_forwarder_block_with_phi): Replace
3587         PENDING_STMT use with redirect_edge_var_map_*.
3588         * tree-ssa.c (edge_var_maps): New definition.
3589         (redirect_edge_var_map_add): New.
3590         (redirect_edge_var_map_clear): New.
3591         (redirect_edge_var_map_dup): New.
3592         (redirect_edge_var_map_vector): New.
3593         (redirect_edge_var_map_destroy): New.
3594         (ssa_redirect_edge): Replace PENDING_STMT use with
3595         redirect_edge_var_map_*.
3596         (flush_pending_stmts): Same.
3597         (delete_tree_ssa): Destroy edge var map.
3598         * tree-flow.h (struct _edge_var_map): New.
3599         Define edge_var_map vector type.
3600         Declare redirect_edge_var_map_* prototypes.
3601         * Makefile.in (cfg.o): Depend on TREE_FLOW_H.
3602         * tree-cfg.c (reinstall_phi_args): Replace
3603         PENDING_STMT use with redirect_edge_var_map_*.
3605 2007-10-02  Diego Novillo  <dnovillo@google.com>
3607         Merge with mainline @128957.
3609         * configure.ac (ACX_PKGVERSION): Update revision merge string.
3610         * configure: Regenerate.
3612 2007-09-24  Diego Novillo  <dnovillo@google.com>
3614         Merge with mainline @128708.
3615         
3616         * configure.ac (ACX_PKGVERSION): Update revision merge string.
3617         * configure: Regenerate.
3619 2007-09-24  Diego Novillo  <dnovillo@google.com>
3621         * gimple.h (gimple_code): Change argument type to
3622         const_gimple.
3623         (gimple_flags): Likewise.
3624         (gimple_subcode): Likewise.
3625         (gimple_next): Likewise.
3626         (gimple_prev): Likewise.
3627         (gimple_bb): Likewise.
3628         (gimple_block): Likewise.
3629         (gimple_locus): Likewise.
3631 2007-09-15  Diego Novillo  <dnovillo@google.com>
3633         * gimple-iterator.c (gsi_replace): Call gsi_insert_before and
3634         gsi_remove to do the replacement.
3635         (gsi_insert_before): Take the basic block from the iterator.
3636         (gsi_insert_after): Likewise.
3637         * gimple-iterator.h: Move inside gimple.h.
3638         * tree-eh.c (make_eh_edge, make_eh_edges): Enable.
3639         * gimple-pretty-print.c (dump_gimple_seq, dump_gimple_cond,
3640         dump_gimple_bind, dump_gimple_try): Do not handle TDF_DETAILS.
3641         (dump_gimple_switch): Fix display of case labels.
3642         (dump_gimple_stmt): Handle TDF_DIAGNOSTIC.
3643         (pp_cfg_jump): New.
3644         (dump_implicit_edges): New.
3645         (gimple_dump_bb_buff): Call it.
3646         * domwalk.c (walk_dominator_tree):
3647         * gimplify.c (gimplify_switch_expr): Fix generation of
3648         GIMPLE_SWITCH labels.
3649         (gimplify_case_label_expr): Emit a label for CASE_LABEL
3650         instead of the CASE_LABEL_EXPR.
3651         * Makefile.in (GIMPLE_H): Add dependency on BASIC_BLOCK_H.
3652         * gimple.c (walk_gimple_stmt): Reverse meaning of return value
3653         of CALLBACK_STMT.  Update all users.
3654         Walk sub-statements of statements with bodies.
3655         * gimple.h (GCC_GIMPLE_H): Rename from GCC_GIMPLE_IR_H.
3656         Include vec.h, tm.h, hard-reg-set.h and basic-block.h.
3657         (bb_seq, set_bb_seq): Move from tree-flow-inline.h
3658         (gimple_label_set_label): Do not allow CASE_LABEL_EXPR.
3659         (gsi_start_bb): New.  Update all users that were calling
3660         gsi_start (bb_seq ()).
3661         (struct gimple_stmt_iterator): Add field 'bb'.
3662         * tree-cfg.c (build_gimple_cfg): Enable.
3663         (create_bb): Create a new sequence if the given one is NULL.
3664         (make_gimple_switch_edges): Rename from make_switch_expr_edges.
3665         Update all users.
3666         (cleanup_dead_labels): Fix handling of GIMPLE_SWITCH.
3667         (group_case_labels): Likewise.
3668         (verify_types_in_gimple_stmt): Do not allow CASE_LABEL_EXPR in
3669         a GIMPLE_LABEL.
3671 2007-09-13  Diego Novillo  <dnovillo@google.com>
3673         * tree-pretty-print.c (dump_symbols, dump_generic_bb,
3674         dump_bb_header, dump_bb_end, dump_phi_nodes, pp_cfg_jump,
3675         dump_implicit_edges, dump_generic_bb_buff): Remove.
3676         * value-prof.c (histogram_eq): Enable.
3677         (dump_histograms_for_stmt): Adapt to tuples.
3678         * value-prof.h (struct):
3679         * cfghooks.h (struct cfg_hooks)<dump_bb>: Add int argument.
3680         Update all users.
3681         * gimple-dummy.c (gimple_remove_stmt_histograms,
3682         remove_stmt_from_eh_region): Remove.
3683         * gimple-iterator.h (gsi_start): Support NULL sequences.
3684         * tree-eh.c (add_stmt_to_eh_region): Enable.
3685         (remove_stmt_from_eh_region): Enable.
3686         (lookup_stmt_eh_region): Enable.
3687         (tree_could_throw_p): Enable.
3688         (stmt_can_throw_internal): Enable.
3689         * gimple-pretty-print.c: Include value-prof.h
3690         (dump_gimple_cond): Do not insert a newline initially.
3691         (dump_gimple_bind): Likewise.
3692         (dump_gimple_try): Likewise.
3693         (dump_gimple_asm): Likewise.
3694         (dump_symbols): Move from tree-pretty-print.c
3695         (dump_gimple_phi): New.
3696         (dump_gimple_stmt): Call it..
3697         (dump_bb_header): Move from tree-pretty-print.c
3698         (dump_bb_end): Likewise.
3699         (dump_phi_nodes): Likewise.
3700         (gimple_dump_bb_buff): New.
3701         (gimple_dump_bb): New.
3702         * Makefile.in (gimple-pretty-print.o): Add dependency
3703         value-prof.h
3704         * tree-cfg.c (fold_cond_expr_cond): Handle cases where
3705         fold_binary returns NULL.
3706         (make_cond_expr_edges): Take locus from the first statement of
3707         the destination blocks.
3708         (tree_dump_bb): Remove.
3709         (gimple_debug_bb): Rename from debug_tree_bb.
3710         Update all users.
3711         (gimple_debug_bb_n): Rename from debug_tree_bb_n.
3712         Update all users.
3713         (gimple_debug_cfg): Rename from debug_tree_cfg.
3714         Update all users.
3715         (gimple_dump_cfg): Rename from dump_tree_cfg.
3716         Update all users.
3717         (is_ctrl_altering_stmt): Call gimple_call_flags to determine
3718         whether the function is const/pure.
3719         * tree-ssa-operands.c (stmt_references_memory_p): Enable.
3721 2007-09-11  Diego Novillo  <dnovillo@google.com>
3723         * tree.h (struct tree_ssa_name): Add field def_stmt.
3724         (SSA_NAME_DEF_STMT): Return it.
3725         * tree-phinodes.c (create_phi_node): Return gimple.
3726         Update all callers.
3727         (add_phi_args): Change PHI argument to gimple.  Update all
3728         callers.
3729         (remove_phi_node): Call gimple_remove.
3730         (phi_reverse): Remove.  Update all users.
3731         * tree-ssa-alias-warnings.c: Disable.
3732         * input.h (IS_LOCATION_EMPTY): Fix comparison of LOCATION_LINE.
3733         * fold-const.c: Include gimple.h.
3734         (fold_undefer_overflow_warnings): Change type of argument STMT to
3735         gimple.  Update all users.
3736         * cfghooks.h (struct cfg_hooks)<can_merge_blocks_p>: Change
3737         arguments to basic_block.  Update all users.
3738         * tree-gimple.c (get_gimple_rhs_class): Change argument to
3739         enum tree_code.  Update all users.  Move calls to
3740         is_gimple_lvalue and is gimple_val...
3741         (is_gimple_formal_tmp_rhs): ... here.
3742         * tree-ssa-ccp.c (fold_stmt_r): Enable.
3743         (fold_stmt): Enable.
3744         (fold_stmt_inplace): Enable.  Adapt to tuples.
3745         * ipa-pure-const.c (analyze_function): Disable.
3746         * tree-ssa-propagate.c (get_rhs): Adapt to tuples.  Update all
3747         users.
3748         * gimple-dummy.c (ssa_operands_active): Remove dummy function.
3749         (remove_stmt_from_eh_region, create_phi_node, add_phi_arg,
3750         substitute_in_loop_info, release_defs, push_stmt_changes,
3751         pop_stmt_changes, replace_exp): Add dummy functions.
3752         * predict.c: Disable.
3753         * gimple-iterator.c: Include tm.h and tree-flow.h
3754         (gsi_delink): Remove.  Update all users.
3755         (update_modified_stmt): Move from tree-cfg.c.
3756         (gsi_insert_before): New.
3757         (gsi_insert_seq_before): New.
3758         (gsi_insert_after): New.
3759         (gsi_insert_seq_after): New.
3760         (gsi_for_stmt): New.
3761         (gsi_move_after): New.
3762         (gsi_move_before): New.
3763         (gsi_move_to_bb_end): New.
3764         * gimple-iterator.h (gsi_remove): New.
3765         * tree-eh.c (add_stmt_to_eh_region_fn): Add comment
3766         (add_stmt_to_eh_region): Likewise.
3767         (remove_stmt_from_eh_region_fn): Likewise.
3768         (remove_stmt_from_eh_region): Likewise.
3769         (lookup_stmt_eh_region_fn): Likewise.
3770         (lookup_stmt_eh_region): Likewise.
3771         (tree_could_throw_p): Likewise.
3772         (stmt_can_throw_internal): Likewise.
3773         (tree_can_throw_external): Likewise.
3774         * gimple-pretty-print.c (op_gimple_cond): Remove.  Update all
3775         users.
3776         * tree-affine.c (tree_to_aff_combination_expand): Disable.
3777         * tree-flow-inline.h (op_iter_init_vdef): Call gimple_code
3778         instead of TREE_CODE.
3779         * gimplify.c (gimplify_cond_expr): Use enum tree_code instead
3780         of enum gimple_cond as the subcode for GIMPLE_COND.
3781         Do not switch around the conditional when the then clause is empty.
3782         (tree_to_gimple_tuple): Remove.  Update all users.
3783         (gimplify_omp_for):
3784         (force_gimple_operand_gsi): Rename from force_gimple_operand_bsi.  Update all users.
3785         * tree-dfa.c (find_referenced_vars): Disable.
3786         (collect_dfa_stats): Likewise.
3787         (collect_dfa_stats_r): Likewise.
3788         * cfgexpand.c: Disable.
3789         * tree-mudflap.c: Disable.
3790         * print-tree.c: Include diagnostic.h.
3791         (print_node): Call print_gimple_stmt when printing SSA_NAMEs.
3792         * lambda-code.c: Disable.
3793         * tree-profile.c (tree_init_edge_profiler): Disable.
3794         (tree_gen_edge_profiler): Disable.
3795         * tree-flow.h (block_stmt_iterator): Remove.  Update all users.
3796         (const_block_stmt_iterator): Likewise.
3797         * Makefile.in (print-tree.o): Add dependency on $(DIAGNOSTIC_H).
3798         (gimple-iterator.o): Add dependency on $(TREE_FLOW_H) and
3799         value-prof.h.
3800         (gimple.o): Likewise.
3801         (fold-const.o): Add dependency on $(GIMPLE_H).
3802         * gimple.c: Include tm.h, hard-reg-set.h, basic-block.h,
3803         tree-flow.h and value-prof.h.
3804         (build_gimple_with_ops): Do not allocate operands if NUM_OPS == 0.
3805         (build_gimple_return): Remove argument RESULT_DECL_P.  Update
3806         all users.
3807         (build_gimple_cond): Use enum tree_code instead of enum
3808         gimple_cond as the subcode.  Update all users.
3809         (gimple_cond_invert): Remove.  Update all users.
3810         (walk_gimple_seq): Add arguments CALLBACK_STMT and
3811         CALLBACK_OP.  Update all users.
3812         (walk_gimple_asm): Likewise.
3813         (walk_gimple_stmt): Likewise.
3814         (gimple_remove): New.
3815         (gimple_seq_reverse): New.
3816         (set_gimple_bb): New.
3817         * gimple.h (gimple_statement_base): Split field 'flags' into
3818         fields 'subcode' and 'flags'.  Update all users.
3819         (gimple_statement_with_ops): Rename field 'base' to
3820         'gsbase'.  Update all users.
3821         (gimple_statement_omp): Likewise.
3822         (gimple_statement_bind): Likewise.
3823         (gimple_statement_catch): Likewise.
3824         (gimple_statement_eh_filter): Likewise.
3825         (gimple_statement_phi): Likewise.
3826         (gimple_statement_resx): Likewise.
3827         (gimple_statement_try): Likewise.
3828         (gimple_statement_omp_parallel): Likewise.
3829         (enum gimple_cond): Remove.  Update all users.
3830         (GIMPLE_NO_WARNING): Define.
3831         (set_gimple_flags): Assert that FLAGS fits in 8 bits.
3832         (add_gimple_flag): Likewise.
3833         (set_gimple_subcode): New.  Use instead of set_gimple_flags
3834         everywhere.
3835         (gimple_subcode): New.  Use instead of gimple_flags
3836         everywhere.
3837         (gimple_no_warning_p): New.
3838         (gimple_cond_set_code): New.
3839         (gimple_cond_make_false): New.
3840         (gimple_cond_make_true): New.
3841         (gimple_phi_num_args): Rename from gimple_phi_nargs.  Update
3842         all users.
3843         * tree-cfg.c (build_gimple_cfg): Return immediately.
3844         (set_bb_for_stmt): Remove.  Move functionality to
3845         set_gimple_bb.  Update all users.
3846         (factor_computed_gotos):
3847         (bsi_for_stmt): Remove.
3848         (bsi_insert_before): Remove.
3849         (bsi_insert_seq_before): Remove.
3850         (bsi_insert_after): Remove.
3851         (bsi_insert_seq_after): Remove.
3852         (bsi_remove): Remove.
3853         (bsi_move_after): Remove.
3854         (bsi_move_before): Remove.
3855         (bsi_move_to_bb_end): Remove.
3856         (bsi_replace): Remove.
3857         (tree_verify_flow_info): Adapt to tuples.
3858         (tree_make_forwarder_block): Likewise.
3859         (tree_try_redirect_by_replacing_jump): Likewise.
3860         (tree_redirect_edge_and_branch): Likewise.
3861         (tree_purge_dead_eh_edges): Likewise.
3862         (gimple_cfg_hooks): Enable some hooks.
3863         * tree-ssanames.c (make_ssa_name): Change type of STMT to
3864         gimple.  Update all users.
3865         * tree-ssa-operands.c (ssa_operands_active): Enable.
3867 2007-08-31  Diego Novillo  <dnovillo@google.com>
3869         * tree-gimple.c (is_gimple_addressable): Tidy.
3870         * Makefile.in (tree-ssa-structalias.o): Disable dependency on
3871         GTY header file.
3872         (tree-ssa-propagate.o): Likewise.
3873         (tree-phinodes.o): Likewise.
3874         (tree-scalar-evolution.o): Likewise.
3875         (tree-vect-generic.o): Likewise.
3876         * gimple.h (struct gimple_statement_phi): Change type of
3877         fields 'capacity' and 'nargs' to size_t.
3878         Update all users.
3879         * tree-cfg.c (verify_gimple_unary_expr): Remove.  Update all
3880         users.
3881         (verify_gimple_binary_expr): Remove.  Update all users.
3882         (verify_types_in_gimple_min_lval): Rename from
3883         verify_gimple_min_lval.
3884         (verify_types_in_gimple_reference): Rename from
3885         verify_gimple_reference.
3886         (verify_gimple_tree_expr): Remove.
3887         Move checks to verify_types_in_gimple_assign.
3888         (verify_types_in_gimple_call): Rename from verify_gimple_call.
3889         (verify_types_in_gimple_cond): Rename from verify_gimple_cond.
3890         (verify_types_in_gimple_assign): Rename from verify_gimple_assign.
3891         (verify_types_in_gimple_switch): Rename from verify_gimple_switch.
3892         (verify_types_in_gimple_phi): New.
3893         verify_types_in_gimple_return): Rename from
3894         verify_gimple_return.
3895         (verify_types_in_gimple_stmt): Rename from verify_gimple_stmt.
3896         (verify_types_in_gimple_seq): Rename from verify_gimple_seq.
3898 2007-08-30  Chris Matthews  <chrismatthews@google.com>
3899             Diego Novillo  <dnovillo@google.com>
3901         * gimplify.c (gimplify_body): Call verify_gimple_seq if
3902         ENABLE_TYPES_CHECKING is set.
3903         * gimple.h (is_gimple_omp): New.
3904         * tree-cfg.c (verify_gimple_tree_expr): Rename from
3905         verify_gimple_expr.
3906         Verify tree nodes that should disappear after conversion to
3907         GIMPLE.
3908         Do not handle COND_EXPR, CALL_EXPR.
3909         (verify_gimple_modify_stmt): Remove.
3910         (verify_gimple_call): New.
3911         (verify_gimple_cond): New.
3912         (verify_gimple_assign): New.
3913         (verify_gimple_return): New.
3914         (verify_gimple_switch): New.
3915         (verify_gimple_stmt):  Change input argument to type gimple.
3916         Call new verifiers.
3917         (verify_gimple_seq): Rename from verify_gimple_1.
3919 2007-08-30  Diego Novillo  <dnovillo@google.com>
3921         * gimple-low.c (gimple_try_catch_may_fallthru): Call
3922         gimple_code instead of gimple_flags.
3923         * gimple.c (set_gimple_body): Use gimple_seq instead of gimple
3924         when accessing vector gimple_bodies_vec.
3925         (gimple_body): Likewise.
3926         (gimple_assign_copy_p): New.
3927         * gimple.h (enum gimple_try_kind): New.
3928         (GIMPLE_TRY_CATCH): Move inside enum gimple_try_kind.
3929         (GIMPLE_TRY_FINALLY): Likewise.
3930         (gimple_assign_copy_p): Declare.
3931         (gimple_assign_rhs_code): New.
3932         Update callers that used to call gimple_flags.
3933         (gimple_cond_code): New.
3934         Update callers that used to call gimple_flags.
3935         (gimple_try_kind): New.
3936         (gimple_nop_p): Tidy comment.
3937         * gimple-pretty-print.c (dump_unary_rhs): New.
3938         (dump_gimple_assign): Call it.
3940 2007-08-30  Diego Novillo  <dnovillo@google.com>
3942         * gimplify.c (gimplify_cond_expr): When gimplifying a ?: call
3943         gimplify_stmt with the expression just built instead of the
3944         original expression.
3945         Use the correct labels when calling build_gimple_cond.
3948 2007-08-30  Diego Novillo  <dnovillo@google.com>
3950         * tree-vrp.c: Disable.
3951         * tree-loop-linear.c: Disable.
3952         * tree-into-ssa.c: Disable.
3953         * tree-ssa-loop-im.c: Disable.
3954         * tree-complex.c: Disable.
3955         * cgraphbuild.c: Disable most functions.
3956         * tree-ssa-threadupdate.c: Disable.
3957         * tree-ssa-loop-niter.c: Disable.
3958         * tree-pretty-print.c: Disable.
3959         * tree-ssa-loop-unswitch.c: Disable.
3960         * tree-ssa-loop-manip.c: Disable.
3961         * value-prof.c: Disable.
3962         * tree-tailcall.c: Disable.
3963         * tree-ssa-loop-ch.c: Disable.
3964         * tree-scalar-evolution.c: Disable.
3965         * tree-phinodes.c: Disable.
3966         * omp-low.c: Disable.
3967         * tree-ssa-dse.c: Disable.
3968         * ipa-reference.c: Disable.
3969         * tree-ssa-uncprop.c: Disable.
3970         * tree-ssa-sccvn.c: Disable.
3971         * cgraphunit.c (verify_cgraph_node): Disable basic block traversal.
3972         * tree-ssa-copyrename.c: Disable.
3973         * tree-ssa-ccp.c: Disable most functions.
3974         * tree-ssa-loop-ivopts.c: Disable.
3975         * tree-stdarg.c: Disable.
3976         * tree-ssa-math-opts.c: Disable.
3977         * tree-ssa-dom.c: Disable most functions.
3978         * tree-nrv.c: Disable.
3979         * tree-ssa-propagate.c: Disable.
3980         * gimple-dummy.c: New file.
3981         * tree-ssa-alias.c: Disable most functions.
3982         * tree-ssa-sink.c: Disable.
3983         * expr.c (expand_expr_real): Disable call to
3984         lookup_stmt_eh_region.
3985         * tree-ssa-loop-ivcanon.c: Disable.
3986         * predict.c (strip_builtin_expect): Disable.
3987         (tree_predict_by_opcode): Disable.
3988         (return_prediction): Disable.
3989         (apply_return_prediction): Disable.
3990         (tree_bb_level_predictions): Disable.
3991         (tree_estimate_probability): Disable.
3992         (predict_paths_leading_to): Disable.
3993         * gimple-iterator.c (gsi_replace): Mark unused arguments with
3994         ATTRIBUTE_UNUSED.
3995         * tree-ssa-ifcombine.c: Disable.
3996         * matrix-reorg.c: Disable.
3997         * c-decl.c (c_gimple_diagnostics_recursively): Disable call to
3998         diagnose_omp_structured_block_errors.
3999         * tree-eh.c: Disable most functions.
4000         * tree-vectorizer.c: Disable.
4001         * tree-vectorizer.h (nested_in_vect_loop_p): Disable.
4002         * ipa-type-escape.c: Disable.
4003         * tree-if-conv.c: Disable.
4004         * profile.c: Disable.
4005         * tree-data-ref.c: Disable.
4006         * tree-flow-inline.h (bsi_start): Set bsi.gsi to NULL if the
4007         block is invalid.
4008         (bsi_last): Likewise.
4009         (op_iter_next_use): Disable call to PHI_ARG_DEF_PTR.
4010         * tree-vect-analyze.c: Disable.
4011         * gimplify.c (gimple_conditional_context): Disable.
4012         (gimple_push_cleanup): Disable.
4013         (gimplify_omp_parallel): Disable calls to
4014         push_gimplify_context and pop_gimplify_context.
4015         * tree-ssa-phiopt.c: Disable.
4016         * calls.c (emit_call_1): Disable calls to lookup_stmt_eh_region.
4017         (expand_call): Likewise.
4018         (emit_library_call_value_1): Initialize low_to_save and
4019         high_to_save.
4020         * tree-ssa-coalesce.c: Disable.
4021         * tree-dfa.c (make_rename_temp): Disable call to
4022         mark_sym_for_renaming.
4023         (find_new_referenced_vars_1): Likewise.
4024         (collect_dfa_stats): Disable CFG iteration.
4025         (collect_dfa_stats_r): Disable.
4026         (mark_symbols_for_renaming): Disable.
4027         * cfgexpand.c (maybe_dump_rtl_for_tree_stmt): Disable.
4028         (label_rtx_for_bb): Disable.
4029         (expand_gimple_cond_expr): Disable.
4030         (expand_gimple_tailcall): Disable.
4031         (expand_gimple_basic_block): Disable.
4032         * tree-cfgcleanup.c: Disable.
4033         * tree-ssa-pre.c: Disable.
4034         * tree-ssa-live.c: Disable.
4035         * tree-sra.c: Disable most functions..
4036         * tree-predcom.c: Disable.
4037         * tree-mudflap.c: Disable.
4038         * ipa-prop.c: Disable.
4039         * tree-ssa-copy.c (may_propagate_copy): Disable.
4040         (propagate_value): Disable.
4041         (execute_copy_prop): Disable.
4042         (do_copy_prop): Disable.
4043         (store_copy_prop): Disable.
4044         * tree-ssa-forwprop.c: Disable.
4045         * tree-ssa-dce.c: Disable.
4046         * tree-vect-patterns.c: Disable.
4047         * tree-ssa-ter.c: Disable.
4048         * tree-ssa.c: Disable.
4049         * lambda-code.c: Disable.
4050         * tree-ssa-loop-prefetch.c: Disable.
4051         * tree-inline.c: Disable most functions.
4052         * tree-optimize.c (execute_fixup_cfg_pre_ipa): Disable.
4053         (execute_fixup_cfg): Disable.
4054         (execute_cleanup_cfg_post_optimizing): Disable.
4055         (execute_fixup_cfg): Disable.
4056         * tree-vect-transform.c: Disable.
4057         * tree-object-size.c: Disable.
4058         * tree-outof-ssa.c: Disable.
4059         * cfgloop.c (find_subloop_latch_edge_by_profile): Disable.
4060         (find_subloop_latch_edge_by_ivs): Disable.
4061         * tree-profile.c: Disable most functions.
4062         * c-gimplify.c (add_block_to_enclosing): Disable.
4063         * tree-vect-generic.c: Disable.
4064         * tree-flow.h (struct function_ann_d): Disable field
4065         reference_vars_info.
4066         * Makefile.in: Force -Werror even during stage 1.
4067         (OBJS-common): Add gimple-dummy.o.
4068         (GTFILES): Remove tree-scalar-evolution.c,
4069         tree-ssa-propagate.c, tree-vect-generic.c,
4070         tree-ssa-structalias.h, tree-ssa-structalias.c,
4071         ipa-reference.h, omp-low.c, tree-phinodes.c, ipa-reference.c
4072         * tree-ssa-structalias.c: Disable.
4073         * tree-cfg.c: Disable most functions.
4074         * passes.c (finish_optimization_passes): Disable call to
4075         end_branch_prob.
4076         (init_optimization_passes): Disable the registration of
4077         several passes.
4078         (execute_function_todo): Disable calls to update_ssa and
4079         need_ssa_update_p.
4080         * tree-ssa-reassoc.c: Disable.
4081         * tree-ssanames.c: Disable.
4082         * tree-ssa-threadedge.c: Disable.
4083         * tree-ssa-operands.c: Disable.
4085 2007-08-29  Aldy Hernandez  <aldyh@redhat.com>
4087         * tree-ssa-operands.h (pop_stmt_changes, push_stmt_changes):
4088         Argument is gimple.
4089         (struct ssa_operand_iterator_d): Member phi_stmt is gimple.
4090         * value-prof.c (gimple_add_histogram_value): Adjust for tuples.
4091         (gimple_duplicate_stmt_histograms): Same.
4092         * value-prof.h (gimple_add_histogram_value): Same.
4093         (gimple_duplicate_stmt_histograms): Same.
4094         * tree-flow-inline.h (clear_and_done_ssa_iter): Same.
4095         (op_iter_init): Same.
4096         (op_iter_init_phiuse): Same.
4097         * tree-flow.h (stmt_references_memory_p): Same.
4098         * tree-cfg.c (tree_can_merge_blocks_p): Same.
4099         (remove_bb): Same.
4100         (find_taken_edge): Same.
4101         (tree_cfg2vcg): Same.
4102         (first_stmt): Same.
4103         (last_stmt): Same.
4104         (bsi_move_after): Same.
4105         (bsi_move_before): Same.
4106         (tree_find_edge_insert_loc): Same.
4107         Remove code handling a GIMPLE_MODIFY_STMT inside a RETURN_EXPR.
4108         (delete_tree_cfg_annotations): Remove code to remove annotations.
4109         * tree-ssa-operands.c (struct scb_d): Stmt_p is a gimple *.
4110         (push_stmt_changes): Adjust for tuples.
4111         (mark_difference_for_renaming): Same.
4112         (pop_stmt_changes): Same.
4113         (stmt_references_memory_p): Same.
4115 2007-08-29  Aldy Hernandez  <aldyh@redhat.com>
4117         * tree-ssa-operands.h: Remove DEF_OPS, USE_OPS, VUSE_OPS,
4118         VDEF_OPS, LOADED_SYMS, STORED_SYMS.
4119         * tree-pretty-print.c (dump_generic_node): Adjust accordingly.
4120         (dump_vops): use gimple_v*_ops.  Adjust accordingly.
4121         * gimple.def: Add to comment.
4122         * tree-ssa-alias.c (create_structure_vars): Adjust for tuples.
4123         * tree-flow-inline.h (op_iter_init): Make stmt gimple.  Use
4124         gimple_*_ops functions.
4125         (op_iter_init_use): Make stmt gimple.
4126         (op_iter_init_def): Same.
4127         (op_iter_init_vdef): Same.
4128         (single_ssa_tree_operand): Same.
4129         (single_ssa_use_operand): Same.
4130         (single_ssa_def_operand): Same.
4131         (zero_ssa_operands): Same.
4132         (num_ssa_operands): Same.
4133         (compare_ssa_operands_equal): Make stmt[12] gimple.
4134         (link_use_stmts_after): Adjust for tuples.
4135         * tree-ssa-structalias.c (update_alias_info): Use
4136         gimple_stored_syms and gimple_loaded_syms.
4137         * gimple.h (gimple_has_mem_ops): New.
4138         (gimple_def_ops): New.
4139         (set_gimple_def_ops): New.
4140         (gimple_use_ops): New.
4141         (set_gimple_use_ops): New.
4142         (gimple_vuse_ops): New.
4143         (set_gimple_vuse_ops): New.
4144         (gimple_vdef_ops): New.
4145         (set_gimple_vdef_ops): New.
4146         (gimple_loaded_syms): New.
4147         (gimple_stored_syms): New.
4148         * tree-ssa-operands.c (finalize_ssa_defs): Adjust for tuples.
4149         (copy_virtual_operands): Same.
4150         (swap_tree_operands): Same.
4152 2007-08-28  Aldy Hernandez  <aldyh@redhat.com>
4154         * Revert the parts of Kaveh's constification patch.that duplicate
4155         API calls.
4157 2007-08-27  Diego Novillo  <dnovillo@google.com>
4159         Merge with mainline @127831.
4160         
4161         * configure.ac (ACX_PKGVERSION): Update revision merge string.
4162         * configure: Regenerate.
4163         
4164 2007-08-25  Diego Novillo  <dnovillo@google.com>
4166         * tree.c (build_gimple_modify_stmt_stat): Add depecrate note.
4167         * omp-low.c (scan_omp_1): Disable.
4168         (scan_omp): Likewise.
4169         (lower_omp_for): Likewise.
4170         (lower_omp_parallel): Likewise.
4171         (lower_omp_1): Likewise.
4172         (lower_omp): Likewise.
4173         (diagnose_sb_1): Likewise.
4174         (diagnose_sb_2): Likewise.
4175         (diagnose_omp_structured_block_errors): Likewise.
4176         * tree-gimple.h (_TREE_GIMPLE_H): Rename from _TREE_SIMPLE_H.
4177         (gimplify_body): Return the new GIMPLE body.
4178         (struct walk_stmt_info): Move to gimple.h.
4179         * gimple-low.c (lower_function_body): Assert that the function
4180         body is a single GIMPLE_BIND statement.
4181         Create a new gimple sequence to lower the existing body.
4182         Replace the function body with the new lowered sequence.
4183         (pass_lower_cf): Enable GIMPLE lowering.
4184         (lower_omp_directive): Disable.
4185         (lower_stmt): Do not call lower_omp_directive.
4186         (gimple_stmt_may_fallthru): Factor out of ...
4187         (gimple_seq_may_fallthru): ... here.
4188         * gimple-iterator.c (gsi_replace): New.
4189         * gimple-iterator.h (gsi_replace): Declare.
4190         * gimple-pretty-print.c: Do not include gimple-iterator.h
4191         * gimplify.c (gimplify_asm_expr): Tidy.
4192         Store the whole TREE_LIST node in the inputs and outputs vectors.
4193         (gimple_push_cleanup): Disable completely.
4194         (gimplify_body): Return a GIMPLE_BIND holding the gimplified
4195         body.
4196         Update all users.
4197         (gimplify_function_tree): Create a GIMPLE sequence to hold
4198         the gimplified body.
4199         * tree-flow.h (gimple_stmt_may_fallthru): Declare.
4200         * Makefile.in (GIMPLE_H): Add gimple-iterator.h.
4202 2007-08-25  Diego Novillo  <dnovillo@google.com>
4204         * tree-nested.c: Re-implement to use GIMPLE tuples.
4205         (init_tmp_var_with_call): New.
4206         (init_tmp_var): Adapt to GIMPLE tuples.
4207         (save_tmp_var): Likewise.
4208         (convert_nl_goto_receiver): Likewise.
4209         (finalize_nesting_tree_1): Likewise.
4210         (gsi_gimplify_val): Likewise.
4211         Rename from tsi_gimplify_val.  Update all users.
4212         (walk_asm_expr): Remove.
4213         (walk_stmts): Remove.
4214         (walk_body): Call walk_gimple_seq.
4215         Add new argument callback_op.  Update all users.
4216         (walk_function): Add argument callback_op.  Update all users.
4217         (convert_nonlocal_reference_op): Rename from
4218         convert_nonlocal_omp_reference.  Update all users.
4219         (convert_nonlocal_reference_stmt): New.  Handle GIMPLE
4220         statements that used to be tree nodes.
4221         (convert_local_reference_op): Rename from
4222         convert_local_reference.  Update all users.
4223         (convert_local_reference_stmt): New.  Handle GIMPLE statements
4224         that used to be tree nodes.
4225         (convert_nl_goto_reference): Convert to walk_stmt_fn callback.
4226         Update all users.
4227         (convert_tramp_reference_op): Rename from
4228         convert_tramp_reference.  Update all users.
4229         (convert_tramp_reference_stmt): New.  Handle GIMPLE statements
4230         that used to be tree nodes.
4231         (convert_gimple_call): Rename from convert_call_expr.  Convert
4232         to be a walk_stmt_fn callback.
4233         * gimple.c (gimple_seq_add): Rename from gimple_add.  Update
4234         all users.
4235         (walk_gimple_seq): Rename from walk_seq_ops.  Update all
4236         users.
4237         (walk_gimple_stmt): Rename from walk_tuple_ops.  Update all
4238         users.
4239         Use two callback functions one for statements and another for
4240         operands.  If either is NULL do not invoke it.
4241         Allow callbacks to replace operands.
4242         (WALKIT): Remove.
4243         (walk_gimple_asm): New.
4244         * gimple.h: Include ggc.h
4245         (gimple_seq_alloc): New.  Use everywhere a GIMPLE sequence is
4246         allocated.
4247         (gimple_op_ptr): New.
4248         (gimple_call_arg_ptr): New.
4249         (gimple_catch_types_ptr): New.
4250         (gimple_eh_filter_types_ptr): New.
4251         (gimple_omp_critical_name_ptr): New.
4252         (gimple_omp_for_clauses_ptr): New.
4253         (gimple_omp_for_index_ptr): New.
4254         (gimple_omp_for_initial_ptr): New.
4255         (gimple_omp_for_final_ptr): New.
4256         (gimple_omp_for_incr_ptr): New.
4257         (gimple_omp_parallel_clauses_ptr): New.
4258         (gimple_omp_parallel_child_fn_ptr): New.
4259         (gimple_omp_parallel_data_arg_ptr): New.
4260         (gimple_omp_single_clauses_ptr): New.
4261         (gimple_omp_sections_clauses_ptr): New.
4262         (walk_stmt_fn): New type.
4263         (struct walk_stmt_info): Move from tree-gimple.h.
4264         Rename field callback to callback_op.
4265         Add new field callback_stmt.
4266         Replace field tsi with gsi of type gimple_stmt_iterator.
4267         (walk_gimple_seq): Declare.
4268         (walk_gimple_stmt): Declare.
4269         * tree-cfg.c (execute_build_cfg): Do not call
4270         build_gimple_cfg.
4271         (pass_build_cfg): Enable.
4272         Disable TODO_verify_stmts and TODO_cleanup_cfg.
4274 2007-08-22  Aldy Hernandez  <aldyh@redhat.com>
4276         * tree-phinodes.c (reserve_phi_args_for_new_edge): Comment out
4277         call to phi_nodes_ptr.
4278         (remove_phi_node): Same.
4279         * tree-flow-inline.h (get_lineno): Work with empty statements or
4280         empty locations.
4281         (phi_nodes_ptr): Remove.
4282         (phi_arg_index_from_use): Adjust for tuples.
4283         (bsi_stmt_ptr): Add ATTRIBUTE_UNUSED.
4284         (op_iter_init): Remove assertion.
4285         (next_imm_use_stmt): Change NULL_TREE to NULL.
4286         * tree-dfa.c (mark_symbols_for_renaming): Adjust for tuples.
4287         * tree-flow.h: Remove bb_for_stmt prototype.
4288         (mark_symbols_for_renaming): Make argument gimple.
4290 2007-08-22  Aldy Hernandez  <aldyh@redhat.com>
4292         Change all instances of bb_for_stmt to gimple_bb throughout.
4294         * gimple.h (gimple_omp_parallel_combined_p): New.
4295         * tree-ssa-operands.h (update_stmt_operands): Argument is now
4296         gimple.
4297         * tree-ssa-threadupdate.c (rederiction_block_p): Use gimple_nop_p
4298         instead of IS_EMPTY_STMT.
4299         * tree-ssa-loop-niter.c: Disable use of COND_EXPR_COND.
4300         * tree-pretty-print.c (dump_bb_header): Adjust for tuples.
4301         * cgraph.c (cgraph_add_new_function): Rename
4302         tree_register_cfg_hooks to gimple_register_cfg_hooks.
4303         * value-prof.c (set_histogram_value): Stmt type is now gimple.
4304         (gimple_histogram_value): Same.
4305         (gimple_remove_histogram_value): Same.
4306         (gimple_remove_stmt_histograms): Same.
4307         * tree.h (struct ssa_use_operand_d): Same.
4308         * value-prof.h (struct histogram_value_t): Same.
4309         Change gimple_*histogram* prototypes to use gimple instead of
4310         tree.
4311         * ipa-cp.c (ipcp_insert_stage): Rename tree_register_cfg_hooks to
4312         gimple_register_cfg_hooks.
4313         * cfghooks.c (gimple_register_cfg_hooks): Rename from
4314         tree_register_cfg_hooks.  Initialize cfg_hooks to gimple_cfg_hooks.
4315         (current_ir_type): Rename tree_cfg_hooks to gimple_cfg_hooks.
4316         * input.h (IS_LOCATION_EMPTY): New.
4317         * cfghooks.h: Rename tree_cfg_hooks to gimple_cfg_hooks.  Rename
4318         tree_register_cfg_hooks to gimple_register_cfg_hooks.
4319         * omp-low.c (determine_parallel_type): Adjust for tuples.
4320         (expand_omp_parallel): Rename bb_stmt_list to bb_seq.
4321         (expand_omp_for_generic): Call gimple_omp_return_nowait_p.
4322         (expand_omp_for_static_nochunk): Same.
4323         (expand_omp_sections): Call gimple_omp_section_last_p.
4324         (expand_omp_single): Comment out call to find_omp_clause.
4325         Call gimple_omp_return_nowait_p.
4326         * cgraphunit.c: Rename tree_register_cfg_hooks to
4327         gimple_register_cfg_hooks.
4328         * tree-ssa-propagate.c: Comment out non working code.
4329         * matrix-reorg.c (matrix_reorg): Rename tree_register_cfg_hooks to
4330         gimple_register_cfg_hooks.
4331         * tree-eh.c (add_stmt_to_eh_region_fn): Change `t' type to gimple.
4332         Adjust accordingly.
4333         (add_stmt_to_eh_region): Same.
4334         (remove_stmt_from_eh_region_fn): Same.
4335         (remove_stmt_from_eh_region): Same.
4336         (lookup_stmt_eh_region_fn): Same.
4337         (lookup_stmt_eh_region): Same.
4338         (make_eh_edges): Adjust for tuples.
4339         (stmt_can_throw_internal): Rename from tree_can_throw_internal.
4340         Adjust for tuples.
4341         (maybe_clean_or_replace_eh_stmt): Arg types are now gimple.
4342         * tree-vectorizer.c: Rename tree_register_cfg_hooks to
4343         gimple_register_cfg_hooks.
4344         * tree-if-conv.c (combine_blocks): Adjust for tuples.
4345         * profile.c (branch_prob): Same.
4346         * tree-flow-inline.h (bb_for_stmt): Remove.
4347         (get_lineno): Adjust for tuples.
4348         (noreturn_call_p): Same.
4349         (mark_stmt_modified): Same.
4350         (update_stmt): Same.
4351         (update_stmt_if_modified): Same.
4352         (stmt_modified_p): Same.
4353         (link_imm_use_stmt): Same.
4354         (relink_imm_use_stmt): Same.
4355         (single_imm_use): Same.
4356         (gimple_phi_arg_def): New.
4357         (gimple_phi_arg_edge): New.
4358         (phi_nodes): Adjust for tuples.
4359         (phi_nodes_ptr): Same.
4360         (set_phi_nodes): Same.
4361         (bb_seq): Rename from bb_stmt_list and adjust for tuples.
4362         (set_bb_seq): Rename from set_bb_stmt_list and adjust for tuples.
4363         (bsi_start): Adjust for tuples.
4364         (bsi_after_labels): Adjust for tuples.
4365         (bsi_last): Same.
4366         (bsi_next): Same.
4367         (bsi_prev): Same.
4368         (bsi_stmt): Same.
4369         (bsi_stmt_ptr): Same.
4370         (loop_containing_stmt): Same.
4371         (delink_stmt_imm_use): Same.
4372         (first_imm_use_stmt): Same.
4373         (next_imm_use_stmt): Same.
4374         * gimplify.c (force_gimple_operand_bsi): Same.
4375         * coretypes.h (const_gimple): New.
4376         * tree-ssa-phiopt.c (empty_block_p): Call gimple_nop_p.
4377         (conditional_replacement): Comment out COND_EXPR_COND.
4378         (value_replacement): Comment out COND_EXPR_COND.
4379         (minmax_replacement): Same.
4380         (abs_replacement): Same.
4381         * except.h (*eh_region*): Change trees to gimple.
4382         (struct throw_stmt_node): Change stmt type to gimple.
4383         * cfgexpand.c (label_rtx_for_bb): Adjust for tuples.
4384         (expand_gimple_cond_expr): Same.
4385         (expand_gimple_basic_block): Same.
4386         * tree-cfgcleanup.c (split_bbs_on_noreturn_calls): Same.
4387         * tree-ssa-pre.c (realify_fake_stores): Comment out non working
4388         code.
4389         * tree-ssa-forwprop.c (propagate_with_phi): Rename
4390         tree_can_throw_internal stmt_can_throw_internal.
4391         * tree-inline.c (copy_edges_for_bb): Rename
4392         tree_can_throw_internal to stmt_can_throw_internal.
4393         (initialize_cfun): Same.
4394         (copy_cfg_body): Same.
4395         (gimple_expand_calls_inline): Same.
4396         (make_nonlocal_label_edges): Rename tree_can_make_abnormal_goto to
4397         stmt_can_make_abnormal_goto.
4398         * tree-optimize.c (tree_lowering_passes): Rename
4399         tree_register_cfg_hooks to gimple_register_cfg_hooks.
4400         (tree_rest_of_compilation): Same.
4401         * tree-flow.h (struct gimple_df): Make modified_noreturn_calls a
4402         vector of gimple types.
4403         Adjust prototypes for tuples.
4404         (struct block_stmt_iterator): Make iterator a gimple iterator.
4405         (enum bsi_iterator_update): Remove BSI_CHAIN_START and
4406         BSI_CHAIN_END.
4407         * Makefile.in (tree-cfg.o): Depend on GIMPLE_H.
4408         (GTFILES): Move gimple.[hc] entries before tree-flow.h.
4409         * basic-block.h (struct edge_def): Make goto_locus of type
4410         location_t.
4411         (union basic_block_il_dependent): Adjust for tuples.
4412         (gimple_bb_info): Rename from tree_bb_info.  Adjust for tuples.
4413         * tree-cfg.c: Include gimple.h.
4414         Adjust prototypes for tuples.
4415         (build_gimple_cfg): Rename from build_tree_cfg.  Adjust for
4416         tuples.
4417         (execute_build_cfg): Rename build_tree_cfg call to
4418         build_gimple_cfg.
4419         (factor_computed_gotos): Adjust for tuples.
4420         (make_blocks): Same.
4421         (create_bb): Same.
4422         (fold_cond_expr_cond): Same.
4423         (make_edges): Same.
4424         (make_cond_expr_edges): Same.
4425         (make_switch_expr_edges): Same.
4426         (make_goto_expr_edges): Same.
4427         (cleanup_dead_labels): Same.
4428         (group_case_labels): Same.
4429         (tree_can_merge_blocks_p): Same.
4430         (replace_uses_by): Same.
4431         (tree_merge_blocks): Same.
4432         (is_ctrl): Same.
4433         (is_ctrl_altering_stmt): Same.
4434         (computed_goto_p): Same.
4435         (simple_goto_p): Same.
4436         (stmt_can_make_abnormal_goto): Rename from
4437         tree_can_make_abnormal_goto.
4438         Adjust for tuples.
4439         (stmt_starts_bb_p): Adjust for tuples.
4440         (stmt_ends_bb_p): Same.
4441         (first_stmt): Same.
4442         (last_stmt): Same.
4443         (last_and_only_stmt): Same.
4444         (set_bb_for_stmt): Same.
4445         (change_bb_for_stmt): Same.
4446         (bsi_for_stmt): Same.
4447         (update_modified_stmt): Rename from update_modified_stmts.
4448         Adjust for tuples.
4449         Handle only one statement.
4450         (bsi_insert_before): Adjust for tuples.
4451         (bsi_insert_after): Same.
4452         (bsi_insert_seq_before): New.
4453         (bsi_insert_seq_after): New.
4454         (bsi_remove): Ajust for tuples.
4455         (bsi_replace): Same.
4456         (verify_stmt): Same.
4457         (gimple_split_block): Rename from tree_split_block.
4458         Adjust for tuples.
4459         (tree_purge_dead_abnormal_call_edges): Adjust for tuples.
4460         (tree_cfg_hooks): Same.
4461         * tree-ssa-operands.c (update_stmt_operands): Same.
4463 2007-08-22  Aldy Hernandez  <aldyh@redhat.com>
4465         * Makefile.in (TREE_GIMPLE_H): Depend on GIMPLE_H.
4466         * gimple-iterator.h: Do not include gimple.h.
4467         * gimple.h (OMP_SECTION_LAST_FLAG): New.
4468         (gimple_omp_return_nowait_p): New.
4469         (gimple_omp_section_last_p): New.
4470         (gimple_switch_set_num_labels): New.
4471         (gimple_nop_p): New.
4472         
4473 2007-08-17  Aldy Hernandez  <aldyh@redhat.com>
4475         Revert this change:
4477         2007-08-14  Aldy Hernandez  <aldyh@redhat.com>
4479         * gimple.c (gimple_call_flags): Make sure this is a GIMPLE_CALL.
4480         
4481 2007-08-14  Aldy Hernandez  <aldyh@redhat.com>
4483         * gimple-iterator.c (gsi_split_seq_after): New.
4484         (gsi_split_seq_before): New.
4485         * gimple-iterator.h: Prototype above two functions.
4486         
4487 2007-08-14  Aldy Hernandez  <aldyh@redhat.com>
4489         * gimple.h (gimple_has_ops): New.
4490         (gimple_modified): New.
4491         (set_gimple_modified): New.
4492         (gimple_switch_default_label): Call gimple_switch_label.
4493         (gimple_switch_set_default_label): Call gimple_switch_set_label.
4495 2007-08-14  Aldy Hernandez  <aldyh@redhat.com>
4497         * gimple.c (gimple_call_flags): Make sure this is a GIMPLE_CALL.
4498         
4499 2007-08-14  Diego Novillo  <dnovillo@google.com>
4501         Merge with mainline @127480.
4503         * version.c (VERSUFFIX): Update.
4504         
4505 2007-08-09  Diego Novillo  <dnovillo@google.com>
4507         * gimple-low.c: Document conversion to Low GIMPLE.
4508         * Makefile.in (gimple.o): Add dependency on gt-gimple.h
4509         (GTFILES): Add gimple.c.
4510         * gimple.c (gimple_bodies_vec): New.
4511         (gimple_bodies_map): Rename from gimple_bodies.
4512         (gss_for_code): Return GSS_ASM for GIMPLE_ASM.
4513         (walk_tuple_ops): Handle GSS_ASM like GSS_WITH_OPS.
4514         (set_gimple_body): Push body into gimple_bodies_vec and create
4515         a mapping to array index in gimple_bodies_map.
4516         (gimple_body): Corresponding changes to use gimple_bodies_map
4517         and gimple_bodies_vec.
4518         * gimple.h: Create VEC templates for gimple_seq.
4520 2007-08-08  Aldy Hernandez  <aldy@quesejoda.com>
4522         * gimple-low.c (struct return_statements_t): Declare.
4523         (struct lower_data): Make return_statements a vector.
4524         (lower_function_body): Adjust for tuples.
4525         (pass_lower_cf): Add PROP_gimple_any to properties_required.
4526         (lower_sequence): Rename from lower_stmt_body.
4527         Adjust for tuples.
4528         (lower_omp_directive): Adjust for tuples.
4529         (lower_stmt): Same.
4530         (lower_gimple_bind): Rename from lower_bind_expr.
4531         Adjust for tuples.
4532         (gimple_try_catch_may_fallthru): New.
4533         (gimple_seq_may_fallthru): New.
4534         (lower_gimple_return): Rename from lower_return_expr and adjust
4535         for tuples.
4536         (lower_builtin_setjmp): Adjust for tuples.
4537         * gimple-iterator.c: New.
4538         * gimple-iterator.h: Include gimple.h.
4539         (enum gsi_iterator_update): Declare.
4540         (gsi_link_seq_before): New prototype.
4541         (gsi_link_before): Same.
4542         (gsi_link_seq_after): Same.
4543         (gsi_link_after): Same.
4544         (gsi_delink): Same.
4545         * gimplify.c (gimplify_body): Comment out verify_gimple_1 call.
4546         * tree-flow.h (gimple_seq_may_fallthru): New prototype.
4547         * Makefile.in (OBJS-common): Add gimple-iterator.o.
4548         (gimple-iterator.o): New.
4549         (gimple-pretty-print.o): Do not depend on gimple-iterator.h.
4550         * gimple.c (set_gimple_prev): Move to gimple.h.
4551         (set_gimple_next): Same.
4552         (gimple_call_flags): New.
4553         * gimple.h (struct gimple_sequence): Add GTY marker.
4554         (struct gimple_statement_bind): Add block field.
4555         (set_gimple_prev): New.
4556         (set_gimple_next): New.
4557         (gimple_call_flags): Protoize.
4558         (gimple_call_fndecl): New.
4559         (gimple_bind_block): New.
4560         (gimple_bind_set_block): New.
4563 2007-08-08  Diego Novillo  <dnovillo@google.com>
4565         * gimple.h (GIMPLE_CHECK, GIMPLE_CHECK2, GIMPLE_RANGE_CHECK):
4566         Do not return the checked statement.  Update all users.
4567         Enable on compilers other than GCC.
4569 2007-08-07  Chris Matthews  <chrismatthews@google.com>
4571         * gimple_iterator.h (gsi_start): Changed to produce a pointer instead of
4572         struct.  Updated clients.
4573         (gsi_last): Same.
4574         (gsi_end_p): Changed to operate on a pointer instead of struct.  Updated
4575         clients.
4576         (gsi_one_before_end_p): Same.
4577         (gsi_next): Same.
4578         (gsi_prev): Same.
4579         (gsi_stmt): Same.
4580         
4581 2007-08-07  Diego Novillo  <dnovillo@google.com>
4583         Merge with mainline @127277.
4585         * version.c (VERSUFFIX): Update.
4587 2007-08-07  Diego Novillo  <dnovillo@google.com>
4589         * gimple.h (gimple_call_return): New.
4590         * gimplify.c (get_tmp_var_for): Call it.
4592 2007-08-02  Chris Matthews  <chrismatthews@google.com>
4594         * gimplify.c (gimplify_asm_expr): Created new gimple tuple.
4595         * gimple-pretty-printer.c (dump_gimple_asm): Added function to dump a
4596         GIMPLE_ASM statement.
4597         (dump_gimple_stmt): Updated to use the dump_gimple_asm function.
4598         * gimple.c (gss_for_code): Made asm statements return as with_mem_ops.
4599         (build_gimple_with_ops): Asm statements are added as a specal case for
4600         allocation because they have extra fields that are not
4601         allocated correctly in the current generic op allocator.
4602         (build_gimple_asm_1): Added a helper function to setup the basics of a
4603         GIMPLE_ASM tuple.
4604         (build_gimple_asm_vec): Create a GIMPLE_ASM tuple from vector arguments.
4605         (build_gimple_asm): Changed to call the new helper function.
4607 2007-08-03  Diego Novillo  <dnovillo@google.com>
4609         * gimple-pretty-print.c (INDENT): Tidy.
4610         (dump_binary_rhs): New.
4611         (dump_gimple_assign): Call it.
4612         * gimplify.c (gimplify_modify_expr_complex_part): If the value
4613         is not interesting, nullify *EXPR_P.
4614         (gimplify_body): Do not add the sequence to the GIMPLE_BIND more
4615         than once.
4617 2007-08-01  Diego Novillo  <dnovillo@google.com>
4619         * gimplify.c (gimplify_switch_expr): Remove switch_body_seq_.
4620         Change switch_body_seq to struct gimple_sequence.
4621         Adjust all uses.
4622         Call gimplify_stmt instead of gimplify_statement_list
4623         (gimplify_to_stmt_list): Remove.
4624         Update all users.
4625         * tree-mudflap.c: Include gimple.h
4626         (mf_decl_cache_locals): Convert to emit GIMPLE.
4627         (mf_build_check_statement_for): Add FIXME and unreachable
4628         markers to convert to GIMPLE.
4629         * Makefile.in (tree-mudflap.o): Depend on $(GIMPLE_H).
4630         * config/i386/i386.c (ix86_gimplify_va_arg): Adapt to emit
4631         GIMPLE.
4633 2007-08-01  Diego Novillo  <dnovillo@google.com>
4635         * gimplify.c (gimplify_switch_expr): Do not call sort_case_labels
4636         if there are no labels other than 'default'.
4637         * gimple.h (gimple_num_ops, gimple_op, gimple_set_op): Use
4638         result of GIMPLE_RANGE_CHECK call.
4640 2007-08-01  Diego Novillo  <dnovillo@google.com>
4642         * DEV-PHASE: Revert to mainline version.
4643         * version.c (VERSUFFIX): Add branch name and revision number
4644         of latest mainline merge.
4646 2007-07-31  Diego Novillo  <dnovillo@google.com>
4648         Mainline merge (@127100).
4649         * DEV-PHASE: Updated.
4651 2007-07-31  Diego Novillo  <dnovillo@google.com>
4653         * dominance.c (free_dominance_info): If there is no CFG,
4654         do nothing.
4655         * cfg.c (compact_blocks): Likewise.
4657 2007-07-30  Diego Novillo  <dnovillo@google.com>
4659         * gimplify.c (get_tmp_var_for): When creating a new temporary
4660         for a GIMPLE_CALL, use the type returned by the function call
4661         instead of the type of the function decl.
4662         * gimple.c (build_gimple_return): Accept NULL and RESULT_DECL
4663         return values.
4665 2007-07-30  Diego Novillo  <dnovillo@google.com>
4667         * gimplify.c (gimplify_init_constructor): If both sides
4668         of the constructor are in GIMPLE form but the assignment
4669         has not been emitted, emit it.
4671 2007-07-28  Diego Novillo  <dnovillo@google.com>
4673         * gimplify.c (gimplify_return_expr): Do not create a MODIFY_EXPR
4674         as return argument
4675         * gimple.c (build_gimple_return): Assert that the returned value
4676         is a GIMPLE value.
4678 2007-07-27  Diego Novillo  <dnovillo@google.com>
4680         * tree-gimple.c (get_gimple_rhs_class): New.
4681         (is_gimple_formal_tmp_rhs): Call it.
4682         * tree-gimple.h (enum gimple_rhs_class): New.
4683         * gimple-iterator.h (gsi_next): Assert that there is nothing
4684         beyond the end of the sequence.
4685         (gsi_prev): Assert that there is nothing before the start of
4686         the sequence.
4687         * gimplify.c (gimplify_switch_expr): Tidy creation of default label.
4688         (gimplify_expr): Fix concatenation of internal sequences to PRE_P.
4689         * gimple.c (get_num_ops_for): Remove.  Update users.
4690         (build_gimple_assign): Call get_gimple_rhs_class to determine
4691         how many operands to allocate.
4692         (gimple_add): Assert that GS does not have previous or next
4693         statements.
4694         (gimple_seq_append): Move from gimple.h.
4696 2007-07-27  Aldy Hernandez  <aldy@quesejoda.com>
4698         * cgraph.c: Fix line wrap.
4699         * cgraph.h: Same.
4700         * tree-pass.h (struct tree_opt_pass): Add works_with_tuples_p
4701         field.
4702         * cgraphunit.c (cgraph_analyze_functions): Remove check for
4703         DECL_SAVED_TREE.
4704         (cgraph_expand_function): Comment out TREE_ASM_WRITTEN assertion.
4705         * tree-optimize.c (tree_lowering_passes): Comment out call to
4706         compact_blocks.
4707         * passes.c (execute_one_pass): Return if pass has not been
4708         converted to tuples.
4709         * tree-vrp.c, regrename.c, fwprop.c, tree-into-ssa.c,
4710         tree-complex.c, see.c, cgraphbuild.c, tracer.c, cgraph.c,
4711         postreload-gcse.c, postreload.c, tree-ssa-loop-ch.c,
4712         tree-tailcall.c, tree-pass.h, ipa-cp.c, final.c, omp-low.c,
4713         tree-ssa-dse.c, ipa-reference.c, tree-ssa-uncprop.c,
4714         auto-inc-dec.c, reorg.c, tree-ssa-copyrename.c, tree-ssa-ccp.c,
4715         df-core.c, mode-switching.c, tree-nomudflap.c, modulo-sched.c,
4716         ipa-pure-const.c, cse.c, web.c, tree-stdarg.c,
4717         tree-ssa-math-opts.c, tree-ssa-dom.c, tree-nrv.c,
4718         tree-ssa-alias.c, loop-init.c, gimple-low.c, tree-ssa-sink.c,
4719         ipa-inline.c, global.c, jump.c, ifcvt.c, predict.c,
4720         tree-ssa-loop.c, recog.c, dse.c, tree-ssa-ifcombine.c,
4721         matrix-reorg.c, c-decl.c, tree-eh.c, regmove.c, local-alloc.c,
4722         function.c, tree-vectorizer.c, gcse.c, ipa-type-escape.c,
4723         tree-if-conv.c, init-regs.c, ipa.c, tree-ssa-phiopt.c,
4724         rtl-factoring.c, lower-subreg.c, bt-load.c, tree-dfa.c except.c,
4725         emit-rtl.c, cfgexpand.c, tree-cfgcleanup.c, cfgcleanup.c,
4726         tree-ssa-pre.c, tree-sra.c, tree-mudflap.c, tree-ssa-copy.c,
4727         cfglayout.c, tree-ssa-forwprop.c, tree-ssa-dce.c, tree-ssa.c,
4728         regclass.c, integrate.c, tree-optimize.c, tree-object-size.c,
4729         combine.c, tree-outof-ssa.c, bb-reorder.c, stack-ptr-mod.c,
4730         var-tracking.c, tree-profile.c, tree-vect-generic.c, reg-stack.c,
4731         sched-rgn.c, tree-ssa-structalias.c, tree-cfg.c, passes.c,
4732         tree-ssa-reassoc.c, combine-stack-adj.c, cfgrtl.c, dce.c,
4733         tree-ssanames.c: Set works_with_tuples_p field to 0.
4735 2007-07-25  Diego Novillo  <dnovillo@google.com>
4737         * gimple.c: Use ENABLE_GIMPLE_CHECKING instead of
4738         ENABLE_TREE_CHECKING.
4739         (set_gimple_code): New.
4740         (set_gimple_prev): New.
4741         (set_gimple_next): New.
4742         * gimple.h: Use ENABLE_GIMPLE_CHECKING instead of
4743         ENABLE_TREE_CHECKING.
4744         (gimple_code): Inline function replacement for GIMPLE_CODE.
4745         (gimple_flags): Inline function replacement for GIMPLE_SUBCODE_FLAGS.
4746         (gimple_next): Inline function replacement for GIMPLE_NEXT.
4747         (gimple_prev): Inline function replacement for GIMPLE_PREV.
4748         (gimple_locus): Inline function replacement for GIMPLE_LOCUS.
4749         (gimple_locus_empty_p): Inline function replacement for
4750         GIMPLE_LOCUS_EMPTY_P.
4751         (struct gimple_statement_base): Rename field 'subcode_flags'
4752         to 'flags'.
4753         (set_gimple_flags): New.
4754         (gimple_bb): New.
4755         (set_gimple_bb): New.
4756         (set_gimple_block): New.
4757         (set_gimple_locus): New.
4758         (add_gimple_flag): Rename from gimple_add_subcode_flag.
4760 2007-07-25  Diego Novillo  <dnovillo@google.com>
4762         * tree-gimple.h (build_gimple_eh_filter_tree): Rename from
4763         gimple_build_eh_filter_tree.
4764         * gimple.h (build_gimple_return): Rename from gimple_build_return.
4765         (build_gimple_assign): Rename from gimple_build_assign.
4766         (build_gimple_call_vec): Rename from gimple_build_call_vec.
4767         (build_gimple_call): Rename from gimple_build_call.
4768         (build_gimple_label): Rename from gimple_build_label.
4769         (build_gimple_goto): Rename from gimple_build_goto.
4770         (build_gimple_nop): Rename from gimple_build_nop.
4771         (build_gimple_bind): Rename from gimple_build_bind.
4772         (build_gimple_asm): Rename from gimple_build_asm.
4773         (build_gimple_catch): Rename from gimple_build_catch.
4774         (build_gimple_eh_filter): Rename from gimple_build_eh_filter.
4775         (build_gimple_try): Rename from gimple_build_try.
4776         (build_gimple_phi): Rename from gimple_build_phi.
4777         (build_gimple_resx): Rename from gimple_build_resx.
4778         (build_gimple_switch): Rename from gimple_build_switch.
4779         (build_gimple_switch_vec): Rename from gimple_build_switch_vec.
4780         (build_gimple_omp_parallel): Rename from gimple_build_omp_parallel.
4781         (build_gimple_omp_for): Rename from gimple_build_omp_for.
4782         (build_gimple_omp_critical): Rename from gimple_build_omp_critical.
4783         (build_gimple_omp_section): Rename from gimple_build_omp_section.
4784         (build_gimple_omp_continue): Rename from gimple_build_omp_continue.
4785         (build_gimple_omp_master): Rename from gimple_build_omp_master.
4786         (build_gimple_omp_return): Rename from gimple_build_omp_return.
4787         (build_gimple_omp_ordered): Rename from gimple_build_omp_ordered.
4788         (build_gimple_omp_sections): Rename from gimple_build_omp_sections.
4789         (build_gimple_omp_single): Rename from gimple_build_omp_single.
4790         Update all users.
4792 2007-07-24  Chris Matthews  <chrismatthews@google.com>
4794         * configure.ac: Added support for ENABLE_GIMPLE_CHECKING and the
4795         --enable-checking=gimple flag.
4796         * config.in: Same.
4797         * configure: Regenerated.
4798         * gimplify.c (cpt_same_type): Same.
4799         (gimple_push_condition): Same.
4800         (gimplify_addr_expr): Same.
4801         (gimplify_expr): Same.
4802         (gimplify_body): Same.
4803         (check_pointer_types_r): Same.
4805 2007-07-24  Diego Novillo  <dnovillo@google.com>
4807         * gimple.def: Re-organize codes that take tree operands so
4808         they are consecutive.
4809         * gsstruct.def (GSS_LABEL, GSS_ASSIGN_BINARY, GSS_ASSIGN_UNARY_REG,
4810         GSS_ASSIGN_UNARY_MEM, GSS_COND, GSS_GOTO, GSS_SWITCH, GSS_CALL,
4811         GSS_RETURN): Remove.  Update al users.
4812         * gimple.c (gss_for_code): New.
4813         (gimple_statement_structure): Call it.
4814         (get_num_ops_for): New.
4815         (gimple_build_with_ops): New.
4816         (gimple_build_return, gimple_build_call_1, gimple_build_assign,
4817         gimple_build_cond, gimple_build_label, gimple_build_goto,
4818         gimple_build_switch_1, ): Call it.
4819         (gss_for_assign): Remove.  Update all users.
4820         (gimple_check_failed): Do not assume that subcode is a valid tree
4821         code.
4822         (gimple_range_check_failed): New.
4823         (walk_tuple_ops): Implement in terms of gimple_num_ops and
4824         gimple_op when dealing with GSS_WITH_OPS and GSS_WITH_MEM_OPS
4825         statements.
4826         * gimple.h (struct gimple_statement_with_ops): Add fields 'num_ops'
4827         and 'op'.
4828         (struct gimple_statement_label, gimple_statement_assign_binary,
4829         gimple_statement_assign_unary_reg, gimple_statement_assign_unary_mem,
4830         gimple_statement_cond, gimple_statement_goto, gimple_statement_switch,
4831         gimple_statement_call, gimple_statement_return): Remove.
4832         Update all users.
4833         (gimple_range_check_failed): Declare.
4834         (GIMPLE_RANGE_CHECK): Define.
4835         (gimple_num_ops): New.
4836         (gimple_op): New.
4837         (gimple_set_op): New.
4838         (gimple_assign_rhs1): Rename from gimple_assign_binary_rhs1.
4839         (gimple_assign_set_rhs1): Rename from gimple_assign_binary_set_rhs1.
4840         (gimple_assign_rhs2): Rename from gimple_assign_binary_rhs2.
4841         (gimple_assign_set_rhs2): Rename from gimple_assign_binary_set_rhs2.
4842         (gimple_assign_unary_rhs): Remove.  Update all users.
4843         (gimple_assign_unary_set_rhs): Likewise.
4844         (gimple_switch_num_labels): Rename from gimple_switch_nlabels.
4845         (gimple_call_fn, gimple_call_lhs, gimple_call_chain,
4846         gimple_call_set_chain, gimple_call_nargs, gimple_call_arg,
4847         gimple_call_set_arg, gimple_cond_lhs, gimple_cond_set_lhs,
4848         gimple_cond_rhs, gimple_cond_set_rhs, gimple_cond_true_label,
4849         gimple_cond_false_label, gimple_cond_set_true_label,
4850         gimple_cond_set_false_label, gimple_label_label,
4851         gimple_label_set_label, gimple_goto_dest,
4852         gimple_goto_set_dest, gimple_asm_input_op,
4853         gimple_asm_set_input_op, gimple_asm_output_op,
4854         gimple_asm_set_output_op, gimple_asm_clobber_op,
4855         gimple_asm_set_clobber_op, gimple_switch_num_labels,
4856         gimple_switch_index, gimple_switch_set_index,
4857         gimple_switch_default_label, gimple_switch_set_default_label,
4858         gimple_switch_label, gimple_switch_set_label,
4859         gimple_return_retval, gimple_return_set_retval): Implement
4860         using the array of operands in field 'with_ops'.
4861         (gimple_asm_set_ninputs, gimple_asm_set_noutputs,
4862         gimple_asm_set_nclobbered, gimple_asm_set_string): Remove.
4863         Update all users.
4866 2007-07-24  Aldy Hernandez  <aldyh@redhat.com>
4868         * tree.c (get_callee_fndecl): Revert previous change.
4869         * gimplify.c (gimplify_call_expr): Use result from
4870         get_callee_fndecl if available.
4871         * c-common.c (c_warn_unused_result): Do not use
4872         get_callee_fndecl.
4873         Add assertion.
4875 2007-07-24  Diego Novillo  <dnovillo@google.com>
4877         Merge with mainline (@126872)
4879 2007-07-23  Aldy Hernandez  <aldyh@redhat.com>
4881         * tree.c (get_callee_fndecl): Work when only the CALL_EXPR_FN has
4882         been passed.
4883         * c-common.c (c_warn_unused_result): Use get_callee_fndecl.
4884         
4885 2007-07-23  Aldy Hernandez  <aldyh@redhat.com>
4887         * c-decl.c: Include gimple.h.
4888         (c_gimple_diagnostics_recursively): Call c_warn_unused_result with
4889         tuplified body.
4890         Exit if -fgimple-only.
4891         * gimplify.c (gimplify_call_expr): Call gimple_build_call_vec with
4892         the correct callee.
4893         * c-gimplify.c (c_genericize): Remove exit.
4894         * c-common.c: Include gimple.h.
4895         (c_warn_unused_result): Tuplify.
4896         * c-common.h (c_warn_unused_result): Protoize.
4897         * Makefile.in (c-decl.o): Depend on GIMPLE_H.
4898         (c-common.o): Same.
4899         * gimple.c (gimple_build_catch): Handler is a sequence.
4900         Adjust accordingly.
4901         (gimple_build_eh_filter): Failure is a sequence.
4902         Adjust accordingly.
4903         (walk_tuple_ops): case GIMPLE_CATCH: Walk handler as a sequence.
4904         case GIMPLE_EH_FILTER: Walkder failure as a sequence.
4905         * gimple.h (gimple_statement_catch): Make handler a sequence.
4906         (gimple_statement_eh_filter): Make failure a sequence.
4907         (gimple_build_catch): Make second argument a sequence.
4908         (gimple_build_eh_filter): Same.
4909         (gimple_catch_handler): Return a sequence.
4910         (gimple_catch_set_handler): Make second argument a sequence.
4911         (gimple_eh_filter_failure): Return a sequence.
4912         (gimple_eh_filter_set_failture): Make second argument a sequence.
4914 2007-07-20  Aldy Hernandez  <aldyh@redhat.com> 
4916         * gimplify.c (gimplify_return_expr): Handle an empty ret_expr
4917         gracefully.
4919 2007-07-19  Aldy Hernandez  <aldyh@redhat.com> 
4921         * testsuite/gcc.dg/gimple/instrument.c: New.
4922         * gimplify.c (gimplify_function_tree): Generate tuples for function
4923         instrumentation.
4925 2007-07-18  Aldy Hernandez  <aldyh@redhat.com> 
4927         * gimplify.c (gimple_add_tmp_var): Remove abort.  Add comment.
4928         
4929 2007-07-18  Aldy Hernandez  <aldyh@redhat.com> 
4931         * gimplify.c (gimple_add_tmp_var): Remove abort.  Add comment.
4933 2007-07-18  Aldy Hernandez  <aldyh@redhat.com> 
4935         * gimplify.c (gimplify_and_add): Remove unecessary temporary sequence.
4936         Remove fixme.  Add comment.
4937         (gimplify_loop_expr): Tuplefy.
4938         (gimplify_bind_expr): Streamline GIMPLE_TRY_FINALLY tuple.
4939         (gimplify_expr): Tuplefy TRY_*_EXPR cases.
4940         * gimple.c: Fix some spacing.
4941         (gimple_build_try, gimple_omp_build_*): Handle empty sequences.
4942         (gimple_push): Remove.
4943         * gimple.h (gimple_push): Remove.
4945 2007-07-18  Aldy Hernandez  <aldyh@redhat.com> 
4947         * tree-gimple.h (declare_vars): Update arguments.
4948         * gimplify.c (pop_gimplify_context): Enable call to declare_vars.
4949         (declare_vars): Convert to use tuples.
4950         (gimple_add_tmp_var): Same.
4951         * gimple.h (GIMPLE_BLOCK): New.
4953 2007-07-17  Chris Matthews  <chrismatthews@google.com>
4955         * gimplify.c (gs_build_eh_filter): Renamed to gs_build_eh_filter_tree
4956         to avoid name conflict.
4957         * gimple-pretty-print.c: Renamed to debug_gs_* to debug_gimple_*.
4958         Updated all users.
4959         * gimple.h: Renamed all functions with GS and gs prefixes to GIMPLE and
4960         gimple, and updated users.
4961         Renamed gs_seq_* functions to gimple_seq_*. Updated all users. 
4962         * gimple.def: Definitions changed to from GS_* to GIMPLE_*.
4964 2007-07-16  Chris Matthews  <chrismatthews@google.com>
4966         * gimple.c (gs_build_switch): Changed nlabels to represent total number
4967         of labels including the default.
4968         (gs_build_switch_1): Same.
4969         (walk_tuple_ops): Same.
4970         * gimple-pretty-print.c (dump_gs_switch): Same.
4972 2007-07-16  Aldy Hernandez  <aldyh@redhat.com> 
4974         * gimplify.c (gimplify_ctx): Rename current_bind_expr_seq to
4975         bind_expr_stack and make it a vector.
4976         (push_gimplify_context): Adjust bind_expr_stack for vectors.
4977         (pop_gimplify_context): Same.
4978         (gimple_push_bind_expr): Same.
4979         (gimple_pop_bind_expr): Same.
4980         (gimple_current_bind_expr): Same.
4981         (get_tmp_var_for): Use ``code''.
4982         (gimplify_bind_expr): Remove comment.
4983         (gimplify_case_label_expr): Add whitespace.
4984         * gimple.c (gs_pop): Remove.
4985         * gimple.h: Define vectors of a gimple type.
4986         (gs_pop): Remove prototype.
4987         * Makefile.in (GIMPLE_H): Add vec.h.
4989 2007-07-15  Diego Novillo  <dnovillo@google.com>
4991         * gimple.c: Rename from gimple-ir.c.
4992         Update all users.
4993         * gimple.h: Rename from gimple-ir.h.
4994         Update all users.
4996 2007-07-15  Diego Novillo  <dnovillo@google.com>
4998         * gimple-ir.c (gimple_statement_structure): Remove code
4999         after gcc_unreachable call.
5000         * gimplify.c (get_tmp_var_for): New.
5001         (gimplify_call_expr): Call it.
5003 2007-07-14  Aldy Hernandez  <aldyh@redhat.com> 
5005         * testsuite/gcc.dg/gimple/with_size_expr.c: Check for GS_TRY.
5006         * Makefile.in (gimple-ir.o): Add diagnostic.h dependency.
5007         * gimple-pretty-print.c (dump_gs_call): Dump LHS if available.
5008         (dump_gs_try): New.
5009         (dump_gimple_stmt): Add case for GS_TRY.
5010         * gimple-ir.c.  Include diagnostic.h.
5011         (gs_build_try): Cleanup and eval are sequences.
5012         Remove catch_p and finally_p arguments.  Add catch_finally argument.
5013         (gs_omp_build_critical): Body is a gs_seq.
5014         (gs_omp_build_parallel): Same.
5015         (gs_omp_build_section): Same.
5016         (gs_omp_build_master): Same.
5017         (gs_omp_build_continue): Same.
5018         (gs_omp_build_ordered): Same.
5019         (gs_omp_build_sections): Same.
5020         (gs_omp_build_single): Same.
5021         (gs_omp_build_for): Body and pre_body is a gs_seq.
5022         (gs_push): New.
5023         (gs_pop): New.
5024         (walk_tuple_ops): Walk GS_TRY tuples eval and cleanups correctly.
5025         Dump tuple before we ICE.
5026         * gimple-ir.h (gs_seq_copy): New.
5027         (struct gimple_statement_try): Eval and cleanups are gs_seq's.
5028         (gs_bind_set_body): Use gs_seq_copy.
5029         (gs_try_eval): Return address of eval.
5030         (gs_try_cleanup): Return address of cleanup.
5031         (gs_try_set_eval): Use gs_seq_copy.
5032         (gs_try_set_cleanup): Same.
5033         (gs_omp_set_body): Same.
5034         (gs_omp_for_set_pre_body): Same.
5035         * gimplify.c (struct gimplify_ctx): Rename current_bind_expr to
5036         current_bind_expr_seq, and make it a sequence.
5037         (pop_gimplify_context): Adjust for current_bind_expr_seq.
5038         (gimple_push_bind_expr): Same.
5039         (gimple_pop_bind_expr): Same.
5040         (gimple_current_bind_expr): Same.
5041         (build_stack_save_restore): Generate tuples.
5042         (gimplify_bind_expr): Same.
5044 2007-07-13  Diego Novillo  <dnovillo@google.com>
5046         * gimple-ir.c (gs_add): Swap arguments.
5047         Update all users.
5048         * gimple-ir.h (gs_seq_append): Likewise.
5050 2007-07-12  Diego Novillo  <dnovillo@google.com>
5052         * tree.c (create_artificial_label): Move from gimplify.c
5053         (get_name): Likewise.
5054         * tree.h (create_artificial_label, get_name): Move
5055         declarations earlier in the file.
5056         * diagnostic.h (dump_gimple_stmt, print_gimple_stmt,
5057         dump_gimple_seq): Rearrange.
5058         * tree-gimple.h (gimplify_function_tree): Move from tree.h.
5059         * gimple-pretty-print.c (do_niy): Tidy.
5060         (maybe_init_pretty_print): Add comment.
5061         (newline_and_indent): Likewise.
5062         Remove "gimpleir: " prefix.
5063         (debug_gimple_stmt): Add comment.
5064         (dump_gs_seq): Remove.
5065         (dump_gimple_seq): Add argument SPC.
5066         Update all users.
5067         If FLAGS contains TDF_DETAILS, emit "gimpleir:" prefix.
5068         (dump_gs_cond): If FLAGS contains TDF_DETAILS, emit
5069         "gimpleir:" prefix.
5070         (dump_gs_bind): Likewise.
5071         * function.h (struct function): Remove field 'gimplified'.
5072         * gimple-ir.c (gimple_bodies): New private variable.
5073         (set_gimple_body): New.
5074         (gimple_body): New.
5075         * gimple-ir.h: Include pointer-set.h.
5076         Add comment before data structure definitons.
5077         (set_gimple_body): Declare.
5078         (gimple_body): Declare.
5079         * gimplify.c (create_artificial_label): Move to tree.c
5080         (get_name): Likewise.
5081         (gimplify_function_tree): Change return type to void.
5082         Call set_gimple_body after gimplification and nullify
5083         DECL_SAVED_TREE.
5084         Update all callers.
5085         * common.opt (fgimple-only): New option.
5086         * tree-optimize.c (tree_rest_of_compilation): Do not nullify
5087         DECL_SAVED_TREE.
5088         * c-gimplify.c (c_genericize): Restore gimplification logic to
5089         mainline version.
5090         If -fgimple-only was given, exit.
5091         * Makefile.in (GIMPLE_IR_H): Add pointer-set.h
5092         * tree-cfg.c (execute_build_cfg): Nullify GIMPLE body after
5093         building the CFG.
5094         (dump_function_to_file): If DECL_SAVED_TREE is NULL dump the
5095         GIMPLE body of the function.
5097 2007-07-12  Diego Novillo  <dnovillo@google.com>
5099         * omp-low.c (lower_regimplify): Use a local GIMPLE sequence to
5100         hold the result from gimplification.
5101         * tree-gimple.c (is_gimple_min_val): Reformat.
5102         * tree-gimple.h (enum fallback_t): Document values.
5103         (gimplify_expr): Remove IS_STATEMENT argument.
5104         Update all users.
5105         * langhooks.c (lhd_gimplify_expr): Likewise.
5106         * gimplify.c (gimplify_statement_list): If a temporary
5107         was returned from voidify_wrapper_expr abort to mark the failure.
5108         (gimplify_expr): Remove argument IS_STATEMENT.
5109         Update all users.
5110         Assert that FALLBACK is used with the appropriate GIMPLE_TEST_F
5111         Restore logic to use internal queue.
5112         Do not abort if on return from gimplify_call_expr, *EXPR_P has
5113         a CALL_EXPR.
5115 2007-07-12  Aldy Hernandez  <aldyh@redhat.com>
5117         * gimple-ir.c (gs_build_switch_1): Allocate one less tree.
5118         (gs_build_switch_1): Offset labels by one.
5119         (gs_switch_label): Same.
5120         (gs_switch_set_label): Same.
5122 2007-07-12  Aldy Hernandez  <aldyh@redhat.com>
5124         * gimple-ir.c (walk_seq_ops): Rename from walk_tree_seq.
5125         (walk_tuple_ops): Rename from walk_tree_tuple.
5126         * gimple-ir.h, gimplify.c, gimple-ir.c: Rename all calls to
5127         walk_tree_seq and walk_tree_tuple accordingly.
5129 2007-07-12  Aldy Hernandez  <aldyh@redhat.com>
5131         * gimple-ir.c (gs_build_switch_1): Fix spacing.
5132         Allocate one more tree.
5133         (gs_build_switch): Set labels starting at 1.
5134         (walk_tree_seq): New.
5135         (walk_tree_tuple): New.
5136         * gimple-ir.h: Add prototypes for walk_tree_tuple and walk_tree_seq.
5137         * gimplify.c (check_pointer_types_r): Uncomment.
5138         (gimplify_body): Walk gimple sequence with check_pointer_types_r.
5140 2007-07-11  Chris Matthews  <chrismatthews@google.com> 
5142         * tree-pretty-print.c (dump_generic_node): Removed space before default
5143         label colon.
5144         * tree.h (sort_case_labels): Moved to gimple-ir.h.
5145         * gimplify.c (sort_case_labels): Changed to a vector instead of tree
5146         vector.
5147         (gimplify_switch_expr): Initial implementation with tuples.
5148         (gimplify_expr): Changed gimplify_case_label_expr parameter.
5149         (gimplify_case_label_expr): Added a gs_seq parameter, and put cases in
5150         that.
5151         (dump_gimple_stmt): Removed semicolon.
5152         (dump_gs_label):  Refactored from dump_gimple_expr.
5153         (dump_gs_switch): Added.
5154         (gs_build_switch_vec): Added.
5155         * gimple-ir.c (gs_build_switch_1): Added.
5156         (gs_build_switch): Refactored to use gs_build_switch_1.
5157         (gs_build_switch_vec): Added.
5158         * gs_switch.c: New test case.
5159         * gs_switch1.c: New test case.
5160         * gs_switch2.c: New test case.
5161         
5162 2007-07-05  Aldy Hernandez  <aldyh@redhat.com> 
5164         * gimple-pretty-print.c (dump_gimple_stmt): Alphabetize cases.
5165         Add case for GS_NOP.
5166         * gimplify.c (gimplify_body): Handle null bodies.
5167         Use GS_CODE instead of GS_SUBCODE_FLAGS.
5169 2007-07-05  Aldy Hernandez  <aldyh@redhat.com> 
5171         * testsuite/gcc.dg/gimple/with_size_expr.c: Clean up dump.
5172         * testsuite/gcc.dg/gimple/gs_bind.c: Clean up dump.
5173         * gimplify.c (struct gimplify_ctx): Make current_bind_expr a tuple.
5174         (pop_gimplify_context): Accept gimple.
5175         Comment out call to declare_vars.
5176         (gimple_current_bind_expr): Return gimple.
5177         (unshare_all_trees): Remove.
5178         (gimplify_self_mod_expr): Remove comment.
5179         (gimplify_cleanup_point_expr): Correct typo in call to gs_seq_init.
5180         (gimplify_body): Remove body local.  
5181         Build GS_BIND tuples when needed.
5182         Do not call unshare_all_trees.
5183         Call pop_gimplify_context with appropriate argument.
5184         Comment out call to walk_tree.
5185         * tree-pretty-print.c (print_declaration): Remove static.
5186         * diagnostic.h (print_declaration): Prototype.
5187         * tree-gimple.h (pop_gimplify_context): Accept gimple tuple.
5188         (gimple_current_bind_expr): Return tuple.
5189         * gimple-pretty-print.c (dump_gs_seq): New.
5190         (dump_gs_bind): New.
5191         (dump_gimple_stmt): Add case for GS_BIND.  Print semi-colons after
5192         each statement.
5194 2007-06-29  Aldy Hernandez  <aldyh@redhat.com> 
5196         * gimplify.c (gimple_push_condition): Enable.  Call gs_seq_init with
5197         address.
5198         (gimplify_cond_expr): Push and pop conditions.  Use other GS_COND
5199         predicates when appropriate
5201 2007-06-28  Aldy Hernandez  <aldyh@redhat.com> 
5203         * testsuite/gcc.dg/gimple/gs_goto.c: New.
5204         * testsuite/gcc.dg/gimple/gs_cond.c: New.
5205         * tree-gimple.h (gimplify_stmt): Return bool.
5206         * gimple-pretty-print.c (INDENT): New.
5207         (newline_and_indent): New.
5208         (op_gs_cond): New.
5209         (dump_gs_cond): New.
5210         (dump_gimple_stmt): New.
5211         * gimple-ir.c (gs_cond_invert): New.
5212         * gimple-ir.h (enum gs_cond): Add comment.
5213         (gs_cond_invert): Protoize.
5214         * gimplify.c (gimplify_cond_expr): Rewrite for tuples.
5215         (gimplify_stmt): Return true if we added a statement to the queue.
5216         (gimplify_expr): Enable gimplify_cond_expr.
5217         Build tuples for GOTO_EXPRs and LABEL_EXPRs.
5219 2007-06-27  Aldy Hernandez  <aldyh@redhat.com> 
5221         * gimple-ir.h (gs_seq_last): Return last statement.
5222         * testsuite/gcc.dg/gimple/compound_expr.c: Add checks.
5223         * testsuite/gcc.dg/gimple/gs_call.c: Same.
5224         * testsuite/gcc.dg/gimple/constructors.c: Same.
5225         * testsuite/gcc.dg/gimple/gs_assign.c: Same.
5227 2007-06-27  Aldy Hernandez  <aldyh@redhat.com> 
5229         Put this patch back in.
5231         2007-06-22  Aldy Hernandez  <aldyh@redhat.com> 
5233         * gimplify.c (gimplify_modify_expr): Return after a successful
5234         call to gimplify_modify_expr_rhs.
5236 2007-06-26  Aldy Hernandez  <aldyh@redhat.com>
5238         * testsuite/gcc.dg/gimple/gimple.exp: Pass -fdump-tree-gimple-details
5239         * testsuite/gcc.dg/gimple/compound_expr.c: Add dg-final.
5240         * testsuite/gcc.dg/gimple/gs_return.c: Same.
5241         * tree.h (gimplify_function_tree): Add return value.
5242         * diagnostic.h (debug_c_tree): Move under tree-pretty-print.c section.
5243         (dump_gimple_seq): New.
5244         to tests.
5245         * gimple-pretty-print.c (dump_gimple_seq): New.
5246         * gimplify.c (gimplify_function_tree): Add return value.
5247         Remove debug call and exit.
5248         Comment out non-working code.
5249         * c-gimplify.c (c_genericize): Dump gimple IR.  Exit.
5251 2007-06-26  Diego Novillo  <dnovillo@google.com>
5253         * gimple-ir.c (gs_build_call_1): Fix formatting.
5255 2007-06-26  Diego Novillo  <dnovillo@google.com>
5257         * gimple-pretty-print.c (dump_gs_assign, dump_gs_return,
5258         dump_gs_call): New functions.
5259         (dump_gimple_stmt): Call them.
5260         * gimple-ir.c (gs_build_call_1): Factor out of gs_build_call.
5261         (gs_build_call): Call it.
5262         (gs_build_call_vec): New function.
5263         * gimple-ir.h (struct gimple_statement_call): Change type of
5264         field 'nargs' to size_t.  Update all users.
5265         (gs_build_call_vec): Declare.
5266         (gs_call_set_fn): Remove.
5267         (gs_call_set_nargs): Remove.
5268         * gimplify.c: Include "vec.h"
5269         (gimplify_return_expr): Fix formatting
5270         (gimplify_call_expr): Call gs_build_call_vec.
5271         (gimplify_expr): Do not try to test if NULL expressions
5272         are in GIMPLE form.
5273         (gimplify_function_tree): Do not call debug_gimple_seq.
5274         * Makefile.in (gimplify.o): Include vec.h
5276 2007-06-25  Chris Matthews  <chrismatthews@google.com>
5278         * gimplify.c (gimple_current_bind_expr): Changed to work with gs_seq
5279         accessors 
5280         (gimplify_and_add): Same.
5281         (annotate_all_with_locus): Same.
5282         (gimplify_self_mod_expr): Same.
5283         (gimplify_cleanup_point_expr): Same.
5284         (gimplify_expr): Same.
5285         (gimplify_body): Same.
5286         (force_gimple_operand): Same.
5287         (gimplify_init_ctor_eval_range): Added GS_ prefix.
5288         * gimple-iterator.h (gsi_last): Changed to gs_seq accessors.  Changed
5289         gimple_stmt_iterator to use a gimple instead of gimple *.
5290         (gsi_one_before_end_p): Same.
5291         (gsi_start): Same.
5292         * gimple-ir.h (gs_cond): Prepended GS_ to names.
5293         (gs_seq_first): Replaced macro.
5294         (gs_seq_last): Same.
5295         (gs_seq_set_first): Same.
5296         (gs_seq_set_last): Same.
5297         (gs_seq_init): Same.
5298         (gs_seq_empty_p): Same.
5299         (gs_assign_operand) Changed opno to be a size_t to match set.
5300         (gs_bind_body): Changed to use gs_seq.
5301         (gs_bind_set_body): Changed to use gs_seq, and gs_seq_set_first, and last. 
5302         (gs_asm_ninputs): Renamed.
5303         (gs_asm_noutputs): Renamed.
5304         (gs_asm_nclobbered): Renamed.
5305         (gs_asm_set_ninputs): Renamed.
5306         (gs_asm_set_noutputs): Renamed.
5307         (gs_asm_set_nclobbered): Renamed.
5308         (gs_asm_set_input_op): Renamed.
5309         (gs_asm_input_op): Renamed.
5310         (gs_asm_set_output_op): Renamed.
5311         (gs_asm_output_op): Renamed.
5312         (gs_omp_body): Changed to use gs_seq.
5313         (gs_omp_set_body): Changed to use gs_seq accessors.
5314         (gs_omp_for_pre_body): Changed to use gs_seq.
5315         (gs_omp_for_set_pre_body): Changed to use gs_seq accessors.
5316         (gs_seq_append): Changed to use gs_seq accessors.
5317         * gimple-ir.c (gs_add): Same.
5318         (gs_build_asm): Changed argument names to match accessors, and changed
5319         functions to new accessor names.
5320         (gs_build_cond): Reformatted.
5321         (gs_build_phi): Same.
5322         (gs_build_try): Renamed args to try_p and catch_p.
5323         (gs_build_omp_return): Change to correct arguments, and added a subcode 
5324         flag.
5325         * function.c (gimplify-oaraneters): Changed to gs_seq accessors.
5327 2007-06-22  Aldy Hernandez  <aldyh@redhat.com>
5329         * gimplify.c (gimplify_modify_expr): Return after a successful
5330         call to gimplify_modify_expr_rhs.
5332 2007-06-21  Aldy Hernandez  <aldyh@redhat.com>
5334         * gimple-ir.h (gs_assign_binary_rhs1): Add assertion for
5335         GSS_ASSIGN_BINARY.
5336         (gs_assign_binary_set_rhs1): Same.
5337         (gs_assign_binary_rhs2): Same.
5338         (gs_assign_binary_set_rhs2): Same.
5339         (gs_assign_unary_rhs): Same.
5340         (gs_assign_unary_set_rhs): Same.
5342 2007-06-21  Aldy Hernandez  <aldyh@redhat.com>
5344         * gcc.dg/gimple/gimple.exp: New.
5345         * gcc.dg/gimple/compound_expr.c: New.
5346         * gcc.dg/gimple/with_size_expr.c: New.
5347         * gcc.dg/gimple/compound_expr.c: New.
5348         * gcc.dg/gimple/gs_call.c: New.
5349         * gcc.dg/gimple/constructors.c: New.
5350         * gcc.dg/gimple/gs_return.c: New.
5351         * gcc.dg/gimple/gs_assign.c: New.
5353 2007-06-21  Aldy Hernandez  <aldyh@redhat.com>
5355         * gimple-ir.c (gs_build_cond): Change order of arguments.  Make labels
5356         of type tree.
5357         (gs_build_asm): Fix formatting.
5358         * gimple-ir.h (gimple_statement_cond): Make labels of type tree.
5359         (gs_build_cond): Change order and type of arguments.
5360         (gs_build_asm): Fix formatting.
5361         (gs_omp_build_for): Same.
5362         (gs_assign_binary_rhs1): Remove assert.
5363         (gs_assign_binary_set_rhs1): Same.
5364         (gs_assign_binary_rhs2): Same.
5365         (gs_assign_binary_set_rhs2): Same.
5366         (gs_assign_unary_rhs): Same.
5367         (gs_cond_true_label): Return a tree.
5368         (gs_cond_set_true_label): Make label a tree.
5369         (gs_cond_set_false_label): Make label a tree.
5370         (gs_cond_false_label): Return a tree.
5371         * gimplify.c (gimplify_init_ctor_eval_range): Build tuples.
5372         (gimplify_init_ctor_eval): Same.
5373         (gimplify_init_constructor): Enable.  Adjust for tuples.
5374         (gimplify_modify_expr_rhs): Uncomment call to
5375         gimplify_init_constructor.
5377 2007-06-21  Diego Novillo  <dnovillo@google.com>
5379         * gimple.def: Rename from gs.def.
5380         Adjust all users.
5382 2007-06-21  Diego Novillo  <dnovillo@google.com>
5384         * tree-pretty-print.c (pred_symbol_code, do_gs_niy,
5385         debug_gimple_stmt, debug_gimple_seq, print_gimple_stmt,
5386         dump_gimple_stmt): Move to gimple-pretty-print.c
5387         * diagnostic.h: Add comment for functions in gimple-pretty-print.c
5388         * gimple-pretty-print.c: New file.
5389         * gimple-ir.c (gs_build_return): Fix spacing.
5390         (gs_build_assign): Likewise.
5391         * gimple-ir.h: Fix spacing.
5392         (gs_assign_set_operand): Change OPNO to size_t.
5393         Add assertions for OPNO's value.
5394         (gs_assign_lhs): Rename from gs_assign_operand_lhs.
5395         (gs_assign_binary_rhs1): Rename from gs_assign_operand_rhs.
5396         Assert that GS is GSS_ASSIGN_BINARY
5397         (gs_assign_binary_set_rhs1): Rename from gs_assign_set_rhs.
5398         Assert that GS is GSS_ASSIGN_BINARY.
5399         (gs_assign_binary_set_rhs2): Rename from gs_assign_set_rhs2.
5400         Assert that GS is GSS_ASSIGN_BINARY.
5401         (gs_assign_unary_rhs): New.
5402         (gs_assign_unary_set_rhs): New.
5403         (gs_call_fn, gs_call_lhs, gs_call_chain, gs_call_arg,
5404         gs_cond_lhs, gs_cond_rhs, gs_label_label, gs_goto_dest,
5405         gs_bind_vars, gs_asm_in_op, gs_asm_out_op, gs_asm_clobber_op,
5406         gs_catch_types, gs_catch_handler, gs_eh_filter_types,
5407         gs_eh_filter_failure, gs_try_eval, gs_try_cleanup,
5408         gs_phi_result, gs_switch_index, gs_switch_default_label,
5409         gs_switch_label,gs_omp_critical_name, gs_omp_for_clauses,
5410         gs_omp_for_index, gs_omp_for_initial, gs_omp_for_final,
5411         gs_omp_for_incr, gs_omp_parallel_clauses,
5412         gs_omp_parallel_child_fn, gs_omp_parallel_data_arg,
5413         gs_omp_single_clauses, gs_omp_sections_clauses,
5414         gs_return_retval): Change return type to 'tree'.
5415         * Makefile.in (OBJS-common): Add gimple-pretty-print.o.
5416         (gimple-pretty-print.o): New rule.
5418 2007-06-20  Aldy Hernandez  <aldyh@redhat.com>
5420         * tree-pretty-print.c (dump_gimple_stmt): Change pred_symbol_code
5421         to op_symbol_code.
5423 2007-06-19  Aldy Hernandez  <aldyh@redhat.com>
5425         * gimplify.c (gimplify_modify_expr_rhs): Enable.  Adjust for tuples.
5426         (gimplify_modify_expr): Call gimplify_modify_expr_rhs.
5427         (gimplify_compound_expr): Enable.  Adjust for tuples.  Remove comment
5428         that no longer applies.
5429         (gimplify_expr): Enable call to gimplify_compound_expr.
5431 2007-06-18  Chris Matthews  <chrismatthews@google.com>
5433         * Makefile.in (GTFILES): Added gimeple-ir.h.
5435         * gimple-ir.c (gs_build_return, gs_build_call, gs_build_assign): 
5436         Changed to use new accessors.
5437         (gs_build_cond, gs_build_label, gs_build_goto,
5438         gs_build_nop, gs_build_bind gs_build_asm, gs_build_catch,
5439         gs_build_eh_filter, gs_build_try, gs_build_phi,
5440         gs_build_resx, gs_build_switch, gs_omp_build_critical,
5441         gs_omp_build_for, gs_omp_build_parallel,
5442         gs_omp_build_section, gs_omp_build_master,
5443         gs_omp_build_ordered, gs_omp_continue,
5444         gs_omp_build_ordered, gs_omp_build_return,
5445         gs_omp_build_sections, gs_omp_build_single): New
5446         functions.
5448         * gimple-ir.h (struct gimple_statement_switch): Changed
5449         default label to be in labels[0].
5451         (struct gimple_statement_asm): Corrected the allocation
5452         length.
5454         (enum gs_cond): New enum.
5455         (gs_assign_set_operand): Changed to work with new accessors.
5456         (gs_assign_operand_lhs, gs_assign_operand_rhs,
5457         gs_assign_operand_set_lhs, gs_assign_set_rhs,
5458         gs_assign_operand_rhs2, gs_assign_set_rhs2, gs_call_fn,
5459         gs_call_set_fn, gs_call_lhs, gs_call_set_lhs,
5460         gs_call_chain, gs_call_set_chain, gs_call_nargs,
5461         gs_call_set_nargs, gs_call_arg, gs_call_set_arg,
5462         gs_cond_lhs, gs_cond_set_lhs, gs_cond_rhs,
5463         gs_cond_set_rhs, gs_cond_true_label,
5464         gs_cond_set_true_label, gs_cond_set_false_label,
5465         gs_cond_false_label, gs_label_label, gs_label_set_label,
5466         gs_goto_dest, gs_goto_set_dest, gs_bind_vars,
5467         gs_bind_set_vars, gs_bind_body, gs_bind_set_body,
5468         gs_asm_ni, gs_asm_set_ni, gs_asm_no, gs_asm_set_no,
5469         gs_asm_nc, gs_asm_set_nc, gs_asm_in_op, gs_asm_set_in_op,
5470         gs_asm_out_op, gs_asm_set_out_op, gs_asm_clobber_op,
5471         gs_asm_set_clobber_op, gs_asm_string, gs_asm_set_string,
5472         gs_catch_types, gs_catch_handler, gs_catch_set_types,
5473         gs_catch_set_handler, gs_eh_filter_types,
5474         gs_eh_filter_failure, gs_eh_filter_set_types,
5475         gs_eh_filter_set_failure, gs_try_eval, gs_try_cleanup,
5476         gs_try_set_eval, gs_try_set_cleanup, gs_phi_capacity,
5477         gs_phi_set_capacity, gs_phi_nargs, gs_phi_set_nargs,
5478         gs_phi_result, gs_phi_set_result, gs_phi_arg,
5479         gs_phi_set_arg, gs_resx_region, gs_resx_set_region,
5480         gs_switch_nlabels, gs_switch_set_nlabels,
5481         gs_switch_index, gs_switch_set_index,
5482         gs_switch_default_label, gs_switch_set_default_label,
5483         gs_switch_label, gs_switch_set_label, gs_omp_body,
5484         gs_omp_set_body, gs_omp_critical_name,
5485         gs_omp_critical_set_name, gs_omp_for_clauses,
5486         gs_omp_for_set_clauses, gs_omp_for_index,
5487         gs_omp_for_set_index, gs_omp_for_initial,
5488         gs_omp_for_set_initial, gs_omp_for_final,
5489         gs_omp_for_set_final, gs_omp_for_incr,
5490         gs_omp_for_set_incr, gs_omp_for_pre_body,
5491         gs_omp_for_set_pre_body, gs_omp_parallel_clauses,
5492         gs_omp_parallel_set_clauses, gs_omp_parallel_child_fn,
5493         gs_omp_parallel_set_child_fn, gs_omp_parallel_data_arg,
5494         gs_omp_parallel_set_data_arg, gs_omp_single_clauses,
5495         gs_omp_single_set_clauses, gs_omp_sections_clauses,
5496         gs_omp_sections_set_clauses, gs_assign_omp_for_cond,
5497         gs_omp_for_cond gs_return_set_retval,
5498         gs_add_subcode_flag): New accessor functions.
5499         (gs_return_retval): Renamed gs_return_operand_retval to match accessor 
5500         conventions.
5502 2007-05-31  Aldy Hernandez  <aldyh@redhat.com>
5504         * gimple-ir.c (gs_build_call): New.
5505         * gimple-ir.h (GS_CALL_LHS): New.
5506         (GS_CALL_FN): New.
5507         (GS_CALL_CHAIN): New.
5508         (GS_CALL_NARGS): New.
5509         (GS_CALL_ARG): New.
5510         (gs_call_lhs): New.
5511         (gs_call_fn): New.
5512         (gs_call_chain): New.
5513         (gs_call_nargs): New.
5514         (gs_call_arg): New.
5515         * gimplify.c (gimplify_modify_expr_to_memcpy): Enable and rewrite for 
5516         tuples.
5517         (gimplify_modify_expr_to_memset): Same.
5518         (gimplify_statement_list): Same.
5519         (gimplify_expr): Enable STATEMENT_LIST case.
5521 2007-05-29  Aldy Hernandez  <aldyh@redhat.com>
5523         Merged revisions 124007-125166 from mainline.
5525 2007-05-23  Aldy Hernandez  <aldyh@redhat.com>
5527         * builtins.c (std_gimplify_va_arg_expr): Add argument to gimplify_expr.
5528         Remove seq argument.
5529         (gimplify_va_arg_expr): Same.
5530         * tree-gimple.h: Same.
5531         * langhooks.c (lhd_gimplify_expr): Change pre_p and post_p types to
5532         sequences.
5533         * langhooks-def.h (lhd_gimplify_expr): Change 
5534         * langhooks.h (struct lang_hooks): Remove argument.
5535         * gimplify.c (internal_get_tmp_var): Adjust calls to gimplify_expr
5536         for new arguments.
5537         (gimplify_switch_expr): Same.
5538         (gimplify_var_or_parm_decl): Same.
5539         (gimplify_compound_lval): Same.
5540         (gimplify_self_mod_expr): Same.
5541         (gimplify_arg): Same.
5542         (gimplify_call_expr): Same.
5543         (gimplify_init_ctor_preeval): Same.
5544         (gimplify_init_constructor): Same.
5545         (gimplify_modify_expr_rhs): Same.
5546         (gimplify_modify_expr): Same.
5547         (gimplify_save_expr): Same.
5548         (gimplify_addr_expr): Same.
5549         (gimplify_asm_expr): Same.
5550         (gimplify_target_expr): Same.
5551         (omp_check_private): Same.
5552         (gimplify_scan_omp_clauses): Same.
5553         (gimplify_omp_parallel): Same.
5554         (gimplify_omp_for): Same.
5555         (goa_stabilize_expr): Same.
5556         (gimplify_omp_atomic): Same.
5557         (gimplify_one_sizepos): Same.
5558         (force_gimple_operand): Same.
5559         (gimplify_expr): Remove seq_p argument.  Add new is_statement
5560         argument.  Adjust accordingly.  Make seq_p required.
5562 2007-05-07  Aldy Hernandez  <aldyh@redhat.com>
5564         * function.c (gimplify_parameters): Use new GS_SEQ_INIT definition.
5565         * gimple-ir.h (GS_SEQ_INIT): Do not use C99 constructs.
5566         * gimplify.c: Disable non working code throughout.
5567         Pass additional call to gimplify_expr throughout.
5568         (gimplify_ctx): Make conditional_cleanups a sequence.
5569         (gimple_push_condition): Use GS_SEQ_EMPTY_P.
5570         (gimple_pop_condition): Adapt for sequences.
5571         (gimplify_and_add): Use gs_seq_append regardless of side effects.
5572         (internal_get_tmp_var): Use sequences.
5573         (get_formal_tmp_var): Same.
5574         (get_initialized_tmp_var): Same.
5575         (annotate_one_with_locus): Change GS_LOCUS to GS_LOCUS_EMPTY_P.
5576         (gimplify_bind_expr): Use sequences.
5577         Change append_to_statement_list to gimplify_and_add.
5578         (gimplify_return_expr): Add gimplified code to pre_p.
5579         (gimplify_decl_expr): New seq_p parameter.
5580         (gimplify_loop_expr): Adapt for sequences.
5581         Use gimplify_and_add instead of append_to_statement_list.
5582         (gimplify_switch_expr): Same.
5583         (gimplify_compound_lval): Use sequences.
5584         (gimplify_self_mod_expr): Same.
5585         Use gs_seq_append instead of append_to_statement_list.
5586         (gimplify_arg): Use sequences.
5587         (gimplify_call_expr): Same.
5588         (gimplify_cond_expr): Use sequences.
5589         (gimplify_init_ctor_preeval): Use sequences.
5590         (gimplify_init_ctor_eval_range): Same.
5591         Use gimplify_and_add instead of append_to_statement_list.
5592         (gimplify_init_ctor_eval): Use sequences.
5593         (gimplify_init_constructor): Same.
5594         Remove one call to append_to_statement_list.
5595         (gimplify_modify_expr_rhs): Use sequences.
5596         (gimplify_modify_expr_complex_part): Use sequences.
5597         Remove call to tree_to_gimple_tuple.
5598         Build GS_ASSIGN tuple.
5599         (gimplify_modify_expr): Use new argument.  Use sequences.
5600         Do not call append_to_statement_list.
5601         Build GS_ASSIGN tuple.
5602         Do not call tree_to_gimple_tuple.
5603         Set *expr_p to NULL when we do not want the value.
5604         (gimplify_compound_expr): Use sequences.
5605         (gimplify_save_expr): Same.
5606         (gimplify_addr_expr): Same.
5607         (gimplify_asm_expr): Same.
5608         (gimplify_cleanup_point_expr): Same.
5609         (gimple_push_cleanup): Same.
5610         Build GS_ASSIGN tuples.
5611         (gimplify_target_expr): Use sequences.
5612         (gimplify_scan_omp_clauses): Same.
5613         Add argument to gimplify_stmt calls.
5614         (gimplify_omp_parallel): Same.
5615         (gimplify_omp_for): Use sequences.
5616         (gimplify_omp_workshare): Same.
5617         (goa_stabilize_expr): Same.
5618         (gimplify_omp_atomic_pipeline): Same.
5619         (gimplify_omp_atomic_mutex): Same.
5620         (gimplify_omp_atomic): Same.
5621         (gimplify_expr): Same.
5622         Call GS_SEQ_INIT with argument.
5623         Use new seq_p argument.
5624         Do not call tree_to_gimple_tuple.
5625         Pass additional argument to gimplify_decl_expr.
5626         Do not pass seq_p argument to gimplify_return_expr.
5627         Call gs_seq_append instead of append_to_statement_list.
5628         Check that all statements have been converted to tuples.
5629         Make pre_p and seq_p sequences coexist.
5630         (gimplify_type_sizes): Use sequences.
5631         (gimplify_one_sizepos): Same.
5632         (gimplify_body): Make parm_stmts a sequence.
5633         Add argument to seq_p.
5634         (gimplify_function_tree): Call debug_gimple_seq.
5635         (force_gimple_operand): Use sequences.
5636         (force_gimple_operand_bsi): Use sequences.
5638 2007-05-04  Aldy Hernandez  <aldyh@redhat.com>
5640         * omp-low.c (build_omp_barrier): Adjust arguments for sequences.
5641         (lower_rec_input_clauses): Disable non working code.
5642         (lower_regimplify): Pass additional argument to gimplify_expr.
5643         * tree-mudflap.c (mx_register_decls): Disable non working code.
5644         * tree-inline.c (copy_bb): Disable non working code.
5645         (setup_one_parameter): Same.
5646         * tree-cfg.c (make_edges): Same.
5648 2007-05-04  Aldy Hernandez  <aldyh@redhat.com>
5650         * tree-gimple.h (get_initialized_tmp_var): Adjust prototype
5651         for sequences.
5652         (get_formal_tmp_var): Same.
5653         (gimplify_type_sizes): Same.
5654         (gimplify_one_sizepos): Same.
5655         (gimplify_stmt): Same.
5656         (gimplify_and_add): Same.
5657         (gimplify_va_arg_expr): Same.
5658         * langhooks.h (lang_hooks): Same.
5659         * function.c (gimplify_parm_type): Adjust for sequences.
5660         (gimplify_parameters): Same.
5661         * c-gimplify.c (gimplify_compound_literal_expr): Same.
5662         (c_gimplify_expr): Same.
5663         * tree-flow.h (force_gimple_operand): Same.
5664         * c-common.h (c_gimplify_expr): Adjust prototype for sequences.
5665         * config/i386/i386.c (ix86_gimplify_va_arg): Adjust for sequences.
5666         Change call to append_to_statement_list to gimplify_and_add.
5667         Add parameter to gimplify_expr.
5669 2007-05-04  Aldy Hernandez  <aldyh@redhat.com>
5671         * gimple-ir.c (gs_code_name): Constify.
5672         (gs_build_assign): New.
5673         (gimple_statement_structure): Abstract code out to...
5674         (gss_for_assign): ...here.
5675         (gs_add): Set the last item correctly.
5676         * gimple-ir.h (GS_LOCUS_EMPTY_P): New.
5677         (GS_SEQ_INIT): Add a cast.
5678         (gimple_statement_base): Make code a gs_code enum.
5679         (gimple_statement_with_ops): Remove address_taken.
5680         (GS_ASSIGN_BINARY_LHS): New.
5681         (GS_ASSIGN_BINARY_RHS1): New.
5682         (GS_ASSIGN_BINARY_RHS2): New.
5683         (GS_ASSIGN_UNARY_REG_LHS): New.
5684         (GS_ASSIGN_UNARY_REG_RHS): New.
5685         (GS_ASSIGN_UNARY_MEM_LHS): New.
5686         (GS_ASSIGN_UNARY_MEM_RHS): New.
5687         (gs_seq_append): New.
5688         Move gs_seq typedef to...
5689         * coretypes.h: ...here.
5690         * gimple-iterator.h (gsi_stmt_ptr): Add FIXME note.
5692 2007-05-04  Aldy Hernandez  <aldyh@redhat.com>
5694         * tree.h (std_gimplify_va_arg_expr): Change tree * to a sequence
5695         in prototype.
5696         (gimplify_parameters): Return a sequence.
5697         * target.h (gimplify_va_arg_expr): Change tree * to a sequence.
5698         * builtins.c (std_gimplify_va_arg_expr): Same.
5699         Pass additional argument to gimplify_expr.
5700         (gimplify_va_arg_expr): Change tree * to a sequence.
5701         Change append_to_statement_list call to gimplify_and_add.
5702         Pass additional argument to gimplify_expr calls.
5704 2007-05-04  Aldy Hernandez  <aldyh@redhat.com>
5706         * tree-pretty-print.c (do_gs_niy): New.
5707         (debug_gimple_stmt): New.
5708         (debug_gimple_seq): New.
5709         (print_gimple_stmt): New.
5710         (dump_gimple_stmt): New.
5711         * diagnostic.h: Add prototypes for dump_gimple_stmt,
5712         print_gimple_stmt, debug_gimple_stmt, debug_gimple_seq.
5714 2007-04-26  Aldy Hernandez  <aldyh@redhat.com>
5716         * tree-gimple.h (annotate_all_with_locus): First argument is now a
5717         sequence.
5718         * gimple-ir.h (GS_LOCUS): New.
5719         (gimple_statement_base): Locus is of type location_t.
5720         * gimplify.c (internal_get_tmp_var): Use sequences.
5721         (should_carry_locus_p): Adjust for gimple ir.
5722         (annotate_one_with_locus): Same.
5723         (annotate_all_with_locus): Same.
5724         (gimplify_stmt): Adjust for sequences.
5725         (gimplify_expr): Same.
5727 2007-04-25  Aldy Hernandez  <aldyh@redhat.com>
5729         * gimple-ir.h (GS_SEQ_EMPTY_P): New.
5730         Move gs_build_return, gs_add, and gimple_statement_structure
5731         prototypes.
5732         (gs_assign_operand): Fix typos in gss.
5733         Include gimple-iterator.h.
5734         * Makefile.in (GIMPLE_IR_H): Add gimple-iterator.h.
5735         (TREE_GIMPLE_H): Same.
5737 2007-04-25  Aldy Hernandez  <aldyh@redhat.com>
5739         * gimple-iterator.h (gsi_one_before_end_p): Use GS_SEQ_LAST.
5741 2007-04-25  Aldy Hernandez  <aldyh@redhat.com>
5743         * gimple-iterator.h: New file.
5745 2007-04-23  Aldy Hernandez  <aldyh@redhat.com>
5747         * gimple-ir.c: New file.
5748         * gimple-ir.h: New file.
5749         * gsstruct.def: New file.
5750         * gs.def: New file.
5751         * gengtype.c (open_base_files): Add gimple-ir.h.
5752         * tree-gimple.h: Include gimple-ir.h.
5753         Add sequence to gimplify_expr and gimplify_body prototypes.
5754         * gimplify.c: Include gimple-ir.h.
5755         (gimplify_and_add): Adjust for gimple IR.
5756         (gimplify_return_expr): Same.
5757         (gimplify_stmt): Add seq_p argument.
5758         (gimplify_expr): Add seq_p sequence and adjust accordingly.
5759         (gimplify_body): Same.
5760         * coretypes.h: Add gimple_statement_d and gimple definitions.
5761         * Makefile.in (GIMPLE_IR_H): New.
5762         (TREE_GIMPLE_H): Add gimple-ir.h.
5763         (OBJS-common): Add gimple-ir.o.
5764         (gimplify.o): Add GIMPLE_IR_H.
5765         (gimple-ir.o): New.
5766         (build/gencheck.o): Add gs.def.
5768 Local Variables:
5769 mode: change-log
5770 End: