]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/ChangeLog.tuples
[Ada] Improved support for aspect alignment in CCG
[thirdparty/gcc.git] / gcc / ChangeLog.tuples
CommitLineData
726a989a
RB
12008-07-28 Richard Guenther <rguenther@suse.de>
2
3 Merge with mainline @138201.
4
5 * configure.ac (ACX_PKGVERSION): Update revision merge string.
6 * configure: Regenerate.
7
82008-07-27 Jakub Jelinek <jakub@redhat.com>
9
10 * omp-low.c (expand_omp_atomic_fetch_op): Fix a merge glitch.
11
122008-07-27 Andrew Pinski <andrew_pinski@playstation.sony.com>
13
14 * config/spu/spu.c (spu_gimplify_va_arg_expr): Unshare the args
15 and skip trees.
16
172008-07-27 Richard Guenther <rguenther@suse.de>
18
19 * tree-eh.c (lookup_expr_eh_region): Do not allocate a tree
20 annotation.
21 * tree-dfa.c (create_tree_common_ann): Set eh region to -1.
22 * tree-flow.h (struct tree_ann_common_d): Reorder rn member
23 to pack with type.
24
252008-07-26 Richard Guenther <rguenther@suse.de>
26
27 Merge with mainline @138159.
28
29 * configure.ac (ACX_PKGVERSION): Update revision merge string.
30 * configure: Regenerate.
31
322008-07-26 Richard Guenther <rguenther@suse.de>
33
34 * gimple.h (CALL_STMT_CANNOT_INLINE_P): Remove.
35
362008-07-26 Jan Hubicka <jh@suse.cz>
37
38 * ipa-inline.c (cgraph_decide_inlining_of_small_function): Use
39 gimple_call_set_cannot_inline.
40 (cgraph_decide_inlining): Likewise.
41 (cgraph_decide_inlining_incrementally): Likewise.
42
432008-07-26 Richard Guenther <rguenther@suse.de>
44
45 Merge with mainline @138092.
46
47 * configure.ac (ACX_PKGVERSION): Update revision merge string.
48 * configure: Regenerate.
49
502008-07-26 Richard Guenther <rguenther@suse.de>
51
52 Merge with mainline @138091.
53
542008-07-25 Richard Guenther <rguenther@suse.de>
55
56 * config/ia64/ia64.c (ia64_gimplify_va_arg): Unshare valist
57 before reusing it.
58
592008-07-25 Andreas Krebbel <krebbel1@de.ibm.com>
60
61 * tree-tailcall.c (process_assignment): Prevent tail call
62 optimization if the modes of the return types don't match.
63
642008-07-24 Aldy Hernandez <aldyh@redhat.com>
65
66 * tree-inline.c (expand_call_inline): Allow casts in assert.
67
682008-07-24 Richard Guenther <rguenther@suse.de>
69
70 PR middle-end/36885
71 * tree.c (walk_tree_1): Also walk CHANGE_DYNAMIC_TYPE_EXPR operands.
72 * gimple.c (gss_for_code): GIMPLE_CHANGE_DYNAMIC_TYPE is GSS_WITH_OPS.
73 * gsstruct.def (GSS_CHANGE_DYNAMIC_TYPE): Remove.
74
752008-07-24 Richard Guenther <rguenther@suse.de>
76
77 * tree-sra.c (sra_walk_expr): Also handle CONVERT_EXPR.
78 (sra_walk_gimple_assign): Correctly detect assigns we can handle.
79 * expr.c (expand_expr_real_1): Pass MOVE_NONTEMPORAL to
80 expand_assignment.
81
822008-07-23 Richard Guenther <rguenther@suse.de>
83
84 * tree-ssa-dse.c (get_kill_of_stmt_lhs): Tuplify correct.
85 * gimple-pretty-print.c (dump_gimple_label): Dump non-local flag.
86 * tree.h (maybe_fold_stmt_addition): Declare.
87 * tree-ssa-ccp.c (maybe_fold_stmt_addition): Export.
88 (fold_gimple_assign): Return the new rhs instead of modifying the stmt.
89 (fold_stmt): Deal with that.
90 (fold_stmt_inplace): Only replace the rhs of a statement if
91 that has enough operand space to hold the new operands.
92 * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Fix
93 POINTER_PLUS_EXPR handling.
94
952008-07-23 Richard Guenther <rguenther@suse.de>
96
97 * tree-eh.c (record_in_goto_queue): Fix bootstrap with
98 --disable-checking.
99
1002008-07-23 Aldy Hernandez <aldyh@redhat.com>
101
102 Merge with mainline @138071.
103
104 * configure.ac (ACX_PKGVERSION): Update revision merge string.
105 * configure: Regenerate.
106
1072008-07-23 Richard Guenther <rguenther@suse.de>
108
109 * tree-eh.c (union treemple): Add tree * member.
110 (find_goto_replacement): Adjust.
111 (replace_goto_queue_cond_clause): Use the address of the
112 individual labels as unique identifier.
113 (replace_goto_queue_1): Use the statement as unique identifier
114 for GIMPLE_GOTO.
115 (record_in_goto_queue): Add checking.
116 (record_in_goto_queue_label): Adjust.
117 (maybe_record_in_goto_queue): Likewise.
118 (do_goto_redirection): Get leh_tf_state.
119 (lower_try_finally_nofallthru): Pass it.
120 (lower_try_finally_onedest): Likewise.
121 (lower_try_finally_copy): Likewise.
122 (lower_try_finally_switch): Likewise.
123
1242008-07-22 Aldy Hernandez <aldyh@redhat.com>
125 Jakub Jelinek <jakub@redhat.com>
126
127 * gimplify.c (gimple_do_not_emit_location_p): New.
128 (gimple_set_do_not_emit_location): New.
129 (annotate_one_with_location): Do not annotate if
130 gimple_do_not_emit_location_p.
131 (gimplify_cond_expr): Do not optimize if the COND_EXPR and
132 GOTO_EXPR have different locations.
133 Do not emit location information for some GIMPLE_COND's.
134
1352008-07-22 Richard Guenther <rguenther@suse.de>
136
137 * tree-ssa-ccp.c (ccp_fold): Use gimple_expr_type.
138 (fold_gimple_assign): Likewise.
139 * tree-inline.c (remap_gimple_op_r): Do not set TREE_BLOCK on
140 non-statements. Recurse to copy_tree_body_r with NULL block.
141 (copy_phis_for_bb): Likewise.
142 * tree-cfg.c (move_stmt_op): Do not set TREE_BLOCK on
143 non-statements.
144
1452008-07-22 Diego Novillo <dnovillo@google.com>
146 Richard Guenther <rguenther@suse.de>
147
148 * tree-ssa-dom.c (hashable_expr_equal_p): Do nothing if
149 either TYPE0 or TYPE1 is NULL.
150
1512008-07-21 Diego Novillo <dnovillo@google.com>
152
153 * tree-ssa-alias-warnings.c (struct gimple_tree_map): New.
154 Change every use of struct tree_map to struct gimple_tree_map.
155 (gimple_tree_map_eq): New.
156 (gimple_tree_map_hash): New.
157 * tree-ssa-ccp.c (evaluate_stmt): Remove stale FIXME note.
158 * gimplify.c (gimplify_expr): Remove stale FIXME note.
159 * tree-ssa-pre.c: Remove stale references to GIMPLE_MODIFY_STMT.
160 * tree-vect-generic.c (expand_vector_operations_1): Change
161 FIXME tuples to NOTE.
162
1632008-07-21 Richard Guenther <rguenther@suse.de>
164
165 * tree-ssa-phiprop.c (propagate_with_phi): Only look through
166 SSA_NAME copies.
167
1682008-07-21 Richard Guenther <rguenther@suse.de>
169
170 * gimplify.c (gimplify_init_constructor): Clear TREE_SIDE_EFFECTS
171 on the remaining empty constructor.
172
1732008-07-21 Richard Guenther <rguenther@suse.de>
174
175 * tree-ssa-ccp.c (fold_gimple_assign): Handle pointer conversions
176 like fold_stmt_r did.
177 * gimple-pretty-print.c (dump_gimple_cond): Place semicolons
178 where trunk did.
179 * tree-inline.c (copy_bb): Do not insert GIMPLE_NOPs.
180
1812008-07-21 Richard Guenther <rguenther@suse.de>
182
183 PR tree-optimization/36826
184 * tree-ssa-pre.c (eliminate): Do not eliminate in unused
185 statements.
186
1872008-07-20 Richard Guenther <rguenther@suse.de>
188
189 * gimple.h (gimple_expr_type): The expression type is always
190 the base type of an integral sub-type result type.
191 * tree-eh.c (replace_goto_queue_cond_clause): Copy the sequence
192 before handing it off to gsi_insert_seq_after.
193 * tree-sra.c (insert_edge_copies_seq): Make sure to not keep an
194 uninserted but marked for update sequence.
195
1962008-07-20 Richard Guenther <rguenther@suse.de>
197
198 * gimple.c (DEFTREECODE): Add REALIGN_LOAD_EXPR.
199
2002008-07-19 Richard Guenther <rguenther@suse.de>
201
202 * tree-ssa-sccvn.h (get_constant_value_id): Declare.
203 (vn_constant_eq_with_type): Make sure an integral type is
204 never equal to a non-integral type.
205 (vn_hash_constant_with_type): Adjust.
206 * tree-ssa-sccvn.c (get_constant_value_id): New function.
207 * tree-ssa-pre.c (get_expr_value_id): For newly created
208 constant value-ids make sure to add the expression to its
209 expression-set.
210
2112008-07-18 Jakub Jelinek <jakub@redhat.com>
212
213 * gimple.c (gimple_regimplify_operands): Moved to...
214 * gimplify.c (gimple_regimplify_operands): ... here. Rework using
215 lower_omp_1 regimplification code, if regimplified LHS of
216 GIMPLE_ASSIGN or GIMPLE_CALL requires simpler RHS, create a temporary.
217 * omp-low.c (gimple_regimplify_operands): Use
218 gimple_regimplify_operands.
219
2202008-07-18 Richard Guenther <rguenther@suse.de>
221
222 * tree-ssa-reassoc.c (get_rank): For single rhs process its
223 operands.
224
2252008-07-18 Richard Guenther <rguenther@suse.de>
226
227 * tree-ssa-loop-niter.c (expand_simple_operations): Expand
228 as much as trunk does.
229 * tree-ssa-sccvn.c (simplify_binary_expression): For comparisons
230 always expand the first operand.
231
2322008-07-18 Jakub Jelinek <jakub@redhat.com>
233
234 * gimple-pretty-print.c (dump_gimple_cond): Print a semicolon if
235 goto or else goto has been printed.
236 (dump_gimple_goto): Print as goto instead of gimple_goto, print
237 a semicolon at the end.
238 (dump_gimple_asm): Print a semicolon at the end.
239
240 * gimplify.c (gimplify_cond_expr): If COND_EXPR has both non-trivial
241 THEN and ELSE statements and the THEN sequence can't fallthru, avoid
242 adding label_cont and jump to it.
243
2442008-07-18 Aldy Hernandez <aldyh@redhat.com>
245
246 * Makefile.in. Remove TREE_GIMPLE_H definition.
247 Rename all TREE_GIMPLE_H uses to GIMPLE_H.
248 Depend on tree-iterator.h when necessary.
249 * tree-into-ssa.c: Include gimple.h instead of tree-gimple.h.
250 * tree-complex.c: Same.
251 * cgraphbuild.c: Same.
252 * cgraph.c: Same.
253 * builtins.c: Same.
254 * tree-ssa-sccvn.c: Same.
255 * tree-ssa-copyrename.c: Same.
256 * tree-nomudflap.c: Same.
257 * tree-call-cdce.c: Same.
258 * ipa-pure-const.c: Same.
259 * ipa-utils.c: Same.
260 * tree-ssa-alias.c: Same.
261 * tree-ssa-sink.c: Same.
262 * langhooks.c: Same.
263 * function.c: Same.
264 * ipa-type-escape.c: Same.
265 * tree-affine.c: Same.
266 * c-typeck.c: Same.
267 * tree-dfa.c: Same.
268 * tree-ssa-pre.c: Same.
269 * tree-sra.c: Same.
270 * c-omp.c: Same.
271 * tree-ssa-dce.c: Same.
272 * tree-nested.c: Same.
273 * tree-ssa.c: Same.
274 * tree-inline.c: Same.
275 * tree-iterator.c: Same.
276 * c-gimplify.c: Same.
277 * tree-vect-generic.c: Same.
278 * tree-flow.h: Same.
279 * tree-ssa-structalias.c: Same.
280 * ipa-struct-reorg.c: Same.
281 * tree-ssa-reassoc.c: Same.
282 * config/alpha/alpha.c: Same.
283 * config/s390/s390.c: Same.
284 * config/m32c/m32c.c: Same.
285 * config/spu/spu.c: Same.
286 * config/sparc/sparc.c: Same.
287 * config/i386/i386.c: Same.
288 * config/sh/sh.c: Same.
289 * config/xtensa/xtensa.c: Same.
290 * config/stormy16/stormy16.c: Same.
291 * config/ia64/ia64.c: Same.
292 * config/rs6000/rs6000: Same.
293 * config/mips/mips.c: Same.
294 * varpool.c: Same.
295 * cgraphunit.c: Same. Include tree-iterator.h
296 * tree-mudflap.c: Same.
297 * gimplify.c: Same.
298 * c-decl.c: Same.
299 * omp-low.c: Same.
300 * c-semantics: Same.
301 * gimple-low.c: Same.
302 * tree-gimple.c: Merge contents into...
303 * gimple.c: ...here.
304 * tree-gimple.h: Merge contents into...
305 * gimple.h: ...here.
306
3072008-07-17 Jakub Jelinek <jakub@redhat.com>
308
309 * omp-low.c (expand_omp_atomic_pipeline): Call
310 force_gimple_operand_gsi on RHS for IADDR initialization.
311
312 * gimplify.c (gimplify_cond_expr): Push statements in between
313 gimple_push_condition and gimple_pop_condition into a new
314 gimple_seq, append it after gimple_pop_condition cleanups.
315
3162008-07-17 Richard Guenther <rguenther@suse.de>
317
318 * tree-complex.c (init_dont_simulate_again): Handle
319 {REAL,IMAG}PART_EXPR correctly.
320 * gimple-pretty-print.c (dump_unary_rhs): Dump VIEW_CONVERT_EXPR
321 and ASSERT_EXPR the same way as on trunk.
322 * tree-ssa-dom.c (initialize_hash_element): Do not record
323 the type for single rhs assigns.
324 (hashable_expr_equal_p): Deal with NULL types.
325 (eliminate_redundant_computations): Use print_gimple_expr.
326 * tree-vrp.c (stmt_interesting_for_vrp): Fix builtin call check.
327 (vrp_visit_stmt): Likewise.
328 * tree-ssa-forwprop.c (simplify_gimple_switch): Fix typo.
329
3302008-07-16 Richard Guenther <rguenther@suse.de>
331
332 PR tree-optimization/36792
333 * tree-ssa-pre.c (get_or_alloc_expr_for): Handle unary
334 expressions inserted by SCCVN.
335 (do_SCCVN_insertion): Adjust comment.
336 (execute_pre): Allow insertion for FRE again.
337
338 * tree-ssa-sccvn.c (simplify_unary_expression): Deal with
339 the GIMPLE_SINGLE_RHS statemens we get.
340 (init_scc_vn): Init VN_INFO->expr to NULL.
341
3422008-07-16 Richard Guenther <rguenther@suse.de>
343
344 Revert
345 2008-07-16 Richard Guenther <rguenther@suse.de>
346 * tree-ssa-pre.c (get_constant_for_value_id): Only hand out
347 constants of the correct type.
348 (fully_constant_expression): Pass the required type to
349 get_constant_for_value_id.
350
351 * tree-ssa-sccvn.h (vn_hash_constant_with_type): New function.
352 (vn_constant_eq_with_type): Likewise.
353 * tree-ssa-sccvn.c (vn_constant_eq): Use vn_constant_eq_with_type.
354 (get_or_alloc_constant_value_id): Use vn_hash_constant_with_type.
355 * tree-ssa-pre.c (pre_expr_eq): Use vn_constant_eq_with_type.
356 (pre_expr_hash): Use vn_hash_constant_with_type.
357 (get_representative_for): Use constants as their representative.
358 (fully_constant_expression): Use constant parts in expressions
359 directly.
360
3612008-07-15 Aldy Hernandez <aldyh@redhat.com>
362
363 * tree-ssa-propagate.c (valid_gimple_expression_p): Remove.
364 * tree-ssa-propagate.h (valid_gimple_expression_p): Remove.
365 * tree-eh.c: Factor out common code in operation_could_trap_p and
366 stmt_could_throw_1_p into...
367 (operation_could_trap_helper_p): New.
368 * gimplify.c (gimplify_expr): Rephrase fixme.
369 * tree-mudflap.c: Remove fixme.
370
3712008-07-17 Jakub Jelinek <jakub@redhat.com>
372
373 * tree-eh.c (collect_finally_tree): Call collect_finally_tree_1
374 with region as second argument for GIMPLE_TRY_FINALLY's cleanup.
375
376 * gimplify.c (gimplify_expr): Call gimple_try_set_catch_is_cleanup
377 for TRY_CATCH_EXPR.
378
3792008-07-16 Jakub Jelinek <jakub@redhat.com>
380
381 * tree-gimple.c (is_gimple_reg_rhs): Don't check for CALL_EXPRs
382 with side-effects.
383 * gimple.c (extract_ops_from_tree): Remove assert.
384 * gimplify.c (is_gimple_reg_or_call_rhs): New function.
385 (rhs_predicate_for): Return it instead of is_gimple_reg_rhs.
386 (gimplify_expr): Handle is_gimple_reg_or_call_rhs.
387
388 * tree-ssa-threadedge.c (record_temporary_equivalences_for_stmts,
389 simplify_control_stmt_condition): Pass stmt instead of NULL as second
390 argument to simplify callback.
391
392 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
393 gimple_call_set_lhs with lhs of last_stmt.
394 * tree-vect-transform.c (vectorizable_call): Build a new dummy
395 assignment, replace the call with it and move over stmt_info.
396
397 * tree-ssa-loop-niter.c (infer_loop_bounds_from_array): Use
398 is_gimple_assign instead of gimple_code () == GIMPLE_ASSIGN and
399 is_gimple_call instead of gimple_code () == GIMPLE_CALL.
400 * tree-ssa-propagate.c (update_call_from_tree, substitute_and_fold):
401 Likewise.
402 * tree-ssa-sccvn.c (visit_use): Likewise.
403 * tree-eh.c (stmt_could_throw_p): Likewise.
404 * tree-optimize.c (execute_fixup_cfg): Likewise.
405 * omp-low.c (check_omp_nesting_restrictions, scan_omp_1_stmt,
406 optimize_omp_library_calls): Likewise.
407 * tree-ssa-loop-im.c (movement_possibility, stmt_cost,
408 determine_invariantness_stmt): Likewise.
409 * tree-ssa-phiprop.c (phivn_valid_p, phiprop_insert_phi,
410 propagate_with_phi): Likewise.
411 * tree-ssa-ccp.c (get_default_value, surely_varying_stmt_p,
412 ccp_fold_builtin, gimplify_and_update_call_from_tree): Likewise.
413 * ipa-struct-reorg.c (is_result_of_mult, create_general_new_stmt):
414 Likewise.
415 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Likewise.
416 * tree-object-size.c (alloc_object_size, call_object_size,
417 check_for_plus_in_loops): Likewise.
418 * tree-ssa.c (verify_ssa): Likewise.
419 * predict.c (expr_expected_value_1, tree_bb_level_predictions,
420 tree_estimate_probability): Likewise.
421 * tree-cfg.c (verify_stmt): Likewise.
422 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p,
423 copy_loop_headers): Likewise.
424 * tree-ssa-ter.c (is_replaceable_p): Likewise.
425 * ipa-prop.c (ipa_count_arguments, ipa_compute_jump_functions):
426 Likewise.
427 * tree-ssa-dom.c (gimple_assign_unary_useless_conversion_p,
428 record_equivalences_from_stmt, optimize_stmt,
429 get_lhs_or_phi_result): Likewise.
430 * tree-ssa-sink.c (is_hidden_global_store): Likewise.
431 * tree-nrv.c (tree_nrv, execute_return_slot_opt): Likewise.
432 * value-prof.c (gimple_divmod_fixed_value,
433 gimple_mod_pow2, gimple_mod_subtract): Likewise.
434 * tree-predcom.c (name_for_ref, find_looparound_phi,
435 replace_ref_with, remove_name_from_operation): Likewise.
436 * tree-ssa-math-opts.c (is_division_by, execute_cse_reciprocals,
437 execute_cse_sincos, execute_convert_to_rsqrt): Likewise.
438 * tree-complex.c (expand_complex_move, expand_complex_operations_1):
439 Likewise.
440 * tree-outof-ssa.c (identical_copies_p): Likewise.
441 * tree-ssa-pre.c (is_exception_related): Likewise.
442 * tree-sra.c (scalarize_use, scalarize_copy): Likewise.
443 * tree-ssa-alias.c (count_uses_and_derefs, update_alias_info_1,
444 is_escape_site): Likewise.
445 * lambda-code.c (can_put_in_inner_loop,
446 cannot_convert_bb_to_perfect_nest): Likewise.
447 * tree-tailcall.c (find_tail_calls, eliminate_tail_call): Likewise.
448 * ipa-type-escape.c (look_for_casts_stmt, is_cast_from_non_pointer):
449 Likewise.
450 * tree-vect-transform.c (vectorizable_reduction): Likewise.
451 * tree-ssa-threadedge.c (record_temporary_equivalences_from_stmts):
452 Likewise.
453 * tree-ssa-phiopt.c (nt_init_block): Likewise.
454 * tree-ssa-structalias.c (find_func_aliases): Likewise.
455 * tree-ssa-forwprop.c (can_propagate_from,
456 forward_propagate_comparison, simplify_not_neg_expr,
457 simplify_gimple_switch, tree_ssa_forward_propagate_single_use_vars):
458 Likewise.
459 * tree-ssa-dce.c (eliminate_unnecessary_stmts): Likewise.
460 * tree-ssa-dse.c (get_kill_of_stmt_lhs, dse_possible_dead_store_p,
461 dse_optimize_stmt, execute_simple_dse): Likewise.
462 * tree-ssa-loop-ivopts.c (find_interesting_uses_op,
463 find_interesting_uses_stmt, rewrite_use_nonlinear_expr): Likewise.
464 * tree-vrp.c (stmt_overflow_infinity, vrp_stmt_computes_nonzero,
465 register_edge_assert_for_2, register_edge_assert_for,
466 find_assert_locations, check_all_array_refs,
467 remove_range_assertions, stmt_interesting_for_vrp, vrp_visit_stmt,
468 simplify_stmt_using_ranges): Likewise.
469 * tree-ssa-loop-prefetch.c (gather_memory_references): Likewise.
470 * tree-ssa-copy.c (may_propagate_copy_into_stmt,
471 propagate_tree_value_into_stmt): Likewise.
472 * tree-inline.c (copy_bb, expand_call_inline,
473 gimple_expand_calls_inline, fold_marked_statements): Likewise.
474
475 * tree-ssa-copyrename.c (rename_ssa_copies): Use
476 gimple_assign_ssa_name_copy_p.
477
478 * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Check
479 gimple_assign_rhs_code, type of rhs is TREE_TYPE (lhs), update
480 rhs_code.
481
4822008-07-16 Richard Guenther <rguenther@suse.de>
483
484 * tree-ssa-pre.c (get_constant_for_value_id): Only hand out
485 constants of the correct type.
486 (fully_constant_expression): Pass the required type to
487 get_constant_for_value_id.
488
4892008-07-15 Aldy Hernandez <aldyh@redhat.com>
490
491 Merge with mainline @137837.
492
493 * configure.ac (ACX_PKGVERSION): Update revision merge string.
494 * configure: Regenerate.
495
4962008-07-15 Jakub Jelinek <jakub@redhat.com>
497
498 * common.opt (-fgimple-conversion=): Remove.
499
500 * tree-affine.c (aff_combination_expand): Tuplify.
501 * cfgexpand.c (gimple_assign_rhs_to_tree): Remove prototype.
502 * tree-outof-ssa.c (gimple_assign_rhs_to_tree): Likewise.
503 * tree-gimple.h (gimple_assign_rhs_to_tree): New prototype.
504
5052008-07-15 Aldy Hernandez <aldyh@redhat.com>
506
507 * tree.h: Remove gimple_unreachable_1 prototype.
508
5092008-07-15 Aldy Hernandez <aldyh@redhat.com>
510
511 * Makefile.in (gimple-dummy.o): Remove.
512 * gimple-dummy.c: Delete.
513 * tree-ssa-propagate.c (valid_gimple_expression_p): Change
514 gimple_unreachable to gcc_unreachable.
515 * tree-affine.c (aff_combination_expand): Same.
516 * tree-vect-transform.c (vectorizable_call): Same.
517
5182008-07-15 Richard Guenther <rguenther@suse.de>
519
520 * gimplify.c (gimplify_expr): Gimplify an unused volatile load
521 properly.
522
5232008-07-15 Richard Guenther <rguenther@suse.de>
524
525 * tree-ssa-pre.c: Tuplify. Enable FRE and PRE.
526 (execute_pre): Disable SCCVN insertion even for FRE.
527 * tree-ssa-sccvn.h (copy_reference_ops_from_call): Declare.
528 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Export.
529 (vn_get_expr_for): Handle more expression kinds.
530 (visit_reference_op_load): Properly set a value id for
531 inserted names.
532 (simplify_binary_expression): Use valid_gimple_rhs_p instead of
533 valid_gimple_expression_p.
534 (simplify_unary_expression): Likewise.
535 (process_scc): Clear the cached/simplified expressions at the
536 start of the iteration.
537 (free_scc_vn): Do not clear SSA_NAME_VALUE.
538 (run_scc_vn): Remove broken special case in printing VNs.
539 * tree-ssa-propagate.c (valid_gimple_rhs_p): Allow
540 gimple-min-invariants and SSA names.
541
5422008-07-14 Andreas Krebbel <krebbel1@de.ibm.com>
543
544 * config/s390/s390.c: (s390_gimplify_va_arg) Unshare the args* tree.
545
5462008-07-14 Richard Guenther <rguenther@suse.de>
547
548 * tree-ssa-math-opts.c (execute_cse_reciprocals): Process
549 SSA_NAME defs of calls.
550 * gimple-pretty-print.c (dump_unary_rhs): Do not prefix
551 CONSTRUCTOR with [constructor].
552
5532008-07-14 Aldy Hernandez <aldyh@redhat.com>
554
555 * config/alpha/alpha.c (va_list_skip_additions): Change
556 GIMPLE_STMT_OPERAND to TREE_OPERAND.
557
5582008-07-14 Jakub Jelinek <jakub@redhat.com>
559
560 * tree-vect-transform.c (vect_create_data_ref_ptr): Update comment.
561 * config/s390/s390.c (s390_va_start): Build MODIFY_EXPR instead of
562 GIMPLE_MODIFY_STMT.
563 (s390_gimplify_va_arg): Use gimplify_assign.
564 * config/sh/sh.c (sh_va_start): Build MODIFY_EXPR instead of
565 GIMPLE_MODIFY_STMT.
566 (sh_gimplify_va_arg_expr): Use gimplify_assign.
567 * config/sparc/sparc.c (sparc_gimplify_va_arg): Likewise.
568 * config/spu/spu.c (spu_va_start): Build MODIFY_EXPR instead of
569 GIMPLE_MODIFY_STMT.
570 (spu_gimplify_va_arg_expr): Use gimplify_assign.
571 * config/stormy16/stormy16.c (xstormy16_expand_builtin_va_start):
572 Build MODIFY_EXPR instead of GIMPLE_MODIFY_STMT.
573 (xstormy16_gimplify_va_arg_expr): Likewise. Use gimplify_assign.
574 * config/xtensa/xtensa.c (xtensa_va_start): Build MODIFY_EXPR
575 instead of GIMPLE_MODIFY_STMT.
576 (xtensa_gimplify_va_arg_expr): Use gimplify_assign.
577
5782008-07-14 Aldy Hernandez <aldyh@redhat.com>
579
580 * config/alpha/alpha.c (va_list_skip_additions): Rename
581 GIMPLE_MODIFY_STMT to MODIFY_EXPR.
582 (alpha_va_start): Same.
583 (alpha_gimplify_va_arg_1): Use gimplify_assign.
584 (alpha_gimplify_va_arg): Same.
585 * config/frv/frv.c (frv_expand_builtin_va_start): Rename
586 GIMPLE_MODIFY_STMT to MODIFY_EXPR.
587 * config/ia64/ia64.c (ia64_gimplify_va_arg): Use gimplify_assign.
588 * config/alpha/mips.c (mips_va_start): Rename GIMPLE_MODIFY_STMT to
589 MODIFY_EXPR or use gimplify_assign when appropriate.
590 (mips_gimplify_va_arg_expr): Same.
591
5922008-07-14 Aldy Hernandez <aldyh@redhat.com>
593
594 * config/rs6000/rs6000.c (rs6000_va_start): Change
595 GIMPLE_MODIFY_STMT to MODIFY_EXPR.
596 (rs6000_gimplify_va_arg): Use gimplify_assign.
597 Build GIMPLE_GOTO directly.
598
5992008-07-14 Aldy Hernandez <aldyh@redhat.com>
600
601 * tree-dump.c (dequeue_and_dump): Remove GIMPLE_MODIFY_STMT case.
602 * tree-ssa-loop-niter.c (simplify_replace_tree): Remove GIMPLE_STMT_P
603 call.
604 * tree-pretty-print.c (dump_generic_node): Remove any references to
605 GIMPLE_MODIFY_STMT, GIMPLE_STMT_P, GIMPLE_TUPLE_P.
606 (op_prio): Same.
607 (op_symbol_code): Same.
608 * java/java-gimplify.c (java_gimplify_expr): Same.
609 (java_gimplify_modify_expr): Same.
610 * java/java-tree.h: Rename GENERIC_NEXT to TREE_CHAIN.
611 * tree-tailcall.c (find_tail_calls): Update comment.
612 * tree.c (tree_code_class_string): Remove "gimple_stmt".
613 (tree_node_kind): Remove "gimple statments".
614 (tree_code_size): Remove tcc_gimple_stmt.
615 (make_node_stat): Same.
616 (copy_node_stat): Remove any references to
617 GIMPLE_MODIFY_STMT, GIMPLE_STMT_P, GIMPLE_TUPLE_P, tcc_gimple_stmt,
618 TS_GIMPLE_STATEMENT, GENERIC_TREE_OPERAND, GENERIC_TREE_TYPE,
619 GIMPLE_TUPLE_HAS_LOCUS_P, GIMPLE_STMT_LOCUS, GIMPLE_STMT_BLOCK,
620 IS_GIMPLE_STMT_CODE_CLASS, GIMPLE_STMT_BLOCK.
621 (expr_align): Same.
622 (tree_node_structure): Same.
623 (build2_stat): Same.
624 (set_expr_locus): Same.
625 (walk_tree_1): Same.
626 (tree_block): Same.
627 (build_gimple_modify_stmt_stat): Remove.
628 (expr_location): Remove.
629 (set_expr_location): Remove.
630 (expr_hash_location): Remove.
631 (expr_locus): Remove.
632 (expr_filename): Remove.
633 (expr_lineno): Remove.
634 (generic_tree_operand): Remove.
635 (generic_tree_type): Remove.
636 * tree.h (tree_code_class): Remove tcc_gimple_stmt.
637 (IS_GIMPLE_STMT_CODE_CLASS): Remove.
638 (struct gimple_stmt): Remove.
639 (GIMPLE_STMT_CHECK): Remove.
640 (TREE_OPERAND_CHECK): Remove GIMPLE_TUPLE_P.
641 (TREE_CHAIN): Same.
642 (GIMPLE_STMT_OPERAND_CHECK): Remove.
643 (GIMPLE_STMT_OPERAND_CHECK): Remove.
644 (GIMPLE_STMT_P): Remove.
645 (GIMPLE_TUPLE_P): Remove.
646 (GIMPLE_TUPLE_HAS_LOCUS_P): Remove.
647 (GENERIC_TREE_OPERAND): Remove.
648 (GENERIC_TREE_TYPE): Remove.
649 (GENERIC_NEXT): Remove.
650 (IS_CONVERT_EXPR_CODE_P): Rename GENERIC_TREE_TYPE to TREE_TYPE.
651 (MOVE_NONTEMPORAL): Remove GIMPLE_MODIFY_STMT_CHECK.
652 Remove GIMPLE_STMT_OPERAND, GIMPLE_STMT_LOCUS, GIMPLE_STMT_BLOCK.
653 (EXPR_LOCATION, SET_EXPR_LOCATION, EXPR_HAS_LOCATION, EXPR_LOCUS,
654 EXPR_FILENAME, EXPR_LINENO): Do ont call functions.
655 (CAN_HAVE_LOCATION_P): Remove GIMPLE_STMT_P.
656 (union tree_node): Remove gstmt.
657 (build_gimple_modify_stmt*): Remove.
658 (expr_location, set_expr_location, expr_has_location,
659 expr_locus, expr_filename, expr_lineno, generic_tree_operand,
660 generic_tree_type): Remove.
661 * tree-scalar-evolution.c (follow_ssa_edge): Update comment.
662 (interpret_condition_phi): Same.
663 * gimple.h (gimplify_assign): New.
664 * builtins.c, fold-const.c, omp-low.c, tree-ssa-dse.c, tree-gimple.c,
665 tree-ssa-math-opts.c, tree-nrv.c, gimple-low.c, dwarf2out.c,
666 expr.c, tree-parloops.c, matrix-reorg.c, c-decl.c, tree-eh.c,
667 c-pretty-print.c, langhooks.c, function.c, tree-affine.c,
668 gimplify.c, tree.def, cfgexpand.c, tree-predcom.c, print-tree.c,
669 tree-ssa-ter.c, tree-ssa.c, tree-inline.c, gimple.c, gimple.h,
670 tree-cfg.c, config/i386/i386.c, stmt.c, tree-ssa-operands.c)
671 Remove any references to
672 GIMPLE_MODIFY_STMT, GIMPLE_STMT_P, GIMPLE_TUPLE_P, tcc_gimple_stmt,
673 TS_GIMPLE_STATEMENT, GENERIC_TREE_OPERAND, GENERIC_TREE_TYPE,
674 GIMPLE_TUPLE_HAS_LOCUS_P, GIMPLE_STMT_LOCUS, GIMPLE_STMT_BLOCK,
675 IS_GIMPLE_STMT_CODE_CLASS, GIMPLE_STMT_BLOCK.
676 Call gimplify_assign or generate a GIMPLE_ASSIGN directly when
677 appropriate.
678
6792008-07-14 Jakub Jelinek <jakub@redhat.com>
680
681 * cfgexpand.c (gimple_cond_pred_to_tree): New function.
682 (gimple_to_tree) <case GIMPLE_COND>: Use it.
683 (release_stmt_tree): New function.
684 (expand_gimple_cond): Call just gimple_cond_pred_to_tree
685 instead of gimple_to_tree, ggc_free pred before returning.
686 (expand_gimple_tailcall): Call release_stmt_tree.
687 (expand_gimple_basic_block): Call release_stmt_tree instead
688 of ggc_free.
689
690 * gimplify.c (internal_get_tmp_var, gimplify_decl_expr,
691 gimplify_init_ctor_eval, gimplify_target_expr): Call ggc_free
692 on the INIT_EXPR.
693
6942008-07-14 Richard Guenther <rguenther@suse.de>
695
696 * tree-ssa-ccp.c (ccp_fold): Move ADDR_EXPR handing to
697 GIMPLE_SINGLE_RHS case.
698 * tree-ssa-ifcombine.c (ifcombine_iforif): Fix typo.
699
7002008-07-14 Jakub Jelinek <jakub@redhat.com>
701
702 * system.h (CONST_CAST2): Avoid using a union for all GCCs <= 4.0.x.
703
7042008-07-12 Diego Novillo <dnovillo@google.com>
705
706 * tree-loop-distribution.c: Tuplify.
707 * tree-ssa-propagate.c (substitute_and_fold): Remove
708 stale FIXME tuples note.
709
7102008-07-11 Jakub Jelinek <jakub@redhat.com>
711
712 * tree-dump.c (dump_options): Don't set TDF_RHS_ONLY for -all.
713
714 * omp-low.c (lower_omp_1): Only use rhs_predicate_for if
715 GIMPLE_SINGLE_RHS.
716
717 * tree-vect-analyze.c (vect_determine_vectorization_factor): Handle
718 GIMPLE_CALL with non-NULL lhs.
719 (vect_build_slp_tree): Likewise. Fix reversed check for references.
720 * tree-vectorizer.c (stmt_vec_info_htab, stmt_vec_info_eq,
721 stmt_vec_info_hash, init_stmt_vec_info_htab,
722 free_stmt_vec_info_htab): Remove.
723 (stmt_vec_info_vec): New variable.
724 (init_stmt_vec_info_vec, free_stmt_vec_info_vec): New functions.
725 (new_loop_vec_info): Clear stmt uid before calling
726 set_vinfo_for_stmt.
727 (vect_is_simple_use): Handle GIMPLE_CALL with non-NULL lhs.
728 (vectorize_loops): Call {init,free}_stmt_vec_info_vec instead of
729 {init,free}_stmt_vec_info_htab.
730 * tree-parloops.c (parallelize_loops): Likewise.
731 * tree-ssa-operands.c (get_expr_operands): Handle VEC_COND_EXPR.
732 * tree-vectorizer.h (stmt_vec_info_htab): Removed.
733 (init_stmt_vec_info_htab, free_stmt_vec_info_htab): Remove
734 prototypes.
735 (stmt_vec_info_vec): New extern decl.
736 (init_stmt_vec_info_vec, free_stmt_vec_info_vec): New prototypes.
737 (vinfo_for_stmt, set_vinfo_for_stmt): Rewritten using stmt uid
738 and vector instead of a hash table.
739 * tree-vect-patterns.c (vect_recog_pow_pattern): Request
740 a GIMPLE_CALL with non-NULL lhs instead of GIMPLE_ASSIGN.
741 (vect_pattern_recog_1): Use is_gimple_call instead of comparing
742 gimple_code with GIMPLE_CALL.
743 * gimple.c (gimple_rhs_class_table): Use GIMPLE_SINGLE_RHS for
744 DOT_PROD_EXPR and VEC_COND_EXPR.
745 * tree-vect-transform.c (vect_get_slp_vect_defs): Use gimple_get_lhs
746 instead of gimple_assign_lhs.
747 (get_initial_def_for_induction): Use build_int_cst even for
748 pointers. Use POINTER_PLUS_EXPR for POINTER_TYPE_P (scalar_type).
749 (vect_get_vec_def_for_operand): Use is_gimple_call instead of
750 comparing gimple_code with GIMPLE_CALL.
751 (vectorizable_call): Likewise. Use gimple_call_lhs instead of
752 gimple_assign_lhs. Build a vector of arguments, use
753 gimple_build_call_vec.
754 (vect_get_vec_def_for_stmt_copy): Use gimple_get_lhs.
755 (vectorizable_live_operation): Handle GIMPLE_SINGLE_RHS operands.
756
7572008-07-11 Doug Kwan <dougkwan@google.com>
758
759 * gimple-dummy.c (vectorizable_induction, vectorizable_type_promotion,
760 vectorizable_type_demotion, vectorizable_conversion,
761 vectorizable_operation, vectorizable_assignment,
762 vectorizable_load, vectorizable_call, vectorizable_store,
763 vectorizable_condition, vectorizable_reduction,
764 vectorizable_live_operation, vectorizable_function,
765 vect_estimate_min_profitable_iters, vect_model_simple_cost,
766 vect_model_store_cost, vect_model_load_cost, vect_transform_loop):
767 Remove DUMMY_FNs.
768 * tree-ssa-loop.c (gate_tree_vectorize): Reenable vectorizer.
769 * tree-vectorizer.c (vect_is_simple_use): Fix handling of
770 GIMPLE_NOP.
771 * tree-vectorizer.h (vectorizable_load, vectorizable_store,
772 vectorizable_operation, vectorizable_type_promotion,
773 vectorizable_type_demotion, vectorizable_conversion,
774 vectorizable_assignment, vectorizable_call, vectorizable_condition,
775 vectorizable_live_operation, vectorizable_reduction,
776 vectorizable_induction): Adjust prototypes.
777 * tree-vect-transform.c (vectorizable_load, vectorizable_store,
778 vectorizable_operation, vectorizable_type_promotion,
779 vectorizable_type_demotion, vectorizable_conversion,
780 vectorizable_assignment, vectorizable_call, vectorizable_condition,
781 vectorizable_live_operation, vectorizable_reduction,
782 vectorizable_induction, vect_transform_stmt,
783 vect_create_data_ref_ptr, vect_create_addr_base_for_vector_ref,
784 vect_get_vec_def_for_operand, vect_init_vector,
785 vect_finish_stmt_generation, vect_create_epilog_for_reduction,
786 get_initial_def_for_reduction, cost_for_stmt,
787 vect_estimate_min_profitable_iters, vect_model_reduction_cost,
788 vect_cost_strided_group_size, vect_model_load_cost, bump_vector_ptr,
789 vect_get_constant_vectors, vect_get_slp_vect_defs,
790 vect_get_slp_defs, get_initial_def_for_induction,
791 vect_get_vec_def_for_stmt_copy, vect_get_vec_defs,
792 vectorizable_function, vect_gen_widened_results_half,
793 vect_permute_store_chain, vect_setup_realignment,
794 vect_permute_load_chain, vect_transform_strided_load,
795 vect_is_simple_cond, vect_build_loop_niters,
796 vect_generate_tmps_on_preheader, vect_update_ivs_after_vectorizer,
797 vect_do_peeling_for_loop_bound, vect_gen_niters_for_prolog_loop,
798 vect_do_peeling_for_alignment, vect_create_cond_for_align_checks,
799 vect_create_cond_for_alias_checks, vect_loop_versioning,
800 vect_remove_stores, vect_schedule_slp_instance,
801 vect_transform_loop): Tuplify.
802
8032008-07-10 Richard Guenther <rguenther@suse.de>
804
805 * gimple.h (gimple_assign_ssa_name_copy_p): Declare.
806 (gimple_has_lhs): New function.
807 * gimple.c (gimple_assign_ssa_name_copy_p): New function.
808 * tree-ssa-copy.c (propagate_tree_value_into_stmt): Remove
809 redundant gimple_set_location call.
810 * gimple-iterator.c (gsi_remove): Do not free stmt operands.
811 * tree-ssa-structalias.c (find_func_aliases): Correctly let
812 all things with pointers escape.
813 * tree-pass.h (TDF_RHS_ONLY): New flag.
814 * diagnostic.h (print_gimple_expr): Declare.
815 * gimple-pretty-print.c (print_gimple_expr): New function.
816 (dump_gimple_assign): Dump the RHS as expression if TDF_RHS_ONLY.
817 (dump_gimple_call): Likewise.
818 (dump_gimple_cond): Likewise.
819 * tree-ssa-propagate.c (fold_predicate_in): Use print_gimple_expr.
820 * tree-ssa-sccvn.c (visit_use): Use gimple_has_lhs.
821 Use print_gimple_expr. Handle tcc_expression correctly.
822
8232008-07-09 Jakub Jelinek <jakub@redhat.com>
824
825 * gimplify.c (struct gimplify_ctx): Move to tree-gimple.h.
826 (push_gimplify_context): Don't allocate bind_expr_stack,
827 temp_htab nor c itself here. Add c argument.
828 (pop_gimplify_context): Allow bind_expr_stack being NULL. Check
829 c->temp_htab instead of optimize whether htab_delete should be called.
830 Don't free c.
831 (gimple_push_bind_expr): Create bind_expr_stack lazily.
832 (lookup_tmp_var): Create temp_htab lazily.
833 (gimplify_scan_omp_clauses, gimplify_omp_parallel, gimplify_omp_task,
834 gimplify_body, force_gimple_operand): Adjust push_gimplify_context
835 callers.
836 * omp-low.c (lower_omp_sections, lower_omp_single, lower_omp_master,
837 lower_omp_ordered, lower_omp_critical, lower_omp_for,
838 create_task_copyfn, lower_omp_taskreg, execute_lower_omp):
839 * tree-ssa-ccp.c (gimplify_and_update_call_from_tree): Likewise.
840 * tree-sra.c (generate_element_init): Likewise.
841 * tree-mudflap.c (execute_mudflap_function_ops,
842 execute_mudflap_function_decls): Likewise.
843 * tree-inline.c (setup_one_parameter, optimize_inline_calls): Likewise.
844 * tree-gimple.h (struct gimplify_ctx): New type.
845 (push_gimplify_context): Adjust prototype.
846
847 * gimple.h (gimple_rhs_class_table): New extern decl.
848 (get_gimple_rhs_class): Change into inline.
849 * gimple.c (get_gimple_rhs_class): Removed.
850 (gimple_rhs_class_table): New variable.
851
8522008-07-09 Doug Kwan <dougkwan@google.com>
853 Diego Novillo <dnovillo@google.com>
854
855 * tree-ssa-ccp.c (fold_stmt_r): Remove gcc_unreachable
856 call from COND_EXPR handler.
857 * tree-if-conv.c: Tuplify.
858 * gimple.c (gimple_could_trap_p_1): Factor out of ...
859 (gimple_could_trap_p): ... here.
860 Call it.
861 (gimple_assign_rhs_could_trap_p): New.
862 * gimple.h (gimple_assign_rhs_could_trap_p): Declare.
863 * tree-ssa-operands.c (get_expr_operands): Handle
864 COND_EXPR.
865
8662008-07-08 Jakub Jelinek <jakub@redhat.com>
867
868 Merge with mainline @137633.
869
870 * configure.ac (ACX_PKGVERSION): Update revision merge string.
871 * configure: Regenerate.
872
8732008-07-08 Jakub Jelinek <jakub@redhat.com>
874
875 * tree-cfg.c (remove_useless_stmts_cond): Avoid calling
876 fold_binary.
877
8782008-07-07 Jakub Jelinek <jakub@redhat.com>
879
880 * gimple-pretty-print.c (dump_gimple_return): Don't print space
881 after return if return has no argument.
882 (dump_gimple_seq): Don't print newline after last statement in
883 the sequence.
884 (dump_gimple_fmt, dump_gimple_try, dump_gimple_omp_for,
885 dump_gimple_omp_single, dump_gimple_omp_sections,
886 dump_gimple_omp_block, dump_gimple_omp_critical,
887 dump_gimple_omp_parallel, dump_gimple_omp_task): Use
888 newline_and_indent after dump_gimple_seq instead of INDENT.
889 (dump_gimple_bind): Likewise. If there are no bind vars, don't
890 print two newlines before the sequence, just one.
891 * tree-cfg.c (dump_function_to_file): Fix dumping lowered gimple
892 before CFG is built.
893
8942008-07-07 Diego Novillo <dnovillo@google.com>
895
896 * tree-vrp.c (ssa_name_nonnegative_p): Tuplify.
897 (ssa_name_nonzero_p): Tuplify.
898 (extract_range_from_comparison): Tidy.
899 (vrp_evaluate_conditional_warnv_with_ops): Tidy.
900 (vrp_evaluate_conditional): Change STMT argument to gimple.
901 Update all users.
902 (simplify_stmt_for_jump_threading): Change WITHIN_STMT argument
903 to gimple.
904 Update all users.
905 (identify_jump_threads): Tidy.
906 * tree-tailcall.c (find_tail_calls): Remove stale FIXME note.
907 * tree.c (tree_node_structure): Likewise.
908 * tree.h (struct tree_base): Likewise.
909 (struct gimple_stmt): Likewise.
910 * builtins.c (expand_builtin_memcpy): Likewise.
911 (expand_builtin_memset_args): Likewise.
912 * tree-chrec.h (build_polynomial_chrec): Do not initialize VAL.
913 * tree-ssa-ccp.c (fold_stmt_r): Do not handle COND_EXPR.
914 (fold_stmt): Remove #if 0 code.
915 * tree-ssa-dom.c (EXTRA_DETAILS): Remove.
916 Update all users.
917 (hashable_expr_equal_p): Remove stale FIXME note.
918 (simplify_stmt_for_jump_threading): Convert WITHIN_STMT
919 argument to gimple. Update all users.
920 * tree-ssa-propagate.c: Include gimple.h
921 (get_rhs): Remove.
922 (set_rhs): Remove.
923 (fold_predicate_in): Tuplify.
924 * Makefile.in (tree-ssa-propagate.o): Add dependency on
925 GIMPLE_H.
926 * tree-ssa-propagate.h (get_rhs, set_rhs): Remove.
927 * tree-parloops.c (create_parallel_loop): Remove FIXME
928 tuples note.
929 * tree-eh.c (lookup_stmt_eh_region): Remove FIXME tuples
930 editorial note.
931 * cfgexpand.c (gimple_to_tree): Likewise.
932 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Tidy.
933 Do not handle GIMPLE_BIND.
934 * tree-inline.c (remap_gimple_op_r): Remove stale FIXME notes.
935 * tree-optimize.c (execute_fixup_cfg): Likewise.
936 * tree-flow.h (struct tree_ann_common_d): Remove stale
937 FIXME tuples notes.
938 (tree_vrp_evaluate_conditional): Change last argument type to
939 gimple. Update all users.
940 (thread_across_edge): Likewise.
941 * gimple.c (gimple_has_side_effects): If any argument has
942 TREE_SIDE_EFFECTS set, assert that S has volatile operands.
943 (gimple_rhs_has_side_effects): Likewise.
944 * gimple.h (gimple_phi_capacity): Remove stale FIXME tuples note.
945 * tree-cfg.c (group_case_labels): Remove FIXME tuples note.
946 Assert that the new size is smaller than the old size.
947 (remove_useless_stmts_warn_notreached): Remove #if 0 code.
948 (remove_useless_stmts_cond): Remove stale FIXME tuples note.
949 (remove_useless_stmts_1): Likewise.
950 (verify_types_in_gimple_assign): Likewise.
951 * passes.c (init_optimization_passes): Re-enable
952 pass_ipa_increase_alignment.
953 * tree-ssa-threadedge.c
954 (record_temporary_equivalences_from_stmts_at_dest):
955 Change SIMPLIFY to accept two arguments of type gimple.
956 Update all users.
957 (simplify_control_stmt_condition): Likewise.
958 (thread_accross_edge): Likewise.
959 * tree-ssa-operands.c (add_call_clobber_ops): Re-enable
960 calls to ipa_reference_get_not_read_globals and
961 ipa_reference_get_not_written_global.
962
9632008-07-07 Aldy Hernandez <aldyh@redhat.com>
964
965 * tree-ssa-dom.c: Remove FIXME tuples.
966
9672008-07-07 Aldy Hernandez <aldyh@redhat.com>
968
969 * tree-cfg.c (verify_types_in_gimple_assign): Remove
970 FIXME tuples.
971
9722008-07-04 Jakub Jelinek <jakub@redhat.com>
973
974 * cfgexpand.c (gimple_to_tree) <case GIMPLE_CALL>: Copy
975 CALL_EXPR_VA_ARG_PACK.
976
977 * gimple.c (gimple_build_bind): Set gimple_bind_block rather
978 than gimple_block.
979 (gimple_copy) <case GIMPLE_BIND>: Don't unshare gimple_bind_block.
980
981 * gimple.h (GF_ASM_INPUT, GF_ASM_VOLATILE, GF_CALL_CANNOT_INLINE,
982 GF_CALL_FROM_TRUNK, GF_CALL_RETURN_SLOT_OPT, GF_CALL_TAILCALL,
983 GF_CALL_VA_ARG_PACK, GF_OMP_PARALLEL_COMBINED, GF_OMP_RETURN_NOWAIT,
984 GF_OMP_SECTION_LAST, GF_PREDICT_TAKEN): Change from static const ints
985 into enum values.
986 (struct gimple_statement_base): Move subcode after flags to make it
987 16-bit aligned.
988
989 * tree-ssa-structalias.c (find_func_aliases): Handle ADDR_EXPR
990 as GIMPLE_SINGLE_RHS instead of GIMPLE_UNARY_RHS.
991
992 * tree-ssa-operands.c (get_expr_operands): Don't handle
993 OMP_FOR, OMP_PARALLEL, OMP_TASK, OMP_SECTIONS and PREDICT_EXPR
994 here.
995
996 * gimple.def (GIMPLE_PREDICT): New.
997 * gimple.h: Update comment above GF_* flags.
998 (GF_PREDICT_TAKEN): New.
999 (gimple_build_predict): New prototype.
1000 (gimple_predict_predictor, gimple_predict_outcome,
1001 gimple_predict_set_predictor, gimple_predict_set_outcome): New
1002 inlines.
1003 * gimple.c (gss_for_code): Handle GIMPLE_PREDICT.
1004 (gimple_size, walk_gimple_op): Likewise.
1005 (gimple_build_predict): New function.
1006 * gimple-pretty-print.c (dump_gimple_stmt): Handle GIMPLE_PREDICT.
1007 * predict.c (tree_bb_level_predictions): Likewise.
1008 * cfgexpand.c (gimple_to_tree): Likewise.
1009 * tree-inline.c (estimate_num_insns): Likewise.
1010 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
1011 * gimple-low.c (lower_stmt): Likewise.
1012 * tree-cfg.c (verify_types_in_gimple_seq_2): Likewise.
1013 (verify_types_in_gimple_stmt): Likewise. Don't handle PREDICT_EXPR.
1014 * gimplify.c (gimplify_expr): Gimplify PREDICT_EXPR into
1015 GIMPLE_PREDICT.
1016 * expr.c (expand_expr_real): Don't handle PREDICT_EXPR.
1017
10182008-07-04 Aldy Hernandez <aldyh@redhat.com>
1019
1020 * tree-ssa-forwprop.c (rhs_to_tree): Remove fixme.
1021 (forward_propagate_into_cond): Add comment.
1022 (forward_propagate_into_gimple_cond): Add comment.
1023 (forward_propagate_addr_expr_1): Enable optimization.
1024
10252008-07-04 David Edelsohn <edelsohn@gnu.org>
1026
1027 Revert:
1028 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Unshare t.
1029
1030 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Unshare reg.
1031
10322008-07-03 David Edelsohn <edelsohn@gnu.org>
1033
1034 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Unshare t.
1035
10362008-07-03 Doug Kwan <dougkwan@google.com>
1037
1038 * gimple-dummy.c (vectorizable_function): New dummy.
1039 (vect_pattern_recog): Remove dummy.
1040 * tree-vectorizer.h (vect_recog_func_ptr): Adjust types for tuples.
1041 * tree-vect-patterns.c (File): Re-enable all code.
1042 (widened_name_p): Tuplify.
1043 (vect_recog_temp_ssa_var): New.
1044 (vect_recog_dot_prod_pattern): Tuplify.
1045 (vect_recog_widen_mult_pattern): Same.
1046 (vect_recog_pow_pattern): Same.
1047 (vect_recog_widen_sum_pattern): Same.
1048 (vect_pattern_recog_1): Tuplify. Factor out code to create SSA
1049 temporaries to vect_recog_temp_ssa_var. Remove code for building
1050 assignment statement.
1051 (vect_pattern_recog): Tuplify.
1052
10532008-07-03 Janis Johnson <janis187@us.ibm.com>
1054 David Edelsohn <edelsohn@gnu.org>
1055
1056 * config/rs6000/rs6000.c (rs6000_va_start): Unshare valist.
1057 (rs6000_gimplify_va_arg): Unshare valist, reg, addr, ovf.
1058
10592008-07-03 Jakub Jelinek <jakub@redhat.com>
1060
1061 * tree-inline.c (remap_gimple_op_r): Remap TREE_BLOCK of
1062 expressions.
1063
1064 * tree-switch-conversion.c (gen_inbound_check): Force RHS to be
1065 gimple operand. Use fold_build* instead of build*.
1066 (build_arrays): Likewise. Convert RHS to LHS's type.
1067
1068 * tree-switch-conversion.c (struct switch_conv_info): Change
1069 arr_ref_first and arr_ref_last to gimple.
1070 (check_range, check_final_bb, gather_default_values,
1071 build_constructors, build_one_array, build_arrays, gen_def_assign,
1072 fix_phi_nodes, gen_inbound_check, process_switch, do_switchconv):
1073 Tuplify.
1074 (create_temp_arrays): Formatting.
1075
1076 * gimple.h (gimple_try_set_kind): New inline function.
1077 * tree-eh.c (same_handler_p, optimize_double_finally,
1078 refactor_eh_r, refactor_eh): Tuplify.
1079 * passes.c (init_optimization_passes): Reenable pass_refactor_eh.
1080
10812008-07-02 Jakub Jelinek <jakub@redhat.com>
1082
1083 * tree-parloops.c (struct reduction_info): Change reduc_stmt,
1084 reduc_phi, keep_res and new_phi field types to gimple.
1085 (struct elv_data): Add info field.
1086 (reduction_phi, loop_parallel_p, take_address_of,
1087 initialize_reductions, eliminate_local_variables_stmt,
1088 eliminate_local_variables, expr_invariant_in_region_p,
1089 separate_decls_in_region_name, separate_decls_in_region_stmt,
1090 create_phi_for_local_result, create_call_for_reduction_1,
1091 create_call_for_reduction, create_loads_for_reductions,
1092 create_final_loads_for_reduction, create_stores_for_reduction,
1093 create_loads_and_stores_for_name, separate_decls_in_region,
1094 canonicalize_loop_ivs, transform_to_exit_first_loop,
1095 create_parallel_loop, gen_parallel_loop,
1096 loop_has_vector_phi_nodes, parallelize_loops): Tuplify.
1097 * tree-cfg.c (gimple_duplicate_sese_tail): Tuplify.
1098 (move_block_to_fn): Don't call gsi_next after calling
1099 remove_phi_node.
1100
11012008-07-02 Aldy Hernandez <aldyh@redhat.com>
1102 Richard Guenther <rguenther@suse.de>
1103
1104 * tree-ssa-forwprop.c (can_propagate_from): Exclude loads
1105 from decls explicitly.
1106 (gate_forwprop): Enable.
1107
11082008-07-02 Jakub Jelinek <jakub@redhat.com>
1109
1110 * tree-vectorizer.h (vinfo_for_stmt): Use htab_find_slot_with_hash.
1111 (set_vinfo_for_stmt): Likewise. If info is NULL, delete entry from
1112 hash table.
1113 * tree-vectorizer.c (stmt_vec_info_eq, stmt_vec_info_hash): New
1114 functions.
1115 (init_stmt_vec_info_htab): Use them instead of htab_hash_pointer
1116 and htab_eq_pointer.
1117 (free_stmt_vec_info): Free stmt_info only after set_vinfo_for_stmt
1118 call.
1119
1120 Merge with mainline @137346.
1121
1122 * configure.ac (ACX_PKGVERSION): Update revision merge string.
1123 * configure: Regenerate.
1124 * builtins.c (gimple_rewrite_call_expr): Fix -Wc++-compat and/or
1125 -Wcast-qual warnings.
1126 * gimple.c (gimple_alloc_stat, gimple_build_omp_for,
1127 gimple_range_check_failed, gimple_copy): Likewise.
1128 * tree-mudflap.c (mx_xfn_xform_decls): Likewise.
1129 * tree-nested.c (convert_nonlocal_reference_stmt,
1130 convert_local_reference_stmt): Likewise.
1131 * gimple-iterator.c (gsi_insert_before_without_update,
1132 gsi_insert_after_without_update): Likewise.
1133 * tree-ssa-loop-im.c (init_lim_data, get_lim_data,
1134 clear_lim_data): Likewise.
1135 * tree-ssa-sccvn.c (vn_nary_op_insert_stmt): Likewise.
1136 * tree-vrp.c (check_all_array_refs): Likewise.
1137 * value-prof.c (histogram_eq): Likewise.
1138 * cgraphbuild.c (record_reference): Don't handle OMP_PARALLEL
1139 and OMP_TASK here.
1140 (build_cgraph_edges): Handle GIMPLE_OMP_{PARALLEL,TASK}.
1141 * cgraph.c (cgraph_add_new_function): Call gimple_register_cfg_hooks
1142 instead of tree_register_cfg_hooks.
1143 * omp-low.c (finalize_task_copyfn): Ensure the new function's
1144 body is a gimple_seq with just GIMPLE_BIND in it.
1145 (scan_omp_1_stmt): Fix -Wc++-compat and/or -Wcast-qual warnings.
1146 * tree-cfg.c (move_stmt_op, have_similar_memory_accesses_1,
1147 ref_base_address_1): Likewise.
1148 (move_stmt_r): Handle gimple_block updating.
1149 * tree-ssa-alias.c (update_alias_info_1): Tuplify.
1150 (update_alias_info): Likewise.
1151 * tree-switch-conversion.c: Stub out temporarily.
1152
11532008-06-30 Aldy Hernandez <aldyh@redhat.com>
1154
1155 * tree-ssa-forwprop.c: Remove obsolete comment.
1156 (get_prop_source_stmt): Wrap call to gimple_assign_lhs with a
1157 TREE_TYPE.
1158 (forward_propagate_comparison): Use build2 instead of
1159 fold_binary.
1160
11612008-06-27 Diego Novillo <dnovillo@google.com>
1162
1163 * cfgexpand.c (gimple_assign_rhs_to_tree): Factor out of ...
1164 (gimple_to_tree): ... here.
1165 Update comments referring to mainline merge.
1166 * tree-ssa-ter.c: Tuplify.
1167 * tree-outof-ssa.c (gimple_assign_rhs_to_tree): Declare.
1168 (replace_use_variable): Call it.
1169 (rewrite_trees): Tuplify.
1170 (remove_ssa_form): Call it.
1171 * gimple.h: Tidy some formatting.
1172 * ipa-struct-reorg.c: Include gimple.h
1173 * Makefile.in (ipa-struct-reorg.o): Add dependency on
1174 GIMPLE_H.
1175
11762008-06-27 Richard Guenther <rguenther@suse.de>
1177
1178 * tree-ssa-sccvn.c (vn_get_expr_for): New function.
1179 (vuses_to_vec): Tuplify.
1180 (copy_vuses_from_stmt): Likewise.
1181 (vdefs_to_vec): Likewise.
1182 (copy_vdefs_from_stmt): Likewise.
1183 (shared_vuses_from_stmt): Likewise.
1184 (copy_reference_ops_from_call): New function split out from
1185 copy_reference_ops_from_ref.
1186 (create_reference_ops_from_call): New function.
1187 (shared_reference_ops_from_call): Likewise.
1188 (get_def_ref_stmt_vuses): Tuplify.
1189 (vn_reference_lookup): Likewise.
1190 (vn_nary_op_lookup_stmt): New function.
1191 (vn_nary_op_insert_stmt): Likewise.
1192 (vn_phi_lookup): Tuplify.
1193 (vn_phi_insert): Likewise.
1194 (defs_to_varying): Likewise.
1195 (visit_unary_op): Likewise.
1196 (visit_binary_op): Likewise.
1197 (visit_reference_op_call): New function.
1198 (visit_reference_op_load): Tuplify.
1199 (visit_reference_op_store): Likewise.
1200 (visit_phi): Likewise.
1201 (stmt_has_constants): New function.
1202 (simplify_binary_expression): Tuplify.
1203 (simplify_unary_expression): Likewise.
1204 (try_to_simplify): Likewise.
1205 (visit_use): Likewise.
1206 (compare_ops): Likewise.
1207 (DFS): Likewise.
1208 (run_scc_vn): Likewise.
1209 * tree-ssa-sccvn.h (shared_vuses_from_stmt): Adjust prototype.
1210 (copy_vuses_from_stmt): Likewise.
1211 (vn_get_expr_for): Declare.
1212 (vn_nary_op_lookup_stmt): Likewise.
1213 (vn_nary_op_insert_stmt): Likewise.
1214 * tree-dfa.c (get_single_def_stmt): Tuplify.
1215 (get_single_def_stmt_from_phi): Likewise.
1216 (get_single_def_stmt_with_phi): Likewise.
1217 * tree-ssa-pre.c (do_SCCVN_insertion): Use vn_get_expr_for.
1218 (eliminate): Likewise.
1219 (execute_pre): Enable SCCVN.
1220 (gate_fre): Enable.
1221 * tree-flow.h (get_single_def_stmt): Adjust prototype.
1222 (get_single_def_stmt_from_phi): Likewise.
1223 (get_single_def_stmt_with_phi): Likewise.
1224 (vn_lookup_or_add_with_stmt): Likewise.
1225 (vn_lookup_with_stmt): Likewise.
1226 * gimple.c (gimple_fold): Fix.
1227 * tree-vn.c (vn_add): Disable call to add_to_value.
1228 (vn_add_with_vuses): Likewise.
1229 (vn_lookup_with_stmt): Tuplify.
1230 (vn_lookup_or_add_with_stmt): Likewise.
1231
12322008-06-27 Aldy Hernandez <aldyh@redhat.com>
1233
1234 * gimple.c (gimple_cond_get_ops_from_tree): Handle TRUTH_NOT_EXPR.
1235
12362008-06-25 Diego Novillo <dnovillo@google.com>
1237
1238 * gimple.h (enum gimple_rhs_class): Move from tree-gimple.h
1239 (struct gimple_statement_base): Change CODE field to 8
1240 bits.
1241 Change SUBCODE field to 16 bits.
1242 (gimple_set_subcode): Move to gimple.c.
1243 (gimple_subcode): Remove.
1244 (gimple_expr_type): Handle GIMPLE_ASSIGN, GIMPLE_CALL and
1245 GIMPLE_COND explicitly.
1246 Move earlier in the file.
1247 (gimple_expr_code): New.
1248 (gimple_omp_subcode): New.
1249 (gimple_omp_set_subcode): New.
1250 (gimple_omp_return_nowait_p): Call gimple_omp_subcode.
1251 (gimple_omp_section_last_p): Likewise.
1252 (gimple_omp_parallel_combined_p): Likewise.
1253 (gimple_assign_rhs_code): New.
1254 (gimple_assign_set_rhs_code): New.
1255 (gimple_assign_cast_p): Call gimple_assign_rhs_code.
1256 Handle VIEW_CONVERT_EXPR.
1257 (gimple_call_tail_p): Access subcode field directly.
1258 (gimple_call_cannot_inline_p): Likewise.
1259 (gimple_call_return_slot_opt_p): Likewise.
1260 (gimple_call_from_thunk_p): Likewise.
1261 (gimple_call_va_arg_pack_p): Likewise.
1262 (gimple_call_copy_flags): Likewise.
1263 (gimple_cond_code): Likewise.
1264 (gimple_cond_set_code): Likewise.
1265 (gimple_cond_make_false): Likewise.
1266 (gimple_cond_make_true): Likewise.
1267 (gimple_asm_volatile_p): Likewise.
1268 (gimple_asm_input_p): Likewise.
1269 (gimple_eh_filter_must_not_throw): Likewise.
1270 (gimple_eh_filter_set_must_not_throw): Likewise.
1271 (gimple_try_kind): Likewise.
1272 (gimple_try_catch_is_cleanup): Likewise.
1273 (gimple_wce_cleanup_eh_only): Likewise.
1274
1275 * tree-vrp.c (simplify_div_or_mod_using_ranges): Call
1276 gimple_assign_set_rhs_code instead of gimple_set_subcode.
1277 (simplify_abs_using_ranges): Likewise.
1278 * tree-complex.c (init_dont_simulate_again): Call
1279 gimple_expr_code instead of gimple_subcode.
1280 (complex_visit_stmt): Likewise.
1281 (expand_complex_move): Call gimple_assign_rhs_code
1282 instead of gimple_subcode.
1283 (expand_complex_operations_1): Likewise.
1284 * value-prof.c (gimple_divmod_fixed_value): Likewise.
1285 (gimple_mod_pow2): Likewise.
1286 (gimple_mod_subtract): Likewise.
1287 (gimple_divmod_values_to_profile): Likewise.
1288 * tree-ssa-alias-warnings.c (find_alias_site_helper):
1289 Call gimple_assign_cast_p.
1290 (already_warned_in_frontend_p): Likewise.
1291 * gimple.def: Add comments warning about code orderings.
1292 * omp-low.c (expand_omp_taskreg): Call gimple_omp_set_subcode.
1293 (expand_omp_atomic_fetch_op): Call gimple_assign_rhs_code.
1294 * tree-gimple.c (get_gimple_rhs_class): Move to gimple.c
1295 (get_gimple_rhs_num_ops): Likewise.
1296 (gimple_assign_rhs_code): Move to gimple.h.
1297 * tree-gimple.h (enum gimple_rhs_class): Move to gimple.h.
1298 * tree-ssa-ccp.c (fold_gimple_assign): Call
1299 gimple_assign_rhs_code instead of gimple_subcode.
1300 * tree-stdarg.c (va_list_counter_bump): Likewise.
1301 (check_all_va_list_escapes): Likewise.
1302 (execute_optimize_stdarg): Likewise.
1303 * tree-ssa-math-opts.c (is_division_by): Likewise.
1304 (replace_reciprocal): Likewise.
1305 (execute_cse_reciprocals): Likewise.
1306 (execute_convert_to_rsqrt): Likewise.
1307 * tree-ssa-dom.c (initialize_hash_element): Likewise.
1308 (simple_iv_increment_p): Likewise.
1309 (gimple_assign_unary_useless_conversion_p): Likewise.
1310 * tree-ssa-alias.c (is_escape_site): Call gimple_assign_cast_p.
1311 * predict.c (expr_expected_value_1): Call gimple_assign_rhs_code
1312 instead of gimple_subcode.
1313 * tree-eh.c (tree_could_trap_p): Call gimple_expr_code
1314 instead of gimple_subcode.
1315 * ipa-type-escape.c (is_array_access_through_pointer_and_index):
1316 Call gimple_assign_rhs_code instead of gimple_subcode.
1317 (check_assign): Likewise.
1318 * gimplify.c (gimplify_omp_parallel): Call gimple_omp_set_subcode
1319 instead of gimple_set_subcode.
1320 * tree-mudflap.c (mf_xform_derefs): Call gimple_assign_rhs_code
1321 instead of gimple_subcode.
1322 * tree-ssa-forwprop.c (get_prop_source_stmt): Likewise.
1323 (can_propagate_from): Likewise.
1324 (remove_prop_source_from_use): Likewise.
1325 (forward_propagate_addr_into_variable_array): Likewise.
1326 * tree-object-size.c (plus_stmt_object_size): Likewise.
1327 (collect_object_sizes_for): Likewise.
1328 (check_for_plus_in_loops_1): Likewise.
1329 (check_for_plus_in_loops): Likewise.
1330 * gimple.c (gimple_set_subcode): Move from gimple.h
1331 (gimple_check_failed): Access subcode field directly.
1332 (gimple_assign_single_p): Call gimple_assign_rhs_code
1333 instead of gimple_subcode.
1334 (gimple_assign_unary_nop_p): Likewise.
1335 (gimple_get_lhs): Change argument type to const_gimple.
1336 (gimple_could_trap_p): Call gimple_assign_rhs_code
1337 instead of gimple_subcode.
1338 (get_gimple_rhs_class): Move from tree-gimple.c.
1339 (get_gimple_rhs_num_ops): Likewise.
1340 * tree-ssa-structalias.c (update_alias_info): Call
1341 gimple_assign_rhs_code instead of gimple_subcode.
1342 (find_func_aliases): Likewise.
1343 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
1344 Likewise.
1345
13462008-06-25 Doug Kwan <dougkwan@google.com>
1347
1348 * gimple-dummy.c: (vect_free_slp_tree) Remove dummy.
1349 (vect_analyze_loop): Same.
1350 (vectorizable_induction): New dummy.
1351 (vectorizable_type_promotion): Same.
1352 (vectorizable_type_demotion): Same.
1353 (vectorizable_conversion): Same.
1354 (vectorizable_operation): Same.
1355 (vectorizable_assignment): Same.
1356 (vectorizable_load): Same.
1357 (vectorizable_call): Same.
1358 (vectorizable_store): Same.
1359 (vectorizable_condition): Same.
1360 (vectorizable_reduction): Same.
1361 (vectorizable_live_operation): Same.
1362 (vect_estimate_min_profitable_iters): Same.
1363 (vect_model_simple_cost): Same.
1364 (vect_model_store_cost): Same.
1365 (vect_model_load_cost): Same.
1366 (vect_pattern_recog): Same.
1367 * tree-vectorizer.h (struct _stmt_vec_info): Change fields FIRST_DR
1368 and NEXT_DR from tree to gimple type.
1369 (vectorizable_load): Change type of parameter STMT to gimple.
1370 (vectorizable_store): Same.
1371 (vectorizable_operation): Same.
1372 (vectorizable_type_promotion): Same.
1373 (vectorizable_type_demotion): Same.
1374 (vectorizable_conversion): Same.
1375 (vectorizable_assignment): Same.
1376 (vectorizable_function): Same.
1377 (vectorizable_call): Same.
1378 (vectorizable_condition): Same.
1379 (vectorizable_live_operation): Same.
1380 (vectorizable_reduction): Same.
1381 (vectorizable_induction): Same.
1382 * tree-vect-analyze.c (File): Re-enable all previously disabled code.
1383 (vect_determine_vectorization_factor): Tuplify.
1384 (vect_analyze_operations): Same.
1385 (exist_non_indexing_operands_for_use_p): Same.
1386 (vect_analyze_scalar_cycles_1): Same.
1387 (vect_insert_into_interleaving_chain): Same.
1388 (vect_same_range_drs): Same.
1389 (vect_compute_data_ref_alignment): Same.
1390 (vect_verify_datarefs_alignment): Same.
1391 (vector_alignment_reachable_p): Same.
1392 (vect_enhance_data_refs_alignment): Same.
1393 (vect_analyze_group_access): Same.
1394 (vect_analyze_data_ref_access): Same.
1395 (vect_free_slp_tree): Same.
1396 (vect_get_and_check_slp_defs): Same.
1397 (vect_build_slp_tree): Same.
1398 (vect_print_slp_tree): Same.
1399 (vect_mark_slp_stmts): Same.
1400 (vect_analyze_slp_instance): Same.
1401 (vect_analyze_slp): Same.
1402 (vect_detect_hybrid_slp_stmts): Same.
1403 (vect_analyze_data_refs): Same.
1404 (vect_mark_relevant): Same.
1405 (process_use): Same.
1406 (vect_mark_stmts_to_be_vectorized): Same.
1407 (vect_can_advance_ivs_p): Same.
1408 (vect_get_loop_niters): Same.
1409 (vect_analyze_loop_form): Same.
1410
14112008-06-25 Diego Novillo <dnovillo@google.com>
1412
1413 * tree-vectorizer.c (hash_gimple_stmt): Remove.
1414 (eq_gimple_stmt): Remove.
1415 (init_stmt_vec_info_htab): Use htab_hash_pointer and
1416 htab_eq_pointer for STMT_VEC_INFO_HTAB.
1417
14182008-06-24 Doug Kwan <dougkwan@google.com>
1419
1420 * gimple-dummy.c (vect_set_verbosity_level): Remove.
1421 (vectorize_loops): Same.
1422 (vect_free_slp_tree): New dummy.
1423 (vect_analyze_loop): Same.
1424 (vect_transform_loop): Same.
1425 * tree-vectorize.c (hashtab.h): New include.
1426 (File): Re-enable all previously commented out code.
1427 (stmt_vec_info_htab): New var.
1428 (rename_variables_in_bb): Tuplify.
1429 (slpeel_update_phis_for_duplicate_loop): Same.
1430 (slpeel_update_phi_nodes_for_guard1): Same.
1431 (slpeel_update_phi_nodes_for_guard2): Same.
1432 (slpeel_make_loop_iterate_ntimes): Same.
1433 (slpeel_tree_duplicate_loop_to_edge_cfg): Same.
1434 (slpeel_add_loop_guard): Same.
1435 (slpeel_can_duplicate_loop_p): Same.
1436 (set_prologue_iterations): Same.
1437 (find_loop_location): Same.
1438 (new_stmt_vec_info): Same.
1439 (hash_gimple_stmt): New function.
1440 (init_stmt_vec_info_htab): New function.
1441 (free_stmt_vec_info_htab): New function.
1442 (free_stmt_vec_info): Replace statement info with hash table entry.
1443 (new_loop_vec_info): Tuplify.
1444 (destroy_loop_vec_info): Same.
1445 (vect_supportable_dr_alignment): Same
1446 (vect_is_simple_use): Same.
1447 (supportable_widening_operation): Same.
1448 (supportable_narrowing_operation): Same.
1449 (report_vec_op): New function. Code factored out from ...
1450 (vect_is_simple_reduction): Call it. Tuplify.
1451 (vectorize_loops): Set up and tear down stmt_vec_info hash table.
1452 * tree-vectorizer.h (struct _slp_tree): Change statement fields
1453 (struct _loop_vec_info): Same.
1454 (struct _stmt_vec_info):
1455 (nested_in_vect_loop): Re-enable.
1456 (init_stmt_vec_info_htab): New prototype.
1457 (free_stmt_vec_info_htab): New prototype.
1458 (vinfo_for_stmt): Use hash table instead of statement info.
1459 (set_stmt_info): Remove.
1460 (set_vinfo_for_stmt): New inline.
1461 (is_pattern_stmt_p): Tuplify.
1462 (vect_is_simple_use): Tuplify prototype.
1463 (vect_is_simple_reduction): Same.
1464 (supportable_widening_operation): Same.
1465 (supportable_narrowing_operation): Same.
1466 (new_stmt_vec_info): Same.
1467 (free_stmt_vec_info): Same.
1468 Makefile.in (tree-vectorize.o): Add HASTAB_H dependency.
1469
14702008-06-22 Andrew Pinski <pinskia@gmail.com>
1471
1472 * gimple-pretty-print.c (dump_binary_rhs): Print out MIN_EXPR and
1473 MAX_EXPR specially.
1474
14752008-06-20 Doug Kwan <dougkwan@google.com>
1476
1477 * tree-loop-linear.c (File): Re-enable all previously disabled code.
1478 (gather_interchange_stats): Tuplify.
1479 (linear_transform_loops): Likewise.
1480 * gimple-dummy.c (get_type): Remove unused dummy.
1481 (ipa_add_method): Same.
1482 (ipa_callsite_callee): Same.
1483 (ipa_callsite_compute_count): Same.
1484 (ipa_callsite_compute_param): Same.
1485 (ipa_callsite_param): Same.
1486 (ipa_callsite_param_count): Same.
1487 (ipa_callsite_param_count_set): Same.
1488 (ipa_edges_create): Same.
1489 (ipa_edges_free): Same.
1490 (ipa_free): Same.
1491 (ipa_jf_get_info_type): Same.
1492 (ipa_method_compute_modify): Same.
1493 (ipa_method_compute_tree_map): Same.
1494 (ipa_method_formal_compute_count): Same.
1495 (ipa_method_formal_count): Same.
1496 (ipa_method_formal_count_set): Same.
1497 (ipa_method_get_tree): Same.
1498 (ipa_method_modify_print): Same.
1499 (ipa_method_tree_print): Same.
1500 (ipa_methodlist_init): Same.
1501 (ipa_methodlist_not_empty): Same.
1502 (ipa_node_create): Same.
1503 (ipa_nodes_create): Same.
1504 (ipa_nodes_free): Same.
1505 (ipa_remove_method): Same.
1506 (vec_set_verbosity_level): Same.
1507 * tree-ssa-loop.c (tree_linear_transform): Re-enable.
1508
15092008-06-19 Jan Hubicka <jh@suse.cz>
1510
1511 * gimple.c (gimple_alloc): Annotate with MEM_STAT_INFO
1512 (gimple_build_with_ops): Likewise.
1513 (gimple_build_assign): Likewise.
1514 (gimple_build_assign_with_ops): Likewise.
1515 * gimple.h (gimple_build_assign, gimple_build_assign_with_ops):
1516 Annotate with MEM_STAT_INFO.
1517
15182008-06-17 Jan Hubicka <jh@suse.cz>
1519
1520 * config/i386.c (ix86_gimplify_va_arg): Fix sharing issue.
1521
15222008-06-17 Jan Hubicka <jh@suse.cz>
1523
1524 * gimplify.c (gimplify_modify_expr): Unshare only returned value when
1525 want_value is set instead of copying operands all the time.
1526
15272008-06-17 Diego Novillo <dnovillo@google.com>
1528
1529 * tree-ssa-loop-niter.c (get_val_for): Fix FIXME note.
1530
15312008-06-17 Steven Bosscher <stevenb.gcc@gmail.com>
1532
1533 * gimple-dummy.c (canonicalize_induction_variables): Remove dummy.
1534 (remove_empty_loops): Likewise.
1535 (tree_unroll_loops_completely): Likewise.
1536 * tree-ssa-ivcanon.c (tree_num_loop_insns): Replace bsi with gsi.
1537 (create_canonical_iv): Convert to tuples.
1538 (try_unroll_loop_completely): Likewise.
1539 (empty_loop_p): Likewise.
1540 (remove_empty_loop): Likewise.
1541 * tree-ssa-loop.c (tree_ssa_loop_ivcanon): Re-enable.
1542 (tree_ssa_empty_loop): Likewise.
1543 (tree_complete_unroll): Likewise.
1544 (tree_complete_unroll_inner): Likewise.
1545
15462008-06-16 Doug Kwan <dougkwan@google.com>
1547
1548 * tree-ssa-ifcombine.c (File): Re-enable all previously diabled code.
1549 (bb_no_side_effects_p): Tuplify.
1550 (same_phi_args_p): Likewise.
1551 (get_name_for_bit_test): Likewise.
1552 (operand_precision): New.
1553 (integral_operand_p): New.
1554 (recognize_single_bit_test): Tuplify.
1555 (regcognize_bits_test): Tuplify.
1556 (ifcombine_ifandif): Likewise.
1557 (ifcombine_iforif): Likewise.
1558 (tree_ssa_ifcombine): Likewise.
1559 * passes.c: Re-enable pass_tree_ifcombine.
1560
15612008-06-16 Doug Kwan <dougkwan@google.com>
1562
1563 * tree-ssa-loop-unswitch.c (File): Re-enable all previously disabled
1564 code.
1565 (tree_may_unswitch_on): Tuplify.
1566 (simplify_using_entry_checks): Likewise.
1567 (tree_unswitch_single_loop): Likewise.
1568 * gimple-dummy.c (tree_ssa_unswitch_loops): Remove dummy.
1569 * tree-ssa-loop.c (gate_tree_ssa_loop_unswitch): Re-enable.
1570
15712008-06-16 Steven Bosscher <steven@gcc.gnu.org>
1572
1573 * tree-ssa-reassoc.c: Convrt to tuples.
1574
15752008-06-15 Diego Novillo <dnovillo@google.com>
1576
1577 * tree-ssa-live.c (mark_all_vars_used_1): Mark as used
1578 the TREE_BLOCK of any _EXPR node.
1579
15802008-06-13 Doug Kwan <dougkwan@google.com>
1581
1582 * tree-mudflap.c (File): Re-enable previously disabled code.
1583 (mf_decl_cache_locals): Tuplify.
1584 (mf_build_check_statement_for): Likewise.
1585 (mf_xform_derefs_1): Re-enable.
1586 (mf_xform_derefs): Tuplify.
1587 (execute_mudflap_function_decls): Likewise.
1588 (mx_register_decls): Tuplify. Add a new formal parameter for
1589 the location of newly generated statements. Change function to
1590 return modified gimple sequence instead of of modifying in-place.
1591 (mx_xfn_xform_decls): Tuplify.
1592 (mf_xform_decls): Tuplify.
1593 * passes.c (init_optimization_passes): Re-enable mudflap passes.
1594
15952008-06-13 Jakub Jelinek <jakub@redhat.com>
1596
1597 Merge with mainline @136757.
1598
1599 * configure.ac (ACX_PKGVERSION): Update revision merge string.
1600 * configure: Regenerate.
1601
16022008-06-13 Doug Kwan <dougkwan@google.com>
1603
1604 * ipa-reference.c (scan_stmt_for_static_refs): Rename walk_subtrees
1605 parameter to handled_ops_p and correct bug of using walk_tree callback
1606 semantics.
1607 * ipa-pure-const.c (scan_function_stmt): Likewise.
1608 * tree-inline.c (mark_local_labes_stmt): Rename walk_subtrees
1609 parameter to handle_ops_p.
1610 (replace_locals_stmt): Likewise.
1611
16122008-06-10 Steven Bosscher <steven@gcc.gnu.org>
1613
1614 * passes.c (init_optimization_passes): Re-enable pass_uncprop.
1615 * tree-ssa-uncprop (associate_equivalences_with_edges): Convert
1616 to tuples.
1617 (uncprop_into_successor_phis): Likewise.
1618
16192008-06-09 Diego Novillo <dnovillo@google.com>
1620
1621 * ipa-cp.c (cgraph_gate_cp): Fix 'FIXME tuples' note.
1622 * cfg.c (compact_blocks): Likewise.
1623 * dominance.c (free_dominance_info): Likewise.
1624 * gimple-low.c (gimple_stmt_may_fallthru): Likewise
1625 * c-gimplify.c (add_block_to_enclosing): Likewise.
1626 * lambda-mat.c: Include tree-flow.h.
1627 * lambda-trans.c: Likewise.
1628 * Makefile.in (lambda-mat.o, lambda-trans.o): Add dependency
1629 on $(TREE_FLOW_H).
1630 * builtins.c (expand_builtin_setjmp_receiver): Remove #if 0 markers.
1631 (fold_call_stmt): Call gimple_call_va_arg_pack_p.
1632 * tree-gimple.h (gimple_bind_expr_stack): Declare.
1633 * cgraphunit.c (update_call_expr): Do not try to access operand 0
1634 of a FUNCTION_DECL.
1635 * tree-ssa-loop-ivopts.c (stmt_invariant_in_loop_p): New.
1636 * tree-flow.h (stmt_invariant_in_loop_p): Declare.
1637 * gimple-dummy.c (remove_iv): Remove.
1638 (gimple_stmt_may_fallthru):
1639 * ipa-type-escape.c (check_tree): Call DECL_P before testing
1640 DECL_INITIAL.
1641 (check_assign): Do not access TREE_OPERAND 0 on the RHS
1642 operand.
1643 * gimplify.c (gimple_bind_expr_stack): New.
1644 * gimple.h (struct gimple_statement_bind): Add more comments
1645 for field BLOCK.
1646 (gimple_cond_set_condition): New.
1647 * gimple.c (gimple_cond_set_condition_from_tree): Call it.
1648 (gimple_copy_no_def_use): Remove. Update all users.
1649 (gimple_has_side_effects):
1650 (gimple_rhs_has_side_effects):
1651 * passes.c (init_optimization_passes): Enable
1652 pass_release_ssa_names, pass_ipa_type_escape, pass_ipa_pta,
1653 pass_ipa_struct_reorg, pass_record_bounds,
1654 pass_late_warn_uninitialized and pass_rename_ssa_copies.
1655
1656 * lambda-code.c: Tuplify.
1657 * ipa-struct-reorg.c: Tuplify.
1658 * ipa-struct-reorg.h: Tuplify.
1659
16602008-06-09 Jakub Jelinek <jakub@redhat.com>
1661
1662 * gimplify.c (gimplify_omp_for): Call gimple_omp_for_set_incr
1663 with the RHS of the GIMPLE_MODIFY_STMT instead of the
1664 GIMPLE_MODIFY_STMT itself.
1665 * gimple-pretty-print.c (dump_gimple_omp_for): Adjust for it.
1666 * tree-nested.c (walk_gimple_omp_for): Likewise.
1667 * omp-low.c (extract_omp_for_data, lower_omp_for): Likewise.
1668
16692008-06-09 Aldy Hernandez <aldyh@redhat.com>
1670
1671 * tree-ssa-forwprop.c (forward_propagate_into_cond): First argument is
1672 a GSI.
1673 (forward_propagate_addr_into_variable_array_index): Accept a GSI
1674 instead of a gimple statement. Update accordingly.
1675 (forward_propagate_addr_expr_1): Same.
1676 (forward_propagate_addr_expr): Pass a GSI to
1677 forward_propagate_addr_expr_1.
1678 (simplify_not_neg_expr): Argument is a GSI.
1679 Adjust accordingly.
1680 (tree_ssa_forward_propagate_single_use_va): Pass GSI to
1681 simplify_not_neg_expr and forward_propagate_into_cond.
1682
16832008-06-09 Aldy Hernandez <aldyh@redhat.com>
1684
1685 * tree.h (IS_CONVERT_EXPR_P): New.
1686 (CONVERT_EXPR_P): Use IS_CONVERT_EXPR_P.
1687 * tree-ssa-forwprop.c (get_prop_dest_stmt): Convert to tuples.
1688 (get_prop_source_stmt): Same.
1689 (can_propagate_from): Same.
1690 (remove_prop_source_from_use): Same.
1691 (combine_cond_expr_cond): Same.
1692 (forward_propagate_into_cond): Same.
1693 (tidy_after_forward_propagate_addr): Same.
1694 (forward_propagate_addr_into_variable_array_index): Same.
1695 (forward_propagate_addr_expr_1): Same.
1696 (forward_propagate_addr_expr): Same.
1697 (forward_propagate_comparison): Same.
1698 (simplify_not_neg_expr): Same.
1699 (tree_ssa_forward_propagate_single_use_vars): Same.
1700 (simplify_gimple_switch): Rename from -simplify_switch_expr.
1701 (rhs_to_tree): New.
1702 (forward_propagate_into_gimple_cond): New.
1703 * Makefile.in (tree-ssa-forwprop.o): Depend on GIMPLE_H.
1704 * passes.c (init_optimization_passes): Enable pass_forwprop.
1705
17062008-06-09 Jakub Jelinek <jakub@redhat.com>
1707
1708 * tree.def (OMP_SECTIONS_SWITCH, OMP_ATOMIC_LOAD, OMP_ATOMIC_STORE):
1709 Removed.
1710 * tree-gimple.c (is_gimple_stmt): Don't handle them.
1711 * gimplify.c (gimplify_expr): Likewise.
1712 * tree-pretty-print.c (dump_generic_node): Likewise.
1713 * tree-ssa-operands.c (get_expr_operands): Likewise.
1714 * expr.c (expand_expr_real_1): Likewise.
1715 * omp-low.c (expand_omp_atomic_pipeline): Adjust comment.
1716
17172008-06-09 Jakub Jelinek <jakub@redhat.com>
1718
1719 Merge with mainline @136433.
1720
1721 * configure.ac (ACX_PKGVERSION): Update revision merge string.
1722 * configure: Regenerate.
1723
17242008-06-08 Diego Novillo <dnovillo@google.com>
1725
1726 Merge with mainline @136432.
1727
1728 * configure.ac (ACX_PKGVERSION): Update revision merge string.
1729 * configure: Regenerate.
1730
17312008-06-08 Diego Novillo <dnovillo@google.com>
1732
1733 * tree-call-cdce.c: Tuplify.
1734
17352008-06-06 Diego Novillo <dnovillo@google.com>
1736
1737 http://gcc.gnu.org/ml/gcc-patches/2008-06/msg00353.html
1738
1739 * gimple.def: Add a third argument to all GIMPLE codes.
1740 Update all users.
1741 * calls.c (gimple_alloca_call_p): Fix comment.
1742 * system.h (CONST_CAST_GIMPLE): Define.
1743 * gimple.c (gimple_ops_offset_): Declare. Fill in from
1744 third argument in gimple.def.
1745 (gimple_set_stored_syms, gimple_set_loaded_syms): Move
1746 from tree-ssa-operands.c
1747 (gimple_alloc): Add argument NUM_OPS. Update all users.
1748 Compute size by adding enough space for NUM_OPS operands.
1749 (gimple_alloc_ops): Remove. Update all users.
1750 (gimple_assign_set_rhs_from_tree): Change first argument
1751 to gimple_stmt_iterator *. Update all users.
1752 Allocate a new statement, if there are more operands that
1753 can fit in the old one.
1754 (gimple_assign_set_rhs_with_ops): Likewise.
1755 (gimple_copy): Fix clearing of stores/loads sets in the
1756 copied statement.
1757 * gimple.h (struct gimple_statement_base): Remove fields
1758 UNUSED_1, UNUSED_2, UNUSED_3.
1759 Add fields MODIFIED, HAS_VOLATILE_OPS, REFERENCES_MEMORY_P,
1760 UID and NUM_OPS.
1761 Re-organize existing fields to eliminate holes on 64 bit
1762 hosts.
1763 Update all users.
1764 (struct gimple_statement_with_ops_base): Define.
1765 Factor out struct gimple_statement_with_ops. Include fields GSBASE,
1766 ADDRESSES_TAKEN, DEF_OPS and USE_OPS.
1767 (struct gimple_statement_with_ops): Include struct
1768 gimple_statement_with_ops_base.
1769 Remove field NUM_OPS.
1770 (struct gimple_statement_with_memory_ops_base): Define.
1771 Factor out of struct gimple_statement_with_memory_ops.
1772 Include fields OPBASE, VDEF_OPS, VUSE_OPS, STORES and
1773 LOADS.
1774 Remove fields HAS_VOLATILE_OPS and REFERENCES_MEMORY_P.
1775 (struct gimple_statement_with_memory_ops): Include
1776 struct gimple_statement_with_memory_ops_base.
1777 (struct gimple_statement_phi): Change size_t fields to
1778 unsigned. Update all users.
1779 (struct gimple_statement_asm): Include struct
1780 gimple_statement_with_memory_ops_base.
1781 Change fields NI and NO to unsigned char.
1782 Change field NC to short.
1783 Update all users.
1784 Add field OP.
1785 (struct gimple_statement_change_dynamic_type): Remove.
1786 Update all users.
1787 (union gimple_statement_d): Rename field WITH_OPS to GSOPS.
1788 Rename field WITH_MEM_OPS to GSMEM.
1789 Update all users.
1790 (gimple_addresses_taken): New.
1791 (gimple_addresses_taken_ptr): New.
1792 (gimple_set_addresses_taken): New.
1793 (gimple_num_ops): Move earlier.
1794 (gimple_ops): Use gimple_ops_offset_ to compute address
1795 of the operand vector.
1796 (gimple_op): Call gimple_ops.
1797 (gimple_op_ptr): Likewise.
1798 (gimple_set_op): Likewise.
1799 (gimple_switch_num_labels): Call gimple_num_ops.
1800 (gimple_switch_set_num_labels): Call gimple_set_num_ops.
1801 (gimple_switch_set_label): Call gimple_num_ops.
1802 (gimple_return_retval_ptr): Likewise.
1803 (gimple_return_retval): Likewise.
1804 (gimple_set_retval): Likewise.
1805 (gimple_cdt_new_type): Use operand 1.
1806 (gimple_cdt_new_type_ptr): Likewise.
1807 (gimple_cdt_set_new_type): Likewise.
1808 * tree-cfg.c (gimple_block_ends_with_call_p): Use
1809 CONST_CAST_BB.
1810 * tree-ssa-operands.c (gimple_set_stored_syms,
1811 gimple_set_loaded_syms): Declare.
1812 * value-prof.c (gimple_divmod_fixed_value_transform,
1813 gimple_mod_pow2_value_transform,
1814 gimple_mod_subtract_transform): Change argument to
1815 gimple_stmt_iterator *. Update all users.
1816 * tree-ssa-ccp.c (fold_gimple_assign): Change parameter
1817 to gimple_stmt_iterator *. Update all users
1818
18192008-06-05 Jakub Jelinek <jakub@redhat.com>
1820
1821 * gimplify.c (gimplify_modify_expr_to_memcpy): Use gimplify_arg
1822 for gimplification of call arguments.
1823 (gimplify_modify_expr_to_memset): Likewise.
1824
18252008-06-02 Jakub Jelinek <jakub@redhat.com>
1826
1827 PR tree-optimization/36389
1828 * gimplify.c (gimplify_cond_expr): If one or both branches are
1829 GOTO_EXPRs jumping to LABEL_DECLs, don't create unnecessary
1830 extra LABEL_DECLs and jumps around.
1831 * tree-cfg.c (remove_useless_stmts_cond): Set may_branch also
1832 for GIMPLE_COND stmts.
1833 * tree-eh.c (replace_goto_queue_cond_clause): Set label to
1834 create_artificial_label () rather than LABEL_EXPR.
1835
18362008-05-30 Diego Novillo <dnovillo@google.com>
1837
1838 * calls.c (gimple_alloca_call_p): Fix detection of
1839 alloca() calls.
1840
18412008-05-30 Diego Novillo <dnovillo@google.com>
1842
1843 * toplev.c: Include gimple.h.
1844 (dump_memory_report): Call dump_gimple_statistics.
1845 * Makefile.in (toplev.o): Add dependency on GIMPLE_H.
1846 * gimple-low.c (pass_lower_cf): Restore disabled bits.
1847 * tree-dfa.c (pass_referenced_vars): Likewise.
1848 * cfgexpand.c (pass_expand): Likewise.
1849 * tree-outof-ssa.c (pass_del_ssa): Likewise.
1850 * gimple.c (gimple_alloc): Fix non-C99 declaration.
1851 * gimplify.c (gimplify_function_tree): Remove calls to
1852 dump_tree_statistics and dump_gimple_statistics.
1853
18542008-05-30 Jakub Jelinek <jakub@redhat.com>
1855
1856 * omp-low.c (diagnose_omp_structured_block_errors): Temporarily
1857 switch cfun to DECL_STRUCT_FUNCTION (fndecl).
1858
1859 * omp-low.c (scan_sharing_clauses): Call scan_omp on
1860 OMP_CLAUSE_REDUCTION_GIMPLE_{INIT,MERGE} instead of
1861 scan_omp_op on OMP_CLAUSE_REDUCTION_{INIT,MERGE}.
1862 (lower_rec_input_clauses): Clear
1863 OMP_CLAUSE_REDUCTION_GIMPLE_{INIT,MERGE} instead of
1864 OMP_CLAUSE_REDUCTION_{INIT,MERGE}. Call lower_omp
1865 on OMP_CLAUSE_REDUCTION_GIMPLE_MERGE before gimple_seq_add_seq
1866 to replace all occurences of placeholder in the seq.
1867 * gimplify.c (gimplify_scan_omp_clauses): Clear
1868 OMP_CLAUSE_REDUCTION_{INIT,MERGE} after gimplifying it.
1869
1870 * tree-nested.c (init_tmp_var_with_call, init_tmp_var, save_tmp_var):
1871 Only set location if not gsi_end_p.
1872 (walk_gimple_omp_for): Avoid adding an empty statement to seq.
1873
1874 * tree-inline.c (remap_gimple_stmt): Remap body of
1875 GIMPLE_OMP_{MASTER,ORDERED,SECTION,SECTIONS,SINGLE}.
1876
18772008-05-28 Andrew Pinski <pinskia@gmail.com>
1878
1879 * gimple-pretty-print.c (dump_unary_rhs): Handle conversions correctly.
1880 Handle PAREN_EXPR, ABS_EXPR, and NEGATE_EXPR.
1881
18822008-05-29 Jakub Jelinek <jakub@redhat.com>
1883
1884 * omp-low.c (lower_omp_1): Handle regimplification of GIMPLE_ASM.
1885 Fix GIMPLE_ASSIGN regimplification.
1886 * gimple-pretty-print.c (dump_gimple_omp_sections,
1887 dump_gimple_omp_block, dump_gimple_omp_critical): New functions.
1888 (dump_gimple_omp_parallel): Formatting.
1889 (dump_gimple_stmt): Handle remaining GIMPLE_OMP_* statements.
1890
18912008-05-29 Aldy Hernandez <aldyh@redhat.com>
1892
1893 * tree-inline.c (remap_gimple_stmt): Handle GIMPLE_OMP_* cases.
1894
18952008-05-29 Aldy Hernandez <aldyh@redhat.com>
1896
1897 * gimple-pretty-print.c (dump_gimple_stmt): Add cases for
1898 GIMPLE_OMP_MASTER and GIMPLE_OMP_ORDERED.
1899
19002008-05-29 Aldy Hernandez <aldyh@redhat.com>
1901
1902 * omp-low.c (expand_omp_parallel): Parse an assignment from an
1903 ADDR_EXPR correctly.
1904 * gimple-pretty-print.c (dump_gimple_omp_parallel): Print braces when
1905 appropriate.
1906
19072008-05-29 Jakub Jelinek <jakub@redhat.com>
1908
1909 * omp-low.c (lower_omp_1): Fix regimplification of GIMPLE_COND and
1910 GIMPLE_CALL.
1911
19122008-05-28 Jakub Jelinek <jakub@redhat.com>
1913
1914 * gimple.c (gimple_regimplify_operands): Don't call gimple_num_ops
1915 twice. Write regimplified operand to the correct operand slot.
1916 * gimplify.c (rhs_predicate_for): No longer static.
1917 * tree-gimple.h (rhs_predicate_for): New prototype.
1918 * omp-low.c (lower_omp_1): Don't call gimple_regimplify_operands,
1919 instead forcefully gimplify_expr each operand with the right
1920 predicate.
1921
1922 * gimple.h (gimple_omp_atomic_store_val_ptr,
1923 gimple_omp_atomic_load_lhs_ptr, gimple_omp_atomic_load_rhs_ptr): New
1924 inlines.
1925 * gimple.c (walk_gimple_op): Handle GIMPLE_OMP_ATOMIC_LOAD and
1926 GIMPLE_OMP_ATOMIC_STORE.
1927 * omp-low.c (lower_omp_1): Handle GIMPLE_OMP_ATOMIC_LOAD.
1928
1929 * gimple-pretty-print.c (dump_gimple_omp_for): Don't indent twice
1930 before gimple_omp_body, don't emit extra newline after it.
1931 (dump_gimple_omp_single): Likewise.
1932
19332008-05-27 Aldy Hernandez <aldyh@redhat.com>
1934
1935 * tree-nested.c (walk_omp_for): Rename to...
1936 (walk_gimple_omp_for): Enable and convert to tuples.
1937 (convert_nonlocal_reference_stmt): Enable call to walk_gimple_omp_for.
1938 (convert_local_reference_stmt): Same.
1939 * gimple.c (walk_gimple_op): Remove fixme note.
1940
19412008-05-27 Diego Novillo <dnovillo@google.com>
1942
1943 * tree-gimple.c (get_gimple_rhs_class): Handle
1944 POLYNOMIAL_CHREC.
1945 * tree-cfg.c (verify_types_in_gimple_assign): Do not
1946 check every operand against the LHS type for tcc_binary
1947 expressions.
1948
19492008-05-26 Diego Novillo <dnovillo@google.com>
1950
1951 Merge with mainline @135951.
1952
1953 * configure.ac (ACX_PKGVERSION): Update revision merge string.
1954 * configure: Regenerate.
1955
19562008-05-22 Aldy Hernandez <aldyh@redhat.com>
1957
1958 * tree-cfg.c (make_edges): Change OMP_SECTION to GIMPLE_OMP_SECTIONS.
1959 Update comments.
1960 (verify_types_in_gimple_stmt): Update comments.
1961 (verify_stmt): Same.
1962
19632008-05-21 Andreas Tobler <a.tobler@schweiz.org>
1964
1965 * ../configure: Regenerate with the correct autoconf version: 2.59.
1966
19672008-05-21 Aldy Hernandez <aldyh@redhat.com>
1968
1969 * omp-low.c (lower_reduction_clauses): Generate OMP_ATOMIC_* directly.
1970 Concatenate atomic code correctly.
1971
19722008-05-20 Aldy Hernandez <aldyh@redhat.com>
1973
1974 * omp-low.c (WALK_SUBSTMTS): New.
1975 (check_combined_parallel): Walk sub-statements.
1976 (diagnose_sb_1): Same.
1977 (diagnose_sb_2): Same.
1978 Handle switch labels and return statements correctly.
1979 * testsuite/gcc.dg/gomp/block-7.c: Adjust for new error message.
1980 * testsuite/gcc.dg/gomp/block-2.c: Same.
1981 * testsuite/gcc.dg/gomp/block-4.c: Same.
1982 * testsuite/gcc.dg/gomp/block-6.c: Same.
1983 * testsuite/gcc.dg/gomp/block-8.c: Same.
1984 * testsuite/gcc.dg/gomp/block-1.c: Same.
1985 * testsuite/gcc.dg/gomp/block-3.c: Same.
1986 * testsuite/gcc.dg/gomp/block-5.c: Same.
1987
19882008-05-20 Aldy Hernandez <aldyh@redhat.com>
1989
1990 * omp-low.c (lower_omp_single): Append to bind variables.
1991 (lower_omp_master): Same.
1992 (lower_omp_ordered): Same.
1993 (lower_omp_critical): Same.
1994 * gimplify.c (gimplify_modify_expr_to_memcpy): Make sure we are
1995 fully gimplified.
1996 (gimplify_omp_for): Same.
1997 * gimple.h (gimple_bind_set_vars): New.
1998
19992008-05-16 Andreas Tobler <a.tobler@schweiz.org>
2000
2001 * config/alpha/alpha.c (alpha_gimplify_va_arg): Adjust arguments.
2002 * config/ia64/ia64.c (ia64_gimplify_va_arg): Likewise.
2003 * config/pa/pa.c (hppa_gimplify_va_arg_expr): Likewise.
2004 * config/m32c/m32c-protos.h (m32c_gimplify_va_arg_expr): Likewise.
2005 * config/spu/spu.c (spu_gimplify_va_arg_expr): Likewise.
2006 * config/stormy16/stormy16.c (xstormy16_gimplify_va_arg_expr): Likewise.
2007 * config/xtensa/xtensa.c (xtensa_gimplify_va_arg_expr): Likewise.
2008
2009 * config/sparc/sparc.c (sparc_gimplify_va_arg): Adjust arguments.
2010
20112008-05-16 Diego Novillo <dnovillo@google.com>
2012
2013 * tree-into-ssa.c (rewrite_uses_p): Fix return type.
2014 * tree-vectorizer.h (nested_in_vect_loop_p): Add return value.
2015 * tree-ssa-pre.c (execute_pre): Add return value.
2016
20172008-05-15 Aldy Hernandez <aldyh@redhat.com>
2018
2019 * config/s390/s390.c (s390_gimplify_va_arg): Adjust for tuples.
2020
20212008-05-15 Diego Novillo <dnovillo@google.com>
2022
2023 * Makefile.in (STRICT_WARN): Revert to mainline behaviour.
2024 (builtins.o-warn, expr.o-warn, dse.o-warn,
2025 ebitmap.o-warn, lower-subreg.o-warn, tree-chrec.o-warn,
2026 tree-ssa-structalias.o-warn, varasm.o-warn): Remove.
2027 * config/arm/arm.c (arm_return_in_memory): Fix return type.
2028 * config/arm/arm-protos.h (arm_return_in_memory): Likewise.
2029
20302008-05-15 Aldy Hernandez <aldyh@redhat.com>
2031
2032 * gimplify.c (gimplify_omp_for): Handle a MODIFY_EXPR in
2033 gimple_omp_for_incr.
2034 * cfgexpand.c (gimple_to_tree): Do not die on compile errors.
2035
20362008-05-15 Aldy Hernandez <aldyh@redhat.com>
2037
2038 * omp-low.c (check_omp_nesting_restrictions): Fetch clauses from for.
2039 (expand_omp_atomic): Parse GIMPLE_OMP_ATOMIC correctly.
2040 (lower_omp_single_simple): Create GIMPLE_COND with both tlabel and
2041 flabel.
2042 (lower_omp_for): Make sure we have a body before look inside.
2043 * gimple-low.c (lower_stmt): Add case for GIMPLE_OMP_SECTIONS_SWITCH.
2044 * gimple-pretty-print.c (dump_gimple_omp_single): New.
2045 (dump_gimple_stmt): Add case for GIMPLE_OMP_SINGLE.
2046 * gimplify.c (gimplify_omp_workshare): Remove fixme. Enable code.
2047 * gimple.c (gss_for_code): Add case for GIMPLE_OMP_{RETURN,
2048 SECTIONS_SWITCH}.
2049 (gimple_regimplify_operands): Do not regimplify GIMPLE_ASM
2050 operands. Do not look inside empty operands.
2051 * gimple.h (is_gimple_omp): Fix typo for GIMPLE_OMP_ATOMIC*.
2052 * tree-cfg.c (make_edges): Rename OMP_SECTION to GIMPLE_OMP_SECTION.
2053
20542008-05-14 Aldy Hernandez <aldyh@redhat.com>
2055
2056 * omp-low.c (optimize_omp_library_calls): Make sure statement is
2057 a GIMPLE_CALL before we look inside of it.
2058 * tree-cfg.c (move_stmt_op): Exit gracefully.
2059
20602008-05-13 Aldy Hernandez <aldyh@redhat.com>
2061
2062 * omp-low.c (scan_omp_op): Remove walk_subtrees. Call walk_tree.
2063 (scan_omp_for): Scan OMP body.
2064 (scan_omp_1_stmt): Set handled_ops_p.
2065 (expand_omp_parallel): Parse ADDR_EXPR correctly.
2066 (diagnose_sb_1): Rename walk_subtrees to handled_ops_p and set
2067 appropriately.
2068 (diagnose_sb_2): Same.
2069 * gimple-pretty-print.c (dump_gimple_omp_for): Print braces around
2070 OMP body.
2071 * tree-inline.c (estimate_num_insns): GIMPLE_OMP_CONTINUE does not
2072 have a body.
2073 * tree-cfg.c (move_stmt_op): Parse move_stmt_d out of data correctly.
2074 (move_stmt_r): Rename walk_subtrees to handled_ops_p and set
2075 appropriately.
2076
20772008-05-12 Diego Novillo <dnovillo@google.com>
2078
2079 Merge with mainline @135126.
2080
2081 * configure.ac (ACX_PKGVERSION): Update revision merge string.
2082 * configure: Regenerate.
2083
20842008-05-11 Doug Kwan <dougkwan@google.com>
2085
2086 * gimplify.c (gimple_pop_condition): Clear
2087 conditional_cleanups field after the associated gimple sequence has
2088 been freed implicitly.
2089 (gimplify_cleanup_point_expr): Clear conditional_cleanups field
2090 of gimplfiy_ctxp after resetting the conditions field.
2091 * gimple.h (gimple_call_return_type): Handle REFERENCE_TYPE like
2092 POINTER_TYPE.
2093
20942008-05-10 Kaz Kojima <kkojima@gcc.gnu.org>
2095
2096 * config/sh/sh.c (sh_gimplify_va_arg_expr): Change pre_p and
2097 post_p types to gimple_seq *.
2098
20992008-05-09 Aldy Hernandez <aldyh@redhat.com>
2100
2101 * omp-low.c (maybe_catch_exception): Return body when no exceptions.
2102 (gate_lower_omp): Enable pass.
2103 * gimple-low.c (lower_stmt): Add GIMPLE_OMP_ATOMIC_* cases.
2104
21052008-05-08 Aldy Hernandez <aldyh@redhat.com>
2106
2107 * omp-low.c (extract_omp_for_data): Update comment.
2108 (get_ws_args_for): Same.
2109 (lower_send_shared_vars): Same.
2110 (expand_omp_parallel): Same.
2111 (expand_omp_for_static_nochunk): Same.
2112 (expand_omp_for_static_chunk): Same.
2113 (expand_omp_sections): Same.
2114 (expand_omp_atomic_fetch_op): Same.
2115 (expand_omp_atomic_pipeline): Same.
2116 (build_omp_regions_1): Same.
2117 (lower_omp_for): Same.
2118 (expand_omp_atomic_mutex): Change OMP_ATOMIC_STORE to
2119 GIMPLE_OMP_ATOMIC_STORE.
2120 * gimple-pretty-print.c (dump_gimple_omp_parallel): Print child fn
2121 and data_arg.
2122 * tree-cfg.c (make_edges): Enable commented out code and convert
2123 to tuples.
2124 (replace_by_duplicate_decl): Same.
2125 (replace_ssa_name): Same.
2126 (move_stmt_r): Same.
2127 (move_stmt_op): New.
2128 (mark_virtual_ops_in_bb): Enable and convert to tuples.
2129 (makr_virtual_ops_in_region): Same.
2130 (move_block_to_fn): Convert to tuples.
2131 (find_outermost_region_in_block): Enable and convert to tuples.
2132 (move_sese_region_to_fn): Same.
2133
21342008-05-05 Aldy Hernandez <aldyh@redhat.com>
2135
2136 * omp-low.c (expand_omp_parallel): Remove fixmes.
2137 (expand_omp_for_static_chunk): Enable and tuplify code.
2138 (expand_omp_sections): Remove fixmes. Tuplify.
2139 (lower_omp_sections): Same.
2140 (diagnose_sb_0): Remove fixme.
2141 * tree-ssa.c (redirect_edge_var_map_dup): Fix typo in comment.
2142 * gimple.c (gimple_size): Add case for GIMPLE_OMP_SECTIONS_SWITCH.
2143 (gimple_build_omp_sections): New.
2144 * gimple.h (gimple_build_omp_sections_switch): New prototype.
2145
21462008-05-03 Aldy Hernandez <aldyh@redhat.com>
2147
2148 * omp-low.c (diagnose_sb_0): Tuplify and enable.
2149 (diagnose_sb_1): Same.
2150 (diagnose_sb_2): Same.
2151 (diagnose_omp_structured_block_errors): Tuplify.
2152 * gimple-dummy.c (DUMMY_FN): Remove
2153 diagnose_omp_structured_block_errors.
2154 * c-decl.c (c_gimple_diagnostics_recursively): Remove fixme
2155 and enable call to diagnose_omp_structured_block_errors.
2156 * Makefile.in (GTFILES): Add omp-low.c again.
2157
719bb4e3 21582008-05-02 Rafael Espíndola <espindola@google.com>
726a989a
RB
2159
2160 * tree-gimple.c (is_gimple_condexpr): Do not allow
2161 trapping comparisons.
2162 * tree-eh.c (tree_could_trap_p): Fix handling of floating
2163 point comparisons.
2164
21652008-05-02 Doug Kwan <dougkwan@google.com>
2166
2167 * value-prof.c (gimple_divmod_fixed_value): Remove formal parameters
2168 OPERATION, OP1 and OP2 and derive their values from parameter STMT
2169 instead. Update prototype and caller.
2170 (gimple_mod_pow2): Remove formal parameters OPERATION, OP1 and OP2
2171 and derive their values from parameter STMT instead. Update prototype
2172 and caller.
2173 (gimple_mod_pow2_value_transform): Remove temporares OP, OP1 and OP2.
2174 Use a new tempory LHS_TYPE to store assignment LHS type.
2175 (gimple_mode_subtract): Remove formal parameters OPERATION, OP1 and OP2
2176 and derive their values from parameter STMT instead. Update prototype
2177 and caller. Fix a bug in a call to gimple_build_assign_with_ops.
2178 (gimple_mod_subtract_transform): Remove temporares OP, OP1 and OP2.
2179 Use a new tempory LHS_TYPE to store assignment LHS type.
2180 (gimple_ic, gimple_indirect_call_to_profile): Fix bug in tree-code
2181 tests.
2182 * tree-profile.c (File): Re-enable all previously disabled code.
2183 (tree_gen_edge_profiler): Tuplify.
2184 (prepare_instrumented_value): Ditto.
2185 (tree_gen_interval_profiler): Ditto.
2186 (tree_gen_pow2_profiler): Ditto.
2187 (tree_gen_one_value_profiler): Ditto.
2188 (tree_gen_ic_profiler): Ditto.
2189 (tree_gen_ic_func_profiler): Ditto.
2190 (tree_gen_const_delta_profiler): Re-format formal parameters for
2191 proper alignement.
2192 (tree_gen_average_profiler): Tuplify.
2193 (tree_gen_ior_profiler): Ditto.
2194 (do_tree_profiling): Re-enable previously disabled code. Remove
2195 FIXME.
2196 (tree_profiling): Ditto.
2197 * gimple.c (gimple_set_bb): Remove assertion.
2198 * tree-cfg.c (change_bb_for_stmt): Remove. Redirect callers to
2199 gimple_set_bb.
2200 (gimple_merge_blocks): Call gimple_set_bb instead of
2201 change_bb_for_stmt.
2202 (gimple_split_block): Ditto.
2203 (verify_stmts): Add code to check that label_to_block_map and labels
2204 are consistent.
2205
719bb4e3 22062008-04-22 Rafael Espíndola <espindola@google.com>
726a989a
RB
2207
2208 Merge with mainline @134843.
2209
2210 * configure.ac (ACX_PKGVERSION): Update revision merge string.
2211 * configure: Regenerate.
2212
22132008-05-01 Diego Novillo <dnovillo@google.com>
2214
2215 http://gcc.gnu.org/ml/gcc-patches/2008-05/msg00053.html
2216
2217 * tree-vrp.c (vrp_visit_phi_node): Cast variable I to int
2218 for printing.
2219 * cgraph.c (cgraph_release_function_body): Only call
2220 gimple_set_body if NODE->DECL has a struct function.
2221 * tree.c (make_node_stat): Do not call gimple_set_body.
2222 * cp/Make-lang.in (cp/semantics.o): Add dependency on
2223 $(GIMPLE_H).
2224 * cp/semantics.c: Include gimple.h
2225 (expand_or_defer_fn): Assert that FN has a gimple body.
2226 * function.h (struct function): Add field GIMPLE_BODY.
2227 * gimple.c (gimple_bodies_vec): Remove.
2228 (gimple_bodies_map): Remove.
2229 (gimple_set_body): Re-write to use GIMPLE_BODY in FN's
2230 function object.
2231 (gimple_body): Likewise.
2232
22332008-05-01 Oleg Ryjkov <olegr@google.com>
2234
2235 http://gcc.gnu.org/ml/gcc-patches/2008-05/msg00053.html
2236
2237 * tree-eh.c (record_in_goto_queue, record_in_goto_queue_label):
2238 New functions.
2239 (maybe_record_in_goto_queue): Refactored and added support for
2240 recording labels embedded in GIMPLE_CONDs.
2241 (lower_catch, lower_cleanup): Fix 3 typos that were introduced
2242 during the conversion to tuples.
2243 (lower_eh_constructs_2): Call maybe_record_in_goto_queue for
2244 GIMPLE_CONDs.
2245
719bb4e3 22462008-05-01 Rafael Espíndola <espindola@google.com>
726a989a
RB
2247
2248 * gimple-pretty-print.c (dump_gimple_try): Print like trunk does.
2249 (dump_gimple_catch): Print like trunk does.
2250
719bb4e3 22512008-05-01 Rafael Espíndola <espindola@google.com>
726a989a
RB
2252
2253 * passes.c (gimple_verify_flow_info): Enable remaining
2254 pass_rename_ssa_copies passes.
2255
719bb4e3 22562008-05-01 Rafael Espíndola <espindola@google.com>
726a989a
RB
2257
2258 * tree-cfg.c (gimple_verify_flow_info): Handle switches with only the
2259 default label.
2260
22612008-04-30 Doug Kwan <dougkwan@google.com>
2262
2263 * cfgexpand.c (gimple_to_tree): Change code to annotate EH region
2264 numbers only if numbers are greater than zero. Also propagate EH
2265 region number to CALL_EXPRs nested in assignments.
2266
22672008-04-29 Doug Kwan <dougkwan@google.com>
2268
2269 * tree-eh.c (lower_try_finally_dup_block): Call
2270 copy_gimple_seq_and_replace_locals instead of gimple_seq_copy.
2271 (optimize_double_finally): Add a note about replacing unsave_expr_now
2272 with copy_gimple_seq_and_replace_locals.
2273 * tree-inline.c (mark_local_labels_stmt, replace_locals_op,
2274 replace_locals_stmt, copy_gimple_seq_and_replace_locals): New.
2275 * tree-inline.h (copy_gimple_seq_and_replace_locals): New prototype.
2276
719bb4e3 22772008-04-29 Rafael Espíndola <espindola@google.com>
726a989a
RB
2278
2279 * gimple-pretty-print.c (dump_gimple_return): Add missing space.
2280 * tree-ssa-threadedge.c (simplify_control_stmt_condition): Fix type
2281 of variable.
2282
719bb4e3 22832008-04-29 Rafael Espíndola <espindola@google.com>
726a989a
RB
2284
2285 * gimple-pretty-print.c (pp_cfg_jump): add missing ";".
2286
719bb4e3 22872008-04-29 Rafael Espíndola <espindola@google.com>
726a989a
RB
2288
2289 * gimple-pretty-print.c (dump_gimple_assign): print ";" at the end.
2290 (dump_gimple_return):print ";" at the end.
2291 (dump_gimple_call): print ";" at the end.
2292 (dump_gimple_cond): use op_symbol_code instead of tree_code_name.
2293 (pp_cfg_jump): print ";" at the end.
2294
719bb4e3 22952008-04-29 Rafael Espíndola <espindola@google.com>
726a989a
RB
2296
2297 * ipa-cp.c (ipcp_driver): Disable.
2298 * matrix-reorg.c (matrix_reorg): Comment body.
2299 (gate_matrix_reorg): Disable.
2300 * passes.c (init_optimization_passes): Enable first pass_merge_phi,
2301 pass_ipa_cp and pass_ipa_matrix_reorg.
2302
23032008-04-29 Doug Kwan <dougkwan@google.com>
2304
2305 * tree-eh.c (lower_catch): Fix bug of accessing sub-statements
2306 using gimple_catch_handler. Fix bug of mixing up GIMPLE_GOTO and
2307 GIMPLE_LABEL in statement building.
2308 (lower_cleanup): Fix bug of mixing up gimple_try_clean and
2309 gimple_try_eval.
2310 (lower_cleanup): Use gimple codes instead of tree codes in switch
2311 statement.
2312 (tree-cfg.c): Add code to generate EH edges of GIMPLE_ASSIGN.
2313
23142008-04-28 Diego Novillo <dnovillo@google.com>
2315
2316 http://gcc.gnu.org/ml/gcc-patches/2008-04/msg02051.html
2317
2318 * tree-ssa-phiprop.c (phiprop_insert_phi): Remove
2319 OLD_ARG_CODE. Use TREE_CODE (ARG) instead.
2320 Assert that NEW_VAR is a GIMPLE register.
2321 (propagate_with_phi): Fix test of is_gimple_reg_type for
2322 ARG.
2323 Do not set subcode of USE_STMT to NOP_EXPR.
2324
23252008-04-28 Doug Kwan <dougkwan@google.com>
2326
2327 * tree-inline.c (remap_gimple_op_r): Remove code to handle RESX_EXPR
2328 region number remapping.
2329 (remap_gimple_stmt): Add code to handle GIMPLE_RESX region number
2330 remapping.
2331
719bb4e3 23322008-04-28 Rafael Espíndola <espindola@google.com>
726a989a
RB
2333
2334 * cfgexpand.c (gimple_to_tree): Add support for switch stmts without
2335 a default label.
2336 * fold-const.c (tree_call_nonnegative_warnv_p): Remove the code
2337 argument.
2338 (tree_invalid_nonnegative_warnv_p): Update call to
2339 tree_call_nonnegative_warnv_p.
2340 * gimple.h (gimple_location_ptr): New.
2341 * tree-flow.h (simplify_stmt_using_ranges): Change signature.
2342 * tree-ssa-propagate.c (substitute_and_fold): Call
2343 simplify_stmt_using_ranges.
2344 * tree-vrp.c (struct assert_locus_d): Tuplify.
2345 (switch_update): Tuplify.
2346 (stmt_overflow_infinity): New.
2347 (gimple_assign_nonnegative_warnv_p): New.
2348 (gimple_call_nonnegative_warnv_p): New.
2349 (gimple_stmt_nonnegative_warnv_p): New.
2350 (gimple_assign_nonzero_warnv_p): New.
2351 (gimple_stmt_nonzero_warnv_p): New.
2352 (vrp_stmt_computes_nonzero): Tuplify.
2353 (extract_range_basic): Tuplify.
2354 (extract_range_from_expr): Tuplify. Rename to
2355 extract_range_from_assignment.
2356 (adjust_range_with_scev): Tuplify.
2357 (vrp_var_may_overflow): Tuplify.
2358 (build_assert_expr_for): Tuplify.
2359 (fp_predicate): Tuplify.
2360 (infer_value_range): Tuplify.
2361 (dump_asserts_for): Tuplify.
2362 (register_new_assert_for): Tuplify.
2363 (register_edge_assert_for_2): Tuplify.
2364 (register_edge_assert_for_1): Tuplify.
2365 (register_edge_assert_for): Tuplify.
2366 (find_conditional_asserts): Tuplify.
2367 (find_switch_asserts): Tuplify.
2368 (find_assert_locations): Tuplify.
2369 (process_assert_insertions_for): Tuplify.
2370 (process_assert_insertions): Tuplify.
2371 (check_array_ref): Tuplify.
2372 (search_for_addr_array): Tuplify.
2373 (check_array_bounds): Tuplify.
2374 (check_all_array_refs): Tuplify.
2375 (remove_range_assertions): Tuplify.
2376 (stmt_interesting_for_vrp): Tuplify.
2377 (vrp_initialize): Tuplify.
2378 (vrp_visit_assignment): Tuplify. Rename to vrp_visit_assignment_or_call.
2379 (vrp_visit_cond_stmt): Tuplify.
2380 (find_case_label_index): Tuplify.
2381 (find_case_label_range): Tuplify.
2382 (vrp_visit_switch_stmt): Tuplify.
2383 (vrp_visit_stmt): Tuplify.
2384 (vrp_visit_phi_node): Tuplify.
2385 (simplify_div_or_mod_using_ranges): Tuplify.
2386 (simplify_abs_using_ranges): Tuplify.
2387 (simplify_cond_using_ranges): Tuplify.
2388 (simplify_switch_using_ranges): Tuplify.
2389 (simplify_stmt_using_ranges): Tuplify.
2390 (simplify_stmt_for_jump_threading): Tuplify.
2391 (identify_jump_threads): Tuplify.
2392 (execute_vrp): Tuplify.
2393 (gate_vrp): Enable.
2394 * tree.h (tree_call_nonnegative_warnv_p): Remove the code argument.
2395
23962008-04-28 Doug Kwan <dougkwan@google.com>
2397
2398 * cp/cp-gimplify.c (finish_bc_block): Tuplify.
2399 (build_bc_goto): Renamed to get_bc_label. Return a label
2400 only. Uupdate callers.
2401 (get_bc_label): New
2402 (gimplify_cp_loop): Tuplify. Also check COND for error_mark_node
2403 before gimplifying it.
2404 (gimplify_for_stmt): Tuplify.
2405 (gimplify_while_stmt): Tuplify.
2406 (gimplify_for_stmt): Tuplify.
2407 (gimplify_do_stmt): Tuplify.
2408 (gimplify_switch_stmt): Tuplify.
2409 (cp_gimplify_omp_switch_stmt): Add temporary code to pop block
2410 label stack.
2411 (cp_gimplify_expr): Pass pre_p to gimplify_while_stmt,
2412 gimplify_do_stmt and gimplify_switch_stmt. Tuplify
2413 gimplification of CONTINUE_STMT and BREAK_STMT.
2414
719bb4e3 24152008-04-26 Rafael Espíndola <espindola@google.com>
726a989a
RB
2416
2417 * gimple.c (gimple_build_assign_with_ops): Don't set SSA_NAME_DEF_STMT.
2418 * gimple.h (gimple_assign_set_lhs): Set SSA_NAME_DEF_STMT.
2419 (gimple_call_set_lhs): Set SSA_NAME_DEF_STMT.
2420 * omp-low.c (expand_parallel_call): Don't set SSA_NAME_DEF_STMT if not
2421 needed.
2422 (expand_omp_for_generic): Same.
2423 (expand_omp_for_static_nochunk): Same.
2424 (expand_omp_for_static_chunk): Same.
2425 (expand_omp_sections): Same.
2426 (expand_omp_atomic_mutex): Same.
2427 * predict.c (strip_builtin_expect): Same.
2428 * tree-cfg.c (gimple_merge_blocks): Same.
2429 * tree-inline.c (remap_ssa_name): Same.
2430 (setup_one_parameter): Same.
2431 * tree-predcom.c (replace_ref_with): Same.
2432 (replace_ref_with): Same.
2433 (initialize_root_vars_lm): Same.
2434 (reassociate_to_the_same_stmt): Same.
2435 * tree-scalar-evolution.c (scev_const_prop): Same.
2436 * tree-ssa-loop-im.c (rewrite_reciprocal): Same.
2437 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Same.
2438 * tree-ssa-loop-manip.c (create_iv): Same.
2439 * tree-ssa-math-opts.c (execute_cse_sincos_1): Same.
2440 * tree-ssa-phiopt.c (minmax_replacement): Same.
2441 (abs_replacement): Same.
2442
24432008-04-25 Diego Novillo <dnovillo@google.com>
2444
2445 http://gcc.gnu.org/ml/gcc-patches/2008-04/msg01965.html
2446
2447 * gimplify.c (annotate_all_with_location_after): New.
2448 (gimplify_expr): Call it.
2449
24502008-04-25 Diego Novillo <dnovillo@google.com>
2451
2452 Merge with mainline @134692.
2453
2454 * configure.ac (ACX_PKGVERSION): Update revision merge string.
2455 * configure: Regenerate.
2456
24572008-04-25 Doug Kwan <dougkwan@google.com>
2458
2459 * tree-inline.c (expand_call_inline): Save old call statement
2460 and use it to look up correct EH region.
2461
24622008-04-24 Doug Kwan <dougkwan@google.com>
2463
2464 * Makefile.in (STRICT_WARN): Remove -Wno-format and
2465 -Wno-missing-format-attribute.
2466 * gimplify.c (gimple_pop_condition): Remove redundant and incorrect
2467 gimple_seq_free.
2468 (gimplify_init_ctor_eval_range): Add a fall-through label for
2469 GIMPLE_COND statement.
2470
719bb4e3 24712008-04-25 Rafael Espíndola <espindola@google.com>
726a989a
RB
2472
2473 * tree-ssa-dom.c (avail_expr_eq): Return false if the hashes don't
2474 match.
2475
24762008-04-24 Oleg Ryjkov <olegr@google.com>
2477
2478 * gimplify.c (gimplify_expr): Fix the assertion that verifies validity
2479 of parameters.
2480 * tree-inline.c (estimate_num_insns): Handle
2481 GIMPLE_CHANGE_DYNAMIC_TYPE.
2482 * tree-cfg.c (verify_types_in_gimple_stmt): Likewise.
2483
719bb4e3 24842008-04-24 Rafael Espíndola <espindola@google.com>
726a989a
RB
2485
2486 * tree-ssa-dom.c (initialize_hash_element): Fix the type of the code
2487 variable.
2488
719bb4e3 24892008-04-23 Rafael Espíndola <espindola@google.com>
726a989a
RB
2490
2491 * omp-low.c (gate_lower_omp): Return 0.
2492 * passes.c (init_optimization_passes): Enable all passes whose
2493 corresponding dump options are used in the testsuite.
2494 * tree-loop-distribution.c (tree_loop_distribution): Comment body.
2495 (gate_tree_loop_distribution): Return 0.
2496 * tree-ssa-forwprop.c (tree_ssa_forward_propagate_single_use_vars):
2497 Comment body.
2498 (gate_forwprop): Return 0.
2499 * tree-ssa-loop.c (gate_tree_ssa_loop_unswitch): Return 0.
2500 (gate_tree_vectorize): Return 0.
2501 (gate_tree_ssa_loop_ivcanon): Return 0.
2502 (tree_ssa_empty_loop): Return 0.
2503 (gate_tree_complete_unroll): Return 0.
2504 * tree-ssa-pre.c (gate_fre): Return 0.
2505 * tree-ssa-reassoc.c (execute_reassoc): Comment body.
2506 (gate_tree_ssa_reassoc): Return 0.
2507 * tree-stdarg.c (gate_optimize_stdarg): Return 0.
2508 (execute_optimize_stdarg): Comment body.
2509 * tree-vrp.c (execute_vrp): Comment body.
2510 (gate_vrp): Return 0.
2511
25122008-04-22 Aldy Hernandez <aldyh@redhat.com>
2513
2514 * omp-low.c (lower_omp_parallel): Add new argument to
2515 gimple_omp_parallel_set_combined_p.
2516 (lower_omp_1): Remove debugging code.
2517 * gimple.h (gimple_omp_parallel_combined_p): Add new argument.
2518
719bb4e3 25192008-04-22 Rafael Espíndola <espindola@google.com>
726a989a
RB
2520
2521 Merge with mainline @134552.
2522
2523 * configure.ac (ACX_PKGVERSION): Update revision merge string.
2524 * configure: Regenerate.
2525
25262008-04-21 Doug Kwan <dougkwan@google.com>
2527
2528 * tree-ssa-phiopt.c (FILE): Uncomment all previously disabled code.
2529 (tree_ssa_phiopt): Remove FIXME and re-enable code.
2530 (tree_ssa_cs_elim): Remove FIXME and re-enable code.
2531 (tree_ssa_phiopt_worker): Tuplify.
2532 (replace_phi_edge_with_variable): Tuplify.
2533 (conditional_replacement): Tuplify and simplify optimization logic.
2534 Construct a boolean tree and let fold and force_gimple_operand_gsi
2535 do optimization and code genaration.
2536 (value_replacement): Tuplify.
2537 (minmax_replacement): Tuplify.
2538 (abs_replacement): Tuplify.
2539 (nt_init_block): Tuplify.
2540 (cond_store_replacement): Tuplify.
2541 * gimple.h (gimple_seq_singleton_p): Fix empty sequence bug.
2542 * passes.c (init_optimization_passes): Re-enable pass_cselim
2543 and pass_phiopt.
2544
25452008-04-21 Diego Novillo <dnovillo@google.com>
2546
2547 * tree.c (make_node_stat): Clear gimple_body() for newly
2548 created FUNCTION_DECLs.
2549 * tree-gimple.c (rhs_predicate_for): Move to gimplify.c.
2550 * tree-gimple.h (rhs_predicate_for): Remove declaration.
2551 * gimple-pretty-print.c (dump_gimple_assign): Add support
2552 for showing volatile operands.
2553 (dump_gimple_call): Likewise.
2554 Add support for showing __builtin_va_arg_pack, static
2555 chains, return slot optimized and tail calls.
2556 (dump_gimple_phi): Remove code to print memory symbols.
2557 * gimplify.c (is_gimple_formal_tmp_or_call_rhs): New.
2558 (is_gimple_mem_or_call_rhs): New.
2559 (rhs_predicate_for): Call them.
2560 (internal_get_tmp_var): Use is_gimple_formal_tmp_or_call_rhs as
2561 the gimplification predicate.
2562 Use the last statement in *PRE_P to get the temporary to
2563 be updated when in SSA form.
2564 (gimplify_bind_expr): Clear out *EXPR_P before returning.
2565 (gimplify_call_expr): Do not build a GIMPLE_CALL if
2566 WANT_VALUE is true.
2567 Call gimple_build_call_from_tree if WANT_VALUE is false.
2568 Remove local variable ARGS.
2569 (gimplify_modify_expr): If after gimplification *FROM_P
2570 is a CALL_EXPR, create a GIMPLE_CALL instead of a
2571 GIMPLE_ASSIGN.
2572 Document why the gimplification of the RHS should accept
2573 CALL_EXPRs.
2574 (gimplify_expr): Document where the generated statement
2575 is stored.
2576 Accept is_gimple_formal_tmp_or_call_rhs and
2577 is_gimple_mem_or_call_rhs as gimplification predicates.
2578 When gimplifying statements, clear out *EXPR_P before
2579 returning.
2580 When generating an rvalue, call is_gimple_formal_tmp_or_call_rhs
2581 to test *EXPR_P.
2582 * tree-dfa.c (mark_symbols_for_renaming): Remove
2583 ATTRIBUTE_UNUSED.
2584 * tree-flow.h (stmt_references_memory_p): Remove.
2585 * gimple.c (gimple_build_call_from_tree): New.
2586 * gimple.h (struct gimple_statement_with_memory_ops): Add
2587 bitfield references_memory_p.
2588 (gimple_build_call_from_tree): Declare.
2589 (gimple_references_memory_p): Rename from
2590 stmt_references_memory_p. Move here. Update all users.
2591 (gimple_set_references_memory): New.
2592 (gimple_assign_set_rhs1): When the assignment has more
2593 than one operand on the RHS, assert that the operands are
2594 gimple values.
2595 (gimple_assign_set_rhs2): Assert that the operand is a
2596 gimple value.
2597 (gimple_call_set_return_slot_opt): Fix mask clearing.
2598 (gimple_call_set_from_thunk): Likewise.
2599 (gimple_call_set_va_arg_pack): Likewise.
2600 * tree-cfg.c (dump_function_to_file): Do not indent when
2601 doing a GIMPLE dump.
2602 * tree-ssa-operands.c (add_virtual_operand): Call
2603 gimple_set_references_memory.
2604 (get_addr_dereference_operands): Likewise.
2605 (get_tmr_operands): Likewise.
2606 (maybe_add_call_clobbered_vops): Likewise.
2607 (get_asm_expr_operands): Likewise.
2608 (parse_ssa_operands): Likewise.
2609 (build_ssa_operands): Likewise.
2610 (stmt_references_memory_p): Remove.
2611
719bb4e3 26122008-04-21 Rafael Espíndola <espindola@google.com>
726a989a
RB
2613
2614 Cherry pick http://gcc.gnu.org/ml/gcc-patches/2008-04/msg01213.html
2615
2616 * params.def (PARAM_MAX_FIELDS_FOR_FIELD_SENSITIVE): Set default
2617 to zero, thus disable creation of SFTs.
2618 * gcc.dg/tree-ssa/salias-1.c: Remove.
2619 * gcc.dg/tree-ssa/pr26421.c: Adjust pattern.
2620 * gcc.dg/tree-ssa/alias-15.c: Likewise.
2621 * gcc.dg/tree-ssa/ssa-lim-3.c: Run at -O2.
2622
26232008-04-20 Zdenek Dvorak <ook@ucw.cz>
2624
2625 * passes.c (init_optimization_passes): Enable pass_dce_loop.
2626
26272008-04-20 Zdenek Dvorak <ook@ucw.cz>
2628
2629 * tree-data-ref.c (split_constant_offset_1): Use POINTER_PLUS_EXPR
2630 for pointer addition.
2631 (split_constant_offset): Set VAR to EXP before conversions are
2632 stripped, when no offset is removed. Handle chrec_dont_know.
2633 * tree-predcom.c: Tuplified.
2634 * passes.c (init_optimization_passes): Enable pass_predcom.
2635
26362008-04-18 Aldy Hernandez <aldyh@redhat.com>
2637
2638 * omp-low.c (lower_rec_input_clauses): Remove fixme and
2639 ATTRIBUTE_UNUSED.
2640 (lower_lastprivate_clauses): Same.
2641 (lower_reduction_clauses): Same.
2642 (lower_copyprivate_clauses): Same.
2643 (lower_send_clauses): Same.
2644 (lower_send_shared_vars): Same.
2645 (maybe_catch_exception): Convert to tuples.
2646 (lower_omp_sections): Same.
2647 (lower_omp_single_simple): Same.
2648 (lower_omp_single_copy): Same.
2649 (lower_omp_single): Same.
2650 (lower_omp_master): Same.
2651 (lower_omp_ordered): Same.
2652 (lower_omp_critical): Same.
2653 (lower_omp_for_lastprivate): Same.
2654 (lower_omp_for): Same.
2655 (check_combined_parallel): Same.
2656 (lower_omp_parallel): Same.
2657 (lower_omp_1): Same.
2658 (execute_lower_omp): Enable.
2659 * gimple-dummy.c: Remove dummy functions for lower_omp_*.
2660 * gimple-low.c (lower_omp_directive): Convert to tuples.
2661 (lower_stmt): Remove fixme.
2662 * gimple.h (gimple_seq_alloc_with_stmt): New.
2663 (gimple_omp_section_set_last): New.
2664 (gimple_omp_parallel_set_combined_p): New.
2665 (gimple_bind_add_stmt): New.
2666 (gimple_bind_add_seq): New.
2667 * tree-cfg.c (verify_node_sharing): Fix typo in comment.
2668
26692008-04-17 Oleg Ryjkov <olegr@google.com>
2670
2671 * Reverting forwprop patch.
2672
2673 2008-04-16 Oleg Ryjkov <olegr@google.com>
2674
2675 * tree-ssa-forwprop.c (get_prop_dest_stmtm get_prop_source_stmt,
2676 can_propagate_from, remove_prop_source_from_use,
2677 tidy_after_forward_propagate_addr,
2678 forward_propagate_addr_into_variable_array_index,
2679 forward_propagate_addr_expr_1, forward_propagate_addr_expr,
2680 forward_propagate_comparison, simplify_not_neg_expr,
2681 simplify_switch_expr,
2682 tree_ssa_forward_propagate_single_use_variables): Tuplified.
2683 (forward_propagate_into_cond): Tuplified and moved some functionality
2684 into forward_propagate_into_cond_gimple.
2685 (rhs_to_tree, forward_propagate_into_cond_gimple): New functions.
2686 * passes.c (init_optimization_passes): Enabled pass_forwprop.
2687 * tree-cfg.c (find_taken_edge_cond_expr): Fixed comment.
2688
26892008-04-16 Oleg Ryjkov <olegr@google.com>
2690
2691 * tree-ssa-forwprop.c (get_prop_dest_stmtm get_prop_source_stmt,
2692 can_propagate_from, remove_prop_source_from_use,
2693 tidy_after_forward_propagate_addr,
2694 forward_propagate_addr_into_variable_array_index,
2695 forward_propagate_addr_expr_1, forward_propagate_addr_expr,
2696 forward_propagate_comparison, simplify_not_neg_expr,
2697 simplify_switch_expr,
2698 tree_ssa_forward_propagate_single_use_variables): Tuplified.
2699 (forward_propagate_into_cond): Tuplified and moved some functionality
2700 into forward_propagate_into_cond_gimple.
2701 (rhs_to_tree, forward_propagate_into_cond_gimple): New functions.
2702 * passes.c (init_optimization_passes): Enabled pass_forwprop.
2703 * tree-cfg.c (find_taken_edge_cond_expr): Fixed comment.
2704
27052008-04-16 Doug Kwan <dougkwan@google.com>
2706
2707 * Makefile.in (STRICT_WARN): Disable -Wmissing-format-attribute
2708 and -Wformat temporarily for bootstrapping.
2709 * lambda-code.c (invariant_in_loop_and_outer_loops): Comment out
2710 to avoid defined-and-not-used warning.
2711 * tree-cfg.c (gather_blocks_in_sese_region): Comment out to avoid
2712 defined-and-not-used warning.
2713
27142008-04-16 Doug Kwan <dougkwan@google.com>
2715
2716 * Makefile.in (GTFILES): Add back ipa-reference.h and ipa-reference.c.
2717 * gimple-dummy.c (memory_identifier_string): Remove.
2718 * ipa-cp.c (constant_val_insert): Tuplify.
2719 * ipa-prop.c (File): Uncomment all previously disabled code.
2720 (ipa_method_modify_stmt): Tuplify.
2721 (ipa_method_compute_modify): Tuplify.
2722 (ipa_callsite_tree): Renamed to ipa_callsite_stmt. Update callers.
2723 (ipa_callsite_stmt): New.
2724 (ipa_callsite_compute_count): Tuplify.
2725 (ipa_callsite_compute_param): Tuplify.
2726 * ipa-reference.c (File): Uncomment all previously disabled code.
2727 (get_asm_stmt_operands): Tuplify.
2728 (check_call): Tuplify. Also add code to handle assignment of
2729 returned value.
2730 (scan_for_static_refs): Remove. Tuplify body and split into two
2731 new functions scan_stmt_for_static_refs and scan_op_for_static_refs.
2732 Update callers.
2733 (scan_stmt_for_static_refs): New. Split from scan_for_static_refs.
2734 (scan_op_for_static_refs): New. Split from scan_for_static_refs.
2735 (analyze_variable): Update walk_tree call.
2736 (analyze_function): Tuplify.
2737 * passes.c (init_optimization_passes): Re-enable pass_ipa_reference.
2738 * tree-flow.h (struct function_ann_d): Uncomment field
2739 ipa_reference_vars_info.
2740
27412008-04-15 Doug Kwan <dougkwan@google.com>
2742
2743 * tree-eh.c (operation_could_trap_p): Fix filtering logic.
2744
27452008-04-15 Bill Maddox <maddox@google.com>
2746
2747 * tree-ssa-dom.c: (degenerate_phi_result, remove_stmt_or_phi,
2748 get_rhs_or_phi_arg, get_lhs_or_phi_result, propagate_rhs_into_lhs,
2749 eliminate_const_or_copy, eliminate_degenerate_phis_1,
2750 eliminate_degenerate_phis): Convert to tuples.
2751 * passes.c (init_optimization_passes): Enable pass_phi_only_cprop.
2752
27532008-04-15 Oleg Ryjkov <olegr@google.com>
2754
2755 * tree-ssa-dom.c (record_const_or_copy): Moving a variable declaration to
2756 the top of a block.
2757
27582008-04-15 Doug Kwan <dougkwan@google.com>
2759
2760 * tree-ssa-sink.c (File): Uncomment all previously disabled code.
2761 (find_bb_for_arg): Tuplify.
2762 (all_immediate_uses_sample_place): Tuplify.
2763 (nearest_common_dominator_of_uses): Tuplify.
2764 (statement_sink_location): Tuplify. Remove parameter tobb and update
2765 caller.
2766 (sink_code_in_bb): Tuplify.
2767 * passes.c (init_optimization_passes): Re-enable pass_sink_code.
2768
27692008-04-14 Bill Maddox <maddox@google.com>
2770
2771 * tree-ssa-threadupdate.c (remove_ctrl_stmt_and_useless_edge,
2772 create_edge_and_update_destination_phis, redirection_block_p):
2773 Convert to tuples.
2774 * tree.c (iterative_hash_exprs_commutative): New function.
2775 * tree.h (iterative_hash_exprs_commutative): Declare.
2776 * tree-ssa_dom.c (enum expr_kind, struct hashable_expr,
2777 struct cond_equivalence): New types.
2778 (struct edge_info): Use struct cond_equivalence.
2779 (avail_exprs_stack): Stack of expr_hash_elt*, not expressions.
2780 (stmts_to_rescan): Use type gimple for statements.
2781 (struct expr_hash_elt): Represent statement RHS with hashable_expr,
2782 not a tree. Add unique stamp to each entry for efficient and reliable
2783 element removal.
2784 (struct eq_expr_value): Delete unused type.
2785 (initialize_hash_element): Convert to tuples. Now applies
2786 only to statements.
2787 (initialize_expr_from_cond, initialize_hash_element_from_expr):
2788 New functions. Replace former functionality of initialize_hash_element
2789 for conditions presented as trees.
2790 (hashable_expr_equal_p, iterative_hash_hashable_expr): New functions.
2791 (print_expr_hash_elt): New function.
2792 (free_expr_hash_elt): New function.
2793 (tree_ssa_dominator_optimize): Convert to tuples
2794 (canonicalize_comparison): Convert to tuples.
2795 (remove_local_expressions_from_table): Use new avail_exprs_stack
2796 representation. Add optional extra diagnostic details.
2797 (simplify_stmt_for_jump_threading, dom_thread_across_edge,
2798 dom_opt_finalize_block): Convert to tuples.
2799 (record_cond, build_and_record_new_cond): Convert to tuples.
2800 Use new hashable_expr type. Extra diagnostic details.
2801 (record_const_or_copy_1): Extra diagnostic details.
2802 (record_const_or_copy): Add assertion.
2803 (simple_iv_increment_p, cprop_into_successor_phis, record_edge_info):
2804 Convert to tuples.
2805 (eliminate_redundant_computations): Convert to tuples.
2806 Additional diagnostic details.
2807 (gimple_assign_unary_useless_conversion_p): New function.
2808 (record_equivalences_from_statement): Convert to tuples.
2809 Additional diagnostic details.
2810 (cprop_operand, cprop_into_stmt): Convert to tuples.
2811 (optimize_stmt): Convert to tuples.
2812 (lookup_avail_expr): Use hashable_expr. Additional diagnostic details.
2813 (avail_expr_hash, avail_expr_eq): Use hashable_expr.
2814 * tree-ssa-copy.c (may_propagate_copy_into_stmt,
2815 propagate_tree_value_into_stmt): New functions.
2816 * tree-flow.h: (may_propagate_copy_into_stmt,
2817 propagate_tree_value_into_stmt): Declare.
2818 (thread_across_edge): Change declaration of callback to accept a
2819 gimple statement.
2820 * gimple.c (gimple_call_flags): Declare argument as a constant.
2821 (gimple_has_side_effects): Declare argument as a constant.
2822 Examine function arguments for side-effects.
2823 (gimple_rhs_has_side_effects): New function.
2824 * gimple.h (gimple_call_flags): Declare argument as a constant.
2825 (gimple_has_side_effects): Declare argument as a constant.
2826 (gimple_rhs_has_side_effects): Declare new function.
2827 (is_gimple_assign): New inline function.
2828 (gimple_switch_index_ptr): New function.
2829 * passes.c (init_optimization_passes): Enable pass_dominator.
2830 * tree-ssa_threadedge.c (potentially_threadable_block,
2831 lhs_of_dominating_assert, record_temporary_equivalences_from_phis):
2832 Convert to tuples.
2833 (fold_assignment_stmt): New function.
2834 (record_temporary_equivalences_from_stmts_at_dest,
2835 simplify_control_stmt_condition, thread_across_edge): Convert to tuples.
2836
28372008-04-14 Doug Kwan <dougkwan@google.com>
2838
2839 * c-typeck.c (convert_for_assignment): Call c_common_unsigned_type
2840
28412008-04-14 Doug Kwan <dougkwan@google.com>
2842
2843 * gimple-iterator.c (gsi_move_to_bb_end): Use gsi_last_bb
2844 instead of calling both gsi_last and bb_seq.
2845 * passes.c (init_optimization_passes): Re-eanble second tail-recursion
2846 pass.
2847
28482008-04-14 Doug Kwan <dougkwan@google.com>
2849
2850 * tree-nrv.c (dest_safe_for_nrv_p): Uncomment.
2851 (execute_return_slot_opt): Tuplify.
2852 * passes.c (init_optimization_passes): Re-enable pass_return_slot.
2853
28542008-04-14 Aldy Hernandez <aldyh@redhat.com>
2855
2856 * tree-cfg.c (gimple_can_merge_blocks_p): Fix typo.
2857 * omp-low.c (maybe_lookup_ctx): Uncomment and set ATTRIBUTE_UNUSED.
2858 (lower_lastprivate_clauses): Same.
2859 (lower_reduction_clauses): Same.
2860 (lower_send_clauses): Same.
2861 (expand_omp_for_generic): Uncomment and convert for tuples.
2862 (expand_omp_for): Remove fixme.
2863 (expand_omp_sections): Same.
2864 (lower_omp_parallel): Partially convert for tuples.
2865 (lower_omp_regimplify_p): Rename from lower_omp_2.
2866 (lower_omp_1): Convert for tuples.
2867 (lower_omp): Same.
2868 (gimple-dummy.c): Add lower_omp_parallel, lower_omp_for,
2869 lower_omp_sections, lower_omp_single, lower_omp_master,
2870 lower_omp_ordered, lower_omp_critical.
2871
28722008-04-13 Diego Novillo <dnovillo@google.com>
2873
2874 * tree-cfg.c (need_fake_edge_p): Initialize CALL_FLAGS.
2875
719bb4e3 28762008-04-12 Rafael Espíndola <espindola@google.com>
726a989a
RB
2877
2878 Merge with mainline @134237.
2879
2880 * configure.ac (ACX_PKGVERSION): Update revision merge string.
2881 * configure: Regenerate.
2882
719bb4e3 28832008-04-13 Rafael Espíndola <espindola@google.com>
726a989a
RB
2884
2885 * config/extensions.m4: Add. Was missing from previous merge.
2886
719bb4e3 28872008-04-12 Rafael Espíndola <espindola@google.com>
726a989a
RB
2888
2889 Merge with mainline @133860.
2890
2891 * configure.ac (ACX_PKGVERSION): Update revision merge string.
2892 * configure: Regenerate.
2893
28942008-04-11 Oleg Ryjkov <olegr@google.com>
2895
2896 * tree-sra.c (scalarize_use): Moving a variable declaration to
2897 the top of a block.
2898
28992008-04-11 Oleg Ryjkov <olegr@google.com>
2900
2901 * tree-sra.c (insert_edge_copies_seq): Removed unused variable.
2902
29032008-04-11 Oleg Ryjkov <olegr@google.com>
2904
2905 * tree-sra.c (sra_build_assignment): Tuplified.
2906 (mark_all_v_defs): Removed.
2907 (mark_all_v_defs_seq, mark_all_v_defs_stmt): New functions.
2908 (sra_walk_expr): Tuplified.
2909 (sra_walk_tree_list): Removed.
2910 (sra_walk_call_expr, sra_walk_gimple_asm,
2911 sra_walk_gimple_modifY_stmt, ): Tuplified and renamed.
2912 (sra_walk_gimple_call, sra_walk_gimple_asm,
2913 sra_walk_gimple_assign): New names for tuplified functions.
2914 (sra_walk_function, find_candidates_for_sra, scan_use, scan_copy,
2915 scan_ldst, instantiate_element, decide_instantiations,
2916 mark_all_v_defs_1, sra_build_assignment, sra_build_bf_assignment,
2917 sra_build_elt_assignment, generate_copy_inout,
2918 generate_element_copy, generate_element_zero,
2919 generate_one_element_init, generate_element_init_1): Tuplified.
2920 (insert_edge_copies): Removed.
2921 (insert_edge_copies_seq): New function.
2922 (sra_insert_before, sra_insert_after, sra_replace,
2923 sra_explode_bitfield_assignment, sra_sync_for_bitfield_assignment,
2924 scalarize_use, scalarize_copy, scalarize_init, mark_no_trap,
2925 scalarize_ldst, scalarize_parms, scalarize_function): Tuplified.
2926 (tree_sra, tree_sra_early): Enabled
2927 (sra_init_cache): Removed extra space.
2928 * tree-flow.h (insert_edge_copies_seq): New declaration.
2929 * gimple.h (gimple_asm_input_op_ptr, gimple_asm_output_op_ptr,
2930 gimple_return_retval_ptr): New functions.
2931 * passes.c (init_optimization_passes): Enabled pass_sra,
2932 pass_early_sra.
2933
29342008-04-11 Doug Kwan <dougkwan@google.com>
2935
2936 * ipa-pure-const.c (get_asm_expr_operands): Tuplify.
2937 (get_asm_expr_operands): Tuplify.
2938 (check_call): Tuplify. Add code to handle return value assignment.
2939 (scan_function): Remove. Original code is tuplified and split into
2940 two new functions scan_function_op and scan_function_stmt.
2941 (scan_function_op): New function.
2942 (scan_function_stmt): New function.
2943 (analyze_function): Tuplify and re-enable previously disabled code.
2944 * passes.c (init_optimization_passes): Re-enable pass_ipa_pure_const.
2945
29462008-04-11 Oleg Ryjkov <olegr@google.com>
2947
2948 * builtins.c (fold_call_stmt): Return the proper value.
2949 * tree-ssa-ccp.c (maybe_fold_stmt_addition): Modify arguments to
2950 allow this function to be called on a GIMPLE_ASSIGN.
2951 (fold_stmt_r): Update the call to maybe_fold_stmt_addition.
2952 (fold_gimple_assign): Manually call maybe_fold_stmt_addition to
2953 fold a POINTER_PLUS_EXPR.
2954
29552008-04-11 Doug Kwan <dougkwan@google.com>
2956
2957 * tree-ssa-phiprop.c (File): Uncomment all previously disabled code.
2958 (struct phiprop_d): Change type of vop_stmt to gimple.
2959 (phivn_valid_p): Tuplify.
2960 (phiprop_insert_phi): Tuplify.
2961 (propagate_with_phi): Tuplify.
2962 (tree_ssa_phiprop_1): Tuplify.
2963 (tree_ssa_phiprop): Tuplify.
2964 * passes.c (init_optimization_passes): Re-enable pass_phiprop.
2965
719bb4e3 29662008-04-11 Rafael Espíndola <espindola@google.com>
726a989a
RB
2967
2968 * tree-ssa-math-opts.c (execute_cse_sincos_1): fix warning.
2969
29702008-04-10 Diego Novillo <dnovillo@google.com>
2971
2972 http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00913.html
2973
2974 * ipa-inline.c (cgraph_clone_inlined_nodes): Change uses
2975 of DECL_SAVED_TREE with gimple_body.
2976 (cgraph_decide_inlining_incrementally): Likewise.
2977 * gimple-iterator.c (gsi_insert_seq_before_without_update):
2978 Do nothing if SEQ is NULL.
2979 (gsi_insert_seq_after_without_update): Likewise.
2980 * tree-ssa-live.c (mark_all_vars_used_1): Do not handle
2981 EXPR trees.
2982 (remove_unused_locals): Mark the gimple_block of every
2983 statement as used.
2984 * tree-inline.c (remap_gimple_stmt): Forward declare.
2985 (remap_decls): Tidy comments.
2986 (remap_gimple_seq): New.
2987 (copy_gimple_bind): New.
2988 (remap_gimple_stmt): Call it.
2989 Handle High GIMPLE statements.
2990 (copy_bb): Regimplify operands on COPY_GSI instead of
2991 GSI.
2992 (copy_cfg_body): Tidy.
2993 (copy_generic_body): Remove unused function.
2994 (clone_body): Tuplify.
2995 * c-common.c (c_warn_unused_result): Remove assertion for
2996 FUNCTION_TYPE.
2997 * gimple.c (gimple_seq_copy): Rename from
2998 gimple_seq_deep_copy. Update all users.
2999 (walk_gimple_stmt): Assert that STMT has no substatements
3000 in the default case.
3001 (gimple_copy_1): Merge into gimple_copy.
3002 (gimple_copy): Always do deep copying.
3003 Handle statements with substatements.
3004 (gimple_shallow_copy): Remove unused function.
3005 (gimple_deep_copy): Remove. Update all users.
3006 * gimple.h: Tidy comments and structure fields
3007 everywhere.
3008 (gimple_has_substatements): New.
3009 (walk_stmt_fn): Change last argument to struct walk_stmt_info *.
3010 Update all users.
3011
30122008-04-10 Oleg Ryjkov <olegr@google.com>
3013
3014 * tree.h (struct tree_base): Added a new flag default_def_flag.
3015 (SSA_NAME_IS_DEFAULT_DEF): Changed to use the new flag.
3016
30172008-04-08 Doug Kwan <dougkwan@google.com>
3018
3019 * gimplify.c (gimple_push_cleanup): Initialize cleanup_stmts to NULL.
3020
30212008-04-08 Doug Kwan <dougkwan@google.com>
3022
3023 * tree-tailcall.c (struct tailcall): Remove call_block and replace
3024 call_bsi by call_gsi.
3025 (independent_of_stmt_p): Change type of parameter 'at' to GIMPLE and
3026 change all tree using code to GIMPLE using equivalent.
3027 Remove parameter block_stmt_iterator type parameter bsi with
3028 gimple_stmt_iterator type parameter gsi. Replace uses of bsi with
3029 that of gsi in function body as appropriate.
3030 (process_assignment): Remove parameter 'ass' and change type of
3031 parameter 'stmt' to GIMPLE. Change all tree using code to GIMPLE
3032 using equivalent.
3033 (propagate_through_phis, eliminate_tail_call, optimize_tail_call):
3034 Change all tree using code to GIMPLE using equivalent.
3035 (find_tail_calls): Change all tree using code to GIMPLE using
3036 equivalent. Remove code that handles GIMPLE_MODIFY_STMT containing
3037 a CALL_EXPR.
3038 (add_successor_phi_arg, adjust_return_value_with_ops,
3039 update_accumulator_with_ops, adjust_accumulator_values,
3040 create_tailcall_accumulator): New functions from refactoring of
3041 duplicated logic.
3042 (adjust_accumulator_values, adjust_return_value): Refactor.
3043 (tree_optimize_tail_calls_1): Refactor and change all tree using code
3044 to GIMPLE using equivalent. Remove code to reverse phi list.
3045 * passes.c (init_optimization_passes): Re-enable pass_tail_recursion
3046 and pass_tail_calls.
3047
30482008-04-04 Doug Kwan <dougkwan@google.com>
3049
3050 * tree-ssa-math-opts.c (struct occurrence): Change field type of
3051 recip_def_stmt to gimple.
3052 (is_division_by): Tuplify.
3053 (insert_reciprocals): Tuplify.
3054 (replace_reciprocals): Tuplify.
3055 (execute_cse_reciprocals_1): Tuplify.
3056 (execute_cse_reciprocals): Tuplify.
3057 (maybe_record_sincos): Use vector of gimples instead of vector of
3058 trees.
3059 (execute_cse_sincos_1): Tuplify. When adjusting recorded old call
3060 sites, generate new gimple assign statements and remove old gimple
3061 call statements.
3062 (execute_cse_sincos): Tuplify.
3063 (execute_convert_to_rsqrt): Tuplify.
3064 * passes.c (init_optimization_passes): Enable pass_cse_sincos,
3065 pass_cse_reciprocals and pass_convert_to_rsqrt.
3066
30672008-04-04 Aldy Hernandez <aldyh@redhat.com>
3068
3069 * omp-low.c (gimple_build_cond_empty): New.
3070 (expand_parallel_call): Convert COND_EXPR to GIMPLE_COND.
3071 (expand_omp_for_generic): Same.
3072 (expand_omp_for_static_nochunk): Same.
3073 (expand_omp_for_static_chunk): Same.
3074 (expand_omp_atomic_pipeline): Same.
3075
30762008-04-04 Diego Novillo <dnovillo@google.com>
3077
3078 http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00413.html
3079
3080 * tree-ssa-loop-im.c (movement_possibility): Return
3081 MOVE_IMPOSSIBLE if that statement makes no assignment.
3082 * tree-complex.c (get_component_ssa_name): Fix comment.
3083 (set_component_ssa_name): Assert that COMP's definition
3084 is LAST.
3085 * cgraph.c (cgraph_update_edges_for_call_stmt): Tuplify.
3086 (dump_cgraph_node): Likewise.
3087 * tree.c (auto_var_in_fn_p): Fix comment.
3088 * cgraphunit.c (verify_cgraph_node): Remove tuples hack
3089 that avoided verifying nodes.
3090 * gimple-pretty-print.c (dump_gimple_asm): Show the
3091 volatile flag.
3092
3093 * gimple-dummy.c (optimize_inline_calls): Remove.
3094 (tree_function_versioning): Remove.
3095 (tree_versionalbe_function_p): Remove.
3096 * ipa-inline.c (cgraph_clone_inlined_bodies): Re-format.
3097 (cgraph_decide_inlining): Re-format.
3098 (cgraph_decide_inlining_incrementally): Re-format.
3099 (pass_ipa_inline): Re-format.
3100 * gimplify.c (gimplify_call_expr): Carry all the
3101 CALL_EXPR flags to the newly created GIMPLE_CALL.
3102 (gimplify_asm_expr): Carry ASM_VOLATILE_P and ASM_INPUT_P
3103 over to the new GIMPLE_ASM.
3104 * tree-dfa.c (find_new_referenced_vars): Change argument
3105 to gimple. Update all callers.
3106 * cfgexpand.c (set_expr_location_r): New private.
3107 (gimple_to_tree): Call it.
3108 Set ASM_VOLATILE_P and ASM_INPUT_P for ASM_EXPRs.
3109 Carry flags from GIMPLE_CALL for CALL_EXPRs.
3110 Set TREE_BLOCK on the newly created expression.
3111 * tree-inline.c: Tuplify.
3112 * tree-inline.h: Tuplify.
3113 * tree-optimize.c (execute_fixup_cfg): Tuplify.
3114 * gimple.c (gimple_build_call_vec): Change second
3115 argument type to VEC(tree, heap). Update all callers.
3116 (gimple_build_assign_with_ops): If the LHS is an
3117 SSA_NAME, set SSA_NAME_DEF_STMT on it.
3118 (walk_gimple_seq): Change return type to gimple. Update
3119 all users.
3120 If walk_gimple_stmt returned a value, store it in
3121 WI->CALLBACK_RESULT.
3122 (walk_gimple_op): Walk gimple_call_chain_ptr() and
3123 gimple_call_fn_ptr() for GIMPLE_CALL.
3124 (walk_gimple_stmt): Add new local HANDLED_OPS.
3125 If callback_stmt() sets HANDLED_OPS, return its return
3126 value.
3127 If any call to walk_gimple_seq returns a non-NULL value,
3128 return WI->CALLBACK_RESULT.
3129 (gimple_copy_1): New function.
3130 (gimple_deep_copy): Rename from gimple_copy. Update all
3131 users.
3132 Call gimple_copy_1.
3133 (gimple_shallow_copy): New.
3134 (gimple_regimplify_operands): New.
3135 * gimple.h (GF_ASM_INPUT): Define.
3136 (GF_ASM_VOLATILE): Define.
3137 (GF_CALL_CANNOT_INLINE): Define.
3138 (GF_CALL_FROM_THUNK): Define.
3139 (GF_CALL_RETURN_SLOT_OPT): Define.
3140 (GF_CALL_VA_ARG_PACK): Define.
3141 (gimple_stmt_iterator): Move earlier in the file.
3142 (gimple_omp_return_nowait_p): Fix return expression.
3143 (gimple_omp_section_last_p): Likewise.
3144 (gimple_omp_parallel_combined_p): Likewise.
3145 (gimple_call_noreturn_p): Likewise.
3146 (gimple_call_nothrow_p): Likewise.
3147 (gimple_asm_volatile_p): Likewise.
3148 (gimple_try_catch_is_cleanup): Likewise.
3149 (gimple_assign_set_rhs1): assert that RHS is a gimple
3150 operand.
3151 (is_gimple_call): New. Change all users that tested
3152 gimple_code() == GIMPLE_CALL.
3153 (gimple_call_fn_ptr): New.
3154 (gimple_call_chain_ptr): New.
3155 (gimple_call_set_chain): Accept NULL values for CHAIN.
3156 (gimple_call_set_tail): Add bool argument specifying the
3157 value of the flag. Update all users.
3158 (gimple_asm_set_volatile): Likewise.
3159 (gimple_call_set_cannot_inline): Rename from
3160 gimple_call_mark_uninlinable. Add bool argument
3161 specifying the value of the flag. Update all users.
3162 (gimple_call_set_return_slot_opt): New.
3163 (gimple_call_return_slot_opt_p): New.
3164 (gimple_call_set_from_thunk): New.
3165 (gimple_call_from_thunk_p): New.
3166 (gimple_call_va_arg_pack_p): New.
3167 (gimple_call_copy_flags): New.
3168 (gimple_asm_set_input): New.
3169 (gimple_asm_input_p): New.
3170 (gimple_asm_clear_volatile): Remove.
3171 (walk_stmt_fn): Add second argument bool *. Update all
3172 users.
3173 (struct walk_stmt_info): Add new field callback_result.
3174 * tree-cfg.c (gimple_split_block): Tuplify.
3175 (gimple_block_ends_with_condjump_p): Tuplify.
3176 (need_fake_edge_p): Tuplify.
3177 (gimple_flow_call_edges_add): Tuplify.
3178 (gimple_purge_dead_abnormal_call_edges): Tuplify.
3179 (gimple_purge_dead_eh_edges): Remove ATTRIBUTE_UNUSED.
3180 (gimple_cfg_hooks): Add gimple_block_ends_with_condjump_p
3181 and gimple_flow_call_edges_add
3182 * passes.c (init_optimization_passes): Enable
3183 pass_cleanup_cfg, pass_inline_parameters,
3184 pass_ipa_inline and pass_apply_inline.
3185 (execute_todo): Re-enable check for TODO_update_ssa_any
3186 if need_ssa_update_p() returns true.
3187 * tree-ssa-operands.c (ssa_operands_active): Return false
3188 if cfun is NULL.
3189
3190
719bb4e3 31912008-04-04 Rafael Espíndola <espindola@google.com>
726a989a
RB
3192
3193 Merge with mainline @133632.
3194
3195 * configure.ac (ACX_PKGVERSION): Update revision merge string.
3196 * configure: Regenerate.
3197
719bb4e3 31982008-04-04 Rafael Espíndola <espindola@google.com>
726a989a
RB
3199
3200 Merge with mainline @133631.
3201
3202 * configure.ac (ACX_PKGVERSION): Update revision merge string.
3203 * configure: Regenerate.
3204
719bb4e3 32052008-04-04 Rafael Espíndola <espindola@google.com>
726a989a
RB
3206
3207 Merge with mainline @133630.
3208
3209 * configure.ac (ACX_PKGVERSION): Update revision merge string.
3210 * configure: Regenerate.
3211
32122008-04-03 Aldy Hernandez <aldyh@redhat.com>
3213
3214 * omp-low.c (expand_omp_sections): Use
3215 gimple_omp_sections_control.
3216 (lower_omp_sections): Same.
3217 * gimplify.c (gimplify_omp_workshare): Adjust OMP clauses before
3218 creating gimple tuple.
3219 Add gimple tuple to sequence.
3220 Set OMP_SECTIONS_CONTROL in newly created tuple.
3221 * gimple.h (gimple_statement_omp_sections): Add control.
3222 (gimple_omp_sections_control): New.
3223 (gimple_omp_sections_control_ptr): New.
3224 (gimple_omp_sections_set_control): New.
3225
32262008-04-03 Oleg Ryjkov <olegr@google.com>
3227
3228 * tree-nested.c (convert_nl_goto_receiver): Changed to hadle gimple
3229 statements instead of trees.
3230 (lower_nested_functions): Pass convert_nl_goto_receiver as the first
3231 parameter to walk_all_functions.
3232
719bb4e3 32332008-04-03 Rafael Espíndola <espindola@google.com>
726a989a
RB
3234
3235 Merge with mainline @133624.
3236
3237 * configure.ac (ACX_PKGVERSION): Update revision merge string.
3238 * configure: Regenerate.
3239
719bb4e3 32402008-04-03 Rafael Espíndola <espindola@google.com>
726a989a
RB
3241
3242 Merge with mainline @133612.
3243
3244 * configure.ac (ACX_PKGVERSION): Update revision merge string.
3245 * configure: Regenerate.
3246
32472008-04-03 Aldy Hernandez <aldyh@redhat.com>
3248
3249 * tree-pretty-print.c (dump_generic_node): Remove
3250 OMP_{RETURN,CONTINUE} cases.
3251 * tree.h (OMP_RETURN_NOWAIT): Remove.
3252 * omp-low.c (dump_omp_region): Rename OMP_{CONTINUE,RETURN} to
3253 GIMPLE_OMP_{CONTINUE,RETURN}.
3254 (expand_omp_for_generic): Handle new arguments to
3255 GIMPLE_OMP_CONTINUE.
3256 (expand_omp_for_static_nochunk): Same.
3257 (expand_omp_for_static_chunk): Same.
3258 (expand_omp_sections): Same.
3259 (expand_omp): Rename all OMP_* to GIMPLE_OMP_*.
3260 (lower_omp_sections): Rename OMP_CONTINUE to GIMPLE_OMP_CONTINUE.
3261 (lower_omp_for): Same.
3262 * tree-gimple.c (is_gimple_stmt): Remove OMP_{RETURN,CONTINUE}
3263 cases.
3264 * gsstruct.def: Add GSS_OMP_CONTINUE.
3265 * gimple-pretty-print.c (dump_gimple_omp_continue): New.
3266 (dump_gimple_omp_return): New.
3267 (dump_gimple_stmt): Add cases for GIMPLE_OMP_{CONTINUE,RETURN}.
3268 * gimplify.c (gimplify_expr): Remove cases for
3269 OMP_{CONTINUE,RETURN}.
3270 * tree.def (DEFTREECODE): Remove OMP_{RETURN,CONTINUE}.
3271 * tree-cfgcleanup.c (cleanup_omp_return): Rename
3272 OMP_SECTIONS_SWITCH to GIMPLE_OMP_SECTIONS_SWITCH.
3273 * gimple.c (gss_for_code): GIMPLE_OMP_RETURN returns GSS_BASE.
3274 GIMPLE_OMP_CONTINUE return GSS_OMP_CONTINUE.
3275 (gimple_size): Adjust size of GIMPLE_OMP_{RETURN,CONTINUE}.
3276 (gimple_build_omp_continue): Change arguments.
3277 (walk_gimple_op): Walk GIMPLE_OMP_CONTINUE operands.
3278 (walk_gimple_stmt): Remove GIMPLE_OMP_CONTINUE case.
3279 * gimple.h (struct gimple_statement_omp_continue): New.
3280 (union gimple_statement_d): Add gimple_omp_continue.
3281 (gimple_build_omp_continue): Change argument types in prototype.
3282 (gimple_omp_return_set_nowait): Rename OMP_RETURN to
3283 GIMPLE_OMP_RETURN.
3284 (gimple_omp_continue_control_def): New.
3285 (gimple_omp_continue_control_def_ptr): New.
3286 (gimple_omp_continue_set_control_def): New.
3287 (gimple_omp_continue_control_use): New.
3288 (gimple_omp_continue_control_use_ptr): New.
3289 (gimple_omp_continue_set_control_use): New.
3290 * tree-cfg.c (make_edges): Rename OMP_ to GIMPLE_OMP_.
3291 (gimple_redirect_edge_and_branch): Same.
3292 * tree-ssa-operands.c (get_expr_operands): Remove OMP_CONTINUE
3293 case.
3294
32952008-04-02 Doug Kwan <dougkwan@google.com>
3296
3297 * tree-complex.c (expand_complex_comparison): Set condition code
3298 correctly for the NE_EXPR case.
3299 * cfgexpand.c (gimple_to_tree): Generate assignment to return value
3300 if necessary.
3301
719bb4e3 33022008-04-02 Rafael Espíndola <espindola@google.com>
726a989a
RB
3303
3304 Merge with mainline @133597.
3305
3306 * configure.ac (ACX_PKGVERSION): Update revision merge string.
3307 * configure: Regenerate.
3308
719bb4e3 33092008-04-02 Rafael Espíndola <espindola@google.com>
726a989a
RB
3310
3311 Merge with mainline @133527.
3312
3313 * configure.ac (ACX_PKGVERSION): Update revision merge string.
3314 * configure: Regenerate.
3315
719bb4e3 33162008-04-02 Rafael Espíndola <espindola@google.com>
726a989a
RB
3317
3318 Merge with mainline @133519.
3319
3320 * configure.ac (ACX_PKGVERSION): Update revision merge string.
3321 * configure: Regenerate.
3322
719bb4e3 33232008-04-02 Rafael Espíndola <espindola@google.com>
726a989a
RB
3324
3325 Merge with mainline @133453.
3326
3327 * configure.ac (ACX_PKGVERSION): Update revision merge string.
3328 * configure: Regenerate.
3329
33302008-04-01 Doug Kwan <dougkwan@google.com>
3331 Bill Maddox <maddox@google.com>.
3332
3333 * value-prof.c (interesting_stringop_to_profile_p) Call
3334 validate_gimple_arglist instead of validate_arglist.
3335 * tree.h (validate_arglist): New declaration.
3336 * builtins.c (expand_builtin_setjmp_receiver, expand_builtin_longjmp,
3337 expand_builtin_nonlocal_goto, expand_builtin_nonlocal_goto,
3338 expand_builtin_update_setjmp_buf, expand_builtin_prefetch,
3339 expand_builtin_apply, expand_builtin_return, expand_builtin_mathfn,
3340 expand_builtin_mathfn_2, expand_builtin_mathfn_3,
3341 expand_builtin_interclass_mathfn, expand_builtin_sincos,
3342 expand_builtin_cexpi, expand_builtin_int_roundingfn,
3343 expand_builtin_int_roundingfn_2, expand_builtin_pow,
3344 expand_builtin_powi, expand_builtin_strlen, expand_builtin_strlen,
3345 expand_builtin_strstr, expand_builtin_strchr, expand_builtin_strrchr,
3346 expand_builtin_memcpy, expand_builtin_memcpy,
3347 expand_builtin_mempcpy_args, expand_builtin_bcopy, expand_movstr,
3348 expand_builtin_stpcpy, expand_builtin_strncpy, builtin_memset_gen_str,
3349 expand_builtin_bzero, expand_builtin_memchr, expand_builtin_memcmp,
3350 expand_builtin_strcmp, expand_builtin_strncmp, expand_builtin_strcat,
3351 expand_builtin_strncat, expand_builtin_strspn, expand_builtin_alloca,
3352 expand_builtin_bswap, expand_builtin_unop, expand_builtin_fputs,
3353 expand_builtin_fabs, expand_builtin_copysign,
3354 expand_builtin___clear_cache, expand_builtin_init_trampoline,
3355 expand_builtin_adjust_trampoline, expand_builtin_signbit,
3356 expand_builtin, validate_arg, expand_builtin_object_size,
3357 expand_builtin_object_size, expand_builtin_memory_chk) Re-enable code
3358 previously disabled for GIMPLE.
3359 (expand_builtin_memcpy, expand_builtin_memset_args): Re-enable code
3360 previously disabled for GIMPLE. Look up tree attribute for original
3361 GIMPLE statement.
3362 (validate_arglist): Use old interface of tree node instead of GIMPLE
3363 statement.
3364 (validate_gimple_arglist): New function.
3365 * cfgexpand.c (gimple_to_tree): Set GIMPLE statement tree attribute
3366 for builtin function calls.
3367 * tree-flow.h (struct tree_ann_common_d): New field stmt.
3368 * gimple.h (validate_gimple_arglist): New declaration.
3369 (validate_arglist): Moved to tree.h.
3370
33712008-03-31 Oleg Ryjkov <olegr@google.com>
3372
3373 * gimplify.c (gimplify_switch_expr): Verify the return value from
3374 gimplify_expr.
3375
719bb4e3 33762008-03-31 Rafael Espíndola <espindola@google.com>
726a989a
RB
3377
3378 Merge with mainline @133452.
3379
3380 * configure.ac (ACX_PKGVERSION): Update revision merge string.
3381 * configure: Regenerate.
3382
719bb4e3 33832008-03-31 Rafael Espíndola <espindola@google.com>
726a989a
RB
3384
3385 Merge with mainline @133440.
3386
3387 * configure.ac (ACX_PKGVERSION): Update revision merge string.
3388 * configure: Regenerate.
3389
719bb4e3 33902008-03-31 Rafael Espíndola <espindola@google.com>
726a989a
RB
3391
3392 Merge with mainline @133423.
3393
3394 * configure.ac (ACX_PKGVERSION): Update revision merge string.
3395 * configure: Regenerate.
3396
719bb4e3 33972008-03-30 Rafael Espíndola <espindola@google.com>
726a989a
RB
3398
3399 Merge with mainline @133342.
3400
3401 * configure.ac (ACX_PKGVERSION): Update revision merge string.
3402 * configure: Regenerate.
3403
719bb4e3 34042008-03-28 Rafael Espíndola <espindola@google.com>
726a989a
RB
3405
3406 Merge with mainline @133341.
3407
3408 * configure.ac (ACX_PKGVERSION): Update revision merge string.
3409 * configure: Regenerate.
3410
34112008-03-28 Oleg Ryjkov <olegr@google.com>
3412
3413 * tree-eh.c (replace_goto_queue_1): Do a deep copy of the replacement
3414 sequence.
3415 (maybe_record_in_goto_queue): Set is_label flag when recording
3416 GIMPLE_GOTOs.
3417 (do_return_redirection, do_return_redirection): Changed to set
3418 cont_stmt.
3419 (lower_try_finally_onedest): Fix the code that assumes that gotos
3420 themselves(instead of the labels) are recorded in the goto_queue.
3421 (lower_try_finally_copy): Likewise.
3422 (lower_try_finally_switch): Likewise, also fix the VEC_* operations.
3423 * gimple.h (gimple_build_switch): Fixed comment.
3424
34252008-03-28 Doug Kwan <dougkwan@google.com>
3426
3427 * omp-low.c (expand_omp_sections): Fix build breakage due to an
3428 uninitialized variable.
3429
719bb4e3 34302008-03-28 Rafael Espíndola <espindola@google.com>
726a989a
RB
3431
3432 Merge with mainline @133315.
3433
3434 * configure.ac (ACX_PKGVERSION): Update revision merge string.
3435 * configure: Regenerate.
3436
34372008-03-28 Diego Novillo <dnovillo@google.com>
3438
3439 * omp-low.c (expand_omp_for_static_chunk): Initialize
3440 V_MAIN and V_BACK.
3441 (expand_omp_for): Initialize VIN.
3442
719bb4e3 34432008-03-28 Rafael Espíndola <espindola@google.com>
726a989a
RB
3444
3445 Merge with mainline @133313.
3446
3447 * configure.ac (ACX_PKGVERSION): Update revision merge string.
3448 * configure: Regenerate.
3449
34502008-03-27 Doug Kwan <dougkwan@google.com>
3451
3452 * c-decl.c (merge_decls): Also copy gimple bodies of decls.
3453 * gimplify.c (gimplify_call_expr): Do not exit early when
3454 gimplifying __builtin_va_start().
3455
34562008-03-27 Oleg Ryjkov <olegr@google.com>
3457
3458 * gimple.c (walk_gimple_op): Add a check for assignments with more
3459 than one operand on the LHS.
3460
34612008-03-27 Aldy Hernandez <aldyh@redhat.com>
3462
3463 * tree.c (empty_body_p): Remove.
3464 * tree.h (empty_body_p): Remove prototype.
3465 * omp-low.c (struct omp_context): Convert to tuples.
3466 (struct omp_context): Comment and convert to tuples.
3467 (scan_omp_op): New.
3468 (is_parallel_ctx): Convert to tuples.
3469 (extract_omp_for_data): Same.
3470 (workshare_safe_to_combine_p): Same.
3471 (get_ws_args_for): Same.
3472 (determine_parallel_type): Same.
3473 (use_pointer_for_field): Same.
3474 (dump_omp_region): Same.
3475 (debug_all_omp_regions): Same.
3476 (new_omp_region): Same.
3477 (new_omp_context): Same.
3478 (scan_sharing_clauses): Same.
3479 (create_omp_child_function): Same.
3480 (scan_omp_parallel): Same.
3481 (scan_omp_for): Same.
3482 (scan_omp_sections): Same.
3483 (scan_omp_single): Same.
3484 (check_omp_nesting_restrictions): Same.
3485 (scan_omp_1_op): New.
3486 (scan_omp_1_stmt): Rename from scan_omp_1. Rewrite for tuples.
3487 (scan_omp): Convert to tuples.
3488 (build_omp_barrier): Same.
3489 (maybe_lookup_ctx): Same.
3490 (lower_rec_input_clauses): Same.
3491 (lower_lastprivate_clauses): Same.
3492 (lower_reduction_clauses): Same.
3493 (lower_copyprivate_clauses): Same.
3494 (lower_send_clauses): Same.
3495 (lower_send_shared_vars): Same.
3496 (expand_parallel_call): Same.
3497 (remove_exit_barrier): Same.
3498 (remove_exit_barriers): Same.
3499 (optimize_omp_library_calls): Same.
3500 (expand_omp_parallel): Same.
3501 (expand_omp_for_generic): Comment out, and convert to tuples.
3502 (expand_omp_for_static_nochunk): Convert to tuples.
3503 (expand_omp_for_static_chunk): Same.
3504 (expand_omp_for): Same.
3505 (expand_omp_sections): Same.
3506 (expand_omp_synch): Same.
3507 (expand_omp_atomic_fetch_op): Same.
3508 (expand_omp_atomic_pipeline): Same.
3509 (expand_omp_atomic_mutex): Same.
3510 (expand_omp_atomic): Same.
3511 (expand_omp): Same.
3512 (build_omp_regions_1): Same.
3513 (execute_expand_omp): Enable.
3514 (execute_lower_omp): Enable and convert to tuples.
3515 * gimple-dummy.c (omp_reduction_init): Remove.
3516 * tree-flow.h (struct omp_region): Convert 'type' to tuples.
3517 (new_omp_region): Adjust prototype for tuples.
3518 * gimple.c (empty_stmt_p): New.
3519 (empty_body_p): New.
3520 * gimple.h (empty_body_p): New prototype.
3521 (gimple_has_location): Remove fixmes.
3522 * tree-cfg.c (gimple_block_label): Remove ATTRIBUTE_UNUSED.
3523
719bb4e3 35242008-03-27 Rafael Espíndola <espindola@google.com>
726a989a
RB
3525
3526 Merge with mainline @133311.
3527
3528 * configure.ac (ACX_PKGVERSION): Update revision merge string.
3529 * configure: Regenerate.
3530
719bb4e3 35312008-03-27 Rafael Espíndola <espindola@google.com>
726a989a
RB
3532
3533 * gcc/tree-nested.c (save_tmp_var): Use gsi_insert_after_without_update
3534 instead of gsi_insert_after.
3535
35362008-03-26 Jakub Staszak <kuba@et.pl>
3537
3538 * gimple.h (gimple_uid, gimple_set_uid): Defined.
3539 (gimple_statement_base): Field UID added.
3540 * tree-ssa-dse.c (execute_simple_dse): #if 0 removed, bitmap_empty_p
3541 condition added. (memory_ssa_name_same, memory_address_same,
3542 get_kill_of_stmt_lhs, dse_possible_dead_store_p, dse_optimize_stmt,
3543 dse_record_phis, dse_finalize_block, tree_ssa_dse): Tuplified.
3544 * passes.c (init_optimization_passes): pass_simple_dse and pass_dse
3545 enabled.
3546 * testsuite/gcc.dg/tree-ssa/ssa-dse-10.c: {dg-final} changed.
3547 * testsuite/gcc.dg/tree-ssa/pr30375.c: {dg-final} changed.
3548
719bb4e3 35492008-03-26 Rafael Espíndola <espindola@google.com>
726a989a
RB
3550 * gcc/tree-ssa-operands.c (ssa_operands_active): Assert that cfun is
3551 not NULL.
3552 * gcc/tree-nested.c (init_tmp_var): Use
3553 gsi_insert_before_without_update instead of gsi_insert_before.
3554
719bb4e3 35552008-03-25 Rafael Espíndola <espindola@google.com>
726a989a
RB
3556
3557 Merge with mainline @133309.
3558
3559 * configure.ac (ACX_PKGVERSION): Update revision merge string.
3560 * configure: Regenerate.
3561
719bb4e3 35622008-03-25 Rafael Espíndola <espindola@google.com>
726a989a
RB
3563
3564 Merge with mainline @133306.
3565
3566 * configure.ac (ACX_PKGVERSION): Update revision merge string.
3567 * configure: Regenerate.
3568
35692008-03-25 Bill Maddox <maddox@google.com>
3570
3571 * tree-ssa-dom.c (loop_depth_of_name): Tuplify.
3572 * tree-ssa-copy.c (stmt_may_generate_copy,
3573 copy_prop_visit_assignment, copy_prop_visi_cond_stmt,
3574 copy_prop_visit_stmt, copy_prop_visit_phi_node,
3575 init_copy_prop, execute_copy_prop): Tuplify.
3576 * passes.c (init_optimization_passes):
3577 Enable pass_copy_prop.
3578
719bb4e3 35792008-03-25 Rafael Espíndola <espindola@google.com>
726a989a
RB
3580
3581 Merge with mainline @133257.
3582
3583 * configure.ac (ACX_PKGVERSION): Update revision merge string.
3584 * configure: Regenerate.
3585
35862008-03-25 Oleg Ryjkov <olegr@google.com>
3587
3588 * gimple.c (gimple_build_bind): Added a new parameter - the
3589 containing block.
3590 * gimple.h (gimple_build_bind): Changed the header accordingly.
3591 * gimplify.c (gimplify_bind_expr, gimplify_function_tree): Updated
3592 the callers of gimple_build_bind.
3593 (gimplify_body): Updated the call to gimple_build_bind and moved
3594 the copying of block information into gimplify_bind_expr.
3595
719bb4e3 35962008-03-25 Rafael Espíndola <espindola@google.com>
726a989a
RB
3597
3598 Merge with mainline @133255.
3599
3600 * configure.ac (ACX_PKGVERSION): Update revision merge string.
3601 * configure: Regenerate.
3602
719bb4e3 36032008-03-25 Rafael Espíndola <espindola@google.com>
726a989a
RB
3604
3605 Merge with mainline @133251.
3606
3607 * configure.ac (ACX_PKGVERSION): Update revision merge string.
3608 * configure: Regenerate.
3609
719bb4e3 36102008-03-25 Rafael Espíndola <espindola@google.com>
726a989a
RB
3611
3612 Merge with mainline @133250.
3613
3614 * configure.ac (ACX_PKGVERSION): Update revision merge string.
3615 * configure: Regenerate.
3616
719bb4e3 36172008-03-24 Rafael Espíndola <espindola@google.com>
726a989a
RB
3618
3619 Merge with mainline @133246.
3620
3621 * configure.ac (ACX_PKGVERSION): Update revision merge string.
3622 * configure: Regenerate.
3623
719bb4e3 36242008-03-24 Rafael Espíndola <espindola@google.com>
726a989a
RB
3625
3626 Merge with mainline @133222.
3627
3628 * configure.ac (ACX_PKGVERSION): Update revision merge string.
3629 * configure: Regenerate.
3630
36312008-03-24 Andrew Pinski <pinskia@gmail.com>
3632
3633 * passes.c (init_optimization_passes): Enable pass_split_crit_edges.
3634
719bb4e3 36352008-03-24 Rafael Espíndola <espindola@google.com>
726a989a
RB
3636
3637 Merge with mainline @133169.
3638
3639 * configure.ac (ACX_PKGVERSION): Update revision merge string.
3640 * configure: Regenerate.
3641
719bb4e3 36422008-03-21 Rafael Espíndola <espindola@google.com>
726a989a
RB
3643
3644 Merge with mainline @133168.
3645
3646 * configure.ac (ACX_PKGVERSION): Update revision merge string.
3647 * configure: Regenerate.
3648
719bb4e3 36492008-03-21 Rafael Espíndola <espindola@google.com>
726a989a
RB
3650
3651 Merge with mainline @133167.
3652
3653 * configure.ac (ACX_PKGVERSION): Update revision merge string.
3654 * configure: Regenerate.
3655
36562008-03-20 Oleg Ryjkov <olegr@google.com>
3657
3658 * tree-eh.c (lower_try_finally): Correctly set the lowered sequence.
3659
36602008-03-20 Jakub Staszak <kuba@et.pl>
3661 Oleg Ryjkov <olegr@google.com>
3662
3663 * tree-ssa-sink.c (is_hidden_global_store): Tuplified.
3664 * tree-ssa-dce.c (mark_stmt_necessary, mark_operand_necessary,
3665 mark_stmt_if_obviously_necessary,
3666 mark_control_dependent_edges_necessary,
3667 find_obviously_necessary_stmts, propagate_necessity,
3668 remove_dead_phis, eliminate_unnecessary_stmts, tree_dce_init,
3669 tree_dce_done): Tuplified.
3670 * tree-flow.h (is_hidden_global_store): Tuplified the declaration.
3671 * passes.c (init_optimization_passes): Enabled pass_dce and
3672 pass_cd_dce.
3673
36742008-03-20 Oleg Ryjkov <olegr@google.com>
3675
3676 * tree-complex.c (init_dont_simulate_again, complex_visit_stmt,
3677 update_complex_components, expand_complex_operations_1): Consider
3678 GIMPLE_CALLs with a lhs, not only GIMPLE_ASSIGNs.
3679 * gimplify.c (get_tmp_var_for): Removed.
3680 (gimplify_call_expr): Remove call to get_tmp_var_for, set
3681 gimple_register on a new lhs in some cases.
3682
719bb4e3 36832008-03-20 Rafael Espíndola <espindola@google.com>
726a989a
RB
3684
3685 Merge with mainline @133162.
3686
3687 * configure.ac (ACX_PKGVERSION): Update revision merge string.
3688 * configure: Regenerate.
3689
719bb4e3 36902008-03-20 Rafael Espíndola <espindola@google.com>
726a989a
RB
3691
3692 Merge with mainline @133161.
3693
3694 * configure.ac (ACX_PKGVERSION): Update revision merge string.
3695 * configure: Regenerate.
3696
719bb4e3 36972008-03-20 Rafael Espíndola <espindola@google.com>
726a989a
RB
3698
3699 Merge with mainline @133140.
3700
3701 * configure.ac (ACX_PKGVERSION): Update revision merge string.
3702 * configure: Regenerate.
3703
719bb4e3 37042008-03-20 Rafael Espíndola <espindola@google.com>
726a989a
RB
3705
3706 Merge with mainline @133138.
3707
3708 * configure.ac (ACX_PKGVERSION): Update revision merge string.
3709 * configure: Regenerate.
3710
37112008-03-18 Bill Maddox <maddox@google.com>
3712
3713 * builtins.c (fold_builtin_object_size):
3714 Enable call to compute_builtin_object_size, previously
3715 stubbed out awaiting tuplification.
3716 * tree-ssa-ccp.c (valid_gimple_rhs_p, valid_gimple_call_p,
3717 move_ssa_defining_stmt_for_defs, update_call_from_tree):
3718 Deleted, moved to tree-ssa-propagate.c.
3719 (get_maxval_strlen): Use gimple_assign_single_p.
3720 Handle assignment with unary NOP correctly.
3721 * tree-ssa-propagate.c (valid_gimple_rhs_p, valid_gimple_call_p,
3722 move_ssa_defining_stmt_for_defs, update_call_from_tree):
3723 Moved here from tree-ssa-ccp.c.
3724 * tree-ssa-propagate.h (valid_gimple_rhs_p, valid_gimple_call_p,
3725 move_ssa_defining_stmt_for_defs, update_call_from_tree): Declared.
3726 * gimple-dummy.c (compute_builtin_object_size): Removed dummy.
3727 * tree_object_size.c (addr_object_size, alloc_object_size)
3728 Tuplified.
3729 (pass_through_call, compute_builtin_object_size): Tuplified.
3730 (expr_object_size): Tuplified. Some cases broken out.
3731 (plus_expr_object_size): Deleted.
3732 (call_object_size, unknown_object_size, plus_stmt_object_size):
3733 New functions. Handle cases broken out from expr_object_size.
3734 (cond_expr_object_size): Fix comment.
3735 (collect_object_sizes_for): Tuplify.
3736 (check_for_plus_in_loops_1, check_for_plus_in_loops): Tuplify.
3737 (compute_object_sizes): Tuplify.
3738 * gimple.c (gimple_assign_single_p, gimple_assign_unary_nop_p):
3739 New functions.
3740 * gimple.h (gimple_assign_single_p, gimple_assign_unary_nop_p):
3741 Declare.
3742 * passes.c (init_optimization_passes): Enable pass_object_sizes.
3743
37442008-03-18 Diego Novillo <dnovillo@google.com>
3745 Oleg Ryjkov <olegr@google.com>
3746
3747 * gimplify.c (gimplify_body): Copy the block information from
3748 the tree function body to gimple function body.
3749 (gimplify_function_tree): Correctly wrap the function body
3750 into the try/finally block if creating one.
3751 * gimple.c (gimple_seq_has_side_effects): Removed.
3752 * gimple.h (gimple_seq_has_side_effects): Removed declaration.
3753 * tree-cfg.c (remove_useless_stmts_tf, remove_useless_stmts_tc):
3754 Modified to use gimple_seq_empty_p instead of
3755 gimple_seq_has_side_effects.
3756
37572008-03-18 Aldy Hernandez <aldyh@redhat.com>
3758
3759 * gimple.c (walk_gimple_stmt): Collapse common code.
3760 Add case for GIMPLE_WITH_CLEANUP_EXPR.
3761
37622008-03-17 Zdenek Dvorak <ook@ucw.cz>
3763
3764 * gimple-iterator.c (gsi_for_stmt): Use gsi_start_phis.
3765 (gsi_start_phis): New function.
3766 * gimple.h (gsi_start_phis): Declare.
3767 * tree-into-ssa.c (initialize_flags_in_bb, rewrite_initialize_block,
3768 rewrite_add_phi_arguments, rewrite_update_init_block,
3769 prepare_block_for_update): Use gsi_start_phis.
3770 * tree-complex.c (init_dont_simulate_again, update_phi_components):
3771 Ditto.
3772 * tree-ssa-loop-manip.c (find_uses_to_rename_bb,
3773 verify_loop_closed_ssa, split_loop_exit_edge,
3774 tree_transform_and_unroll_loop): Ditto.
3775 * tree-scalar-evolution.c (loop_closed_phi_def,
3776 analyze_scalar_evolution_for_all_loop_phi_nodes, scev_const_prop):
3777 Ditto.
3778 * tree-phinodes.c (reserve_phi_args_for_new_edge, remove_phi_args):
3779 Ditto.
3780 * tree-ssa-copyrename.c (rename_ssa_copies): Ditto.
3781 * tree-ssa-ccp.c (ccp_initialize): Ditto.
3782 * tree-ssa-loop-ivopts.c (find_bivs, mark_bivs,
3783 find_interesting_uses_outside, find_interesting_uses,
3784 determine_set_costs): Ditto.
3785 * tree-ssa-propagate.c (simulate_block, ssa_prop_init,
3786 substitute_and_fold): Ditto.
3787 * tree-ssa-alias.c (dump_points_to_info, create_structure_vars): Ditto.
3788 * gimple-pretty-print.c (dump_phi_nodes): Ditto.
3789 * tree-data-ref.c (stmts_from_loop): Ditto.
3790 * tree-ssa-coalesce.c (build_ssa_conflict_graph,
3791 create_outofssa_var_map, coalesce_partitions): Ditto.
3792 * tree-dfa.c (collect_dfa_stats): Ditto.
3793 * tree-cfgcleanup.c (phi_alternatives_equal, remove_forwarder_block,
3794 remove_forwarder_block_with_phi, merge_phi_nodes): Ditto.
3795 * tree-ssa-live.c (remove_unused_locals, calculate_live_on_exit,
3796 verify_live_on_entry): Ditto.
3797 * tree-ssa.c (ssa_redirect_edge, flush_pending_stmts, verify_ssa,
3798 execute_late_warn_uninitialized, execute_update_addresses_taken):
3799 Ditto.
3800 * tree-outof-ssa.c (eliminate_build, eliminate_virtual_phis,
3801 rewrite_trees, remove_ssa_form, insert_backedge_copies):
3802 Ditto.
3803 * cfgloop.c (find_subloop_latch_edge_by_ivs): Ditto.
3804 * tree-ssa-structalias.c (compute_points_to_sets, ipa_pta_execute):
3805 Ditto.
3806 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block,
3807 reinstall_phi_args, verify_stmts, gimple_make_forwarder_block,
3808 add_phi_args_after_copy_edge, gimple_lv_adjust_loop_header_phi):
3809 Ditto.
3810
38112008-03-16 Zdenek Dvorak <ook@ucw.cz>
3812
3813 * tree-ssa-loop-ivopts.c: Tuplify.
3814 * gimple-dummy.c (multiplier_allowed_in_address_p, multiply_by_cost,
3815 tree_ssa_iv_optimize): Removed.
3816 * tree-ssa-phiopt.c (empty_block_p): Tuplify.
3817 * gimple.h (gimple_cond_lhs_ptr, gimple_cond_rhs_ptr): New.
3818 * passes.c (init_optimization_passes): Enable pass_iv_optimize.
3819
3820 * gimplify.c (gimplify_omp_workshare, gimplify_expr): Avoid using
3821 uninitialized sequence.
3822
38232008-03-13 Bill Maddox <maddox@google.com>
3824
3825 * tree.h (fold_call_stmt, gimple_fold_builtin_snprintf_chk):
3826 Declare new functions.
3827 * builtins.c (fold_builtin_object_size): Disable call to
3828 compute_builtin_object_size, which has not been converted.
3829 (gimple_rewrite_call_expr, gimple_fold_builtin_sprintf_chk,
3830 gimple_fold_builtin_snprintf_chk, gimple_fold_builtin_varargs,
3831 fold_call_stmt): New functions.
3832 * tree-chrec.h (build_polynomial_chrec): Silence uninitialized
3833 variable warning.
3834 * tree-ssa-ccp.c (likely_value): Recognize additional cases
3835 of constant values.
3836 (surely_varying_stmt_p): Note that return statements are not
3837 interesting to CCP as they no longer contain assignments.
3838 (ccp_fold): Add missing spaces.
3839 (valid_gimple_call_p): New function.
3840 (get_maxval_strlen): Don't trip over unary operator.
3841 (ccp_fold_builtin): Use fold_call_stmt and
3842 gimple_fold_builtin_snprintf_chk. Enable disabled
3843 call now that target has been converted for tuples.
3844 Add missing spaces.
3845 (move_ssa_defining_stmt_for_defs): New function.
3846 (update_call_from_tree): New function.
3847 (fold_gimple_call): Use update_call_from_tree.
3848 (fold_stmt_inplace): Assert that operand folding tree
3849 walk goes to completion, i.e., does not return non-null.
3850 (optimize_stack_restore, optimize_stdarg_builtin):
3851 Convert to tuples
3852 (convert_to_gimple_builtin): Removed.
3853 (gimplify_and_update_call_from_tree): New function.
3854 Replaces convert_to_gimple_builtin.
3855 (execute_fold_all_builtins): Convert to tuples.
3856 * tree-ssa-propagate.c (replace_uses_in): Removed
3857 replaced_address argument. Made function static.
3858 (replace_vuses_in): Removed replaced_address argument.
3859 (substitute_and_fold): Removed replaced_address boolean,
3860 which was set but never examined.
3861 * tree-ssa-propagate.h (replace_uses_in): Removed declaration.
3862 * gimple-iterator.c (update_modified_stmt): Moved to
3863 head of file to avoid a forward declaration.
3864 (update_modified_stmts): New function.
3865 (gsi_insert_seq_before_without_update,
3866 gsi_insert_before_without_update,
3867 gsi_insert_seq_after_without_update,
3868 gsi_insert_after_without_update): New functions.
3869 (gsi_insert_before, gsi_insert_seq_before,
3870 gsi_insert_after, gsi_insert_seq_after): Call the
3871 _without_update variants.
3872 * gimplify.c (gimplify_seq_add_stmt, gimplify_seq_add_seq):
3873 New functions.
3874 (gimple_pop_condition, gimplify_return_expr, gimplify_loop_expr,
3875 gimplify_switch_expr, gimplify_case_label_expr,
3876 gimplify_self_mod_expr, gimplify_call_expr,
3877 gimplify_modify_expr_to_memcpy, gimplify_modify_expr_to_memset,
3878 gimplify_init_ctor_eval_range, gimpllify_modify_expr_complex_part,
3879 gimplify_modify_expr, gimplify_asm_expr, gimplify_cleanup_point_expr,
3880 gimple_push_cleanup, gimplify_omp_parallel, gimplify_omp_atomic,
3881 gimplify_expr, gimplify_body, gimplify_function_tree): When adding
3882 to statement sequences in the gimplifier, do not update operands.
3883 * tree-dfa.c (find_new_referenced_vars): Convert to tuples.
3884 * tree-flow.h (find_new_referenced_vars): Declare with new signature.
3885 * gimple.h (gimple_return_set_retval): Fix argument validation.
3886 (gsi_insert_seq_before_without_update,
3887 gsi_insert_before_without_update,
3888 gsi_insert_seq_after_without_update,
3889 gsi_insert_after_without_update): Declare new functions.
3890 * gimple.c (gimple_build_return): Rely on gimple_return_set_retval
3891 to perform argument validation.
3892 * passes.c (init_optimization_passes): Enable pass_fold_builtins.
3893
38942008-03-13 Oleg Ryjkov <olegr@google.com>
3895
3896 * tree-cfg.c (gimplify_val): Removed.
3897 (gimplify_build1, gimplify_build2, gimplify_build3): Use
3898 force_gimple_operand_gsi instead of gimplify_val.
3899 * tree-complex.c (extract_component): Use force_gimple_operand_gsi
3900 instead of gimplify_val.
3901 * tree-vect-generic.c (expand_vector_parallel): Ditto.
3902
39032008-03-13 Diego Novillo <dnovillo@google.com>
3904 Oleg Ryjkov <olegr@google.com>
3905
3906 * tree-ssa-operands.c (get_expr_operands): Handle FILTER_EXPR and
3907 EXC_PTR_EXPR.
3908
39092008-03-12 Diego Novillo <dnovillo@google.com>
3910 Oleg Ryjkov <olegr@google.com>
3911
3912 * cfgexpand.c (gimple_to_tree): Record the correct type when
3913 converting GIMPLE_CALL.
3914
39152008-03-12 Zdenek Dvorak <ook@ucw.cz>
3916
3917 * tree-ssa-loop-im.c (stmt_cost, rewrite_bittest,
3918 determine_invariantness_stmt, gather_mem_refs_stmt):
3919 Use gimple_assign_rhs_code.
3920 * cfgexpand.c (gimple_to_tree): Ditto.
3921 * tree-inline.c (estimate_num_insns): Ditto.
3922 * tree-vect-generic.c (expand_vector_operations_1): Ditto.
3923 * tree-ssa-ccp.c (likely_value, ccp_fold, evaluate_stmt,
3924 * gimple.c (gimple_fold, gimple_assign_set_rhs_with_ops): Ditto.
3925 * tree-ssa-structalias.c (handle_ptr_arith): Ditto.
3926 fold_gimple_assign): Ditto.
3927 * value-prof.c (gimple_divmod_fixed_value_transform): Ditto.
3928 * tree-ssa-loop-ch.c (copy_loop_headers): Ditto.
3929 * tree-ssa-propagate.c (stmt_makes_single_load,
3930 substitute_and_fold): Ditto.
3931 * tree-ssa-loop-niter.c (chain_of_csts_start): Exclude memory loads.
3932 (get_val_for): Assert that the statement is an assignment.
3933 (derive_constant_upper_bound_assign,
3934 expand_simple_operations): Use gimple_assign_rhs_code.
3935 * tree-ssa-loop-manip.c (create_iv, ip_normal_pos,
3936 standard_iv_increment_position, determine_exit_conditions,
3937 tree_transform_and_unroll_loop): Tuplify.
3938 * tree-scalar-evolution.c (interpret_expr): Fail for chrecs.
3939 (interpret_gimple_assign, follow_ssa_edge_in_rhs): Use
3940 gimple_assign_rhs_code.
3941 * tree-gimple.c (gimple_assign_rhs_code): New function.
3942 * tree-gimple.h (gimple_assign_rhs_code): Declare.
3943 * tree-ssa-loop-ivopts.c (single_dom_exit): Enable.
3944 * gimple-dummy.c (compute_data_dependences_for_loop, dump_ddrs,
3945 free_data_refs, free_dependence_relations,
3946 gimple_duplicate_loop_to_header_edge, tree_ssa_prefetch_arrays,
3947 estimated_loop_iterations_int): Removed.
3948 * tree-ssa-loop-ivcanon.c (tree_num_loop_insns): Tuplify.
3949 * predict.c, tree-data-ref.c, tree-ssa-loop-prefetch.c: Tuplify.
3950 * tree-data-ref.h (struct data_reference, struct rdg_vertex): Change
3951 the type of stmt to gimple.
3952 (get_references_in_stmt, create_data_ref, rdg_vertex_for_stmt,
3953 stores_from_loop, remove_similar_memory_refs,
3954 have_similar_memory_accesses): Declaration changed.
3955 * gimple-iterator.c (gsi_insert_seq_on_edge_immediate): New.
3956 * gimple-pretty-print.c (dump_gimple_assign): Dump nontemporal
3957 move. Use gimple_assign_rhs_code.
3958 (dump_unary_rhs, dump_binary_rhs): Use gimple_assign_rhs_code.
3959 * gimplify.c (gimplify_modify_expr): Set lhs of the assignment to
3960 the new SSA name.
3961 * tree-ssa-coalesce.c (build_ssa_conflict_graph,
3962 create_outofssa_var_map): Use gimple_assign_copy_p.
3963 * tree-predcom.c (mark_virtual_ops_for_renaming): Enable.
3964 * tree-inline.c (estimate_num_insns): Use gimple_assign_rhs_code.
3965 * tree-flow.h (mark_virtual_ops_for_renaming): Declaration changed.
3966 * gimple.h (struct gimple_statement_base): Change unused_4 flag
3967 to nontemporal_move flag.
3968 (gimple_assign_nontemporal_move_p, gimple_assign_set_nontemporal_move):
3969 New functions.
3970 (gsi_insert_seq_on_edge_immediate): Declare.
3971 (gimple_assign_rhs2): Return NULL if the statement does not have two
3972 operands.
3973 (gimple_assign_subcode): Removed.
3974 * tree-cfg.c (verify_types_in_gimple_assign): Use
3975 gimple_assign_rhs_code.
3976 (gimple_lv_adjust_loop_header_phi, gimple_lv_add_condition_to_bb):
3977 Tuplify.
3978 (gimple_cfg_hooks): Enable lv_add_condition_to_bb and
3979 lv_adjust_loop_header_phi hooks.
3980 * passes.c (init_optimization_passes): Enable pass_profile,
3981 pass_check_data_deps and pass_loop_prefetch.
3982
39832008-03-11 Diego Novillo <dnovillo@google.com>
3984
3985 * tree-ssa-operands.h: Added declaration of add_to_addressable_set.
3986 * tree-ssa-operands.h (add_to_addressable_set): New function.
3987 (gimple_add_to_addresses_taken): Moved most of the logic to
3988 add_addressable_set.
3989 * tree-ssa-structalias.c (update_alias_info): Record the variables
3990 whose address is taken inside a phi node.
3991
39922008-03-11 Aldy Hernandez <aldyh@redhat.com>
3993
3994 * tree-phinodes.c (allocate_phi_node): Update for tuples.
3995 * gimplify.c (gimplify_function_tree): Dump memory stats.
3996 * gimple.c: Declare gimple_alloc_counts, gimple_alloc_sizes,
3997 and gimple_alloc_kind_names.
3998 (gimple_alloc): Gather statistics for tuples.
3999 (gimple_build_asm_1): Same.
4000 (gimple_seq_alloc): Same.
4001 (dump_gimple_statistics): New.
4002 * gimple.h: Define gimple_alloc_kind.
4003 (gimple_alloc_kind): New.
4004 (dump_gimple_statistics): Protoize.
4005 * tree-ssa-copy.c (replace_exp_1): Mark for_propagation as unused
4006 (merged from mainline).
4007
40082008-03-11 Diego Novillo <dnovillo@google.com>
4009
4010 Merge with mainline @133081.
4011
4012 * configure.ac (ACX_PKGVERSION): Update revision merge string.
4013 * configure: Regenerate.
4014
40152008-03-06 Diego Novillo <dnovillo@google.com>
4016
4017 Merge with mainline @132948
4018
4019 * configure.ac (ACX_PKGVERSION): Update revision merge string.
4020 * configure: Regenerate.
4021
40222008-03-06 Diego Novillo <dnovillo@google.com>
4023
4024 * config/rs6000/rs6000.c (rs6000_alloc_sdmode_stack_slot):
4025 Call walk_gimple_op.
4026 * tree-complex.c (expand_complex_div_wide): Call
4027 split_block with STMT.
4028
40292008-03-06 Diego Novillo <dnovillo@google.com>
4030
4031 * gimple.h (struct gimple_statement_base): Rename field
4032 'locus' to 'location'. Update all users.
4033 (gimple_location): Rename from gimple_locus. Update all
4034 users.
4035 (gimple_set_location): Rename from gimple_set_locus.
4036 Update all users.
4037 (gimple_has_location): Rename from gimple_location_empty_p.
4038 Change sign of return value. Update all users.
4039 * gimplify.c (tree_annotate_all_with_location): Rename
4040 from tree_annotate_all_with_locus.
4041 (annotate_all_with_location): Rename from
4042 annotate_all_with_locus.
4043
40442008-03-05 Diego Novillo <dnovillo@google.com>
4045
4046 * gimple.c (gimple_set_lhs): Remove return keywords.
4047
40482008-03-05 David Daney <ddaney@avtrex.com>
4049
4050 * builtins.c (expand_builtin___clear_cache): Disable call to
4051 validate_arglist.
4052 * config/mips/mips.c (mips_gimplify_va_arg_expr): Tuplify.
4053
40542008-03-05 Bill Maddox <maddox@google.com>
4055
4056 * tree-ssa-ccp.c (dump_lattice_value, debug_lattice_value):
4057 Re-enable functions #if'd out.
4058 (test_default_value, likely_value, surely_varying_stmt_p,
4059 ccp_initialize, ccp_visit_phi_node, ccp_fold, evaluate_stmt,
4060 visit_assignment, visit_cond_stmt, ccp_visit_stmt):
4061 Convert to tuples.
4062 (fold_gimple_call): Don't trip over call that simplifies to
4063 another call, not a constant.
4064 * tree-ssa-propagate.c (ssa_prop_init): Initialize in-worklist
4065 flag for phi nodes as well as statements.
4066 (valid_gimple_expression_p): Add fixme comment to remove this.
4067 function. It currently has static uses, but asserts when called.
4068 (stmt_makes_single_load, stmt_makes_single_store):
4069 Convert to tuples
4070 (replace_phi_args_in): Convert to tuples. Fix typo in comment.
4071 * gimple.c (gimple_copy_no_def_use, gimple_get_lhs,
4072 gimple_set_lhs): New function.
4073 * gimple.h (gimple_copy_no_def_use, gimple_get_lhs,
4074 gimple_set_lhs): Declare new function.
4075 * tree-cfg.c (replace_uses_by): Add comment regarding empty
4076 operands.
4077 * passes.c (init_optimization_passes): Enable pass_ccp and
4078 pass_store_ccp.
4079
40802008-03-05 David Daney <ddaney@avtrex.com>
4081
4082 * tree-phinodes.c (allocate_phi_node): Fix syntax errors from
4083 previous commit.
4084
719bb4e3 40852008-03-05 Rafael Espíndola <espindola@google.com>
726a989a
RB
4086
4087 * tree-phinodes.c (allocate_phi_node): free free_phinodes[bucket]
4088 if empty.
4089
40902008-03-05 Diego Novillo <dnovillo@google.com>
4091
4092 http://gcc.gnu.org/ml/gcc/2008-03/msg00256.html
4093
4094 * fold-const.c (tree_binary_nonnegative_warnv_p): Fix
4095 invalid C90 declaration.
4096 (tree_single_nonnegative_warnv_p): Likewise.
4097 * gimplify.c (gimplify_bind_expr): Likewise.
4098 (gimplify_return_expr): Likewise.
4099
41002008-03-04 Zdenek Dvorak <ook@ucw.cz>
4101
4102 * tree-ssa-loop-niter.c, tree-scalar-evolution.c: Tuplified.
4103 * tree-ssa-loop-manip.c (split_loop_exit_edge): Ditto.
4104 * tree-chrec.c (chrec_fold_plus, chrec_apply, chrec_convert_1,
4105 convert_affine_scev, chrec_convert_rhs, chrec_convert,
4106 chrec_convert_aggressive): Pass statements as gimple.
4107 * tree-scalar-evolution.h (get_loop_exit_condition, simple_iv):
4108 Type changed.
4109 * tree-chrec.h (chrec_convert, chrec_convert_rhs): Ditto.
4110 * tree-ssa-loop-ivopts.c (abnormal_ssa_name_p,
4111 idx_contains_abnormal_ssa_name_p, contains_abnormal_ssa_name_p,
4112 expr_invariant_in_loop_p, tree_int_cst_sign_bit): Enabled.
4113 * gimple-dummy.c (chrec_dont_know, chrec_known, chrec_not_analyzed_yet,
4114 analyze_scalar_evolution, chrec_contains_symbols_defined_in_loop,
4115 estimate_numbers_of_iterations, expr_invariant_in_loop_p,
4116 free_numbers_of_iterations_estimates,
4117 free_numbers_of_iterations_estimates_loop, get_loop_exit_condition,
4118 instantiate_parameters, nowrap_type_p. scev_const_prop. scev_finalize,
4119 scev_initialize, scev_probably_wraps_p, scev_reset,
4120 tree_int_cst_sign_bit, number_of_iterations_exit, loop_niter_by_eval,
4121 substitute_in_loop_info): Removed.
4122 * tree-ssa-loop.c (tree_loop_optimizer_init): Merged into...
4123 (tree_ssa_loop_init): ... here. Enable scev_initialize call.
4124 (tree_ssa_loop_done): Enable scev finalization.
4125 * gimple-iterator.c (gsi_insert_seq_nodes_before): Allow inserting
4126 at the end of basic block.
4127 (gsi_for_stmt): Handle phi nodes.
4128 * cfgloop.h (struct nb_iter_bound): Change type of stmt field to gimple.
4129 * tree-flow.h (scev_probably_wraps_p, convert_affine_scev,
4130 stmt_dominates_stmt_p): Types changed.
4131 * Makefile.in (gt-tree-scalar-evolution.h): Enable.
4132 * gimple.c (extract_ops_from_tree): Export.
4133 (gimple_copy): Do not share bitmaps.
4134 * gimple.h (extract_ops_from_tree): Declare.
4135 (gimple_call_set_lhs): Allow lhs to be NULL.
4136 * tree-cfg.c (add_phi_args_after_copy_edge,
4137 add_phi_args_after_copy_bb): Tuplify.
4138 * passes.c (init_optimization_passes): Enable pass_ch, pass_scev_cprop.
4139
41402008-03-04 Oleg Ryjkov <olegr@google.com>
4141
4142 * tree-ssa-dse.c (execute_simple_dse): Commented out.
4143 * passes.c (init_optimization_passes): Disabling pass_simple_dse.
4144
41452008-03-04 Bill Maddox <maddox@google.com>
4146
4147 * tree-cfg.c (remove_useless_stmts_1):
4148 Correctly distinguish try-catch and try-finally.
4149
41502008-03-04 Oleg Ryjkov <olegr@google.com>
4151
4152 * tree-ssa-dse.c (execute_simple_dse): Tuplified.
4153 * gimplify.c (gimplify_return_expr): Copy the NO_WARNING flag
4154 to the newly created expr from the tree.
4155 * tree-cfg.c (gimplify_build1): Tuplified.
4156 * passes.c (init_optimization_passes): Enabled
4157 pass_warn_function_return, pass_update_address_taken,
4158 pass_simple_dse and pass_build_alias passes.
4159
719bb4e3 41602008-03-04 Rafael Espíndola <espindola@google.com>
726a989a
RB
4161
4162 * fold-const.c (tree_simple_nonnegative_warnv_p): New.
4163 (tree_unary_nonnegative_warnv_p): New.
4164 (tree_binary_nonnegative_warnv_p): New.
4165 (tree_single_nonnegative_warnv_p): New.
4166 (tree_invalid_nonnegative_warnv_p): New.
4167 (tree_expr_nonnegative_warnv_p): Redefine in term of the new functions.
4168
41692008-03-04 Aldy Hernandez <aldyh@redhat.com>
4170
4171 * gimple.c (walk_gimple_seq): Do not set wi->gsi.
4172 (walk_gimple_stmt): Set wi->gsi.
4173 * tree-cfg.c (verify_stmt): Use walk_gimple_op instead of
4174 walk_gimple_stmt.
4175 (verify_stmts): Same.
4176
41772008-03-04 Diego Novillo <dnovillo@google.com>
4178
4179 http://gcc.gnu.org/ml/gcc-patches/2008-03/msg00219.html
4180
4181 * expr.c (expand_expr_real): Call lookup_expr_eh_region.
4182 * tree-eh.c (lookup_stmt_eh_region_fn):
4183 (lookup_stmt_eh_region): Fix comment.
4184 (lookup_expr_eh_region): Handle missing cfun and missing
4185 EH table.
4186 (record_in_finally_tree): Fix comment.
4187 (collect_finally_tree_1): Remove handler for
4188 GIMPLE_SWITCH.
4189 (maybe_record_in_goto_queue): Remove local variable
4190 NEW_IS_LABEL.
4191 Record GIMPLE_GOTOs instead of their label.
4192 (verify_norecord_switch_expr): Retrieve the CASE_LABEL
4193 from the case label expression.
4194 (do_return_redirection): Change sign of assertion.
4195 (lower_try_finally_onedest): Assert that
4196 TF->GOTO_QUEUE[0] contains a GIMPLE statement.
4197 (lower_try_finally_copy): Assert that Q contains a GIMPLE
4198 statement.
4199 (lower_try_finally_switch): Build a new GIMPLE label for
4200 CONT_STMT.
4201 (mark_eh_edge): Tuplify.
4202 (verify_eh_edges): Tuplify.
4203 (tree_can_throw_external): Remove unused function.
4204 (optimize_double_finally): Remove #if 0.
4205 * gimple-pretty-print.c (GIMPLE_NIY): Tidy.
4206 (dump_gimple_resx): Fix format string for
4207 dump_gimple_fmt.
4208 * gimplify.c (gimplify_cleanup_point_expr): Initialize
4209 BODY_SEQUENCE.
4210 * calls.c (emit_call_1): Remove ATTRIBUTE_UNUSED markers.
4211 * cfgexpand.c (gimple_to_tree) <GIMPLE_NOP>: Assign new
4212 expression to T.
4213 <GIMPLE_RESX>: Handle.
4214 Always assign the value from lookup_stmt_eh_region to
4215 ANN->RN.
4216 * tree-cfg.c (start_recording_case_labels):
4217 (recording_case_labels_p): Re-enable.
4218 (get_cases_for_edge): Likewise.
4219 (gimple_verify_flow_info): Re-enable call to
4220 verify_eh_edges.
4221 (gimple_redirect_edge_and_branch): Re-enable handling of
4222 GIMPLE_SWITCH.
4223 (gimple_block_ends_with_call_p): Tuplify.
4224 (struct gimple_cfg_hooks): Enable block_ends_with_call_p
4225 callback.
4226
719bb4e3 42272008-03-04 Rafael Espíndola <espindola@google.com>
726a989a
RB
4228
4229 * fold-const.c (tree_unary_nonzero_warnv_p): New.
4230 (tree_binary_nonzero_warnv_p): New.
4231 (tree_single_nonzero_warnv_p): New.
4232 (tree_expr_nonzero_warnv_p): Redefine using the new functions.
4233
42342008-03-04 Aldy Hernandez <aldyh@redhat.com>
4235
4236 * gimple.c (walk_gimple_op): Update comment.
4237 (walk_gimple_stmt): Same.
4238
42392008-03-03 Aldy Hernandez <aldyh@redhat.com>
4240
4241 * cgraphbuild.c (build_cgraph_edges): Use walk_gimple_op instead of
4242 walk_gimple_stmt.
4243 * tree-ssa-alias-warnings.c (find_references_in_function): Same.
4244 * tree-ssa-ccp.c (fold_stmt): Change walk_gimple_stmt call to
4245 walk_gimple_op.
4246 * tree-nrv.c (tree_nrv): Same.
4247 * tree-ssa-alias.c (count_uses_and_derefs): Same.
4248 * cfgexpand.c (discover_nonconstant_array_refs_r): Same.
4249 * tree-nested.c (convert_nonlocal_reference_stmt): Make first
4250 argument a GSI.
4251 (convert_local_reference_op): Same.
4252 (convert_nl_goto_reference): Same.
4253 (convert_tramp_reference_stmt): Same.
4254 (convert_gimple_call): Same.
4255 * tree-inline.c (inline_forbidden_p_stmt): Same.
4256 * tree-ssa.c (execute_early_warn_uninitialized): Change
4257 walk_gimple_stmt call to walk_gimple_op.
4258 * gimple.c (walk_gimple_seq): Pass GSI to walk_gimple_stmt.
4259 (walk_gimple_stmt): Move operand walking code to...
4260 (walk_gimple_op): ...here.
4261 (walk_gimple_stmt): First argument is now a GSI.
4262 * gimple.h: Change walk_stmt_fn argument to a GSI.
4263 (walk_gimple_stmt): Make first argument is a GSI.
4264 (walk_gimple_op): New prototype.
4265 * tree-cfg.c (verify_stmt): Change argument to a GSI. Adjust
4266 accordingly.
4267
42682008-02-29 Zdenek Dvorak <ook@ucw.cz>
4269
4270 * tree-ssa-alias.c (is_escape_site): Detect pure/const functions
4271 correctly.
4272
42732008-02-28 Zdenek Dvorak <ook@ucw.cz>
4274
4275 * tree-ssa-loop-im.c: Tuplify.
4276 * tree-ssa-loop-manip.c (add_exit_phis_edge, find_uses_to_rename_stmt,
4277 find_uses_to_rename_bb, check_loop_closed_ssa_use,
4278 check_loop_closed_ssa_stmt, verify_loop_closed_ssa): Ditto.
4279 * gimple-dummy.c (rewrite_into_loop_closed_ssa, tree_ssa_lim,
4280 verify_loop_closed_ssa, replace_exp): Removed.
4281 * tree-ssa-loop.c (tree_ssa_loop_init, tree_ssa_loop_done): Comment
4282 out scev initialization and finalization.
4283 * gimple-iterator.c (gsi_remove): Rename remove_eh_info to
4284 remove_permanently. Do not free operands if remove_permanently
4285 is false.
4286 (gimple_find_edge_insert_loc): Use gsi_last_bb.
4287 * tree-eh.c (operation_could_trap_p): Factored out of ...
4288 (tree_could_trap_p): ... here.
4289 * tree-ssa-copy.c (replace_exp): Enable.
4290 * tree-flow.h (movement_possibility): Declaration changed.
4291 (operation_could_trap_p): Declare.
4292 * Makefile.in (tree-ssa-loop-im.o): Add pointer-set.h dependency.
4293 (gimple.o): Add FLAGS_H dependency.
4294 * gimple.c: Include flags.h.
4295 (gimple_could_trap_p): New function.
4296 * gimple.h (gimple_could_trap_p): Declare.
4297 * tree-cfg.c (replace_uses_by): Check that op is not null.
4298 * passes.c (init_optimization_passes): Enable pass_lim.
4299
719bb4e3 43002008-02-28 Rafael Espíndola <espindola@google.com>
726a989a
RB
4301
4302 * tree-outof-ssa.c (insert_backedge_copies): Don't build
4303 uninitialized assignment.
4304
719bb4e3 43052008-02-28 Rafael Espíndola <espindola@google.com>
726a989a
RB
4306
4307 * tree-dfa.c (dump_dfa_stats): cast dfa_stats.max_num_phi_args to long.
4308
43092008-02-26 Diego Novillo <dnovillo@google.com>
4310
4311 * tree-ssa-copyrename.c (rename_ssa_copies): Do not mix
4312 declarations with code.
4313 * tree-ssa-coalesce.c (create_outofssa_var_map): Likewise.
4314 * tree-dfa.c (dump_dfa_stats): Use %ld for
4315 dfa_stats.max_num_phi_args.
4316
43172008-02-26 Bill Maddox <maddox@google.com>
4318
4319 * tree-ssa-ccp.c (maybe_fold_stmt_addition):
4320 Reinstated this function for tuples as-is.
4321 (valid_gimple_rhs_p): New function. Mostly lifted from
4322 valid_gimple_epxression_p, which is likely obsolete.
4323 (fold_stmt_r): Reinstated commented-out cases for
4324 tuples. Replaced call to obsolete function set_rhs.
4325 (get_maxval_strlen): Convert to tuples.
4326 (ccp_fold_builtin): Partial conversion to tuples.
4327 (fold_gimple_assign): New function.
4328 (fold_gimple_cond): New function.
4329 (fold_gimple_call): New function.
4330 (fold_stmt): Convert to tuples.
4331 (fold_stmt_inplace): Convert to tuples.
4332 * tree-ssa-propagate.c (substitute_and_fold):
4333 Update call to fold_stmt for revised argument signature.
4334 * gimple-dummy.c (fold_stmt): Removed dummy definition.
4335 * gimplify.c (gimplify_call_expr): Removed obsolete
4336 manipulation of TREE_NOTHROW flag.
4337 * cfgexpand.c (gimple_to_tree): Set nothrow flag
4338 of call expression based on call statement flags.
4339 Handle GIMPLE_NOP statement.
4340 * tree-flow.h (notice_special_calls, fold_stmt):
4341 Update prototypes for tuples.
4342 * gimple.c (gimple_cond_set_condition_from_tree):
4343 New function.
4344 (gimple_seq_has_side_effects): New function.
4345 * gimple.h (gimple_cond_set_condition_from_tree,
4346 gimple_seq_has_side_effects): New prototypes.
4347 (gimple_call_nothrow_p): New function.
4348 (gsi_stmt_ptr): Add comment regarding usage of this
4349 function vs. gsi_replace.
4350 * tree-cfg.c (struct rus_data): Convert to tuples.
4351 (remove_useless_stmts_1, remove_useless_stmts_warn_notreached,
4352 remove_useless_stmts_cond, remove_useless_stmts_tf,
4353 remove_useless_stmts_tc, remove_useless_stmts_goto,
4354 remove_useless_stmts_label, notice_special_calls,
4355 remove_useless_stmts): Convert to tuples.
4356 (update_call_expr_flags): Removed.
4357 * passes.c (init_optimization_passes): Enable
4358 pass_remove_useless_stmts.
4359
43602008-02-25 Bill Maddox <maddox@google.com>
4361
4362 * tree-into-ssa.c (rewrite_initialize_block):
4363 Avoid declaration following statement in block.
4364 * tree-nrv.c (tree_nrv):
4365 Avoid declaration following statement in block.
4366 * tree-eh.c (collect_finally_tree): Fix typo in comment.
4367 Avoid cast to union type.
4368 (replace_goto_queue_cond_clause, replace_goto_queue_1,
4369 maybe_record_in_goto_queue, verify_norecord_switch_expr,
4370 lower_try_finally_fallthru_label): Avoid cast to union type.
4371 * fortran/Make-lang.in: Add -Wno-missing-format-attribute
4372 to fortran-warn options to avoid conflict with -Wno-format.
4373 * gimplify.c (gimplify_switch_expr): Change assignment
4374 to initialiation.
4375 (gimplify_case_label_expr): Avoid declaration following
4376 statement in block.
4377 * tree-ssa-coalesce.c (create_outofssa_var_map): Avoid
4378 declaration following statement in block.
4379 * tree-ssa.c (ssa_redirect_edge, flush_pending_stmts):
4380 Avoid declaration following statements in block.
4381 * Makefile.in: Add -Wno-missing-format-attribute
4382 to builtins.o-warn and expr.o-warn options to avoid conflict
4383 with -Wno-format. Removed fortran/*-warn options, -Wno-format
4384 and -Wno-uninitialized, which belong in fortran/Make-lang.in,
4385 and are applied to all fortran files there.
4386
43872008-02-25 Oleg Ryjkov <olegr@google.com>
4388
4389 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg01236.html
4390
4391 * tree-ssa-copyrename.c: Include gimple.h
4392 Tuplify.
4393 * tree-ssa.c (warn_uninit): Pass &LOCUS to warning().
4394 * passes.c (init_optimization_passes): Enable
4395 pass_early_warn_uninitialized, pass_rebuild_cgraph_edges
4396 and pass_early_inline.
4397
43982008-02-25 Diego Novillo <dnovillo@google.com>
4399
4400 * Makefile.in (tree-ssa-copyrename.o): Add dependency on
4401 gimple.h.
4402
44032008-02-25 Diego Novillo <dnovillo@google.com>
4404
4405 * tree-cfgcleanup.c (tree_forwarder_block_p): Revert
4406 previous change.
4407
44082008-02-25 Diego Novillo <dnovillo@google.com>
4409
4410 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg01217.html
4411
4412 * tree-ssa-alias-warnings.c: Tuplify.
4413 * cgraphunit.c (cgraph_process_new_functions): Remove
4414 calls to gimple_unreachable.
4415 (cgraph_expand_function): Likewise.
4416 * omp-low.c (execute_expand_omp): Return 0 after call to
4417 gimple_unreachable.
4418 * tree-scalar-evolution.c (scev_const_prop): Likewise.
4419 (execute_lower_omp): Likewise.
4420 * tree-ssa-dse.c (execute_simple_dse): Likewise.
4421 * tree-ssa-dom.c (tree_ssa_dominator_optimize): Likewise.
4422 (eliminate_degenerate_phis): Likewise.
4423 * tree-ssa-propagate.c (get_rhs): Likewise.
4424 (valid_gimple_expression_p): Likewise.
4425 (set_rhs): Likewise.
4426 (fold_predicate_in): Likewise.
4427 * tree-nrv.c (execute_return_slot_opt): Likewise.
4428 * predict.c (tree_estimate_probability): Likewise.
4429 * tree-parloops.c (parallelize_loops): Likewise.
4430 * tree-if-conv.c (main_tree_if_conversion): Likewise.
4431 * tree-ssa-phiopt.c (tree_ssa_phiopt): Likewise.
4432 (tree_ssa_cs_elim): Likewise.
4433 * tree-sra.c (tree_sra): Likewise.
4434 (tree_sra_early): Likewise.
4435 * tree-predcom.c (tree_predictive_commoning): Likewise.
4436 * tree-ssa-copy.c (execute_copy_prop): Likewise.
4437 * lambda-code.c (gcc_loop_to_lambda_loop): Likewise.
4438 (perfect_nest_p): Likewise.
4439 (can_convert_to_perfect_nest): Likewise.
4440 (perfect_nestify): Likewise.
4441 * tree-optimize.c (execute_fixup_cfg): Likewise.
4442 * tree-object-size.c (compute_object_sizes): Likewise.
4443 * tree-cfg.c (remove_useless_stmts): Likewise.
4444 (gimple_duplicate_sese_tail): Likewise.
4445 (move_sese_region_to_fn): Likewise.
4446 (gimple_purge_dead_abnormal_call_edges): Likewise.
4447 (execute_warn_function_return): Likewise.
4448 * value-prof.c (gimple_histogram_value): Remove calls to
4449 gimple_unreachable.
4450 (gimple_stringop_fixed_value): Likewise.
4451 * tree-flow-inline.h (op_iter_next_use): Likewise.
4452 * tree-dfa.c (dump_variable): Likewise.
4453 * tree-ssa-copy.c (may_propagate_copy): Likewise.
4454 (may_propagate_copy_into_asm): Likewise.
4455 (merge_alias_info): Likewise.
4456 (replace_exp_1): Likewise.
4457 * tree-ssa.c (delete_tree_ssa): Likewise.
4458 * tree-cfg.c (make_edges): Likewise.
4459 (remove_useless_stmts): Likewise.
4460 (gimple_duplicate_sese_tail): Likewise.
4461 (move_sese_region_to_fn): Likewise.
4462 (gimple_purge_dead_abnormal_call_edges): Likewise.
4463 (execute_warn_function_return): Likewise.
4464 * passes.c (finish_optimization_passes): Likewise.
4465 (init_optimization_passes): Likewise.
4466 * tree-ssa-operands.c (add_call_clobber_ops): Likewise.
4467 * tree-eh.c (lookup_expr_eh_region): New.
4468 (tree_can_throw_external): Return false after call to
4469 gimple_unreachable.
4470 (maybe_clean_or_replace_eh_stmt): Re-enable.
4471 Call stmt_could_throw_p.
4472 * expr.c (expand_expr_real): Call lookup_expr_eh_region.
4473 * profile.c: Tuplify.
4474 * calls.c: Include tree-flow.h.
4475 (emit_call_1): Call lookup_expr_eh_region.
4476 (expand_call): Likewise.
4477 * cfgexpand.c (gimple_to_tree): Call SET_EXPR_LOCATION on
4478 generated expression tree T.
4479 Set EH region number on T's annotation.
4480 * common.opt (fgimple-conversion=): Add RejectNegative
4481 and Joined attributes.
4482 * tree-inline.c (unsave_r): Abort if *TP is a
4483 STATEMENT_LIST.
4484 (unsave_expr_now): Re-enable.
4485 * tree-flow.h (struct tree_ann_common_d): Add field RN.
4486 * Makefile.in (builtins.o-warn): Add -Wno-format.
4487 (expr.o-warn): Likewise.
4488 (fortran/check.o-warn): Likewise.
4489 (fortran/interface.o-warn): Likewise.
4490 (fortran/resolve.o-warn): Likewise.
4491 (fortran/simplify.o-warn): Likewise.
4492 (fortran/target-memory.o-warn): Likewise.
4493 (calls.o): Add dependency on tree-flow.h
4494 * gimple.c (gimple_build_asm_1): Call ggc_alloc_string to
4495 copy STRING.
4496 * gimple.h (gimple_filename): New.
4497 (gimple_lineno): New.
4498 * passes.c (init_optimization_passes): Disable
4499 pass_remove_useless_stmts pass_mudflap_1,
4500 pass_warn_function_return and pass_lower_omp.
4501 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Tuplify.
4502 (rs6000_alloc_sdmode_stack_slot): Likewise.
4503 * tree-cfgcleanup.c (tree_forwarder_block_p): Fix test
4504 for PHI_WANTED.
4505
719bb4e3 45062008-02-25 Rafael Espíndola <espindola@google.com>
726a989a
RB
4507
4508 * tree-cfgcleanup.c (tree_forwarder_block_p): fix thinko.
4509
719bb4e3 45102008-02-24 Rafael Espíndola <espindola@google.com>
726a989a
RB
4511
4512 * gimple-iterator.c (gsi_split_seq_before): Don't abort if at the
4513 beginning.
4514
45152008-02-23 Diego Novillo <dnovillo@google.com>
4516
4517 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg01025.html
4518
4519 * gimplify.c (gimplify_one_sizepos): Call gimplify_expr with
4520 STMT_P.
4521
45222008-02-22 Zdenek Dvorak <ook@ucw.cz>
4523
4524 * gimple.c (gimple_assign_copy_p): Do not consider unary operations
4525 to be copies.
4526
45272008-02-22 Diego Novillo <dnovillo@google.com>
4528
4529 * Makefile.in (fortran/parse.o-warn,
4530 fortran/simplify.o-warn): New.
4531
45322008-02-22 Diego Novillo <dnovillo@google.com>
4533
4534 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00961.html
4535
4536 Revert
4537
4538 2008-02-20 Zdenek Dvorak <ook@ucw.cz>
4539
4540 * tree-tailcall.c: Tuplify.
4541 * gimplify.c (force_gimple_operand): Remove ATTRIBUTE_UNUSED.
4542 * gimple.c (gimple_assign_copy_p): Do not
4543 consider unary operations to be copies.
4544 (copy_or_nop_cast_stmt_rhs): New.
4545 * gimple.h (copy_or_nop_cast_stmt_rhs): Declare.
4546
719bb4e3 45472008-02-21 Rafael Espíndola <espindola@google.com>
726a989a
RB
4548
4549 * gimple.h (gimple_cond_true_p): Define.
4550 (gimple_cond_false_p): Define.
4551 (gimple_cond_single_var_p): Define.
4552
719bb4e3 45532008-02-21 Rafael Espíndola <espindola@google.com>
726a989a
RB
4554
4555 * tree-tailcall.c (adjust_accumulator_values): Check that a phi was
4556 found.
4557
719bb4e3 45582008-02-21 Rafael Espíndola <espindola@google.com>
726a989a
RB
4559
4560 * tree-tailcall.c (adjust_accumulator_values): Initialize phi.
4561
45622008-02-20 Zdenek Dvorak <ook@ucw.cz>
4563
4564 * tree-tailcall.c: Tuplify.
4565 * gimplify.c (force_gimple_operand): Remove ATTRIBUTE_UNUSED.
4566 * gimple.c (gimple_assign_copy_p): Do not consider unary operations
4567 to be copies.
4568 (copy_or_nop_cast_stmt_rhs): New.
4569 * gimple.h (copy_or_nop_cast_stmt_rhs): Declare.
4570
45712008-02-20 Oleg Ryjkov <olegr@google.com>
4572
4573 * gimplify.c (gimplify_expr): Save locus into the right
4574 sequence.
4575
719bb4e3 45762008-02-20 Rafael Espíndola <espindola@google.com>
726a989a
RB
4577
4578 * passes.c (init_optimization_passes): Enable pass_mark_used_blocks
4579 and pass_cleanup_cfg_post_optimizing.
4580 * tree-optimize.c (execute_cleanup_cfg_post_optimizing): call cleanup_tree_cfg.
4581
719bb4e3 45822008-02-20 Rafael Espíndola <espindola@google.com>
726a989a
RB
4583
4584 * passes.c (init_optimization_passes): Enable pass_nrv.
4585 * tree-nrv.c (finalize_nrv_r): data is now a walk_stmt_info.
4586 (tree_nrv): port to gimple.
4587
45882008-02-19 Oleg Ryjkov <olegr@google.com>
4589
4590 * gimple-pretty-print.c: Introduce support for TDF_RAW
4591 flag.
4592 (dump_gimple_fmt): New function.
4593 (dump_gimple_assign, dump_gimple_return): Update to print
4594 RAW gimple.
4595 (dump_gimple_call_args): New function.
4596 (dump_gimple_call, dump_gimple_switch, dump_gimple_cond,
4597 dump_gimple_label, dump_gimple_bind, dump_gimple_try):
4598 Update to print RAW gimple.
4599 (dump_gimple_catch, dump_gimple_eh_filter,
4600 dump_gimple_resx): New functions.
4601 (dump_gimple_omp_for, dump_gimple_asm, dump_gimple_phi):
4602 Update to print RAW gimple.
4603 (dump_gimple_omp_parallel, dump_gimple_omp_atomic_load,
4604 dump_gimple_omp_atomic_store): New, code moved from
4605 dump_gimple_stmt, then added support to print RAW gimple.
4606 (gimple_dump_stmt): Some code refactored into helper
4607 subroutines.
4608 * tree-cfg.c(dump_function_to_file): Print RAW gimple when
4609 TDF_RAW is set.
4610
46112008-02-19 Diego Novillo <dnovillo@google.com>
4612
4613 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00793.html
4614
4615 * tree-complex.c (expand_complex_div_wide): Call gsi_bb.
4616 * tree.h (std_gimplify_va_arg_expr): Change gimple_seq
4617 arguments to gimple_seq *.
4618 Update all users.
4619 (gimplify_parameters): Change return type to gimple_seq.
4620 Update all users.
4621 * target.h (struct gcc_target)<gimplify_va_arg_expr>:
4622 Change gimple_seq arguments to gimple_seq *.
4623 Update all users.
4624 * tree-phinodes.c (free_phinodes): Convert to VEC.
4625 Update all users.
4626 * omp-low.c (lower_rec_input_clauses): Change gimple_seq
4627 arguments to gimple_seq *. Update all users.
4628 (lower_reduction_clauses): Convert sub_list to
4629 gimple_seq.
4630 (lower_regimplify): Convert PRE to gimple_seq.
4631 (lower_regimplify): Call gimple_seq_insert_before instead
4632 of tsi_link_before.
4633 * tree-gimple.h (get_initialized_tmp_var,
4634 get_formal_tmp_var, gimplify_expr, gimplify_type_sizes,
4635 gimplify_one_sizepos, gimplify_stmt, gimplify_and_add,
4636 gimplify_va_arg_expr): Change gimple_seq arguments to
4637 gimple_seq *. Update all users.
4638 * gimple-iterator.c: Include value-prof.h.
4639 (gsi_link_seq_before): Remove. Update all users.
4640 (gsi_link_seq_after): Remove. Update all users.
4641 (gsi_link_after): Remove. Update all users.
4642 (gsi_link_before): Remove. Update all users.
4643 (update_bb_for_stmts): New.
4644 (gsi_insert_seq_nodes_before): New.
4645 (gsi_insert_seq_nodes_after): New.
4646 (gsi_insert_seq_before): Re-write. Call
4647 gsi_insert_seq_nodes_before.
4648 (gsi_insert_seq_after): Re-write. Call
4649 gsi_insert_seq_nodes_after.
4650 (gsi_replace): Re-enable EH updating.
4651 (update_modified_stmt): Move earlier in the file.
4652 (gsi_insert_after): Re-write. Call
4653 gsi_insert_seq_nodes_after.
4654 (gsi_insert_before): Re-write. Call
4655 gsi_insert_seq_nodes_before.
4656 (gsi_remove): Move from gimple.h. Re-write.
4657 * langhooks.h (struct lang_hooks): Change gimple_seq
4658 arguments for gimplify_expr to gimple_seq *.
4659 Update all users.
4660 * coretypes.h (struct gimple_seq_d): Rename from struct
4661 gimple_sequence. Update all users.
4662 (struct gimple_seq_node_d): New.
4663 (gimple_seq_node): New.
4664 (const_gimple_seq_node): New.
4665 * tree-flow.h (force_gimple_operand): Change gimple_seq
4666 argument to gimple_seq *. Update all users.
4667 * c-common.h (c_gimplify_expr): Change gimple_seq
4668 argument to gimple_seq *. Update all users.
4669 * Makefile.in (build):
4670 * gimple.c (gimple_seq_cache): New.
4671 (gimple_seq_alloc): Take sequences from gimple_seq_cache,
4672 if possible.
4673 (gimple_seq_free): New.
4674 (gimple_seq_add_stmt): Rename from gimple_seq_add.
4675 Change gimple_seq argument to gimple_seq *. Update all users.
4676 (gimple_seq_add_seq): Rename from gimple_seq_append.
4677 Update all users.
4678 (gimple_remove): Remove. Update all users.
4679 (gimple_seq_reverse): Remove unused function.
4680 (gimple_set_bb): Only update block-to-labels map if
4681 CFUN->CFG exists.
4682 * gimple.h (struct gimple_seq_node_d): New.
4683 (struct gimple_seq_d): Change fields 'first' and 'last'
4684 to type gimple_seq_node. Update all users.
4685 Add field 'next_free'.
4686 (gimple_seq_first): Change return type to
4687 gimple_seq_node. Update all users.
4688 (gimple_seq_first_stmt): New.
4689 (gimple_seq_last): Change return type to gimple_seq_node.
4690 Update all users.
4691 (gimple_seq_last_stmt): New.
4692 (gimple_seq_set_first): Change second argument to type
4693 gimple_seq_node. Update all users.
4694 (gimple_seq_set_last): Change second argument to type
4695 gimple_seq_node. Update all users.
4696 (gimple_seq_init): Remove. Update all users.
4697 (struct gimple_statement_base): Remove field 'next' and
4698 'prev'. Update all users.
4699 (struct gimple_statement_omp): Change fields of type
4700 struct gimple_sequence to type gimple_seq. Update all
4701 users.
4702 (struct gimple_statement_bind): Likewise.
4703 (struct gimple_statement_catch): Likewise.
4704 (struct gimple_statement_eh_filter): Likewise.
4705 (struct gimple_statement_try): Likewise.
4706 (struct gimple_statement_wce): Likewise.
4707 (struct gimple_statement_omp_for): Likewise.
4708 (gimple_set_prev): Remove. Update all users.
4709 (gimple_set_next): Remove. Update all users.
4710 (gimple_next): Remove. Update all users.
4711 (gimple_prev): Remove. Update all users.
4712 (gimple_seq_bb): New.
4713 (gimple_catch_handler_ptr): New.
4714 (gimple_stmt_iterator): Remove field 'stmt'.
4715 Add field 'ptr'. Update all users.
4716 (gsi_remove): Move to gimple-iterator.c
4717 * tree-cfg.c (pass_build_cfg): Re-enable PROP_gimple_leh.
4718 * Makefile.in (builtins.o-warn, expr.o-warn, dse.o-warn,
4719 ebitmap.o-warn, lower-subreg.o-warn, tree-chrec.o-warn):
4720 Change -Wno-error to -Wno-uninitialized.
4721
719bb4e3 47222008-02-19 Rafael Espíndola <espindola@google.com>
726a989a
RB
4723
4724 * tree-eh.c (collect_finally_tree): handle GIMPLE_SWITCH.
4725
47262008-02-19 Aldy Hernandez <aldyh@redhat.com>
4727
4728 * gimple.h (gimple_cond_invert): Remove prototype.
4729 (update_stmt_if_modified): Fix typo in comment.
4730 * gimple.c (walk_gimple_asm): Fix typo in comment.
4731
47322008-02-13 Bill Maddox <maddox@google.com>
4733
4734 * tree-inline.c (estimate_operator_cost):
4735 Removed operators superseded by tuplified statement forms.
4736 Small cosmetic reordering of a few switch cases.
4737
47382008-02-13 Oleg Ryjkov <olegr@google.com>
4739
4740 * tree.h: New function declaration.
4741 * gimple-dummy.c (tree_inlinable_function_p): Removed.
4742 * ipa-inline.c (compute_inline_parameters): Removed
4743 gcc_unreachable ().
4744 * calls.c (gimple_alloca_call_p): New function.
4745 * tree-inline.c (inline_forbidden_p_1): Split in two and removed.
4746 (inline_forbidden_p_op, inline_forbidden_p_stmt): New functions.
4747 (inline_forbidden_p): Tuplified.
4748 (estimate_operator_cost): Added missing cases.
4749 * passes.c (init_optimization_passes): Enabled pass_inline_parameters,
4750 pass_ipa_function_and_variable_visibility, pass_ipa_early_inline,
4751 pass_inline_parameters, pass_rebuild_cgraph_edges passes.
4752
47532008-02-13 Diego Novillo <dnovillo@google.com>
4754
4755 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00459.html
4756
4757 * gimple.def (GIMPLE_TRY): Tidy comment.
4758 * gimple-pretty-print.c (dump_gimple_stmt): Handle TDF_VOPS and
4759 TDF_MEMSYMS.
4760
47612008-02-13 Diego Novillo <dnovillo@google.com>
4762
4763 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00455.html
4764
4765 * tree-complex.c (update_complex_components): Handle
4766 GIMPLE_CALL and GIMPLE_ASSIGN.
4767 (expand_complex_libcall): Set SSA_NAME_DEF_STMT on LHS.
4768 * tree-ssa-operands.c (maybe_add_call_clobbered_vops):
4769 Rename from get_call_expr_operands. Update all users.
4770 Convert to handle GIMPLE_CALL instead of CALL_EXPR.
4771 (get_modify_stmt_operands): Remove. Update all users.
4772 (get_expr_operands): Do not handle CALL_EXPR, COND_EXPR,
4773 VEC_COND_EXPR, GIMPLE_MODIFY_STMT, BLOCK, EXC_PTR_EXPR
4774 and FILTER_EXPR.
4775 (parse_ssa_operands): Call maybe_add_call_clobbered_vops
4776 after parsing operands if STMT is a GIMPLE_CALL.
4777
47782008-02-12 Zdenek Dvorak <ook@ucw.cz>
4779 Bill Maddox <maddox@google.com>
4780
4781 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00429.html
4782
4783 * tree-inline.h (estimate_num_insns_fn): Declare.
4784 * cgraphunit.c (cgraph_process_new_functions):
4785 Use estimate_num_insns_fn.
4786 * ipa-inline.c (compute_inline_parameters): Ditto.
4787 * gimple-dummy.c (estimate_move_cost, estimate_num_insns):
4788 Removed.
4789 * tree-inline.c (struct eni_data, estimate_num_insns_1):
4790 Removed.
4791 (estimate_num_insns): Rewritten.
4792 (operation_cost, estimate_num_insns_fn): New functions.
4793 * gimple.c (gimple_copy): Unshare operands. Update
4794 operand caches.
4795 * gimple.h (gimple_set_no_warning): New.
4796 (gimple_cond_set_true_label, gimple_cond_set_false_label):
4797 Allow setting the label to NULL.
4798 * tree-ssa-operands.c (copy_virtual_operands): Handle statements
4799 without virtual operands.
4800
48012008-02-12 Zdenek Dvorak <ook@ucw.cz>
4802
4803 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00429.html
4804
4805 * tree-into-ssa.c (update_ssa): Remove ATTRIBUTE_UNUSED.
4806 * tree-ssa-loop-ch.c: Tuplified.
4807 * gimple-iterator.c (gsi_commit_one_edge_insert): Ditto.
4808 * tree-cfg.c (gimple_redirect_edge_and_branch,
4809 gimple_try_redirect_by_replacing_jump, gimple_merge_blocks,
4810 gimple_block_label, gimple_redirect_edge_and_branch_force,
4811 gimple_duplicate_bb): Ditto.
4812 (make_cond_expr_edges): Remove the labels.
4813 (cleanup_dead_labels): Handle conditions without labels.
4814 (gimple_make_forwarder_block): Do not reverse the list
4815 of phi nodes.
4816 (gimple_duplicate_sese_region): Enable ssa updates.
4817 (gimple_cfg_hooks): Enable edge redirection and bb duplication.
4818 * gimple-pretty-print.c (dump_gimple_cond): Do not dump
4819 branches if labels are null.
4820 (dump_implicit_edges): Dump implicit GIMPLE_COND edges.
4821
48222008-02-12 Diego Novillo <dnovillo@google.com>
4823
4824 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00429.html
4825
4826 * tree-vrp.c (range_includes_zero_p): Partially re-enable.
4827 (ssa_name_nonnegative_p): Partially re-enable.
4828 (ssa_name_nonzero_p): Likewise.
4829 * gimple-dummy.c (ssa_name_nonzero_p): Remove.
4830 (ssa_name_nonnegative_p): Remove.
4831 * tree-cfg.c (gimple_split_block): Convert to tuples.
4832
48332008-02-12 Aldy Hernandez <aldyh@redhat.com>
4834
4835 Merge with mainline @132177
4836
4837 * configure.ac (ACX_PKGVERSION): Update revision merge string.
4838 * configure: Regenerate.
4839
48402008-02-08 Diego Novillo <dnovillo@google.com>
4841
4842 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00273.html
4843
4844 * gimplify.c (gimplify_call_expr): Remove code to set
4845 TREE_SIDE_EFFECTS.
4846 * gimple.c (gimple_has_side_effects): New.
4847 * gimple.h (gimple_has_side_effects): Declare.
4848 * tree-cfg.c (stmt_can_make_abnormal_goto): Call.
4849
48502008-02-07 Diego Novillo <dnovillo@google.com>
4851
4852 * gimple.h (gimple_call_num_args): Rename from
4853 gimple_call_nargs. Update all users.
4854
48552008-02-07 Aldy Hernandez <aldyh@redhat.com>
4856
4857 * gimplify.c: Remove various FIXMEs that have been resolved.
4858
48592008-02-06 Aldy Hernandez <aldyh@redhat.com>
4860
4861 * gimple.def: Add GIMPLE_OMP_ATOMIC_{LOAD,STORE} entires.
4862 * gsstruct.def: Add GSS_OMP_ATOMIC_{LOAD,STORE} entries.
4863 * gimple-pretty-print.c (dump_gimple_stmt): Add case for
4864 GIMPLE_OMP_ATOMIC_{LOAD,STORE}.
4865 * gimplify.c (gimplify_omp_atomic): Enable and convert to tuples.
4866 * tree.def: Add FIXME notes.
4867 * gimple.c (gss_for_code): Add cases for
4868 GIMPLE_OMP_ATOMIC_{LOAD,STORE}.
4869 (gimple_size): Same.
4870 (gimple_build_omp_atomic_load): New.
4871 (gimple_build_omp_atomic_store): New.
4872 * gimple.h (struct gimple_statement_omp_atomic_{load,store}): New.
4873 (union gimple_statement_d): Add gimple_omp_atomic_{load,store}.
4874 (gimple_omp_atomic_store_set_val): New.
4875 (gimple_omp_atomic_store_val): New.
4876 (gimple_omp_atomic_load_set_lhs): New.
4877 (gimple_omp_atomic_load_lhs): New.
4878 (gimple_omp_atomic_load_set_rhs): New.
4879 (gimple_omp_atomic_load_rhs): New.
4880 * tree-cfg.c (verify_types_in_gimple_seq_2): Add cases for
4881 GIMPLE_OMP_ATOMIC_{LOAD,STORE}.
4882
48832008-02-05 Diego Novillo <dnovillo@google.com>
4884
4885 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00161.html
4886
4887 * gimple-iterator.c (gsi_split_seq_after): Change
4888 argument type to gimple_stmt_iterator. Update all users.
4889 (gsi_for_stmt): Return gimple_stmt_iterator. Update all users.
4890 (gimple_find_edge_insert_loc): Change GSI argument to
4891 gimple_stmt_iterator. Update all users.
4892 * gimple.c (gimple_seq_deep_copy): Change argument to gimple_seq.
4893 Update all users.
4894 * gimple.h (gsi_alloc): Remove. Update all users.
4895 (gsi_start): Return gimple_stmt_iterator. Update all users.
4896 (gsi_start_bb): Likewise.
4897 (gsi_last): Likewise.
4898 (gsi_last_bb): Likewise.
4899 (gsi_end_p): Change argument to gimple_stmt_iterator.
4900 Update all users.
4901 (gsi_one_before_end_p): Likewise.
4902 (gsi_stmt): Likewise.
4903 (gsi_bb): Likewise.
4904 (gsi_seq): Likewise.
4905 (gsi_split_seq_after): Likewise.
4906 (gsi_for_stmt): Likewise.
4907 (gsi_after_labels): Return gimple_stmt_iterator. Update all users.
4908
49092008-02-05 Aldy Hernandez <aldyh@redhat.com>
4910
4911 * gimple-pretty-print.c (dump_gimple_stmt): Print clauses for
4912 GIMPLE_OMP_PARALLEL.
4913 Handle GIMPLE_OMP_FOR.
4914 (dump_gimple_omp_for): New.
4915 * tree-pretty-print.c (dump_omp_clauses): Remove static.
4916 * diagnostic.h (dump_omp_clauses): Add prototype.
4917 * gimplify.c (gimplify_omp_for): Convert to tuples and enable.
4918 (gimplify_omp_workshare): Same.
4919 (gimplify_expr) [OMP_MASTER, OMP_ORDERED, OMP_CRITICAL]: Same.
4920
49212008-02-04 Oleg Ryjkov <olegr@google.com>
4922
4923 * tree-gimple.c (get_gimple_rhs_class): Handle
4924 FILTER_EXPR.
4925 * tree-eh.c (union treemple): Declare.
4926 Convert to tuples.
4927 * except.c:
4928 * except.h (lang_protect_cleanup_actions): Change return
4929 type to 'gimple'. Update all users.
4930 * tree-inline.c (count_insns_seq): New.
4931 * tree-inline.h (count_insns_seq): Declare.
4932 * gimple.c (gimple_seq_deep_copy): New.
4933 * gimple.h (gimple_seq_deep_copy): Declare.
4934 (gimple_singleton_p): New.
4935 * passes.c (init_optimization_passes): Enable
4936 pass_lower_eh.
4937
49382008-02-02 Aldy Hernandez <aldyh@redhat.com>
4939
4940 * tree.h (OMP_CLAUSE_REDUCTION_GIMPLE_INIT): New.
4941 (OMP_CLAUSE_REDUCTION_GIMPLE_MERGE): New.
4942 (struct tree_omp_clause): Add gimple_reduction_{init,merge} fields.
4943 * gimplify.c (gimplify_scan_omp_clauses): Gimplify reduction
4944 init/merge fields into separate sequences.
4945 (gimplify_and_add): Use gimplify_expr directly.
4946 * omp-low.c (lower_rec_input_clauses): Extract reduction info from
4947 gimple tuples in structure.
4948 (lower_reduction_clauses): Same.
4949
49502008-02-01 Diego Novillo <dnovillo@google.com>
4951
4952 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00036.html
4953
4954 * tree-complex.c (expand_complex_comparison): Set the RHS
4955 of the new comparison to boolean_true_node.
4956 * gimplify.c (gimplify_call_expr): Fix creation of new
4957 GIMPLE_CALL. Create the vector of arguments in the same
4958 order as the original expression.
4959
49602008-02-01 Diego Novillo <dnovillo@google.com>
4961
4962 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00032.html
4963
4964 * tree-pas.h (struct tree_opt_pass): Remove field
4965 WORKS_WITH_TUPLES_P. Adjust all users.
4966 * opts.c (decode_options): Force -O0.
4967 * cfgexpand.c (gimple_to_tree): Handle GIMPLE_RETURN,
4968 GIMPLE_ASM, GIMPLE_CALL and GIMPLE_SWITCH.
4969 Show unrecognized tuple when failing.
4970 (expand_gimple_basic_block): Do not use
4971 gimple_stmt_iterator to go through the statements in BB.
4972 Handle GIMPLE_CALL instead of CALL_EXPR.
4973 (gimple_expand_cfg): Rename from tree_expand_cfg. Update
4974 all users.
4975 Remove PROP_gimple_leh.
4976 * gimple.c (walk_gimple_seq): Guard against WI == NULL.
4977 * tree-cfg.c (execute_warn_function_return): Move #if 0
4978 markers.
4979 * passes.c (init_optimization_passes): Adjust #if 0
4980 markers to execute pass_expand.
4981 Guard more passes under #if 0.
4982
719bb4e3 49832008-02-01 Rafael Espíndola <espindola@google.com>
726a989a
RB
4984
4985 * passes.c (init_optimization_passes): Enable pass_del_ssa.
4986
4987 * tree-outof-ssa.c (insert_copy_on_edge): Port to tuples.
4988 (eliminate_build): Likewise.
4989 (eliminate_virtual_phis): Likewise.
4990 (rewrite_trees): Likewise. Remove stmt_ann_t ann.
4991 (stmt_list): Changed from tree to gimple_seq.
4992 (identical_copies_p): Port to tuples.
4993 (identical_stmt_lists_p): Likewise.
4994 (init_analyze_edges_for_bb): Likewise.
4995 (fini_analyze_edges_for_bb): Likewise.
4996 (process_single_block_loop_latch): Likewise.
4997 (analyze_edges_for_bb): LIkewise.
4998 (remove_ssa_form): Likewise.
4999 (insert_backedge_copies):
5000 (rewrite_out_of_ssa):Likewise.
5001 (pass_del_ssa): flip works_with_tuples_p. Don't require PROP_alias.
5002
5003 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Port to tuples.
5004 (abnormal_corrupt): Port to tuples.
5005 (fail_abnormal_edge_coalesce): Port to tuples.
5006 (create_outofssa_var_map):Port to tuples.
5007 (coalesce_partitions): Port to tuples.
5008
719bb4e3 50092008-02-01 Rafael Espíndola <espindola@google.com>
726a989a
RB
5010
5011 * tree-ssa-operands.c (free_stmt_operands): Only free
5012 with_ops.addresses_taken if stmt has ops.
5013
719bb4e3 50142008-01-31 Rafael Espíndola <espindola@google.com>
726a989a
RB
5015
5016 * tree-optimize.c (pass_free_cfg_annotations): Flip
5017 works_with_tuples_p.
5018 * passes.c (init_optimization_passes): Enable
5019 pass_free_cfg_annotations.
5020
50212008-01-30 Diego Novillo <dnovillo@google.com>
5022
5023 http://gcc.gnu.org/ml/gcc-patches/2008-01/msg01461.html
5024
5025 * tree-into-ssa.c (compute_global_livein): Initialize
5026 PHI with call to gsi_stmt.
5027 (rewrite_update_init_block): Likewise.
5028 * tree-complex.c (expand_complex_comparison): Initialize
5029 TYPE.
5030 (expand_complex_operations_1): Initialize BR and BI.
5031 * ebitmap.h (ebitmap_iter_init): Initialize OURN.
5032 * Makefile.in (dse.o-warn, ebitmap.o-warn,
5033 lower-subreg.o-warn, tree-chrec.o-warn, varasm.o-warn):
5034 New.
5035
719bb4e3 50362008-01-30 Rafael Espíndola <espindola@google.com>
726a989a
RB
5037
5038 * gimplify.c (gimplify_scan_omp_clauses): Comment out
5039 pop_gimplify_context calls
5040
719bb4e3 50412008-01-30 Rafael Espíndola <espindola@google.com>
726a989a
RB
5042
5043 * gimple.h (gsi_after_labels): Add.
5044
719bb4e3 50452008-01-30 Rafael Espíndola <espindola@google.com>
726a989a
RB
5046
5047 * Makefile.in (tree-complex.o): Uncomment gt-tree-vect-generic.h.
5048 (GTFILES): Add tree-vect-generic.c.
5049 * passes.c (init_optimization_passes): Enable pass_lower_vector.
5050 * tree-vect-generic.c: uncomment all the file.
5051 (elem_op_func): Use gimple_stmt_iterator instead of
5052 block_stmt_iterator.
5053 (tree_vec_extract): Likewise. Rename bsi to gsi.
5054 (do_unop): Likewise.
5055 (do_binop): Likewise.
5056 (do_plus_minus): Likewise.
5057 (do_negate): Likewise.
5058 (expand_vector_piecewise): Likewise.
5059 (expand_vector_parallel): Likewise.
5060 (expand_vector_addition): Likewise.
5061 (expand_vector_operation): Likewise. Remove "tree rhs" param. Add
5062 "gimple assign" param. Use gimple_assign_rhs1|2 instead of
5063 TREE_OPERAND.
5064 (expand_vector_operations_1): Use gimple_stmt_iterator instead of
5065 block_stmt_iterator. Rename bsi to gsi. Use gsi_stmt instead of
5066 bsi_stmt. Use gimple_assign_* instead of GIMPLE_STMT_OPERAND. Use
5067 gimple_assign_set_rhs_from_tree instead of setting *p_rhs.
5068 (gate_expand_vector_operations): Use gimple_stmt_iterator instead
5069 of block_stmt_iterator. Use gsi_* instead of bsi_*
5070 (pass_lower_vector): flip works_with_tuples_p
5071 (pass_lower_vector_ssa) flip works_with_tuples_
5072
719bb4e3 50732008-01-29 Rafael Espíndola <espindola@google.com>
726a989a
RB
5074
5075 http://gcc.gnu.org/ml/gcc-patches/2008-01/msg01434.html
5076
5077 * gimple.c (gimple_assign_set_rhs_with_ops): Fix
5078 allocation of operand vector.
5079
50802008-01-29 Diego Novillo <dnovillo@google.com>
5081
5082 http://gcc.gnu.org/ml/gcc-patches/2008-01/msg01434.html
5083
5084 * tree-into-ssa.c (prepare_block_for_update): Initialize
5085 PHI.
5086 * tree.c (build_gimple_modify_stmt): Fix documentation.
5087
5088 * tree-complex.c: Convert to tuples.
5089 (pass_lower_complex_O0): Re-enable.
5090
5091 * ipa-cp.c (constant_val_insert): Disable.
5092 * tree-gimple.c (get_gimple_rhs_class): Handle SSA_NAME.
5093
5094 * tree-ssa-propagate.c: Fix documentation to refer to
5095 prop_simulate_again_p.
5096 (add_ssa_edge): Call prop_simulate_again_p.
5097 (simulate_stmt): Likewise.
5098 (simulate_block): Fix loop iterating over PHI nodes.
5099 * tree-ssa-propagate.h (prop_set_simulate_again): New.
5100 (prop_simulate_again_p): New.
5101 * gimple-iterator.c (gsi_insert_seq_after): Re-write to
5102 avoid use of gimple_stmt_iterator.
5103 (gimple_find_edge_insert_loc): Move from tree-cfg.c.
5104 Re-enable.
5105 (gsi_commit_edge_inserts): Likewise.
5106 (gsi_commit_one_edge_insert): Likewise.
5107 (gsi_insert_on_edge): Likewise.
5108 (gsi_insert_on_edge_immediate): Likewise.
5109 (gsi_insert_seq_on_edge): New.
5110 * gimplify.c (gimplify_cond_expr): Call
5111 gimple_cond_get_ops_from_tree.
5112 * tree-optimize.c (pass_all_optimizations): Enable.
5113 * gimple.c (gimple_cond_get_ops_from_tree): New.
5114 (gimple_build_cond_from_tree): New.
5115 * basic-block.h (struct edge_def): Replace field
5116 edge_def_insns.t with gimple_seq edge_def_insns.g.
5117 Update all users.
5118 * gimple.h (gimple_stmt_iterator):
5119 * tree-cfg.c (change_bb_for_stmt):
5120 * passes.c (init_optimization_passes): Move #if0 around
5121 to disable passes in groups instead of individually.
5122 (execute_function_todo): Re-enable call to update_ssa.
5123
51242008-01-25 Aldy Hernandez <aldyh@redhat.com>
5125
5126 * gimple-pretty-print.c (dump_gimple_stmt): Handle
5127 GIMPLE_OMP_PARALLEL.
5128 * gimplify.c (pop_gimplify_context): Add comment.
5129 (gimplify_and_return_first): New.
5130 (gimplify_scan_omp_clauses): Remove unused 'gs'.
5131 Remove #if 0.
5132 (gimplify_omp_parallel): Convert to tuples.
5133 (gimplify_omp_workshare): Remove redundant retval.
5134 (gimplify_expr): Adapt to lack of retval for gimplify_omp_variable and
5135 gimplify_omp_workshare.
5136 Abort on OMP_ATOMIC_{LOAD,STORE} case.
5137
51382008-01-21 Diego Novillo <dnovillo@google.com>
5139
5140 Merge with mainline @131695
5141
5142 * configure.ac (ACX_PKGVERSION): Update revision merge
5143 string.
5144 * configure: Regenerate.
5145
51462008-01-15 Diego Novillo <dnovillo@google.com>
5147
5148 http://gcc.gnu.org/ml/gcc-patches/2008-01/msg00674.html
5149
5150 * tree-into-ssa.c (mark_def_sites): Force operand scan.
5151 * gimple.def (GIMPLE_ASSIGN): Move into section of
5152 statements with memory operands.
5153 * gimple-dummy.c (remove_unused_locals): Remove.
5154 * tree-flow-inline.h (noreturn_call_p,
5155 mark_stmt_modified, update_stmt, update_stmt_if_modified,
5156 stmt_modified_p): Remove.
5157 * tree-ssa-live.c: Convert to tuples.
5158 * gimple.c (gimple_set_modified): Replace
5159 mark_stmt_modified. Update all callers.
5160 (gimple_remove): Call free_stmt_operands.
5161 * gimple.h: Include tree-ssa-operands.h
5162 Move extern function declarations earlier in the file.
5163 (GIMPLE_CHECK2): Remove.
5164 (GIMPLE_RANGE_CHECK): Remove.
5165 (struct gimple_statement_with_ops): Fix GTY markers.
5166 (struct gimple_statement_with_memory_ops): Likewise.
5167 (gimple_modified_p): Replace stmt_modifed_p. Update all
5168 users.
5169 (update_stmt): Move from tree-flow-inline.h. Update all
5170 users.
5171 (update_stmt_if_modified): Likewise.
5172 (gimple_has_ops): Use range GIMPLE_COND ... GIMPLE_RETURN
5173 (gimple_has_mem_ops): Use range GIMPLE_ASSIGN ... GIMPLE_RETURN
5174 (gimple_num_ops): Call gimple_has_ops.
5175 (gimple_ops): Likewise.
5176 (gimple_op): Likewise.
5177 (gimple_op_ptr): Likewise.
5178 (gimple_set_op): Likewise.
5179 (gimple_set_addresses_taken): Remove. Update all users.
5180 (gimple_add_to_addresses_taken): Likewise.
5181 (gimple_call_noreturn_p): Replace noreturn_call_p.
5182 Update all users.
5183 (gimple_phi_arg): Assert that INDEX is smaller than
5184 CAPACITY.
5185 * passes.c (init_optimization_passes): Enable
5186 pass_referenced_vars, pass_reset_cc_flags and pass_build_ssa.
5187 * tree-ssa-operands.c (gimple_set_stored_syms): Do not
5188 free the STORES field if SYMS is empty.
5189 (gimple_set_loaded_syms): Likewise.
5190 (finalize_ssa_stmt_operands): Only call
5191 finalize_ssa_vdefs and finalize_ssa_vuses if STMT has
5192 memory operands.
5193 (get_expr_operands): Handle CASE_LABEL_EXPR.
5194 (free_stmt_operands): Free bitmaps ADDRESSES_TAKEN,
5195 STORES and LOADS.
5196 (gimple_add_to_addresses_taken): Rename from
5197 add_to_addressable_set.
5198
51992008-01-14 Aldy Hernandez <aldyh@redhat.com>
5200
5201 * tree-dfa.c (dump_dfa_stats): Add %z modifier to size_t argument.
5202
52032008-01-11 Andrew MacLeod <amacleod@redhat.com>
5204 Diego Novillo <dnovillo@google.com>
5205
5206 http://gcc.gnu.org/ml/gcc-patches/2008-01/msg00493.html
5207
5208 * tree.h (struct ssa_use_operand_d): Replace field STMT
5209 with a union field LOC containing the fields STMT and
5210 SSA_NAME.
5211 Update all users.
5212 * tree-flow.h (struct immediate_use_iterator_d): Document
5213 how immediate use iteration works.
5214
52152008-01-10 Diego Novillo <dnovillo@google.com>
5216
5217 http://gcc.gnu.org/ml/gcc-patches/2008-01/msg00444.html
5218
5219 * Makefile.in (tree-complex.o): Remove gt-tree-vect-generic.h
5220
52212008-01-10 Diego Novillo <dnovillo@google.com>
5222
5223 http://gcc.gnu.org/ml/gcc-patches/2008-01/msg00436.html
5224
5225 * tree-ssa-operands.h (PHI_RESULT_PTR): Call
5226 gimple_phi_result_ptr.
5227 (PHI_ARG_DEF_PTR): Call gimple_phi_arg_imm_use_ptr.
5228 (free_ssa_operands): Remove.
5229 (copy_virtual_operands, create_ssa_artificial_load_stmt,
5230 add_to_addressable_set, discard_stmt_changes,
5231 FOR_EACH_PHI_OR_STMT_USE, FOR_EACH_PHI_OR_STMT_DEF): Convert
5232 to use 'gimple'.
5233 * tree-into-ssa.c: Convert to use 'gimple'.
5234 (rewrite_uses_p): New. Use instead of REWRITE_THIS_STMT.
5235 (set_rewrite_uses): New. Use instead of REWRITE_THIS_STMT.
5236 (register_defs_p): New. Use instead of
5237 REGISTER_DEFS_IN_THIS_STMT.
5238 (set_register_defs): New. Use instead of
5239 REGISTER_DEFS_IN_THIS_STMT.
5240 (REWRITE_THIS_STMT): Remove.
5241 (REGISTER_DEFS_IN_THIS_STMT): Remove.
5242 * tree-pretty-print.c (dump_vops): Remove. Update all
5243 users.
5244 (dump_generic_node): Do not handle PHI_NODE.
5245 * tree.c (tree_node_kind): Remove "phi_nodes" entry.
5246 (tree_code_size): Do not handle PHI_NODE.
5247 (tree_size): Likewise.
5248 (make_node_stat): Likewise.
5249 (tree_node_structure): Likewise.
5250 (phi_node_elt_check_failed): Remove.
5251 * tree.h (PHI_NODE_ELT_CHECK): Remove.
5252 (PHI_RESULT_TREE): Remove.
5253 (PHI_ARG_DEF_TREE): Remove.
5254 (PHI_CHAIN): Remove.
5255 (PHI_NUM_ARGS): Remove.
5256 (PHI_ARG_CAPACITY): Remove.
5257 (PHI_ARG_ELT): Remove.
5258 (PHI_ARG_EDGE): Remove.
5259 (PHI_BB): Remove.
5260 (PHI_ARG_IMM_USE_NODE): Remove.
5261 (struct tree_phi_node): Remove.
5262 (union tree_node): Remove field 'phi'.
5263 (release_phi_node): Change argument to gimple.
5264 (duplicate_ssa_name): Change second argument to gimple.
5265 (swap_tree_operands): Remove.
5266 (enum tree_node_kind): Remove phi_kind entry.
5267 * tree-phinodes.c: Convert to use gimple.
5268 * tree-gimple.c (is_gimple_stmt): Do not handle PHI_NODE.
5269 * cgraphunit.c (cgraph_process_new_functions): Call
5270 gimple_unreachable to mark unconverted sections.
5271 (verify_cgraph_node): Do not ICE if THIS_CFUN is NULL.
5272 Convert statement verification to use gimple.
5273 (cgraph_expand_function): Call gimple_unreachable to mark
5274 unconverted sections.
5275 * tree-ssa-propagate.c: Convert to use gimple.
5276 (STMT_IN_SSA_EDGE_WORKLIST): Use flag GF_PLF_1 as marker.
5277 (DONT_SIMULATE_AGAIN): Remove. Use gimple_visited.
5278 * gimple-dummy.c: Remove converted functions.
5279 * tree-ssa-alias.c (may_be_aliased): Re-enable.
5280 * tree-flow-inline.h (gimple_phi_arg_imm_use_ptr): Rename
5281 from get_phi_arg_def_ptr.
5282 (bsi_start, bsi_after_labels, bsi_last, bsi_end_p,
5283 bsi_next, bsi_prev, bsi_stmt, bsi_stmt_ptr): Remove.
5284 * tree.def (PHI_NODE): Remove. Update most users.
5285 * tree-dfa.c: Convert to use gimple.
5286 * common.opt (fgimple-conversion): Default to 0.
5287 * tree-ssa.c: Convert to use gimple.
5288 * tree-optimize.c (pass_early_local_passes,
5289 pass_all_early_optimization, pass_init_datastructures):
5290 Enable.
5291 * tree-flow.h (tree_ann_type): Remove STMT_ANN. Update
5292 all users.
5293 (struct stmt_ann_d): Remove. Update all users.
5294 * Makefile.in (GIMPLE_H): Add tree-ssa-operands.h.
5295 (tree-ssa-copy.o, tree-phi-nodes.o, tree-complex.o):
5296 Re-enable.
5297 * gimple.h (enum plf_mask): Define.
5298 (GF_NO_WARNING): Remove
5299 (bb_seq): Return NULL if BB->il.gimple is NULL.
5300 (struct gimple_statement_base): Add bitfields no_warning,
5301 visited, unused_1, unused_2, unused_3, unused_4 and plf.
5302 (gimple_flags, gimple_set_flags, gimple_add_flag):
5303 Remove. Update all users.
5304 (gimple_set_visited): New.
5305 (gimple_visited_p): New.
5306 (gimple_set_plf): New.
5307 (gimple_plf): New.
5308 (gimple_has_volatile_ops): New.
5309 (gimple_set_has_volatile_ops): New.
5310 (gimple_addresses_taken): New.
5311 (gimple_set_addresses_taken): New.
5312 (gimple_add_to_addresses_taken): New.
5313 (gimple_phi_result_ptr): New.
5314 (gsi_stmt_ptr): New.
5315 (gsi_bb): New.
5316 (gsi_seq): New.
5317 * tree-cfg.c (execute_build_cfg): Do not call
5318 gimple_set_body after building the CFG.
5319 (pass_build_cfg): Do not require PROP_gimple_leh.
5320 (gimplify_val): Convert to gimple.
5321 * passes.c (init_optimization_passes): Disable all of
5322 pass_all_early_optimizations.
5323 * tree-ssanames.c: Convert to gimple.
5324 * tree-ssa-operands.c: Convert to gimple.
5325 (gimple_set_stored_syms): New.
5326 (gimple_set_loaded_syms): New.
5327
53282008-01-03 Diego Novillo <dnovillo@google.com>
5329
5330 Merge with mainline @131303
5331
5332 * configure.ac (ACX_PKGVERSION): Update revision merge
5333 string.
5334 * configure: Regenerate.
5335
53362007-12-20 Diego Novillo <dnovillo@google.com>
5337
5338 * Makefile.in (builtins.o-warn, expr.o-warn): Add
5339 -Wno-error.
5340
53412007-12-05 Diego Novillo <dnovillo@google.com>
5342
5343 http://gcc.gnu.org/ml/gcc-patches/2007-12/msg00221.html
5344
5345 * gimple.c (walk_gimple_asm): Guard against WI being
5346 NULL.
5347 (walk_gimple_stmt): Likewise.
5348
53492007-12-05 Diego Novillo <dnovillo@google.com>
5350
5351 http://gcc.gnu.org/ml/gcc-patches/2007-12/msg00216.html
5352
5353 * tree.h (gimple_unreachable_1): Declare.
5354 (gimple_unreachable): Define.
5355 Replace calls to gcc_unreachable with gimple_unreachable
5356 in unconverted code.
5357 * gimple-dummy.c (gimple_unreachable_1): New function.
5358 * common.opt (fgimple-only): Remove.
5359 (fgimple-conversion): Define.
5360 * Makefile.in (STRICT_WARN): Add -Wno-return-type.
5361
53622007-11-30 Diego Novillo <dnovillo@google.com>
5363
5364 Merge with mainline @130470
5365
5366 * configure.ac (ACX_PKGVERSION): Update revision merge
5367 string.
5368 * configure: Regenerate.
5369 * tree-inline.c (copy_decl_no_change,
5370 copy_decl_for_dup_finish): Re-enable.
5371
53722007-11-26 Aldy Hernandez <aldyh@redhat.com>
5373
5374 * gimple.h (gimple_bind_block): Update comment.
5375
53762007-11-19 Diego Novillo <dnovillo@google.com>
5377
5378 Merge with mainline @130291.
5379
5380 * configure.ac (ACX_PKGVERSION): Update revision merge string.
5381 * configure: Regenerate.
5382
53832007-11-19 Diego Novillo <dnovillo@google.com>
5384
5385 * tree-flow-inline.h (get_lineno): Call IS_LOCATION_EMPTY
5386 and LOCATION_LINE instead of accessing location fields
5387 directly.
5388 * gimple-low.c (lower_function_body): Use
5389 UNKNOWN_LOCATION instead of unknown_location.
5390
53912007-11-16 Diego Novillo <dnovillo@google.com>
5392
5393 * cgraph.c (cgraph_create_edge): Call gimple_body
5394 instead of DECL_SAVED_TREE.
5395 (dump_cgraph_node): Likewise.
5396 * cgraphunit.c (verify_cgraph_node): Likewise.
5397 (cgraph_analyze_functions): Likewise.
5398 (cgraph_mark_functions_to_output): Likewise.
5399 (cgraph_optimize): Likewise.
5400 * tree-eh.c (lower_eh_constructs): Add notes for future
5401 changes to calls to DECL_SAVED_TREE.
5402 (refactor_eh_r): Likewise.
5403 * cfgexpand.c (gimple_to_tree): New function.
5404 (maybe_dump_rtl_for_gimple_stmt): Rename from
5405 maybe_dump_rtl_for_tree_stmt. Convert to tuples.
5406 (label_rtx_for_bb): Convert to tuples.
5407 (expand_gimple_cond): Rename from
5408 expand_gimple_cond_expr. Convert to tuples.
5409 (expand_gimple_tailcall): Convert to tuples.
5410 (expand_gimple_basic_block): Convert to tuples.
5411 (discover_nonconstant_array_refs_r): Convert to tuples.
5412 (discover_nonconstant_array_refs): Convert to tuples.
5413 * tree-mudflap.c (execute_mudflap_function_decls): Add
5414 deprecation comment for DECL_SAVED_TREE call.
5415 * tree-inline.c (copy_generic_body): Call gimple_body
5416 instead of DECL_SAVED_TREE.
5417 (inlinable_function_p): Likewise.
5418 (clone_body): Add deprecation comment for DECL_SAVED_TREE
5419 call.
5420 * tree-cfg.c (remove_useless_stmts_bind): Call
5421 gimple_body instead of DECL_SAVED_TREE.
5422 (remove_useless_stmts): Likewise.
5423
54242007-11-10 Aldy Hernandez <aldyh@redhat.com>
5425
5426 * tree-cfg.c (verify_types_in_gimple_call): OBJ_TYPE_REF are allowed
5427 as function types.
5428
5429 [objc]
5430 * objc-act.c (objc_gimplify_expr): Change pre and post to sequences.
5431 * objc-act.h (objc_gimplify_expr): Change prototype accordingly.
5432
5433 [testsuite]
5434 * lib/objc.exp: Set -I regardless of libobjc.
5435
54362007-11-10 Aldy Hernandez <aldyh@redhat.com>
5437
5438 * tree-gimple.h (tree_annotate_all_with_locus): New.
5439 * gimple-dummy.c: Add omp_reduction_init and
5440 diagnose_omp_structured_block_errors.
5441 * gimplify.c (tree_should_carry_locus_p): New.
5442 (tree_annotate_one_with_locus): New.
5443 (tree_annotate_all_with_locus): New.
5444
54452007-11-08 Diego Novillo <dnovillo@google.com>
5446
5447 Merge with mainline @129982
5448
5449 * configure.ac (ACX_PKGVERSION): Update revision merge string.
5450 * configure: Regenerate.
5451
54522007-11-01 Diego Novillo <dnovillo@google.com>
5453
5454 * cgraphbuild.c (initialize_inline_failed): Re-enable.
5455 (build_cgraph_edges): Adapt to use tuples.
5456 (pass_build_cgraph): Re-enable.
5457 (rebuild_cgraph_edges): Adapt to use tuples.
5458 * cgraph.c (cgraph_release_function_body): Also NULLify the
5459 gimple body.
5460 (debug_cgraph_node): New.
5461 (debug_cgraph): New.
5462 * cgraph.h (struct cgraph_edge): Change field CALL_STMT to
5463 type gimple. Update all users.
5464 * cgraphunit.c (cgraph_analyze_functions): If DECL does not
5465 have a struct function entry, discard it.
5466 * gimple.h (GF_CALL_CANNOT_INLINE): New.
5467 (gimple_call_lhs_ptr): New.
5468 (gimple_call_mark_uninlinable): New.
5469 (gimple_call_cannot_inline_p): New.
5470 (struct walk_stmt_info): Add field PSET.
5471
54722007-11-01 Diego Novillo <dnovillo@google.com>
5473
5474 * tree-optimize.c (tree_rest_of_compilation): Call
5475 gimple_set_body to remove the body if not inlining.
5476 * gimple.c (walk_gimple_stmt): Update documentation.
5477 Pass WI->PSET to every call to walk_tree.
5478
54792007-11-01 Diego Novillo <dnovillo@google.com>
5480
5481 * langhooks.h (struct lang_hooks_for_callgraph): Remove third
5482 argument from function pointer ANALYZE_EXPR. Update all
5483 users.
5484
54852007-10-30 Diego Novillo <dnovillo@google.com>
5486
5487 * gimple.c (gimple_build_omp_return): Call
5488 gimple_omp_return_set_nowait if needed.
5489 * gimple.h (GIMPLE_CHECK, GIMPLE_CHECK2, GIMPLE_RANGE_CHECK):
5490 Move earlier in the file.
5491 (GF_NO_WARNING): Change to static const unsigned.
5492 (GF_CALL_TAILCALL): New.
5493 (GF_OMP_PARALLEL_COMBINED): Rename from
5494 OMP_PARALLEL_COMBINED_FLAG. Change to static const unsigned.
5495 Update all users.
5496 (GF_OMP_RETURN_NOWAIT): Rename from OMP_RETURN_NOWAIT_FLAG.
5497 Change to static const unsigned.
5498 Update all users.
5499 (GF_OMP_SECTION_LAST): Rename from OMP_SECTION_LAST_FLAG.
5500 Change to static const unsigned.
5501 Update all users.
5502 (gimple_omp_return_set_nowait): New.
5503 (gimple_call_set_tail): New.
5504 (gimple_call_tail_p): New.
5505
55062007-10-30 Aldy Hernandez <aldyh@redhat.com>
5507
5508 * gimplify.c (get_tmp_var_for): Remove reference to IS_FORMAL in
5509 opening comment.
5510 (gimplify_return_expr): Return GS_ERROR if we have errored.
5511 (gimplify_statement_list): Handle case where voidify_wrapper returns a
5512 temporary.
5513 (gimplify_call_expr): Return gracefully on error.
5514 (gimplify_cond_expr): Same.
5515 * gimple.h (gimple_call_return_type): Do not error on methods.
5516
55172007-10-29 Diego Novillo <dnovillo@google.com>
5518 Tom Tromey <tromey@redhat.com>
5519
5520 * gimple.h (gimple_locus): Update comment.
5521 (gimple_set_locus): Likewise.
5522 (gimple_locus_empty_p): Add support for mapped locations.
5523
55242007-10-29 Diego Novillo <dnovillo@google.com>
5525
5526 * tree-optimize.c (execute_cleanup_cfg_pre_ipa): Re-enable.
5527 * gimple.c (walk_gimple_asm): Tidy comment.
5528
55292007-10-29 Aldy Hernandez <aldyh@redhat.com>
5530
5531 * tree-gimple.h (build_gimple_eh_filter_tree): Remove.
5532 * gimplify.c (build_gimple_eh_filter_tree): Move from here...
5533 * cp/cp-gimplify.c: ...to here.
5534 (cp_gimplify_init_expr): Convert to tuples.
5535 (gimplify_must_not_throw_expr): Make function return a
5536 gimplify_status and convert to tuples.
5537 (cp_gimplify_expr): Convert MUST_NOT_THROW_EXPR, INIT_EXPR, and
5538 USING_STMT to tuples.
5539
55402007-10-28 Aldy Hernandez <aldyh@redhat.com>
5541
5542 * gimplify.c (gimplify_body): Make work when body contains more than
5543 a GIMPLE_BIND statement.
5544
55452007-10-26 Diego Novillo <dnovillo@google.com>
5546
5547 Merge with mainline @129659.
5548
5549 * configure.ac (ACX_PKGVERSION): Update revision merge string.
5550 * configure: Regenerate.
5551
55522007-10-26 Diego Novillo <dnovillo@google.com>
5553
5554 * gimple-low.c (lower_builtin_setjmp): Pass ARG to first
5555 call to gimple_build_call.
5556
55572007-10-17 Aldy Hernandez <aldyh@redhat.com>
5558
5559 * tree-gimple.c (get_gimple_rhs_class): Add case for EXC_PTR_EXPR.
5560 * gimplify.c (gimple_conditional_context): Enable.
5561 (gimplify_cleanup_point_expr): Enable. Adjust for tuples.
5562 (gimple_push_cleanup): Enable.
5563 (gimplify_target_expr): Do not gimplify TARGET_EXPR_CLEANUP before
5564 calling gimple_push_cleanup.
5565 (gimplify_expr): Rename `try' to `try_'.
5566 Enable CLEANUP_POINT_EXPR case.
5567 Gimplify CATCH_EXPR and EH_FILTER_EXPR cases correctly.
5568
55692007-10-17 Aldy Hernandez <aldyh@redhat.com>
5570
5571 * gimple.c (gimple_size): Handle GIMPLE_WITH_CLEANUP_EXPR.
5572 * gimple.h (struct gimple_statement_catch): Make handler a structure,
5573 not a pointer.
5574 (struct gimple_statement_eh_filter): Make failure a structure, not a
5575 pointer.
5576 document EH_FILTER_MUST_NOT_THROW subcode flag.
5577 (gimple_catch_handler): Handler is now a struct.
5578 (gimple_catch_set_handler): Same.
5579 (gimple_eh_filter_failure): Failure is now a struct.
5580 (gimple_eh_filter_set_failure): Same.
5581 (gimple_eh_filter_must_not_throw): New.
5582 (gimple_eh_filter_set_must_not_throw): New.
5583 (gsi_next): Update comment.
5584 (gsi_prev): Same.
5585 * tree-cfg.c (verify_types_in_gimple_seq_2): Handle GIMPLE_EH_FILTER.
5586
55872007-10-18 Diego Novillo <dnovillo@google.com>
5588
5589 * gimple-iterator.c (gsi_delink): Remove.
5590 * gimple.h (gsi_delink): Remove.
5591
55922007-10-17 Diego Novillo <dnovillo@google.com>
5593
5594 * coretypes.h (const_gimple_seq): New typedef.
5595 * gimple.h (gimple_seq_first): Constify argument.
5596 (gimple_seq_last): Likewise.
5597 (gimple_seq_copy): Likewise.
5598 (gimple_seq_empty_p): Likewise.
5599 (gimple_set_prev): Rename from set_gimple_prev.
5600 Update all users.
5601 (gimple_set_next): Rename from set_gimple_next.
5602 Update all users.
5603 (gimple_set_flags): Rename from set_gimple_flags.
5604 Update all users.
5605 (gimple_add_flag): Rename from add_gimple_flag.
5606 Update all users.
5607 (gimple_set_subcode): Rename from set_gimple_subcode.
5608 Update all users.
5609 (gimple_set_block): Rename from set_gimple_block.
5610 Update all users.
5611 (gimple_set_locus): Rename from set_gimple_locus.
5612 Update all users.
5613 (gimple_locus_empty_p): Constify argument.
5614 (gimple_has_ops): Likewise.
5615 (gimple_has_mem_ops): Likewise.
5616 (gimple_def_ops): Likewise.
5617 (gimple_set_def_ops): Rename from set_gimple_def_ops.
5618 Update all users.
5619 (gimple_use_ops): Constify argument.
5620 (gimple_set_use_ops): Rename from set_gimple_use_ops.
5621 Update all users.
5622 (gimple_vuse_ops): Constify argument.
5623 (gimple_set_vuse_ops): Rename from set_gimple_vuse_ops.
5624 Update all users.
5625 (gimple_vdef_ops): Constify argument.
5626 (gimple_set_vdef_ops): Rename from set_gimple_vdef_ops.
5627 Update all users.
5628 (gimple_loaded_syms): Constify argument.
5629 (gimple_stored_syms): Constify argument.
5630 (gimple_modified): Constify argument.
5631 (gimple_set_modified): Rename from set_gimple_modified.
5632 Update all users.
5633 (gimple_omp_return_nowait_p): Constify argument.
5634 (gimple_omp_section_last_p): Constify argument.
5635 (gimple_omp_parallel_combined_p): Constify argument.
5636 (gimple_build_return): Rename from build_gimple_return.
5637 Update all users.
5638 (gimple_build_assign): Rename from build_gimple_assign.
5639 Update all users.
5640 (gimple_build_assign_with_ops): Rename from
5641 build_gimple_assign_with_ops.
5642 Update all users.
5643 (gimple_build_call_vec): Rename from build_gimple_call_vec.
5644 Update all users.
5645 (gimple_build_call): Rename from build_gimple_call.
5646 Update all users.
5647 (gimple_build_cond): Rename from build_gimple_cond.
5648 Update all users.
5649 (gimple_build_label): Rename from build_gimple_label.
5650 Update all users.
5651 (gimple_build_goto): Rename from build_gimple_goto.
5652 Update all users.
5653 (gimple_build_nop): Rename from build_gimple_nop.
5654 Update all users.
5655 (gimple_build_asm): Rename from build_gimple_asm.
5656 Update all users.
5657 (gimple_build_asm_vec): Rename from build_gimple_asm_vec.
5658 Update all users.
5659 (gimple_build_catch): Rename from build_gimple_catch.
5660 Update all users.
5661 (gimple_build_eh_filter): Rename from build_gimple_eh_filter.
5662 Update all users.
5663 (gimple_build_try): Rename from build_gimple_try.
5664 Update all users.
5665 (gimple_build_wce): Rename from build_gimple_wce.
5666 Update all users.
5667 (gimple_build_resx): Rename from build_gimple_resx.
5668 Update all users.
5669 (gimple_build_switch): Rename from build_gimple_switch.
5670 Update all users.
5671 (gimple_build_switch_vec): Rename from
5672 build_gimple_switch_vec. Update all users.
5673 (gimple_build_omp_parallel): Rename from
5674 build_gimple_omp_parallel. Update all users.
5675 (gimple_build_omp_for): Rename from build_gimple_omp_for.
5676 Update all users.
5677 (gimple_build_omp_critical): Rename from
5678 build_gimple_omp_critical.
5679 Update all users.
5680 (gimple_build_omp_section): Rename from
5681 build_gimple_omp_section. Update all users.
5682 (gimple_build_omp_continue): Rename from
5683 build_gimple_omp_continue. Update all users.
5684 (gimple_build_omp_master): Rename from
5685 build_gimple_omp_master. Update all users.
5686 (gimple_build_omp_ordered): Rename from
5687 build_gimple_omp_ordered. Update all users.
5688 (gimple_build_omp_sections): Rename from
5689 build_gimple_omp_sections. Update all users.
5690 (gimple_build_omp_single): Rename from
5691 build_gimple_omp_single. Update all users.
5692 (gimple_set_body): Rename from set_gimple_body. Update all
5693 users.
5694 (gimple_set_bb): Rename from set_gimple_bb. Update all users.
5695 (is_gimple_operand): Constify argument.
5696 (gimple_ops): Likewise.
5697 (gimple_op_ptr): Likewise.
5698 (gimple_call_lhs): Likewise.
5699 (gimple_call_return_type): Likewise.
5700 (gimple_call_chain): Likewise.
5701 (gimple_call_arg_ptr): Likewise.
5702 (gimple_cond_true_label): Likewise.
5703 (gimple_bind_vars): Likewise.
5704 (gimple_bind_set_body): Likewise.
5705 (gimple_bind_block): Likewise.
5706 (gimple_asm_ninputs): Likewise.
5707 (gimple_asm_noutputs): Likewise.
5708 (gimple_asm_nclobbers): Likewise.
5709 (gimple_asm_input_op): Likewise.
5710 (gimple_asm_output_op): Likewise.
5711 (gimple_asm_clobber_op): Likewise.
5712 (gimple_asm_string): Likewise.
5713 (gimple_asm_volatile_p): Likewise.
5714 (gimple_catch_types): Likewise.
5715 (gimple_catch_handler): Likewise.
5716 (gimple_eh_filter_types): Likewise.
5717 (gimple_eh_filter_failure): Likewise.
5718 (gimple_try_kind): Likewise.
5719 (gimple_try_set_eval): Likewise.
5720 (gimple_try_set_cleanup): Likewise.
5721 (gimple_wce_set_cleanup): Likewise.
5722 (gimple_wce_cleanup_eh_only): Likewise.
5723 (gimple_phi_capacity): Likewise.
5724 (gimple_phi_num_args): Likewise.
5725 (gimple_phi_result): Likewise.
5726 (gimple_resx_region): Likewise.
5727 (gimple_switch_num_labels): Likewise.
5728 (gimple_switch_label): Likewise.
5729 (gimple_switch_default_label): Likewise.
5730 (gimple_omp_set_body): Likewise.
5731 (gimple_omp_critical_name): Likewise.
5732 (gimple_omp_for_clauses): Likewise.
5733 (gimple_omp_for_index): Likewise.
5734 (gimple_omp_for_initial): Likewise.
5735 (gimple_omp_for_final): Likewise.
5736 (gimple_omp_for_incr): Likewise.
5737 (gimple_omp_for_set_pre_body): Likewise.
5738 (gimple_omp_parallel_clauses): Likewise.
5739 (gimple_omp_parallel_child_fn): Likewise.
5740 (gimple_omp_parallel_data_arg): Likewise.
5741 (gimple_omp_single_clauses): Likewise.
5742 (gimple_omp_sections_clauses): Likewise.
5743 (gimple_omp_for_cond): Likewise.
5744 (gimple_return_retval): Likewise.
5745 (is_gimple_omp): Likewise.
5746 (gimple_nop_p): Likewise.
5747 (gimple_expr_type): Likewise.
5748
57492007-10-17 Diego Novillo <dnovillo@google.com>
5750
5751 * tree-ssa-loop-manip.c (gimple_duplicate_loop_to_header_edge): Rename
5752 from tree_duplicate_loop_to_header_edge.
5753 Update all users.
5754 * value-prof.c: Convert and enable all functions in the file.
5755 (gimple_divmod_fixed_value): Rename from
5756 tree_divmod_fixed_value.
5757 (gimple_mod_pow2): Rename from tree_mod_pow2.
5758 (gimple_mod_subtract): Rename from tree_mod_subtract.
5759 (gimple_divmod_fixed_value_transform): Rename from
5760 tree_divmod_fixed_value_transform.
5761 (gimple_mod_pow2_value_transform): Rename from
5762 tree_mod_pow2_value_transform.
5763 (gimple_mod_subtract_transform): Rename from
5764 tree_mod_subtract_transform.
5765 (gimple_stringops_transform): Rename from tree_stringops_transform.
5766 (gimple_ic_transform): Rename from tree_ic_transform.
5767 Update all users.
5768 * value-prof.h (gimple_register_value_prof_hooks): Rename from
5769 tree_register_value_prof_hooks. Update all users.
5770 * tree.h (OMP_DIRECTIVE_P): Remove. Update all users.
5771 (validate_arglist): Move to gimple.h.
5772 * builtins.c: (validate_arglist): Change first argument to
5773 const_gimple. Disable most callers.
5774 * gimple.def: Document all GIMPLE codes.
5775 * tree-gimple.c (is_gimple_operand): New.
5776 (get_gimple_rhs_class)<ADDR_EXPR>: Accept as a
5777 GIMPLE_SINGLE_RHS.
5778 <WITH_SIZE_EXPR>: Likewise.
5779 (get_gimple_rhs_num_ops): New.
5780 (is_gimple_call_addr): Tidy.
5781 * tree-gimple.h (get_gimple_rhs_num_ops): Declare.
5782 * gimple-dummy.c (free_histograms, stringop_block_profile):
5783 Remove.
5784 * gimple-low.c (lower_function_body): Tidy.
5785 * predict.c (gimple_predicted_by_p): Rename from
5786 tree_predicted_by_p. Update all users.
5787 (gimple_predict_edge): Rename from tree_predict_edge. Update
5788 all users.
5789 * gimple-iterator.c (gsi_link_seq_after): Update documentation.
5790 (gsi_link_after): Likewise.
5791 * tree-eh.c (stmt_could_throw_1_p): New.
5792 (stmt_could_throw_p): New.
5793 * gimple-pretty-print.c (dump_unary_rhs): Print ADDR_EXPR as
5794 a single operand.
5795 (dump_gimple_switch): Support NULL case labels.
5796 (dump_gimple_asm): Dump outputs first.
5797 * gimplify.c (compare_case_labels): Make the default label
5798 sort first.
5799 (sort_case_labels): Do not special case the default label.
5800 (gimplify_init_ctor_eval): Gimplify initializer expressions.
5801 (gimplify_modify_expr): Unshare the operands before setting
5802 them on the new GIMPLE_ASSIGN statement.
5803 (gimplify_asm_expr): NULLify the chain on operands before
5804 putting them on the input/output vectors.
5805 * tree-cfgcleanup.c: Convert and enable CFG cleanup functions.
5806 (cleanup_control_expr_graph): Call gimple_fold.
5807 * tree-flow.h (gimple_block_label): Rename from
5808 tree_block_label. Update all users.
5809 (gimple_duplicate_sese_region): Rename from
5810 tree_duplicate_sese_region. Update all users.
5811 (gimple_duplicate_sese_tail): Rename from
5812 tree_duplicate_sese_tail. Update all users.
5813 (gimple_purge_dead_abnormal_call_edges): Rename from
5814 tree_purge_dead_abnormal_call_edges. Update all users.
5815 (gimple_purge_all_dead_eh_edges): Rename from
5816 tree_purge_all_dead_eh_edges. Update all users.
5817 (stmt_could_throw_p): Declare.
5818 (add_stmt_to_eh_region_fn): Move from except.h.
5819 (remove_stmt_from_eh_region_fn): Likewise.
5820 (lookup_stmt_eh_region_fn): Likewise.
5821 (lookup_stmt_eh_region): Likewise.
5822 (verify_eh_edges): Likewise.
5823 * Makefile.in (GIMPLE_H): Add dependencies on GGC_H, TM_H and
5824 TARGET_H.
5825 (ipa-inline.o): Add dependency on TREE_FLOW_H.
5826 (out_object_file): Add dependency on TREE_GIMPLE_H.
5827 * gimple.c (gimple_set_code): Rename from set_gimple_code.
5828 (gimple_size): New.
5829 (gimple_alloc): New.
5830 (gimple_alloc_ops): New.
5831 (build_gimple_with_ops): Call them.
5832 (build_gimple_return): Only call gimple_return_set_retval if
5833 RETVAL is not NULL.
5834 (build_gimple_call): Validate argument FN.
5835 (extract_ops_from_tree): New.
5836 (build_gimple_assign_with_ops): New.
5837 (build_gimple_assign): Call them.
5838 (build_gimple_nop): Call gimple_alloc.
5839 (build_gimple_bind): Likewise.
5840 (build_gimple_asm_1): Tidy.
5841 (build_gimple_asm_vec): Tidy.
5842 (build_gimple_asm): Tidy.
5843 (build_gimple_catch): Call gimple_alloc.
5844 (build_gimple_eh_filter): Likewise.
5845 (build_gimple_try): Likewise.
5846 (build_gimple_wce): Likewise.
5847 (build_gimple_phi): Remove.
5848 (build_gimple_resx): Call gimple_alloc.
5849 (build_gimple_switch_1): Tidy.
5850 (build_gimple_switch): Tidy.
5851 (build_gimple_omp_critical): Call gimple_alloc.
5852 (build_gimple_omp_for): Likewise.
5853 (build_gimple_omp_parallel): Likewise.
5854 (build_gimple_omp_section): Likewise.
5855 (build_gimple_omp_master): Likewise.
5856 (build_gimple_omp_continue): Likewise.
5857 (build_gimple_omp_ordered): Likewise.
5858 (build_gimple_omp_return): Likewise.
5859 (build_gimple_omp_sections): Likewise.
5860 (build_gimple_omp_single): Likewise.
5861 (gimple_check_failed): Change GS to const_gimple. Update all
5862 users.
5863 (gimple_range_check_failed): Likewise.
5864 (walk_gimple_seq): Change return type to tree. Update all
5865 users.
5866 If the call to walk_gimple_stmt returns non-NULL,
5867 return it immediately.
5868 (walk_gimple_asm): Change return type to tree. Update all
5869 users.
5870 If the call to walk_tree returns non-NULL, return it.
5871 (walk_gimple_stmt): Likewise.
5872 (gimple_fold): New.
5873 (gimple_assign_set_rhs_from_tree): New.
5874 (gimple_assign_set_rhs_with_ops): New.
5875 (gimple_copy): New.
5876 * basic-block.h (gimple_predicted_by_p): Rename from
5877 tree_predicted_by_p. Update all users.
5878 (gimple_predict_edge): Rename from tree_predict_edge. Update
5879 all users.
5880 * gimple.h: Add documentation to all inline functions.
5881 (gimple_seq_first): Return NULL if S is NULL.
5882 (gimple_seq_last): Likewise.
5883 (GF_ASM_VOLATILE): Define.
5884 (GF_NO_WARNING): Rename from GIMPLE_NO_WARNING. Update all
5885 users.
5886 (build_gimple_assign_with_ops): Declare.
5887 (build_gimple_asm): Change unsigned arguments to size_t.
5888 Update all users.
5889 (build_gimple_switch): Likewise.
5890 (build_gimple_phi): Remove.
5891 (validate_arglist): Declare.
5892 (gimple_fold): Declare.
5893 (gimple_assign_set_rhs_from_tree): Declare.
5894 (gimple_assign_set_rhs_with_ops): Declare.
5895 (gimple_copy): Declare.
5896 (is_gimple_operand): Declare.
5897 (gimple_num_ops): Change argument to const_gimple.
5898 Return 0 if GS is not one of the statements that has tree
5899 operands.
5900 (gimple_ops): New.
5901 (gimple_op): Change argument to const_gimple.
5902 If GS is not a statement that has tree operands, return NULL.
5903 (gimple_op_ptr): Likewise.
5904 (gimple_assign_subcode): Change argument to const_gimple.
5905 (gimple_assign_operand): Remove. Update all users.
5906 (gimple_assign_set_operand): Remove. Update all users.
5907 (gimple_assign_lhs): Change argument type to const_gimple.
5908 (gimple_assign_rhs1): Likewise.
5909 (gimple_assign_rhs2): Likewise.
5910 (gimple_assign_set_rhs1): Assert that RHS is a valid operand.
5911 (gimple_assign_set_rhs2): Likewise.
5912 (gimple_call_lhs): Call gimple_op.
5913 (gimple_call_set_lhs): Assert that LHS is a valid operand.
5914 Call gimple_set_op.
5915 (gimple_call_set_fn): New.
5916 (gimple_call_fndecl): Change argument type to const_gimple.
5917 Call gimple_call_fn.
5918 (gimple_call_chain): Call gimple_op.
5919 (gimple_call_set_chain): Assert that CHAIN is valid.
5920 Call gimple_set_op.
5921 (gimple_call_nargs): Change argument to const_gimple.
5922 Call gimple_op.
5923 (gimple_call_arg_ptr): Call gimple_op_ptr.
5924 (gimple_call_set_arg): Assert that ARG is valid.
5925 Call gimple_set_op.
5926 (gimple_cond_code): Change argument to const_gimple.
5927 (gimple_cond_lhs): Change argument to const_gimple.
5928 (gimple_cond_set_lhs): Assert that the operand is valid.
5929 Call gimple_set_op.
5930 (gimple_cond_rhs): Change argument to const_gimple.
5931 Call gimple_op.
5932 (gimple_cond_true_label): Call gimple_op.
5933 (gimple_cond_false_label): Likewise.
5934 (gimple_label_label): Likewise.
5935 (gimple_cond_set_true_label): Assert that the operand is
5936 valid.
5937 Call gimple_set_op.
5938 (gimple_cond_set_false_label): Likewise.
5939 (gimple_goto_dest): Change argument to const_gimple.
5940 Call gimple_set_op.
5941 (gimple_goto_set_dest): Assert that the operand is valid.
5942 Call gimple_set_op.
5943 (gimple_asm_ninputs): Change return type to size_t. Update
5944 all users.
5945 (gimple_asm_noutputs): Likewise.
5946 (gimple_asm_nclobbers): Rename from gimple_asm_nclobbered.
5947 Change return type to size_t.
5948 Update all users.
5949 (gimple_asm_set_input_op): Assert that the argument is
5950 valid.
5951 (gimple_asm_set_output_op): Likewise.
5952 (gimple_asm_set_clobber_op): Likewise.
5953 (gimple_asm_volatile_p): New.
5954 (gimple_asm_set_volatile): New.
5955 (gimple_asm_clear_volatile): New.
5956 (gimple_phi_set_capacity): Remove.
5957 (gimple_phi_set_nargs): Remove.
5958 (gimple_expr_type): New.
5959 (struct walk_stmt_info): Remove fields want_bind_expr and
5960 want_return_expr. Update all users.
5961 * tree-cfg.c: Convert all functions for CFG cleanup and
5962 verification.
5963 (gimple_redirect_edge_and_branch): Rename from
5964 tree_redirect_edge_and_branch.
5965 (gimple_try_redirect_by_replacing_jump): Rename from
5966 tree_try_redirect_by_replacing_jump.
5967 (gimple_verify_flow_info): Rename from tree_verify_flow_info.
5968 (gimple_make_forwarder_block): Rename from
5969 tree_make_forwarder_block.
5970 (gimple_cfg2vcg): Rename from tree_cfg2vcg.
5971 (gimple_merge_blocks): Rename from tree_merge_blocks.
5972 (gimple_can_merge_blocks_p): Rename from tree_merge_blocks_p.
5973 (gimple_can_remove_branch_p): Rename from tree_can_remove_branch_p.
5974 (gimple_redirect_edge_and_branch): Rename from
5975 tree_redirect_edge_and_branch.
5976 (gimple_move_block_after): Rename from tree_move_block_after.
5977 (gimple_predict_edge): Rename from tree_predict_edge.
5978 (gimple_predicted_by_p): Rename from tree_predicted_by_p.
5979 (gimple_duplicate_bb): Rename from tree_duplicate_bb.
5980 (gimple_can_duplicate_bb_p): Rename from tree_can_duplicate_bb_p.
5981 (gimple_split_edge): Rename from tree_split_edge.
5982 (gimple_make_forwarder_block): Rename from tree_make_forwarder_block.
5983 (gimple_block_ends_with_call_p): Rename from
5984 tree_block_ends_with_call_p.
5985 (gimple_block_ends_with_condjump_p): Rename from
5986 tree_block_ends_with_condjump_p.
5987 (gimple_flow_call_edges_add): Rename from
5988 tree_flow_call_edges_add.
5989 (gimple_execute_on_growing_pred): Rename from
5990 tree_execute_on_growing_pred.
5991 (gimple_execute_on_shrinking_pred): Rename from
5992 tree_execute_on_shrinking_pred.
5993 (gimple_duplicate_loop_to_header_edge): Rename from
5994 tree_duplicate_loop_to_header_edge.
5995 (gimple_lv_add_condition_to_bb): Rename from
5996 tree_lv_add_condition_to_bb.
5997 (gimple_lv_adjust_loop_header_phi): Rename from
5998 tree_lv_adjust_loop_header_phi.
5999 (struct pass_build_cfg): Enable TODO_verify_stmts and
6000 TODO_cleanup_cfg.
6001 * passes.c (execute_function_todo): Enable call to
6002 cleanup_tree_cfg.
6003
60042007-10-17 Aldy Hernandez <aldyh@redhat.com>
6005
6006 * gimple.def: Add GIMPLE_WITH_CLEANUP_EXPR.
6007 * gsstruct.def: Add GSS_WCE.
6008 * gimple-iterator.c (gsi_delink): New.
6009 (gsi_split_seq_*): Update comment.
6010 * gimple.c (gss_for_code): Handle GIMPLE_WCE. Adjust whitespace.
6011 (build_gimple_wce): New.
6012 * gimple.h (struct gimple_statement_wce): New.
6013 (union gimple_statement_d): Add gimple_wce.
6014 (build_gimple_wce): Protoize.
6015 (gimple_wce_cleanup): New.
6016 (gimple_wce_set_cleanup): New.
6017 (gimple_wce_cleanup_eh_only): New.
6018 (gimple_wce_set_cleanup_eh_only): New.
6019 (gsi_delink): Protoize.
6020
60212007-10-12 Aldy Hernandez <aldyh@redhat.com>
6022
6023 * Makefile.in (GIMPLE_H): Depend on TARGET_H.
6024 * gimple.h (gsi_alloc): New.
6025 (_ALLOC_GSI): Remove.
6026 Replace _ALLOC_GSI uses by gsi_alloc.
6027
60282007-10-12 Aldy Hernandez <aldyh@redhat.com>
6029
6030 * gimple.h (_ALLOC_GSI): New.
6031 Use it throughout when allocating a new gimple_stmt_iterator.
6032
60332007-10-11 Aldy Hernandez <aldyh@redhat.com>
6034
6035 Merge with mainline @129233.
6036
6037 * configure.ac (ACX_PKGVERSION): Update revision merge string.
6038 * configure: Regenerate.
6039
60402007-10-11 Aldy Hernandez <aldyh@redhat.com>
6041
6042 * cfg.c: Include tree-flow.h.
6043 (remove_edge_raw): Call redirect_edge_var_map_clear.
6044 (redirect_edge_succ_nodup): Call redirect_edge_var_map_dup.
6045 * tree-flow-inline.h (redirect_edge_var_map_def): New.
6046 (redirect_edge_var_map_result): New.
6047 * tree-cfgcleanup.c (remove_forwarder_block_with_phi): Replace
6048 PENDING_STMT use with redirect_edge_var_map_*.
6049 * tree-ssa.c (edge_var_maps): New definition.
6050 (redirect_edge_var_map_add): New.
6051 (redirect_edge_var_map_clear): New.
6052 (redirect_edge_var_map_dup): New.
6053 (redirect_edge_var_map_vector): New.
6054 (redirect_edge_var_map_destroy): New.
6055 (ssa_redirect_edge): Replace PENDING_STMT use with
6056 redirect_edge_var_map_*.
6057 (flush_pending_stmts): Same.
6058 (delete_tree_ssa): Destroy edge var map.
6059 * tree-flow.h (struct _edge_var_map): New.
6060 Define edge_var_map vector type.
6061 Declare redirect_edge_var_map_* prototypes.
6062 * Makefile.in (cfg.o): Depend on TREE_FLOW_H.
6063 * tree-cfg.c (reinstall_phi_args): Replace
6064 PENDING_STMT use with redirect_edge_var_map_*.
6065
60662007-10-02 Diego Novillo <dnovillo@google.com>
6067
6068 Merge with mainline @128957.
6069
6070 * configure.ac (ACX_PKGVERSION): Update revision merge string.
6071 * configure: Regenerate.
6072
60732007-09-24 Diego Novillo <dnovillo@google.com>
6074
6075 Merge with mainline @128708.
6076
6077 * configure.ac (ACX_PKGVERSION): Update revision merge string.
6078 * configure: Regenerate.
6079
60802007-09-24 Diego Novillo <dnovillo@google.com>
6081
6082 * gimple.h (gimple_code): Change argument type to
6083 const_gimple.
6084 (gimple_flags): Likewise.
6085 (gimple_subcode): Likewise.
6086 (gimple_next): Likewise.
6087 (gimple_prev): Likewise.
6088 (gimple_bb): Likewise.
6089 (gimple_block): Likewise.
6090 (gimple_locus): Likewise.
6091
60922007-09-15 Diego Novillo <dnovillo@google.com>
6093
6094 * gimple-iterator.c (gsi_replace): Call gsi_insert_before and
6095 gsi_remove to do the replacement.
6096 (gsi_insert_before): Take the basic block from the iterator.
6097 (gsi_insert_after): Likewise.
6098 * gimple-iterator.h: Move inside gimple.h.
6099 * tree-eh.c (make_eh_edge, make_eh_edges): Enable.
6100 * gimple-pretty-print.c (dump_gimple_seq, dump_gimple_cond,
6101 dump_gimple_bind, dump_gimple_try): Do not handle TDF_DETAILS.
6102 (dump_gimple_switch): Fix display of case labels.
6103 (dump_gimple_stmt): Handle TDF_DIAGNOSTIC.
6104 (pp_cfg_jump): New.
6105 (dump_implicit_edges): New.
6106 (gimple_dump_bb_buff): Call it.
6107 * domwalk.c (walk_dominator_tree):
6108 * gimplify.c (gimplify_switch_expr): Fix generation of
6109 GIMPLE_SWITCH labels.
6110 (gimplify_case_label_expr): Emit a label for CASE_LABEL
6111 instead of the CASE_LABEL_EXPR.
6112 * Makefile.in (GIMPLE_H): Add dependency on BASIC_BLOCK_H.
6113 * gimple.c (walk_gimple_stmt): Reverse meaning of return value
6114 of CALLBACK_STMT. Update all users.
6115 Walk sub-statements of statements with bodies.
6116 * gimple.h (GCC_GIMPLE_H): Rename from GCC_GIMPLE_IR_H.
6117 Include vec.h, tm.h, hard-reg-set.h and basic-block.h.
6118 (bb_seq, set_bb_seq): Move from tree-flow-inline.h
6119 (gimple_label_set_label): Do not allow CASE_LABEL_EXPR.
6120 (gsi_start_bb): New. Update all users that were calling
6121 gsi_start (bb_seq ()).
6122 (struct gimple_stmt_iterator): Add field 'bb'.
6123 * tree-cfg.c (build_gimple_cfg): Enable.
6124 (create_bb): Create a new sequence if the given one is NULL.
6125 (make_gimple_switch_edges): Rename from make_switch_expr_edges.
6126 Update all users.
6127 (cleanup_dead_labels): Fix handling of GIMPLE_SWITCH.
6128 (group_case_labels): Likewise.
6129 (verify_types_in_gimple_stmt): Do not allow CASE_LABEL_EXPR in
6130 a GIMPLE_LABEL.
6131
61322007-09-13 Diego Novillo <dnovillo@google.com>
6133
6134 * tree-pretty-print.c (dump_symbols, dump_generic_bb,
6135 dump_bb_header, dump_bb_end, dump_phi_nodes, pp_cfg_jump,
6136 dump_implicit_edges, dump_generic_bb_buff): Remove.
6137 * value-prof.c (histogram_eq): Enable.
6138 (dump_histograms_for_stmt): Adapt to tuples.
6139 * value-prof.h (struct):
6140 * cfghooks.h (struct cfg_hooks)<dump_bb>: Add int argument.
6141 Update all users.
6142 * gimple-dummy.c (gimple_remove_stmt_histograms,
6143 remove_stmt_from_eh_region): Remove.
6144 * gimple-iterator.h (gsi_start): Support NULL sequences.
6145 * tree-eh.c (add_stmt_to_eh_region): Enable.
6146 (remove_stmt_from_eh_region): Enable.
6147 (lookup_stmt_eh_region): Enable.
6148 (tree_could_throw_p): Enable.
6149 (stmt_can_throw_internal): Enable.
6150 * gimple-pretty-print.c: Include value-prof.h
6151 (dump_gimple_cond): Do not insert a newline initially.
6152 (dump_gimple_bind): Likewise.
6153 (dump_gimple_try): Likewise.
6154 (dump_gimple_asm): Likewise.
6155 (dump_symbols): Move from tree-pretty-print.c
6156 (dump_gimple_phi): New.
6157 (dump_gimple_stmt): Call it..
6158 (dump_bb_header): Move from tree-pretty-print.c
6159 (dump_bb_end): Likewise.
6160 (dump_phi_nodes): Likewise.
6161 (gimple_dump_bb_buff): New.
6162 (gimple_dump_bb): New.
6163 * Makefile.in (gimple-pretty-print.o): Add dependency
6164 value-prof.h
6165 * tree-cfg.c (fold_cond_expr_cond): Handle cases where
6166 fold_binary returns NULL.
6167 (make_cond_expr_edges): Take locus from the first statement of
6168 the destination blocks.
6169 (tree_dump_bb): Remove.
6170 (gimple_debug_bb): Rename from debug_tree_bb.
6171 Update all users.
6172 (gimple_debug_bb_n): Rename from debug_tree_bb_n.
6173 Update all users.
6174 (gimple_debug_cfg): Rename from debug_tree_cfg.
6175 Update all users.
6176 (gimple_dump_cfg): Rename from dump_tree_cfg.
6177 Update all users.
6178 (is_ctrl_altering_stmt): Call gimple_call_flags to determine
6179 whether the function is const/pure.
6180 * tree-ssa-operands.c (stmt_references_memory_p): Enable.
6181
61822007-09-11 Diego Novillo <dnovillo@google.com>
6183
6184 * tree.h (struct tree_ssa_name): Add field def_stmt.
6185 (SSA_NAME_DEF_STMT): Return it.
6186 * tree-phinodes.c (create_phi_node): Return gimple.
6187 Update all callers.
6188 (add_phi_args): Change PHI argument to gimple. Update all
6189 callers.
6190 (remove_phi_node): Call gimple_remove.
6191 (phi_reverse): Remove. Update all users.
6192 * tree-ssa-alias-warnings.c: Disable.
6193 * input.h (IS_LOCATION_EMPTY): Fix comparison of LOCATION_LINE.
6194 * fold-const.c: Include gimple.h.
6195 (fold_undefer_overflow_warnings): Change type of argument STMT to
6196 gimple. Update all users.
6197 * cfghooks.h (struct cfg_hooks)<can_merge_blocks_p>: Change
6198 arguments to basic_block. Update all users.
6199 * tree-gimple.c (get_gimple_rhs_class): Change argument to
6200 enum tree_code. Update all users. Move calls to
6201 is_gimple_lvalue and is gimple_val...
6202 (is_gimple_formal_tmp_rhs): ... here.
6203 * tree-ssa-ccp.c (fold_stmt_r): Enable.
6204 (fold_stmt): Enable.
6205 (fold_stmt_inplace): Enable. Adapt to tuples.
6206 * ipa-pure-const.c (analyze_function): Disable.
6207 * tree-ssa-propagate.c (get_rhs): Adapt to tuples. Update all
6208 users.
6209 * gimple-dummy.c (ssa_operands_active): Remove dummy function.
6210 (remove_stmt_from_eh_region, create_phi_node, add_phi_arg,
6211 substitute_in_loop_info, release_defs, push_stmt_changes,
6212 pop_stmt_changes, replace_exp): Add dummy functions.
6213 * predict.c: Disable.
6214 * gimple-iterator.c: Include tm.h and tree-flow.h
6215 (gsi_delink): Remove. Update all users.
6216 (update_modified_stmt): Move from tree-cfg.c.
6217 (gsi_insert_before): New.
6218 (gsi_insert_seq_before): New.
6219 (gsi_insert_after): New.
6220 (gsi_insert_seq_after): New.
6221 (gsi_for_stmt): New.
6222 (gsi_move_after): New.
6223 (gsi_move_before): New.
6224 (gsi_move_to_bb_end): New.
6225 * gimple-iterator.h (gsi_remove): New.
6226 * tree-eh.c (add_stmt_to_eh_region_fn): Add comment
6227 (add_stmt_to_eh_region): Likewise.
6228 (remove_stmt_from_eh_region_fn): Likewise.
6229 (remove_stmt_from_eh_region): Likewise.
6230 (lookup_stmt_eh_region_fn): Likewise.
6231 (lookup_stmt_eh_region): Likewise.
6232 (tree_could_throw_p): Likewise.
6233 (stmt_can_throw_internal): Likewise.
6234 (tree_can_throw_external): Likewise.
6235 * gimple-pretty-print.c (op_gimple_cond): Remove. Update all
6236 users.
6237 * tree-affine.c (tree_to_aff_combination_expand): Disable.
6238 * tree-flow-inline.h (op_iter_init_vdef): Call gimple_code
6239 instead of TREE_CODE.
6240 * gimplify.c (gimplify_cond_expr): Use enum tree_code instead
6241 of enum gimple_cond as the subcode for GIMPLE_COND.
6242 Do not switch around the conditional when the then clause is empty.
6243 (tree_to_gimple_tuple): Remove. Update all users.
6244 (gimplify_omp_for):
6245 (force_gimple_operand_gsi): Rename from force_gimple_operand_bsi. Update all users.
6246 * tree-dfa.c (find_referenced_vars): Disable.
6247 (collect_dfa_stats): Likewise.
6248 (collect_dfa_stats_r): Likewise.
6249 * cfgexpand.c: Disable.
6250 * tree-mudflap.c: Disable.
6251 * print-tree.c: Include diagnostic.h.
6252 (print_node): Call print_gimple_stmt when printing SSA_NAMEs.
6253 * lambda-code.c: Disable.
6254 * tree-profile.c (tree_init_edge_profiler): Disable.
6255 (tree_gen_edge_profiler): Disable.
6256 * tree-flow.h (block_stmt_iterator): Remove. Update all users.
6257 (const_block_stmt_iterator): Likewise.
6258 * Makefile.in (print-tree.o): Add dependency on $(DIAGNOSTIC_H).
6259 (gimple-iterator.o): Add dependency on $(TREE_FLOW_H) and
6260 value-prof.h.
6261 (gimple.o): Likewise.
6262 (fold-const.o): Add dependency on $(GIMPLE_H).
6263 * gimple.c: Include tm.h, hard-reg-set.h, basic-block.h,
6264 tree-flow.h and value-prof.h.
6265 (build_gimple_with_ops): Do not allocate operands if NUM_OPS == 0.
6266 (build_gimple_return): Remove argument RESULT_DECL_P. Update
6267 all users.
6268 (build_gimple_cond): Use enum tree_code instead of enum
6269 gimple_cond as the subcode. Update all users.
6270 (gimple_cond_invert): Remove. Update all users.
6271 (walk_gimple_seq): Add arguments CALLBACK_STMT and
6272 CALLBACK_OP. Update all users.
6273 (walk_gimple_asm): Likewise.
6274 (walk_gimple_stmt): Likewise.
6275 (gimple_remove): New.
6276 (gimple_seq_reverse): New.
6277 (set_gimple_bb): New.
6278 * gimple.h (gimple_statement_base): Split field 'flags' into
6279 fields 'subcode' and 'flags'. Update all users.
6280 (gimple_statement_with_ops): Rename field 'base' to
6281 'gsbase'. Update all users.
6282 (gimple_statement_omp): Likewise.
6283 (gimple_statement_bind): Likewise.
6284 (gimple_statement_catch): Likewise.
6285 (gimple_statement_eh_filter): Likewise.
6286 (gimple_statement_phi): Likewise.
6287 (gimple_statement_resx): Likewise.
6288 (gimple_statement_try): Likewise.
6289 (gimple_statement_omp_parallel): Likewise.
6290 (enum gimple_cond): Remove. Update all users.
6291 (GIMPLE_NO_WARNING): Define.
6292 (set_gimple_flags): Assert that FLAGS fits in 8 bits.
6293 (add_gimple_flag): Likewise.
6294 (set_gimple_subcode): New. Use instead of set_gimple_flags
6295 everywhere.
6296 (gimple_subcode): New. Use instead of gimple_flags
6297 everywhere.
6298 (gimple_no_warning_p): New.
6299 (gimple_cond_set_code): New.
6300 (gimple_cond_make_false): New.
6301 (gimple_cond_make_true): New.
6302 (gimple_phi_num_args): Rename from gimple_phi_nargs. Update
6303 all users.
6304 * tree-cfg.c (build_gimple_cfg): Return immediately.
6305 (set_bb_for_stmt): Remove. Move functionality to
6306 set_gimple_bb. Update all users.
6307 (factor_computed_gotos):
6308 (bsi_for_stmt): Remove.
6309 (bsi_insert_before): Remove.
6310 (bsi_insert_seq_before): Remove.
6311 (bsi_insert_after): Remove.
6312 (bsi_insert_seq_after): Remove.
6313 (bsi_remove): Remove.
6314 (bsi_move_after): Remove.
6315 (bsi_move_before): Remove.
6316 (bsi_move_to_bb_end): Remove.
6317 (bsi_replace): Remove.
6318 (tree_verify_flow_info): Adapt to tuples.
6319 (tree_make_forwarder_block): Likewise.
6320 (tree_try_redirect_by_replacing_jump): Likewise.
6321 (tree_redirect_edge_and_branch): Likewise.
6322 (tree_purge_dead_eh_edges): Likewise.
6323 (gimple_cfg_hooks): Enable some hooks.
6324 * tree-ssanames.c (make_ssa_name): Change type of STMT to
6325 gimple. Update all users.
6326 * tree-ssa-operands.c (ssa_operands_active): Enable.
6327
63282007-08-31 Diego Novillo <dnovillo@google.com>
6329
6330 * tree-gimple.c (is_gimple_addressable): Tidy.
6331 * Makefile.in (tree-ssa-structalias.o): Disable dependency on
6332 GTY header file.
6333 (tree-ssa-propagate.o): Likewise.
6334 (tree-phinodes.o): Likewise.
6335 (tree-scalar-evolution.o): Likewise.
6336 (tree-vect-generic.o): Likewise.
6337 * gimple.h (struct gimple_statement_phi): Change type of
6338 fields 'capacity' and 'nargs' to size_t.
6339 Update all users.
6340 * tree-cfg.c (verify_gimple_unary_expr): Remove. Update all
6341 users.
6342 (verify_gimple_binary_expr): Remove. Update all users.
6343 (verify_types_in_gimple_min_lval): Rename from
6344 verify_gimple_min_lval.
6345 (verify_types_in_gimple_reference): Rename from
6346 verify_gimple_reference.
6347 (verify_gimple_tree_expr): Remove.
6348 Move checks to verify_types_in_gimple_assign.
6349 (verify_types_in_gimple_call): Rename from verify_gimple_call.
6350 (verify_types_in_gimple_cond): Rename from verify_gimple_cond.
6351 (verify_types_in_gimple_assign): Rename from verify_gimple_assign.
6352 (verify_types_in_gimple_switch): Rename from verify_gimple_switch.
6353 (verify_types_in_gimple_phi): New.
6354 verify_types_in_gimple_return): Rename from
6355 verify_gimple_return.
6356 (verify_types_in_gimple_stmt): Rename from verify_gimple_stmt.
6357 (verify_types_in_gimple_seq): Rename from verify_gimple_seq.
6358
63592007-08-30 Chris Matthews <chrismatthews@google.com>
6360 Diego Novillo <dnovillo@google.com>
6361
6362 * gimplify.c (gimplify_body): Call verify_gimple_seq if
6363 ENABLE_TYPES_CHECKING is set.
6364 * gimple.h (is_gimple_omp): New.
6365 * tree-cfg.c (verify_gimple_tree_expr): Rename from
6366 verify_gimple_expr.
6367 Verify tree nodes that should disappear after conversion to
6368 GIMPLE.
6369 Do not handle COND_EXPR, CALL_EXPR.
6370 (verify_gimple_modify_stmt): Remove.
6371 (verify_gimple_call): New.
6372 (verify_gimple_cond): New.
6373 (verify_gimple_assign): New.
6374 (verify_gimple_return): New.
6375 (verify_gimple_switch): New.
6376 (verify_gimple_stmt): Change input argument to type gimple.
6377 Call new verifiers.
6378 (verify_gimple_seq): Rename from verify_gimple_1.
6379
63802007-08-30 Diego Novillo <dnovillo@google.com>
6381
6382 * gimple-low.c (gimple_try_catch_may_fallthru): Call
6383 gimple_code instead of gimple_flags.
6384 * gimple.c (set_gimple_body): Use gimple_seq instead of gimple
6385 when accessing vector gimple_bodies_vec.
6386 (gimple_body): Likewise.
6387 (gimple_assign_copy_p): New.
6388 * gimple.h (enum gimple_try_kind): New.
6389 (GIMPLE_TRY_CATCH): Move inside enum gimple_try_kind.
6390 (GIMPLE_TRY_FINALLY): Likewise.
6391 (gimple_assign_copy_p): Declare.
6392 (gimple_assign_rhs_code): New.
6393 Update callers that used to call gimple_flags.
6394 (gimple_cond_code): New.
6395 Update callers that used to call gimple_flags.
6396 (gimple_try_kind): New.
6397 (gimple_nop_p): Tidy comment.
6398 * gimple-pretty-print.c (dump_unary_rhs): New.
6399 (dump_gimple_assign): Call it.
6400
64012007-08-30 Diego Novillo <dnovillo@google.com>
6402
6403 * gimplify.c (gimplify_cond_expr): When gimplifying a ?: call
6404 gimplify_stmt with the expression just built instead of the
6405 original expression.
6406 Use the correct labels when calling build_gimple_cond.
6407
6408
64092007-08-30 Diego Novillo <dnovillo@google.com>
6410
6411 * tree-vrp.c: Disable.
6412 * tree-loop-linear.c: Disable.
6413 * tree-into-ssa.c: Disable.
6414 * tree-ssa-loop-im.c: Disable.
6415 * tree-complex.c: Disable.
6416 * cgraphbuild.c: Disable most functions.
6417 * tree-ssa-threadupdate.c: Disable.
6418 * tree-ssa-loop-niter.c: Disable.
6419 * tree-pretty-print.c: Disable.
6420 * tree-ssa-loop-unswitch.c: Disable.
6421 * tree-ssa-loop-manip.c: Disable.
6422 * value-prof.c: Disable.
6423 * tree-tailcall.c: Disable.
6424 * tree-ssa-loop-ch.c: Disable.
6425 * tree-scalar-evolution.c: Disable.
6426 * tree-phinodes.c: Disable.
6427 * omp-low.c: Disable.
6428 * tree-ssa-dse.c: Disable.
6429 * ipa-reference.c: Disable.
6430 * tree-ssa-uncprop.c: Disable.
6431 * tree-ssa-sccvn.c: Disable.
6432 * cgraphunit.c (verify_cgraph_node): Disable basic block traversal.
6433 * tree-ssa-copyrename.c: Disable.
6434 * tree-ssa-ccp.c: Disable most functions.
6435 * tree-ssa-loop-ivopts.c: Disable.
6436 * tree-stdarg.c: Disable.
6437 * tree-ssa-math-opts.c: Disable.
6438 * tree-ssa-dom.c: Disable most functions.
6439 * tree-nrv.c: Disable.
6440 * tree-ssa-propagate.c: Disable.
6441 * gimple-dummy.c: New file.
6442 * tree-ssa-alias.c: Disable most functions.
6443 * tree-ssa-sink.c: Disable.
6444 * expr.c (expand_expr_real): Disable call to
6445 lookup_stmt_eh_region.
6446 * tree-ssa-loop-ivcanon.c: Disable.
6447 * predict.c (strip_builtin_expect): Disable.
6448 (tree_predict_by_opcode): Disable.
6449 (return_prediction): Disable.
6450 (apply_return_prediction): Disable.
6451 (tree_bb_level_predictions): Disable.
6452 (tree_estimate_probability): Disable.
6453 (predict_paths_leading_to): Disable.
6454 * gimple-iterator.c (gsi_replace): Mark unused arguments with
6455 ATTRIBUTE_UNUSED.
6456 * tree-ssa-ifcombine.c: Disable.
6457 * matrix-reorg.c: Disable.
6458 * c-decl.c (c_gimple_diagnostics_recursively): Disable call to
6459 diagnose_omp_structured_block_errors.
6460 * tree-eh.c: Disable most functions.
6461 * tree-vectorizer.c: Disable.
6462 * tree-vectorizer.h (nested_in_vect_loop_p): Disable.
6463 * ipa-type-escape.c: Disable.
6464 * tree-if-conv.c: Disable.
6465 * profile.c: Disable.
6466 * tree-data-ref.c: Disable.
6467 * tree-flow-inline.h (bsi_start): Set bsi.gsi to NULL if the
6468 block is invalid.
6469 (bsi_last): Likewise.
6470 (op_iter_next_use): Disable call to PHI_ARG_DEF_PTR.
6471 * tree-vect-analyze.c: Disable.
6472 * gimplify.c (gimple_conditional_context): Disable.
6473 (gimple_push_cleanup): Disable.
6474 (gimplify_omp_parallel): Disable calls to
6475 push_gimplify_context and pop_gimplify_context.
6476 * tree-ssa-phiopt.c: Disable.
6477 * calls.c (emit_call_1): Disable calls to lookup_stmt_eh_region.
6478 (expand_call): Likewise.
6479 (emit_library_call_value_1): Initialize low_to_save and
6480 high_to_save.
6481 * tree-ssa-coalesce.c: Disable.
6482 * tree-dfa.c (make_rename_temp): Disable call to
6483 mark_sym_for_renaming.
6484 (find_new_referenced_vars_1): Likewise.
6485 (collect_dfa_stats): Disable CFG iteration.
6486 (collect_dfa_stats_r): Disable.
6487 (mark_symbols_for_renaming): Disable.
6488 * cfgexpand.c (maybe_dump_rtl_for_tree_stmt): Disable.
6489 (label_rtx_for_bb): Disable.
6490 (expand_gimple_cond_expr): Disable.
6491 (expand_gimple_tailcall): Disable.
6492 (expand_gimple_basic_block): Disable.
6493 * tree-cfgcleanup.c: Disable.
6494 * tree-ssa-pre.c: Disable.
6495 * tree-ssa-live.c: Disable.
6496 * tree-sra.c: Disable most functions..
6497 * tree-predcom.c: Disable.
6498 * tree-mudflap.c: Disable.
6499 * ipa-prop.c: Disable.
6500 * tree-ssa-copy.c (may_propagate_copy): Disable.
6501 (propagate_value): Disable.
6502 (execute_copy_prop): Disable.
6503 (do_copy_prop): Disable.
6504 (store_copy_prop): Disable.
6505 * tree-ssa-forwprop.c: Disable.
6506 * tree-ssa-dce.c: Disable.
6507 * tree-vect-patterns.c: Disable.
6508 * tree-ssa-ter.c: Disable.
6509 * tree-ssa.c: Disable.
6510 * lambda-code.c: Disable.
6511 * tree-ssa-loop-prefetch.c: Disable.
6512 * tree-inline.c: Disable most functions.
6513 * tree-optimize.c (execute_fixup_cfg_pre_ipa): Disable.
6514 (execute_fixup_cfg): Disable.
6515 (execute_cleanup_cfg_post_optimizing): Disable.
6516 (execute_fixup_cfg): Disable.
6517 * tree-vect-transform.c: Disable.
6518 * tree-object-size.c: Disable.
6519 * tree-outof-ssa.c: Disable.
6520 * cfgloop.c (find_subloop_latch_edge_by_profile): Disable.
6521 (find_subloop_latch_edge_by_ivs): Disable.
6522 * tree-profile.c: Disable most functions.
6523 * c-gimplify.c (add_block_to_enclosing): Disable.
6524 * tree-vect-generic.c: Disable.
6525 * tree-flow.h (struct function_ann_d): Disable field
6526 reference_vars_info.
6527 * Makefile.in: Force -Werror even during stage 1.
6528 (OBJS-common): Add gimple-dummy.o.
6529 (GTFILES): Remove tree-scalar-evolution.c,
6530 tree-ssa-propagate.c, tree-vect-generic.c,
6531 tree-ssa-structalias.h, tree-ssa-structalias.c,
6532 ipa-reference.h, omp-low.c, tree-phinodes.c, ipa-reference.c
6533 * tree-ssa-structalias.c: Disable.
6534 * tree-cfg.c: Disable most functions.
6535 * passes.c (finish_optimization_passes): Disable call to
6536 end_branch_prob.
6537 (init_optimization_passes): Disable the registration of
6538 several passes.
6539 (execute_function_todo): Disable calls to update_ssa and
6540 need_ssa_update_p.
6541 * tree-ssa-reassoc.c: Disable.
6542 * tree-ssanames.c: Disable.
6543 * tree-ssa-threadedge.c: Disable.
6544 * tree-ssa-operands.c: Disable.
6545
65462007-08-29 Aldy Hernandez <aldyh@redhat.com>
6547
6548 * tree-ssa-operands.h (pop_stmt_changes, push_stmt_changes):
6549 Argument is gimple.
6550 (struct ssa_operand_iterator_d): Member phi_stmt is gimple.
6551 * value-prof.c (gimple_add_histogram_value): Adjust for tuples.
6552 (gimple_duplicate_stmt_histograms): Same.
6553 * value-prof.h (gimple_add_histogram_value): Same.
6554 (gimple_duplicate_stmt_histograms): Same.
6555 * tree-flow-inline.h (clear_and_done_ssa_iter): Same.
6556 (op_iter_init): Same.
6557 (op_iter_init_phiuse): Same.
6558 * tree-flow.h (stmt_references_memory_p): Same.
6559 * tree-cfg.c (tree_can_merge_blocks_p): Same.
6560 (remove_bb): Same.
6561 (find_taken_edge): Same.
6562 (tree_cfg2vcg): Same.
6563 (first_stmt): Same.
6564 (last_stmt): Same.
6565 (bsi_move_after): Same.
6566 (bsi_move_before): Same.
6567 (tree_find_edge_insert_loc): Same.
6568 Remove code handling a GIMPLE_MODIFY_STMT inside a RETURN_EXPR.
6569 (delete_tree_cfg_annotations): Remove code to remove annotations.
6570 * tree-ssa-operands.c (struct scb_d): Stmt_p is a gimple *.
6571 (push_stmt_changes): Adjust for tuples.
6572 (mark_difference_for_renaming): Same.
6573 (pop_stmt_changes): Same.
6574 (stmt_references_memory_p): Same.
6575
65762007-08-29 Aldy Hernandez <aldyh@redhat.com>
6577
6578 * tree-ssa-operands.h: Remove DEF_OPS, USE_OPS, VUSE_OPS,
6579 VDEF_OPS, LOADED_SYMS, STORED_SYMS.
6580 * tree-pretty-print.c (dump_generic_node): Adjust accordingly.
6581 (dump_vops): use gimple_v*_ops. Adjust accordingly.
6582 * gimple.def: Add to comment.
6583 * tree-ssa-alias.c (create_structure_vars): Adjust for tuples.
6584 * tree-flow-inline.h (op_iter_init): Make stmt gimple. Use
6585 gimple_*_ops functions.
6586 (op_iter_init_use): Make stmt gimple.
6587 (op_iter_init_def): Same.
6588 (op_iter_init_vdef): Same.
6589 (single_ssa_tree_operand): Same.
6590 (single_ssa_use_operand): Same.
6591 (single_ssa_def_operand): Same.
6592 (zero_ssa_operands): Same.
6593 (num_ssa_operands): Same.
6594 (compare_ssa_operands_equal): Make stmt[12] gimple.
6595 (link_use_stmts_after): Adjust for tuples.
6596 * tree-ssa-structalias.c (update_alias_info): Use
6597 gimple_stored_syms and gimple_loaded_syms.
6598 * gimple.h (gimple_has_mem_ops): New.
6599 (gimple_def_ops): New.
6600 (set_gimple_def_ops): New.
6601 (gimple_use_ops): New.
6602 (set_gimple_use_ops): New.
6603 (gimple_vuse_ops): New.
6604 (set_gimple_vuse_ops): New.
6605 (gimple_vdef_ops): New.
6606 (set_gimple_vdef_ops): New.
6607 (gimple_loaded_syms): New.
6608 (gimple_stored_syms): New.
6609 * tree-ssa-operands.c (finalize_ssa_defs): Adjust for tuples.
6610 (copy_virtual_operands): Same.
6611 (swap_tree_operands): Same.
6612
66132007-08-28 Aldy Hernandez <aldyh@redhat.com>
6614
6615 * Revert the parts of Kaveh's constification patch.that duplicate
6616 API calls.
6617
66182007-08-27 Diego Novillo <dnovillo@google.com>
6619
6620 Merge with mainline @127831.
6621
6622 * configure.ac (ACX_PKGVERSION): Update revision merge string.
6623 * configure: Regenerate.
6624
66252007-08-25 Diego Novillo <dnovillo@google.com>
6626
6627 * tree.c (build_gimple_modify_stmt_stat): Add depecrate note.
6628 * omp-low.c (scan_omp_1): Disable.
6629 (scan_omp): Likewise.
6630 (lower_omp_for): Likewise.
6631 (lower_omp_parallel): Likewise.
6632 (lower_omp_1): Likewise.
6633 (lower_omp): Likewise.
6634 (diagnose_sb_1): Likewise.
6635 (diagnose_sb_2): Likewise.
6636 (diagnose_omp_structured_block_errors): Likewise.
6637 * tree-gimple.h (_TREE_GIMPLE_H): Rename from _TREE_SIMPLE_H.
6638 (gimplify_body): Return the new GIMPLE body.
6639 (struct walk_stmt_info): Move to gimple.h.
6640 * gimple-low.c (lower_function_body): Assert that the function
6641 body is a single GIMPLE_BIND statement.
6642 Create a new gimple sequence to lower the existing body.
6643 Replace the function body with the new lowered sequence.
6644 (pass_lower_cf): Enable GIMPLE lowering.
6645 (lower_omp_directive): Disable.
6646 (lower_stmt): Do not call lower_omp_directive.
6647 (gimple_stmt_may_fallthru): Factor out of ...
6648 (gimple_seq_may_fallthru): ... here.
6649 * gimple-iterator.c (gsi_replace): New.
6650 * gimple-iterator.h (gsi_replace): Declare.
6651 * gimple-pretty-print.c: Do not include gimple-iterator.h
6652 * gimplify.c (gimplify_asm_expr): Tidy.
6653 Store the whole TREE_LIST node in the inputs and outputs vectors.
6654 (gimple_push_cleanup): Disable completely.
6655 (gimplify_body): Return a GIMPLE_BIND holding the gimplified
6656 body.
6657 Update all users.
6658 (gimplify_function_tree): Create a GIMPLE sequence to hold
6659 the gimplified body.
6660 * tree-flow.h (gimple_stmt_may_fallthru): Declare.
6661 * Makefile.in (GIMPLE_H): Add gimple-iterator.h.
6662
66632007-08-25 Diego Novillo <dnovillo@google.com>
6664
6665 * tree-nested.c: Re-implement to use GIMPLE tuples.
6666 (init_tmp_var_with_call): New.
6667 (init_tmp_var): Adapt to GIMPLE tuples.
6668 (save_tmp_var): Likewise.
6669 (convert_nl_goto_receiver): Likewise.
6670 (finalize_nesting_tree_1): Likewise.
6671 (gsi_gimplify_val): Likewise.
6672 Rename from tsi_gimplify_val. Update all users.
6673 (walk_asm_expr): Remove.
6674 (walk_stmts): Remove.
6675 (walk_body): Call walk_gimple_seq.
6676 Add new argument callback_op. Update all users.
6677 (walk_function): Add argument callback_op. Update all users.
6678 (convert_nonlocal_reference_op): Rename from
6679 convert_nonlocal_omp_reference. Update all users.
6680 (convert_nonlocal_reference_stmt): New. Handle GIMPLE
6681 statements that used to be tree nodes.
6682 (convert_local_reference_op): Rename from
6683 convert_local_reference. Update all users.
6684 (convert_local_reference_stmt): New. Handle GIMPLE statements
6685 that used to be tree nodes.
6686 (convert_nl_goto_reference): Convert to walk_stmt_fn callback.
6687 Update all users.
6688 (convert_tramp_reference_op): Rename from
6689 convert_tramp_reference. Update all users.
6690 (convert_tramp_reference_stmt): New. Handle GIMPLE statements
6691 that used to be tree nodes.
6692 (convert_gimple_call): Rename from convert_call_expr. Convert
6693 to be a walk_stmt_fn callback.
6694 * gimple.c (gimple_seq_add): Rename from gimple_add. Update
6695 all users.
6696 (walk_gimple_seq): Rename from walk_seq_ops. Update all
6697 users.
6698 (walk_gimple_stmt): Rename from walk_tuple_ops. Update all
6699 users.
6700 Use two callback functions one for statements and another for
6701 operands. If either is NULL do not invoke it.
6702 Allow callbacks to replace operands.
6703 (WALKIT): Remove.
6704 (walk_gimple_asm): New.
6705 * gimple.h: Include ggc.h
6706 (gimple_seq_alloc): New. Use everywhere a GIMPLE sequence is
6707 allocated.
6708 (gimple_op_ptr): New.
6709 (gimple_call_arg_ptr): New.
6710 (gimple_catch_types_ptr): New.
6711 (gimple_eh_filter_types_ptr): New.
6712 (gimple_omp_critical_name_ptr): New.
6713 (gimple_omp_for_clauses_ptr): New.
6714 (gimple_omp_for_index_ptr): New.
6715 (gimple_omp_for_initial_ptr): New.
6716 (gimple_omp_for_final_ptr): New.
6717 (gimple_omp_for_incr_ptr): New.
6718 (gimple_omp_parallel_clauses_ptr): New.
6719 (gimple_omp_parallel_child_fn_ptr): New.
6720 (gimple_omp_parallel_data_arg_ptr): New.
6721 (gimple_omp_single_clauses_ptr): New.
6722 (gimple_omp_sections_clauses_ptr): New.
6723 (walk_stmt_fn): New type.
6724 (struct walk_stmt_info): Move from tree-gimple.h.
6725 Rename field callback to callback_op.
6726 Add new field callback_stmt.
6727 Replace field tsi with gsi of type gimple_stmt_iterator.
6728 (walk_gimple_seq): Declare.
6729 (walk_gimple_stmt): Declare.
6730 * tree-cfg.c (execute_build_cfg): Do not call
6731 build_gimple_cfg.
6732 (pass_build_cfg): Enable.
6733 Disable TODO_verify_stmts and TODO_cleanup_cfg.
6734
67352007-08-22 Aldy Hernandez <aldyh@redhat.com>
6736
6737 * tree-phinodes.c (reserve_phi_args_for_new_edge): Comment out
6738 call to phi_nodes_ptr.
6739 (remove_phi_node): Same.
6740 * tree-flow-inline.h (get_lineno): Work with empty statements or
6741 empty locations.
6742 (phi_nodes_ptr): Remove.
6743 (phi_arg_index_from_use): Adjust for tuples.
6744 (bsi_stmt_ptr): Add ATTRIBUTE_UNUSED.
6745 (op_iter_init): Remove assertion.
6746 (next_imm_use_stmt): Change NULL_TREE to NULL.
6747 * tree-dfa.c (mark_symbols_for_renaming): Adjust for tuples.
6748 * tree-flow.h: Remove bb_for_stmt prototype.
6749 (mark_symbols_for_renaming): Make argument gimple.
6750
67512007-08-22 Aldy Hernandez <aldyh@redhat.com>
6752
6753 Change all instances of bb_for_stmt to gimple_bb throughout.
6754
6755 * gimple.h (gimple_omp_parallel_combined_p): New.
6756 * tree-ssa-operands.h (update_stmt_operands): Argument is now
6757 gimple.
6758 * tree-ssa-threadupdate.c (rederiction_block_p): Use gimple_nop_p
6759 instead of IS_EMPTY_STMT.
6760 * tree-ssa-loop-niter.c: Disable use of COND_EXPR_COND.
6761 * tree-pretty-print.c (dump_bb_header): Adjust for tuples.
6762 * cgraph.c (cgraph_add_new_function): Rename
6763 tree_register_cfg_hooks to gimple_register_cfg_hooks.
6764 * value-prof.c (set_histogram_value): Stmt type is now gimple.
6765 (gimple_histogram_value): Same.
6766 (gimple_remove_histogram_value): Same.
6767 (gimple_remove_stmt_histograms): Same.
6768 * tree.h (struct ssa_use_operand_d): Same.
6769 * value-prof.h (struct histogram_value_t): Same.
6770 Change gimple_*histogram* prototypes to use gimple instead of
6771 tree.
6772 * ipa-cp.c (ipcp_insert_stage): Rename tree_register_cfg_hooks to
6773 gimple_register_cfg_hooks.
6774 * cfghooks.c (gimple_register_cfg_hooks): Rename from
6775 tree_register_cfg_hooks. Initialize cfg_hooks to gimple_cfg_hooks.
6776 (current_ir_type): Rename tree_cfg_hooks to gimple_cfg_hooks.
6777 * input.h (IS_LOCATION_EMPTY): New.
6778 * cfghooks.h: Rename tree_cfg_hooks to gimple_cfg_hooks. Rename
6779 tree_register_cfg_hooks to gimple_register_cfg_hooks.
6780 * omp-low.c (determine_parallel_type): Adjust for tuples.
6781 (expand_omp_parallel): Rename bb_stmt_list to bb_seq.
6782 (expand_omp_for_generic): Call gimple_omp_return_nowait_p.
6783 (expand_omp_for_static_nochunk): Same.
6784 (expand_omp_sections): Call gimple_omp_section_last_p.
6785 (expand_omp_single): Comment out call to find_omp_clause.
6786 Call gimple_omp_return_nowait_p.
6787 * cgraphunit.c: Rename tree_register_cfg_hooks to
6788 gimple_register_cfg_hooks.
6789 * tree-ssa-propagate.c: Comment out non working code.
6790 * matrix-reorg.c (matrix_reorg): Rename tree_register_cfg_hooks to
6791 gimple_register_cfg_hooks.
6792 * tree-eh.c (add_stmt_to_eh_region_fn): Change `t' type to gimple.
6793 Adjust accordingly.
6794 (add_stmt_to_eh_region): Same.
6795 (remove_stmt_from_eh_region_fn): Same.
6796 (remove_stmt_from_eh_region): Same.
6797 (lookup_stmt_eh_region_fn): Same.
6798 (lookup_stmt_eh_region): Same.
6799 (make_eh_edges): Adjust for tuples.
6800 (stmt_can_throw_internal): Rename from tree_can_throw_internal.
6801 Adjust for tuples.
6802 (maybe_clean_or_replace_eh_stmt): Arg types are now gimple.
6803 * tree-vectorizer.c: Rename tree_register_cfg_hooks to
6804 gimple_register_cfg_hooks.
6805 * tree-if-conv.c (combine_blocks): Adjust for tuples.
6806 * profile.c (branch_prob): Same.
6807 * tree-flow-inline.h (bb_for_stmt): Remove.
6808 (get_lineno): Adjust for tuples.
6809 (noreturn_call_p): Same.
6810 (mark_stmt_modified): Same.
6811 (update_stmt): Same.
6812 (update_stmt_if_modified): Same.
6813 (stmt_modified_p): Same.
6814 (link_imm_use_stmt): Same.
6815 (relink_imm_use_stmt): Same.
6816 (single_imm_use): Same.
6817 (gimple_phi_arg_def): New.
6818 (gimple_phi_arg_edge): New.
6819 (phi_nodes): Adjust for tuples.
6820 (phi_nodes_ptr): Same.
6821 (set_phi_nodes): Same.
6822 (bb_seq): Rename from bb_stmt_list and adjust for tuples.
6823 (set_bb_seq): Rename from set_bb_stmt_list and adjust for tuples.
6824 (bsi_start): Adjust for tuples.
6825 (bsi_after_labels): Adjust for tuples.
6826 (bsi_last): Same.
6827 (bsi_next): Same.
6828 (bsi_prev): Same.
6829 (bsi_stmt): Same.
6830 (bsi_stmt_ptr): Same.
6831 (loop_containing_stmt): Same.
6832 (delink_stmt_imm_use): Same.
6833 (first_imm_use_stmt): Same.
6834 (next_imm_use_stmt): Same.
6835 * gimplify.c (force_gimple_operand_bsi): Same.
6836 * coretypes.h (const_gimple): New.
6837 * tree-ssa-phiopt.c (empty_block_p): Call gimple_nop_p.
6838 (conditional_replacement): Comment out COND_EXPR_COND.
6839 (value_replacement): Comment out COND_EXPR_COND.
6840 (minmax_replacement): Same.
6841 (abs_replacement): Same.
6842 * except.h (*eh_region*): Change trees to gimple.
6843 (struct throw_stmt_node): Change stmt type to gimple.
6844 * cfgexpand.c (label_rtx_for_bb): Adjust for tuples.
6845 (expand_gimple_cond_expr): Same.
6846 (expand_gimple_basic_block): Same.
6847 * tree-cfgcleanup.c (split_bbs_on_noreturn_calls): Same.
6848 * tree-ssa-pre.c (realify_fake_stores): Comment out non working
6849 code.
6850 * tree-ssa-forwprop.c (propagate_with_phi): Rename
6851 tree_can_throw_internal stmt_can_throw_internal.
6852 * tree-inline.c (copy_edges_for_bb): Rename
6853 tree_can_throw_internal to stmt_can_throw_internal.
6854 (initialize_cfun): Same.
6855 (copy_cfg_body): Same.
6856 (gimple_expand_calls_inline): Same.
6857 (make_nonlocal_label_edges): Rename tree_can_make_abnormal_goto to
6858 stmt_can_make_abnormal_goto.
6859 * tree-optimize.c (tree_lowering_passes): Rename
6860 tree_register_cfg_hooks to gimple_register_cfg_hooks.
6861 (tree_rest_of_compilation): Same.
6862 * tree-flow.h (struct gimple_df): Make modified_noreturn_calls a
6863 vector of gimple types.
6864 Adjust prototypes for tuples.
6865 (struct block_stmt_iterator): Make iterator a gimple iterator.
6866 (enum bsi_iterator_update): Remove BSI_CHAIN_START and
6867 BSI_CHAIN_END.
6868 * Makefile.in (tree-cfg.o): Depend on GIMPLE_H.
6869 (GTFILES): Move gimple.[hc] entries before tree-flow.h.
6870 * basic-block.h (struct edge_def): Make goto_locus of type
6871 location_t.
6872 (union basic_block_il_dependent): Adjust for tuples.
6873 (gimple_bb_info): Rename from tree_bb_info. Adjust for tuples.
6874 * tree-cfg.c: Include gimple.h.
6875 Adjust prototypes for tuples.
6876 (build_gimple_cfg): Rename from build_tree_cfg. Adjust for
6877 tuples.
6878 (execute_build_cfg): Rename build_tree_cfg call to
6879 build_gimple_cfg.
6880 (factor_computed_gotos): Adjust for tuples.
6881 (make_blocks): Same.
6882 (create_bb): Same.
6883 (fold_cond_expr_cond): Same.
6884 (make_edges): Same.
6885 (make_cond_expr_edges): Same.
6886 (make_switch_expr_edges): Same.
6887 (make_goto_expr_edges): Same.
6888 (cleanup_dead_labels): Same.
6889 (group_case_labels): Same.
6890 (tree_can_merge_blocks_p): Same.
6891 (replace_uses_by): Same.
6892 (tree_merge_blocks): Same.
6893 (is_ctrl): Same.
6894 (is_ctrl_altering_stmt): Same.
6895 (computed_goto_p): Same.
6896 (simple_goto_p): Same.
6897 (stmt_can_make_abnormal_goto): Rename from
6898 tree_can_make_abnormal_goto.
6899 Adjust for tuples.
6900 (stmt_starts_bb_p): Adjust for tuples.
6901 (stmt_ends_bb_p): Same.
6902 (first_stmt): Same.
6903 (last_stmt): Same.
6904 (last_and_only_stmt): Same.
6905 (set_bb_for_stmt): Same.
6906 (change_bb_for_stmt): Same.
6907 (bsi_for_stmt): Same.
6908 (update_modified_stmt): Rename from update_modified_stmts.
6909 Adjust for tuples.
6910 Handle only one statement.
6911 (bsi_insert_before): Adjust for tuples.
6912 (bsi_insert_after): Same.
6913 (bsi_insert_seq_before): New.
6914 (bsi_insert_seq_after): New.
6915 (bsi_remove): Ajust for tuples.
6916 (bsi_replace): Same.
6917 (verify_stmt): Same.
6918 (gimple_split_block): Rename from tree_split_block.
6919 Adjust for tuples.
6920 (tree_purge_dead_abnormal_call_edges): Adjust for tuples.
6921 (tree_cfg_hooks): Same.
6922 * tree-ssa-operands.c (update_stmt_operands): Same.
6923
69242007-08-22 Aldy Hernandez <aldyh@redhat.com>
6925
6926 * Makefile.in (TREE_GIMPLE_H): Depend on GIMPLE_H.
6927 * gimple-iterator.h: Do not include gimple.h.
6928 * gimple.h (OMP_SECTION_LAST_FLAG): New.
6929 (gimple_omp_return_nowait_p): New.
6930 (gimple_omp_section_last_p): New.
6931 (gimple_switch_set_num_labels): New.
6932 (gimple_nop_p): New.
6933
69342007-08-17 Aldy Hernandez <aldyh@redhat.com>
6935
6936 Revert this change:
6937
6938 2007-08-14 Aldy Hernandez <aldyh@redhat.com>
6939
6940 * gimple.c (gimple_call_flags): Make sure this is a GIMPLE_CALL.
6941
69422007-08-14 Aldy Hernandez <aldyh@redhat.com>
6943
6944 * gimple-iterator.c (gsi_split_seq_after): New.
6945 (gsi_split_seq_before): New.
6946 * gimple-iterator.h: Prototype above two functions.
6947
69482007-08-14 Aldy Hernandez <aldyh@redhat.com>
6949
6950 * gimple.h (gimple_has_ops): New.
6951 (gimple_modified): New.
6952 (set_gimple_modified): New.
6953 (gimple_switch_default_label): Call gimple_switch_label.
6954 (gimple_switch_set_default_label): Call gimple_switch_set_label.
6955
69562007-08-14 Aldy Hernandez <aldyh@redhat.com>
6957
6958 * gimple.c (gimple_call_flags): Make sure this is a GIMPLE_CALL.
6959
69602007-08-14 Diego Novillo <dnovillo@google.com>
6961
6962 Merge with mainline @127480.
6963
6964 * version.c (VERSUFFIX): Update.
6965
69662007-08-09 Diego Novillo <dnovillo@google.com>
6967
6968 * gimple-low.c: Document conversion to Low GIMPLE.
6969 * Makefile.in (gimple.o): Add dependency on gt-gimple.h
6970 (GTFILES): Add gimple.c.
6971 * gimple.c (gimple_bodies_vec): New.
6972 (gimple_bodies_map): Rename from gimple_bodies.
6973 (gss_for_code): Return GSS_ASM for GIMPLE_ASM.
6974 (walk_tuple_ops): Handle GSS_ASM like GSS_WITH_OPS.
6975 (set_gimple_body): Push body into gimple_bodies_vec and create
6976 a mapping to array index in gimple_bodies_map.
6977 (gimple_body): Corresponding changes to use gimple_bodies_map
6978 and gimple_bodies_vec.
6979 * gimple.h: Create VEC templates for gimple_seq.
6980
69812007-08-08 Aldy Hernandez <aldy@quesejoda.com>
6982
6983 * gimple-low.c (struct return_statements_t): Declare.
6984 (struct lower_data): Make return_statements a vector.
6985 (lower_function_body): Adjust for tuples.
6986 (pass_lower_cf): Add PROP_gimple_any to properties_required.
6987 (lower_sequence): Rename from lower_stmt_body.
6988 Adjust for tuples.
6989 (lower_omp_directive): Adjust for tuples.
6990 (lower_stmt): Same.
6991 (lower_gimple_bind): Rename from lower_bind_expr.
6992 Adjust for tuples.
6993 (gimple_try_catch_may_fallthru): New.
6994 (gimple_seq_may_fallthru): New.
6995 (lower_gimple_return): Rename from lower_return_expr and adjust
6996 for tuples.
6997 (lower_builtin_setjmp): Adjust for tuples.
6998 * gimple-iterator.c: New.
6999 * gimple-iterator.h: Include gimple.h.
7000 (enum gsi_iterator_update): Declare.
7001 (gsi_link_seq_before): New prototype.
7002 (gsi_link_before): Same.
7003 (gsi_link_seq_after): Same.
7004 (gsi_link_after): Same.
7005 (gsi_delink): Same.
7006 * gimplify.c (gimplify_body): Comment out verify_gimple_1 call.
7007 * tree-flow.h (gimple_seq_may_fallthru): New prototype.
7008 * Makefile.in (OBJS-common): Add gimple-iterator.o.
7009 (gimple-iterator.o): New.
7010 (gimple-pretty-print.o): Do not depend on gimple-iterator.h.
7011 * gimple.c (set_gimple_prev): Move to gimple.h.
7012 (set_gimple_next): Same.
7013 (gimple_call_flags): New.
7014 * gimple.h (struct gimple_sequence): Add GTY marker.
7015 (struct gimple_statement_bind): Add block field.
7016 (set_gimple_prev): New.
7017 (set_gimple_next): New.
7018 (gimple_call_flags): Protoize.
7019 (gimple_call_fndecl): New.
7020 (gimple_bind_block): New.
7021 (gimple_bind_set_block): New.
7022
7023
70242007-08-08 Diego Novillo <dnovillo@google.com>
7025
7026 * gimple.h (GIMPLE_CHECK, GIMPLE_CHECK2, GIMPLE_RANGE_CHECK):
7027 Do not return the checked statement. Update all users.
7028 Enable on compilers other than GCC.
7029
70302007-08-07 Chris Matthews <chrismatthews@google.com>
7031
7032 * gimple_iterator.h (gsi_start): Changed to produce a pointer instead of
7033 struct. Updated clients.
7034 (gsi_last): Same.
7035 (gsi_end_p): Changed to operate on a pointer instead of struct. Updated
7036 clients.
7037 (gsi_one_before_end_p): Same.
7038 (gsi_next): Same.
7039 (gsi_prev): Same.
7040 (gsi_stmt): Same.
7041
70422007-08-07 Diego Novillo <dnovillo@google.com>
7043
7044 Merge with mainline @127277.
7045
7046 * version.c (VERSUFFIX): Update.
7047
70482007-08-07 Diego Novillo <dnovillo@google.com>
7049
7050 * gimple.h (gimple_call_return): New.
7051 * gimplify.c (get_tmp_var_for): Call it.
7052
70532007-08-02 Chris Matthews <chrismatthews@google.com>
7054
7055 * gimplify.c (gimplify_asm_expr): Created new gimple tuple.
7056 * gimple-pretty-printer.c (dump_gimple_asm): Added function to dump a
7057 GIMPLE_ASM statement.
7058 (dump_gimple_stmt): Updated to use the dump_gimple_asm function.
7059 * gimple.c (gss_for_code): Made asm statements return as with_mem_ops.
7060 (build_gimple_with_ops): Asm statements are added as a specal case for
7061 allocation because they have extra fields that are not
7062 allocated correctly in the current generic op allocator.
7063 (build_gimple_asm_1): Added a helper function to setup the basics of a
7064 GIMPLE_ASM tuple.
7065 (build_gimple_asm_vec): Create a GIMPLE_ASM tuple from vector arguments.
7066 (build_gimple_asm): Changed to call the new helper function.
7067
70682007-08-03 Diego Novillo <dnovillo@google.com>
7069
7070 * gimple-pretty-print.c (INDENT): Tidy.
7071 (dump_binary_rhs): New.
7072 (dump_gimple_assign): Call it.
7073 * gimplify.c (gimplify_modify_expr_complex_part): If the value
7074 is not interesting, nullify *EXPR_P.
7075 (gimplify_body): Do not add the sequence to the GIMPLE_BIND more
7076 than once.
7077
70782007-08-01 Diego Novillo <dnovillo@google.com>
7079
7080 * gimplify.c (gimplify_switch_expr): Remove switch_body_seq_.
7081 Change switch_body_seq to struct gimple_sequence.
7082 Adjust all uses.
7083 Call gimplify_stmt instead of gimplify_statement_list
7084 (gimplify_to_stmt_list): Remove.
7085 Update all users.
7086 * tree-mudflap.c: Include gimple.h
7087 (mf_decl_cache_locals): Convert to emit GIMPLE.
7088 (mf_build_check_statement_for): Add FIXME and unreachable
7089 markers to convert to GIMPLE.
7090 * Makefile.in (tree-mudflap.o): Depend on $(GIMPLE_H).
7091 * config/i386/i386.c (ix86_gimplify_va_arg): Adapt to emit
7092 GIMPLE.
7093
70942007-08-01 Diego Novillo <dnovillo@google.com>
7095
7096 * gimplify.c (gimplify_switch_expr): Do not call sort_case_labels
7097 if there are no labels other than 'default'.
7098 * gimple.h (gimple_num_ops, gimple_op, gimple_set_op): Use
7099 result of GIMPLE_RANGE_CHECK call.
7100
71012007-08-01 Diego Novillo <dnovillo@google.com>
7102
7103 * DEV-PHASE: Revert to mainline version.
7104 * version.c (VERSUFFIX): Add branch name and revision number
7105 of latest mainline merge.
7106
71072007-07-31 Diego Novillo <dnovillo@google.com>
7108
7109 Mainline merge (@127100).
7110 * DEV-PHASE: Updated.
7111
71122007-07-31 Diego Novillo <dnovillo@google.com>
7113
7114 * dominance.c (free_dominance_info): If there is no CFG,
7115 do nothing.
7116 * cfg.c (compact_blocks): Likewise.
7117
71182007-07-30 Diego Novillo <dnovillo@google.com>
7119
7120 * gimplify.c (get_tmp_var_for): When creating a new temporary
7121 for a GIMPLE_CALL, use the type returned by the function call
7122 instead of the type of the function decl.
7123 * gimple.c (build_gimple_return): Accept NULL and RESULT_DECL
7124 return values.
7125
71262007-07-30 Diego Novillo <dnovillo@google.com>
7127
7128 * gimplify.c (gimplify_init_constructor): If both sides
7129 of the constructor are in GIMPLE form but the assignment
7130 has not been emitted, emit it.
7131
71322007-07-28 Diego Novillo <dnovillo@google.com>
7133
7134 * gimplify.c (gimplify_return_expr): Do not create a MODIFY_EXPR
7135 as return argument
7136 * gimple.c (build_gimple_return): Assert that the returned value
7137 is a GIMPLE value.
7138
71392007-07-27 Diego Novillo <dnovillo@google.com>
7140
7141 * tree-gimple.c (get_gimple_rhs_class): New.
7142 (is_gimple_formal_tmp_rhs): Call it.
7143 * tree-gimple.h (enum gimple_rhs_class): New.
7144 * gimple-iterator.h (gsi_next): Assert that there is nothing
7145 beyond the end of the sequence.
7146 (gsi_prev): Assert that there is nothing before the start of
7147 the sequence.
7148 * gimplify.c (gimplify_switch_expr): Tidy creation of default label.
7149 (gimplify_expr): Fix concatenation of internal sequences to PRE_P.
7150 * gimple.c (get_num_ops_for): Remove. Update users.
7151 (build_gimple_assign): Call get_gimple_rhs_class to determine
7152 how many operands to allocate.
7153 (gimple_add): Assert that GS does not have previous or next
7154 statements.
7155 (gimple_seq_append): Move from gimple.h.
7156
71572007-07-27 Aldy Hernandez <aldy@quesejoda.com>
7158
7159 * cgraph.c: Fix line wrap.
7160 * cgraph.h: Same.
7161 * tree-pass.h (struct tree_opt_pass): Add works_with_tuples_p
7162 field.
7163 * cgraphunit.c (cgraph_analyze_functions): Remove check for
7164 DECL_SAVED_TREE.
7165 (cgraph_expand_function): Comment out TREE_ASM_WRITTEN assertion.
7166 * tree-optimize.c (tree_lowering_passes): Comment out call to
7167 compact_blocks.
7168 * passes.c (execute_one_pass): Return if pass has not been
7169 converted to tuples.
7170 * tree-vrp.c, regrename.c, fwprop.c, tree-into-ssa.c,
7171 tree-complex.c, see.c, cgraphbuild.c, tracer.c, cgraph.c,
7172 postreload-gcse.c, postreload.c, tree-ssa-loop-ch.c,
7173 tree-tailcall.c, tree-pass.h, ipa-cp.c, final.c, omp-low.c,
7174 tree-ssa-dse.c, ipa-reference.c, tree-ssa-uncprop.c,
7175 auto-inc-dec.c, reorg.c, tree-ssa-copyrename.c, tree-ssa-ccp.c,
7176 df-core.c, mode-switching.c, tree-nomudflap.c, modulo-sched.c,
7177 ipa-pure-const.c, cse.c, web.c, tree-stdarg.c,
7178 tree-ssa-math-opts.c, tree-ssa-dom.c, tree-nrv.c,
7179 tree-ssa-alias.c, loop-init.c, gimple-low.c, tree-ssa-sink.c,
7180 ipa-inline.c, global.c, jump.c, ifcvt.c, predict.c,
7181 tree-ssa-loop.c, recog.c, dse.c, tree-ssa-ifcombine.c,
7182 matrix-reorg.c, c-decl.c, tree-eh.c, regmove.c, local-alloc.c,
7183 function.c, tree-vectorizer.c, gcse.c, ipa-type-escape.c,
7184 tree-if-conv.c, init-regs.c, ipa.c, tree-ssa-phiopt.c,
7185 rtl-factoring.c, lower-subreg.c, bt-load.c, tree-dfa.c except.c,
7186 emit-rtl.c, cfgexpand.c, tree-cfgcleanup.c, cfgcleanup.c,
7187 tree-ssa-pre.c, tree-sra.c, tree-mudflap.c, tree-ssa-copy.c,
7188 cfglayout.c, tree-ssa-forwprop.c, tree-ssa-dce.c, tree-ssa.c,
7189 regclass.c, integrate.c, tree-optimize.c, tree-object-size.c,
7190 combine.c, tree-outof-ssa.c, bb-reorder.c, stack-ptr-mod.c,
7191 var-tracking.c, tree-profile.c, tree-vect-generic.c, reg-stack.c,
7192 sched-rgn.c, tree-ssa-structalias.c, tree-cfg.c, passes.c,
7193 tree-ssa-reassoc.c, combine-stack-adj.c, cfgrtl.c, dce.c,
7194 tree-ssanames.c: Set works_with_tuples_p field to 0.
7195
71962007-07-25 Diego Novillo <dnovillo@google.com>
7197
7198 * gimple.c: Use ENABLE_GIMPLE_CHECKING instead of
7199 ENABLE_TREE_CHECKING.
7200 (set_gimple_code): New.
7201 (set_gimple_prev): New.
7202 (set_gimple_next): New.
7203 * gimple.h: Use ENABLE_GIMPLE_CHECKING instead of
7204 ENABLE_TREE_CHECKING.
7205 (gimple_code): Inline function replacement for GIMPLE_CODE.
7206 (gimple_flags): Inline function replacement for GIMPLE_SUBCODE_FLAGS.
7207 (gimple_next): Inline function replacement for GIMPLE_NEXT.
7208 (gimple_prev): Inline function replacement for GIMPLE_PREV.
7209 (gimple_locus): Inline function replacement for GIMPLE_LOCUS.
7210 (gimple_locus_empty_p): Inline function replacement for
7211 GIMPLE_LOCUS_EMPTY_P.
7212 (struct gimple_statement_base): Rename field 'subcode_flags'
7213 to 'flags'.
7214 (set_gimple_flags): New.
7215 (gimple_bb): New.
7216 (set_gimple_bb): New.
7217 (set_gimple_block): New.
7218 (set_gimple_locus): New.
7219 (add_gimple_flag): Rename from gimple_add_subcode_flag.
7220
72212007-07-25 Diego Novillo <dnovillo@google.com>
7222
7223 * tree-gimple.h (build_gimple_eh_filter_tree): Rename from
7224 gimple_build_eh_filter_tree.
7225 * gimple.h (build_gimple_return): Rename from gimple_build_return.
7226 (build_gimple_assign): Rename from gimple_build_assign.
7227 (build_gimple_call_vec): Rename from gimple_build_call_vec.
7228 (build_gimple_call): Rename from gimple_build_call.
7229 (build_gimple_label): Rename from gimple_build_label.
7230 (build_gimple_goto): Rename from gimple_build_goto.
7231 (build_gimple_nop): Rename from gimple_build_nop.
7232 (build_gimple_bind): Rename from gimple_build_bind.
7233 (build_gimple_asm): Rename from gimple_build_asm.
7234 (build_gimple_catch): Rename from gimple_build_catch.
7235 (build_gimple_eh_filter): Rename from gimple_build_eh_filter.
7236 (build_gimple_try): Rename from gimple_build_try.
7237 (build_gimple_phi): Rename from gimple_build_phi.
7238 (build_gimple_resx): Rename from gimple_build_resx.
7239 (build_gimple_switch): Rename from gimple_build_switch.
7240 (build_gimple_switch_vec): Rename from gimple_build_switch_vec.
7241 (build_gimple_omp_parallel): Rename from gimple_build_omp_parallel.
7242 (build_gimple_omp_for): Rename from gimple_build_omp_for.
7243 (build_gimple_omp_critical): Rename from gimple_build_omp_critical.
7244 (build_gimple_omp_section): Rename from gimple_build_omp_section.
7245 (build_gimple_omp_continue): Rename from gimple_build_omp_continue.
7246 (build_gimple_omp_master): Rename from gimple_build_omp_master.
7247 (build_gimple_omp_return): Rename from gimple_build_omp_return.
7248 (build_gimple_omp_ordered): Rename from gimple_build_omp_ordered.
7249 (build_gimple_omp_sections): Rename from gimple_build_omp_sections.
7250 (build_gimple_omp_single): Rename from gimple_build_omp_single.
7251 Update all users.
7252
72532007-07-24 Chris Matthews <chrismatthews@google.com>
7254
7255 * configure.ac: Added support for ENABLE_GIMPLE_CHECKING and the
7256 --enable-checking=gimple flag.
7257 * config.in: Same.
7258 * configure: Regenerated.
7259 * gimplify.c (cpt_same_type): Same.
7260 (gimple_push_condition): Same.
7261 (gimplify_addr_expr): Same.
7262 (gimplify_expr): Same.
7263 (gimplify_body): Same.
7264 (check_pointer_types_r): Same.
7265
72662007-07-24 Diego Novillo <dnovillo@google.com>
7267
7268 * gimple.def: Re-organize codes that take tree operands so
7269 they are consecutive.
7270 * gsstruct.def (GSS_LABEL, GSS_ASSIGN_BINARY, GSS_ASSIGN_UNARY_REG,
7271 GSS_ASSIGN_UNARY_MEM, GSS_COND, GSS_GOTO, GSS_SWITCH, GSS_CALL,
7272 GSS_RETURN): Remove. Update al users.
7273 * gimple.c (gss_for_code): New.
7274 (gimple_statement_structure): Call it.
7275 (get_num_ops_for): New.
7276 (gimple_build_with_ops): New.
7277 (gimple_build_return, gimple_build_call_1, gimple_build_assign,
7278 gimple_build_cond, gimple_build_label, gimple_build_goto,
7279 gimple_build_switch_1, ): Call it.
7280 (gss_for_assign): Remove. Update all users.
7281 (gimple_check_failed): Do not assume that subcode is a valid tree
7282 code.
7283 (gimple_range_check_failed): New.
7284 (walk_tuple_ops): Implement in terms of gimple_num_ops and
7285 gimple_op when dealing with GSS_WITH_OPS and GSS_WITH_MEM_OPS
7286 statements.
7287 * gimple.h (struct gimple_statement_with_ops): Add fields 'num_ops'
7288 and 'op'.
7289 (struct gimple_statement_label, gimple_statement_assign_binary,
7290 gimple_statement_assign_unary_reg, gimple_statement_assign_unary_mem,
7291 gimple_statement_cond, gimple_statement_goto, gimple_statement_switch,
7292 gimple_statement_call, gimple_statement_return): Remove.
7293 Update all users.
7294 (gimple_range_check_failed): Declare.
7295 (GIMPLE_RANGE_CHECK): Define.
7296 (gimple_num_ops): New.
7297 (gimple_op): New.
7298 (gimple_set_op): New.
7299 (gimple_assign_rhs1): Rename from gimple_assign_binary_rhs1.
7300 (gimple_assign_set_rhs1): Rename from gimple_assign_binary_set_rhs1.
7301 (gimple_assign_rhs2): Rename from gimple_assign_binary_rhs2.
7302 (gimple_assign_set_rhs2): Rename from gimple_assign_binary_set_rhs2.
7303 (gimple_assign_unary_rhs): Remove. Update all users.
7304 (gimple_assign_unary_set_rhs): Likewise.
7305 (gimple_switch_num_labels): Rename from gimple_switch_nlabels.
7306 (gimple_call_fn, gimple_call_lhs, gimple_call_chain,
7307 gimple_call_set_chain, gimple_call_nargs, gimple_call_arg,
7308 gimple_call_set_arg, gimple_cond_lhs, gimple_cond_set_lhs,
7309 gimple_cond_rhs, gimple_cond_set_rhs, gimple_cond_true_label,
7310 gimple_cond_false_label, gimple_cond_set_true_label,
7311 gimple_cond_set_false_label, gimple_label_label,
7312 gimple_label_set_label, gimple_goto_dest,
7313 gimple_goto_set_dest, gimple_asm_input_op,
7314 gimple_asm_set_input_op, gimple_asm_output_op,
7315 gimple_asm_set_output_op, gimple_asm_clobber_op,
7316 gimple_asm_set_clobber_op, gimple_switch_num_labels,
7317 gimple_switch_index, gimple_switch_set_index,
7318 gimple_switch_default_label, gimple_switch_set_default_label,
7319 gimple_switch_label, gimple_switch_set_label,
7320 gimple_return_retval, gimple_return_set_retval): Implement
7321 using the array of operands in field 'with_ops'.
7322 (gimple_asm_set_ninputs, gimple_asm_set_noutputs,
7323 gimple_asm_set_nclobbered, gimple_asm_set_string): Remove.
7324 Update all users.
7325
7326
73272007-07-24 Aldy Hernandez <aldyh@redhat.com>
7328
7329 * tree.c (get_callee_fndecl): Revert previous change.
7330 * gimplify.c (gimplify_call_expr): Use result from
7331 get_callee_fndecl if available.
7332 * c-common.c (c_warn_unused_result): Do not use
7333 get_callee_fndecl.
7334 Add assertion.
7335
73362007-07-24 Diego Novillo <dnovillo@google.com>
7337
7338 Merge with mainline (@126872)
7339
73402007-07-23 Aldy Hernandez <aldyh@redhat.com>
7341
7342 * tree.c (get_callee_fndecl): Work when only the CALL_EXPR_FN has
7343 been passed.
7344 * c-common.c (c_warn_unused_result): Use get_callee_fndecl.
7345
73462007-07-23 Aldy Hernandez <aldyh@redhat.com>
7347
7348 * c-decl.c: Include gimple.h.
7349 (c_gimple_diagnostics_recursively): Call c_warn_unused_result with
7350 tuplified body.
7351 Exit if -fgimple-only.
7352 * gimplify.c (gimplify_call_expr): Call gimple_build_call_vec with
7353 the correct callee.
7354 * c-gimplify.c (c_genericize): Remove exit.
7355 * c-common.c: Include gimple.h.
7356 (c_warn_unused_result): Tuplify.
7357 * c-common.h (c_warn_unused_result): Protoize.
7358 * Makefile.in (c-decl.o): Depend on GIMPLE_H.
7359 (c-common.o): Same.
7360 * gimple.c (gimple_build_catch): Handler is a sequence.
7361 Adjust accordingly.
7362 (gimple_build_eh_filter): Failure is a sequence.
7363 Adjust accordingly.
7364 (walk_tuple_ops): case GIMPLE_CATCH: Walk handler as a sequence.
7365 case GIMPLE_EH_FILTER: Walkder failure as a sequence.
7366 * gimple.h (gimple_statement_catch): Make handler a sequence.
7367 (gimple_statement_eh_filter): Make failure a sequence.
7368 (gimple_build_catch): Make second argument a sequence.
7369 (gimple_build_eh_filter): Same.
7370 (gimple_catch_handler): Return a sequence.
7371 (gimple_catch_set_handler): Make second argument a sequence.
7372 (gimple_eh_filter_failure): Return a sequence.
7373 (gimple_eh_filter_set_failture): Make second argument a sequence.
7374
73752007-07-20 Aldy Hernandez <aldyh@redhat.com>
7376
7377 * gimplify.c (gimplify_return_expr): Handle an empty ret_expr
7378 gracefully.
7379
73802007-07-19 Aldy Hernandez <aldyh@redhat.com>
7381
7382 * testsuite/gcc.dg/gimple/instrument.c: New.
7383 * gimplify.c (gimplify_function_tree): Generate tuples for function
7384 instrumentation.
7385
73862007-07-18 Aldy Hernandez <aldyh@redhat.com>
7387
7388 * gimplify.c (gimple_add_tmp_var): Remove abort. Add comment.
7389
73902007-07-18 Aldy Hernandez <aldyh@redhat.com>
7391
7392 * gimplify.c (gimple_add_tmp_var): Remove abort. Add comment.
7393
73942007-07-18 Aldy Hernandez <aldyh@redhat.com>
7395
7396 * gimplify.c (gimplify_and_add): Remove unecessary temporary sequence.
7397 Remove fixme. Add comment.
7398 (gimplify_loop_expr): Tuplefy.
7399 (gimplify_bind_expr): Streamline GIMPLE_TRY_FINALLY tuple.
7400 (gimplify_expr): Tuplefy TRY_*_EXPR cases.
7401 * gimple.c: Fix some spacing.
7402 (gimple_build_try, gimple_omp_build_*): Handle empty sequences.
7403 (gimple_push): Remove.
7404 * gimple.h (gimple_push): Remove.
7405
74062007-07-18 Aldy Hernandez <aldyh@redhat.com>
7407
7408 * tree-gimple.h (declare_vars): Update arguments.
7409 * gimplify.c (pop_gimplify_context): Enable call to declare_vars.
7410 (declare_vars): Convert to use tuples.
7411 (gimple_add_tmp_var): Same.
7412 * gimple.h (GIMPLE_BLOCK): New.
7413
74142007-07-17 Chris Matthews <chrismatthews@google.com>
7415
7416 * gimplify.c (gs_build_eh_filter): Renamed to gs_build_eh_filter_tree
7417 to avoid name conflict.
7418 * gimple-pretty-print.c: Renamed to debug_gs_* to debug_gimple_*.
7419 Updated all users.
7420 * gimple.h: Renamed all functions with GS and gs prefixes to GIMPLE and
7421 gimple, and updated users.
7422 Renamed gs_seq_* functions to gimple_seq_*. Updated all users.
7423 * gimple.def: Definitions changed to from GS_* to GIMPLE_*.
7424
74252007-07-16 Chris Matthews <chrismatthews@google.com>
7426
7427 * gimple.c (gs_build_switch): Changed nlabels to represent total number
7428 of labels including the default.
7429 (gs_build_switch_1): Same.
7430 (walk_tuple_ops): Same.
7431 * gimple-pretty-print.c (dump_gs_switch): Same.
7432
74332007-07-16 Aldy Hernandez <aldyh@redhat.com>
7434
7435 * gimplify.c (gimplify_ctx): Rename current_bind_expr_seq to
7436 bind_expr_stack and make it a vector.
7437 (push_gimplify_context): Adjust bind_expr_stack for vectors.
7438 (pop_gimplify_context): Same.
7439 (gimple_push_bind_expr): Same.
7440 (gimple_pop_bind_expr): Same.
7441 (gimple_current_bind_expr): Same.
7442 (get_tmp_var_for): Use ``code''.
7443 (gimplify_bind_expr): Remove comment.
7444 (gimplify_case_label_expr): Add whitespace.
7445 * gimple.c (gs_pop): Remove.
7446 * gimple.h: Define vectors of a gimple type.
7447 (gs_pop): Remove prototype.
7448 * Makefile.in (GIMPLE_H): Add vec.h.
7449
74502007-07-15 Diego Novillo <dnovillo@google.com>
7451
7452 * gimple.c: Rename from gimple-ir.c.
7453 Update all users.
7454 * gimple.h: Rename from gimple-ir.h.
7455 Update all users.
7456
74572007-07-15 Diego Novillo <dnovillo@google.com>
7458
7459 * gimple-ir.c (gimple_statement_structure): Remove code
7460 after gcc_unreachable call.
7461 * gimplify.c (get_tmp_var_for): New.
7462 (gimplify_call_expr): Call it.
7463
74642007-07-14 Aldy Hernandez <aldyh@redhat.com>
7465
7466 * testsuite/gcc.dg/gimple/with_size_expr.c: Check for GS_TRY.
7467 * Makefile.in (gimple-ir.o): Add diagnostic.h dependency.
7468 * gimple-pretty-print.c (dump_gs_call): Dump LHS if available.
7469 (dump_gs_try): New.
7470 (dump_gimple_stmt): Add case for GS_TRY.
7471 * gimple-ir.c. Include diagnostic.h.
7472 (gs_build_try): Cleanup and eval are sequences.
7473 Remove catch_p and finally_p arguments. Add catch_finally argument.
7474 (gs_omp_build_critical): Body is a gs_seq.
7475 (gs_omp_build_parallel): Same.
7476 (gs_omp_build_section): Same.
7477 (gs_omp_build_master): Same.
7478 (gs_omp_build_continue): Same.
7479 (gs_omp_build_ordered): Same.
7480 (gs_omp_build_sections): Same.
7481 (gs_omp_build_single): Same.
7482 (gs_omp_build_for): Body and pre_body is a gs_seq.
7483 (gs_push): New.
7484 (gs_pop): New.
7485 (walk_tuple_ops): Walk GS_TRY tuples eval and cleanups correctly.
7486 Dump tuple before we ICE.
7487 * gimple-ir.h (gs_seq_copy): New.
7488 (struct gimple_statement_try): Eval and cleanups are gs_seq's.
7489 (gs_bind_set_body): Use gs_seq_copy.
7490 (gs_try_eval): Return address of eval.
7491 (gs_try_cleanup): Return address of cleanup.
7492 (gs_try_set_eval): Use gs_seq_copy.
7493 (gs_try_set_cleanup): Same.
7494 (gs_omp_set_body): Same.
7495 (gs_omp_for_set_pre_body): Same.
7496 * gimplify.c (struct gimplify_ctx): Rename current_bind_expr to
7497 current_bind_expr_seq, and make it a sequence.
7498 (pop_gimplify_context): Adjust for current_bind_expr_seq.
7499 (gimple_push_bind_expr): Same.
7500 (gimple_pop_bind_expr): Same.
7501 (gimple_current_bind_expr): Same.
7502 (build_stack_save_restore): Generate tuples.
7503 (gimplify_bind_expr): Same.
7504
75052007-07-13 Diego Novillo <dnovillo@google.com>
7506
7507 * gimple-ir.c (gs_add): Swap arguments.
7508 Update all users.
7509 * gimple-ir.h (gs_seq_append): Likewise.
7510
75112007-07-12 Diego Novillo <dnovillo@google.com>
7512
7513 * tree.c (create_artificial_label): Move from gimplify.c
7514 (get_name): Likewise.
7515 * tree.h (create_artificial_label, get_name): Move
7516 declarations earlier in the file.
7517 * diagnostic.h (dump_gimple_stmt, print_gimple_stmt,
7518 dump_gimple_seq): Rearrange.
7519 * tree-gimple.h (gimplify_function_tree): Move from tree.h.
7520 * gimple-pretty-print.c (do_niy): Tidy.
7521 (maybe_init_pretty_print): Add comment.
7522 (newline_and_indent): Likewise.
7523 Remove "gimpleir: " prefix.
7524 (debug_gimple_stmt): Add comment.
7525 (dump_gs_seq): Remove.
7526 (dump_gimple_seq): Add argument SPC.
7527 Update all users.
7528 If FLAGS contains TDF_DETAILS, emit "gimpleir:" prefix.
7529 (dump_gs_cond): If FLAGS contains TDF_DETAILS, emit
7530 "gimpleir:" prefix.
7531 (dump_gs_bind): Likewise.
7532 * function.h (struct function): Remove field 'gimplified'.
7533 * gimple-ir.c (gimple_bodies): New private variable.
7534 (set_gimple_body): New.
7535 (gimple_body): New.
7536 * gimple-ir.h: Include pointer-set.h.
7537 Add comment before data structure definitons.
7538 (set_gimple_body): Declare.
7539 (gimple_body): Declare.
7540 * gimplify.c (create_artificial_label): Move to tree.c
7541 (get_name): Likewise.
7542 (gimplify_function_tree): Change return type to void.
7543 Call set_gimple_body after gimplification and nullify
7544 DECL_SAVED_TREE.
7545 Update all callers.
7546 * common.opt (fgimple-only): New option.
7547 * tree-optimize.c (tree_rest_of_compilation): Do not nullify
7548 DECL_SAVED_TREE.
7549 * c-gimplify.c (c_genericize): Restore gimplification logic to
7550 mainline version.
7551 If -fgimple-only was given, exit.
7552 * Makefile.in (GIMPLE_IR_H): Add pointer-set.h
7553 * tree-cfg.c (execute_build_cfg): Nullify GIMPLE body after
7554 building the CFG.
7555 (dump_function_to_file): If DECL_SAVED_TREE is NULL dump the
7556 GIMPLE body of the function.
7557
75582007-07-12 Diego Novillo <dnovillo@google.com>
7559
7560 * omp-low.c (lower_regimplify): Use a local GIMPLE sequence to
7561 hold the result from gimplification.
7562 * tree-gimple.c (is_gimple_min_val): Reformat.
7563 * tree-gimple.h (enum fallback_t): Document values.
7564 (gimplify_expr): Remove IS_STATEMENT argument.
7565 Update all users.
7566 * langhooks.c (lhd_gimplify_expr): Likewise.
7567 * gimplify.c (gimplify_statement_list): If a temporary
7568 was returned from voidify_wrapper_expr abort to mark the failure.
7569 (gimplify_expr): Remove argument IS_STATEMENT.
7570 Update all users.
7571 Assert that FALLBACK is used with the appropriate GIMPLE_TEST_F
7572 Restore logic to use internal queue.
7573 Do not abort if on return from gimplify_call_expr, *EXPR_P has
7574 a CALL_EXPR.
7575
75762007-07-12 Aldy Hernandez <aldyh@redhat.com>
7577
7578 * gimple-ir.c (gs_build_switch_1): Allocate one less tree.
7579 (gs_build_switch_1): Offset labels by one.
7580 (gs_switch_label): Same.
7581 (gs_switch_set_label): Same.
7582
75832007-07-12 Aldy Hernandez <aldyh@redhat.com>
7584
7585 * gimple-ir.c (walk_seq_ops): Rename from walk_tree_seq.
7586 (walk_tuple_ops): Rename from walk_tree_tuple.
7587 * gimple-ir.h, gimplify.c, gimple-ir.c: Rename all calls to
7588 walk_tree_seq and walk_tree_tuple accordingly.
7589
75902007-07-12 Aldy Hernandez <aldyh@redhat.com>
7591
7592 * gimple-ir.c (gs_build_switch_1): Fix spacing.
7593 Allocate one more tree.
7594 (gs_build_switch): Set labels starting at 1.
7595 (walk_tree_seq): New.
7596 (walk_tree_tuple): New.
7597 * gimple-ir.h: Add prototypes for walk_tree_tuple and walk_tree_seq.
7598 * gimplify.c (check_pointer_types_r): Uncomment.
7599 (gimplify_body): Walk gimple sequence with check_pointer_types_r.
7600
76012007-07-11 Chris Matthews <chrismatthews@google.com>
7602
7603 * tree-pretty-print.c (dump_generic_node): Removed space before default
7604 label colon.
7605 * tree.h (sort_case_labels): Moved to gimple-ir.h.
7606 * gimplify.c (sort_case_labels): Changed to a vector instead of tree
7607 vector.
7608 (gimplify_switch_expr): Initial implementation with tuples.
7609 (gimplify_expr): Changed gimplify_case_label_expr parameter.
7610 (gimplify_case_label_expr): Added a gs_seq parameter, and put cases in
7611 that.
7612 (dump_gimple_stmt): Removed semicolon.
7613 (dump_gs_label): Refactored from dump_gimple_expr.
7614 (dump_gs_switch): Added.
7615 (gs_build_switch_vec): Added.
7616 * gimple-ir.c (gs_build_switch_1): Added.
7617 (gs_build_switch): Refactored to use gs_build_switch_1.
7618 (gs_build_switch_vec): Added.
7619 * gs_switch.c: New test case.
7620 * gs_switch1.c: New test case.
7621 * gs_switch2.c: New test case.
7622
76232007-07-05 Aldy Hernandez <aldyh@redhat.com>
7624
7625 * gimple-pretty-print.c (dump_gimple_stmt): Alphabetize cases.
7626 Add case for GS_NOP.
7627 * gimplify.c (gimplify_body): Handle null bodies.
7628 Use GS_CODE instead of GS_SUBCODE_FLAGS.
7629
76302007-07-05 Aldy Hernandez <aldyh@redhat.com>
7631
7632 * testsuite/gcc.dg/gimple/with_size_expr.c: Clean up dump.
7633 * testsuite/gcc.dg/gimple/gs_bind.c: Clean up dump.
7634 * gimplify.c (struct gimplify_ctx): Make current_bind_expr a tuple.
7635 (pop_gimplify_context): Accept gimple.
7636 Comment out call to declare_vars.
7637 (gimple_current_bind_expr): Return gimple.
7638 (unshare_all_trees): Remove.
7639 (gimplify_self_mod_expr): Remove comment.
7640 (gimplify_cleanup_point_expr): Correct typo in call to gs_seq_init.
7641 (gimplify_body): Remove body local.
7642 Build GS_BIND tuples when needed.
7643 Do not call unshare_all_trees.
7644 Call pop_gimplify_context with appropriate argument.
7645 Comment out call to walk_tree.
7646 * tree-pretty-print.c (print_declaration): Remove static.
7647 * diagnostic.h (print_declaration): Prototype.
7648 * tree-gimple.h (pop_gimplify_context): Accept gimple tuple.
7649 (gimple_current_bind_expr): Return tuple.
7650 * gimple-pretty-print.c (dump_gs_seq): New.
7651 (dump_gs_bind): New.
7652 (dump_gimple_stmt): Add case for GS_BIND. Print semi-colons after
7653 each statement.
7654
76552007-06-29 Aldy Hernandez <aldyh@redhat.com>
7656
7657 * gimplify.c (gimple_push_condition): Enable. Call gs_seq_init with
7658 address.
7659 (gimplify_cond_expr): Push and pop conditions. Use other GS_COND
7660 predicates when appropriate
7661
76622007-06-28 Aldy Hernandez <aldyh@redhat.com>
7663
7664 * testsuite/gcc.dg/gimple/gs_goto.c: New.
7665 * testsuite/gcc.dg/gimple/gs_cond.c: New.
7666 * tree-gimple.h (gimplify_stmt): Return bool.
7667 * gimple-pretty-print.c (INDENT): New.
7668 (newline_and_indent): New.
7669 (op_gs_cond): New.
7670 (dump_gs_cond): New.
7671 (dump_gimple_stmt): New.
7672 * gimple-ir.c (gs_cond_invert): New.
7673 * gimple-ir.h (enum gs_cond): Add comment.
7674 (gs_cond_invert): Protoize.
7675 * gimplify.c (gimplify_cond_expr): Rewrite for tuples.
7676 (gimplify_stmt): Return true if we added a statement to the queue.
7677 (gimplify_expr): Enable gimplify_cond_expr.
7678 Build tuples for GOTO_EXPRs and LABEL_EXPRs.
7679
76802007-06-27 Aldy Hernandez <aldyh@redhat.com>
7681
7682 * gimple-ir.h (gs_seq_last): Return last statement.
7683 * testsuite/gcc.dg/gimple/compound_expr.c: Add checks.
7684 * testsuite/gcc.dg/gimple/gs_call.c: Same.
7685 * testsuite/gcc.dg/gimple/constructors.c: Same.
7686 * testsuite/gcc.dg/gimple/gs_assign.c: Same.
7687
76882007-06-27 Aldy Hernandez <aldyh@redhat.com>
7689
7690 Put this patch back in.
7691
7692 2007-06-22 Aldy Hernandez <aldyh@redhat.com>
7693
7694 * gimplify.c (gimplify_modify_expr): Return after a successful
7695 call to gimplify_modify_expr_rhs.
7696
76972007-06-26 Aldy Hernandez <aldyh@redhat.com>
7698
7699 * testsuite/gcc.dg/gimple/gimple.exp: Pass -fdump-tree-gimple-details
7700 * testsuite/gcc.dg/gimple/compound_expr.c: Add dg-final.
7701 * testsuite/gcc.dg/gimple/gs_return.c: Same.
7702 * tree.h (gimplify_function_tree): Add return value.
7703 * diagnostic.h (debug_c_tree): Move under tree-pretty-print.c section.
7704 (dump_gimple_seq): New.
7705 to tests.
7706 * gimple-pretty-print.c (dump_gimple_seq): New.
7707 * gimplify.c (gimplify_function_tree): Add return value.
7708 Remove debug call and exit.
7709 Comment out non-working code.
7710 * c-gimplify.c (c_genericize): Dump gimple IR. Exit.
7711
77122007-06-26 Diego Novillo <dnovillo@google.com>
7713
7714 * gimple-ir.c (gs_build_call_1): Fix formatting.
7715
77162007-06-26 Diego Novillo <dnovillo@google.com>
7717
7718 * gimple-pretty-print.c (dump_gs_assign, dump_gs_return,
7719 dump_gs_call): New functions.
7720 (dump_gimple_stmt): Call them.
7721 * gimple-ir.c (gs_build_call_1): Factor out of gs_build_call.
7722 (gs_build_call): Call it.
7723 (gs_build_call_vec): New function.
7724 * gimple-ir.h (struct gimple_statement_call): Change type of
7725 field 'nargs' to size_t. Update all users.
7726 (gs_build_call_vec): Declare.
7727 (gs_call_set_fn): Remove.
7728 (gs_call_set_nargs): Remove.
7729 * gimplify.c: Include "vec.h"
7730 (gimplify_return_expr): Fix formatting
7731 (gimplify_call_expr): Call gs_build_call_vec.
7732 (gimplify_expr): Do not try to test if NULL expressions
7733 are in GIMPLE form.
7734 (gimplify_function_tree): Do not call debug_gimple_seq.
7735 * Makefile.in (gimplify.o): Include vec.h
7736
77372007-06-25 Chris Matthews <chrismatthews@google.com>
7738
7739 * gimplify.c (gimple_current_bind_expr): Changed to work with gs_seq
7740 accessors
7741 (gimplify_and_add): Same.
7742 (annotate_all_with_locus): Same.
7743 (gimplify_self_mod_expr): Same.
7744 (gimplify_cleanup_point_expr): Same.
7745 (gimplify_expr): Same.
7746 (gimplify_body): Same.
7747 (force_gimple_operand): Same.
7748 (gimplify_init_ctor_eval_range): Added GS_ prefix.
7749 * gimple-iterator.h (gsi_last): Changed to gs_seq accessors. Changed
7750 gimple_stmt_iterator to use a gimple instead of gimple *.
7751 (gsi_one_before_end_p): Same.
7752 (gsi_start): Same.
7753 * gimple-ir.h (gs_cond): Prepended GS_ to names.
7754 (gs_seq_first): Replaced macro.
7755 (gs_seq_last): Same.
7756 (gs_seq_set_first): Same.
7757 (gs_seq_set_last): Same.
7758 (gs_seq_init): Same.
7759 (gs_seq_empty_p): Same.
7760 (gs_assign_operand) Changed opno to be a size_t to match set.
7761 (gs_bind_body): Changed to use gs_seq.
7762 (gs_bind_set_body): Changed to use gs_seq, and gs_seq_set_first, and last.
7763 (gs_asm_ninputs): Renamed.
7764 (gs_asm_noutputs): Renamed.
7765 (gs_asm_nclobbered): Renamed.
7766 (gs_asm_set_ninputs): Renamed.
7767 (gs_asm_set_noutputs): Renamed.
7768 (gs_asm_set_nclobbered): Renamed.
7769 (gs_asm_set_input_op): Renamed.
7770 (gs_asm_input_op): Renamed.
7771 (gs_asm_set_output_op): Renamed.
7772 (gs_asm_output_op): Renamed.
7773 (gs_omp_body): Changed to use gs_seq.
7774 (gs_omp_set_body): Changed to use gs_seq accessors.
7775 (gs_omp_for_pre_body): Changed to use gs_seq.
7776 (gs_omp_for_set_pre_body): Changed to use gs_seq accessors.
7777 (gs_seq_append): Changed to use gs_seq accessors.
7778 * gimple-ir.c (gs_add): Same.
7779 (gs_build_asm): Changed argument names to match accessors, and changed
7780 functions to new accessor names.
7781 (gs_build_cond): Reformatted.
7782 (gs_build_phi): Same.
7783 (gs_build_try): Renamed args to try_p and catch_p.
7784 (gs_build_omp_return): Change to correct arguments, and added a subcode
7785 flag.
7786 * function.c (gimplify-oaraneters): Changed to gs_seq accessors.
7787
77882007-06-22 Aldy Hernandez <aldyh@redhat.com>
7789
7790 * gimplify.c (gimplify_modify_expr): Return after a successful
7791 call to gimplify_modify_expr_rhs.
7792
77932007-06-21 Aldy Hernandez <aldyh@redhat.com>
7794
7795 * gimple-ir.h (gs_assign_binary_rhs1): Add assertion for
7796 GSS_ASSIGN_BINARY.
7797 (gs_assign_binary_set_rhs1): Same.
7798 (gs_assign_binary_rhs2): Same.
7799 (gs_assign_binary_set_rhs2): Same.
7800 (gs_assign_unary_rhs): Same.
7801 (gs_assign_unary_set_rhs): Same.
7802
78032007-06-21 Aldy Hernandez <aldyh@redhat.com>
7804
7805 * gcc.dg/gimple/gimple.exp: New.
7806 * gcc.dg/gimple/compound_expr.c: New.
7807 * gcc.dg/gimple/with_size_expr.c: New.
7808 * gcc.dg/gimple/compound_expr.c: New.
7809 * gcc.dg/gimple/gs_call.c: New.
7810 * gcc.dg/gimple/constructors.c: New.
7811 * gcc.dg/gimple/gs_return.c: New.
7812 * gcc.dg/gimple/gs_assign.c: New.
7813
78142007-06-21 Aldy Hernandez <aldyh@redhat.com>
7815
7816 * gimple-ir.c (gs_build_cond): Change order of arguments. Make labels
7817 of type tree.
7818 (gs_build_asm): Fix formatting.
7819 * gimple-ir.h (gimple_statement_cond): Make labels of type tree.
7820 (gs_build_cond): Change order and type of arguments.
7821 (gs_build_asm): Fix formatting.
7822 (gs_omp_build_for): Same.
7823 (gs_assign_binary_rhs1): Remove assert.
7824 (gs_assign_binary_set_rhs1): Same.
7825 (gs_assign_binary_rhs2): Same.
7826 (gs_assign_binary_set_rhs2): Same.
7827 (gs_assign_unary_rhs): Same.
7828 (gs_cond_true_label): Return a tree.
7829 (gs_cond_set_true_label): Make label a tree.
7830 (gs_cond_set_false_label): Make label a tree.
7831 (gs_cond_false_label): Return a tree.
7832 * gimplify.c (gimplify_init_ctor_eval_range): Build tuples.
7833 (gimplify_init_ctor_eval): Same.
7834 (gimplify_init_constructor): Enable. Adjust for tuples.
7835 (gimplify_modify_expr_rhs): Uncomment call to
7836 gimplify_init_constructor.
7837
78382007-06-21 Diego Novillo <dnovillo@google.com>
7839
7840 * gimple.def: Rename from gs.def.
7841 Adjust all users.
7842
78432007-06-21 Diego Novillo <dnovillo@google.com>
7844
7845 * tree-pretty-print.c (pred_symbol_code, do_gs_niy,
7846 debug_gimple_stmt, debug_gimple_seq, print_gimple_stmt,
7847 dump_gimple_stmt): Move to gimple-pretty-print.c
7848 * diagnostic.h: Add comment for functions in gimple-pretty-print.c
7849 * gimple-pretty-print.c: New file.
7850 * gimple-ir.c (gs_build_return): Fix spacing.
7851 (gs_build_assign): Likewise.
7852 * gimple-ir.h: Fix spacing.
7853 (gs_assign_set_operand): Change OPNO to size_t.
7854 Add assertions for OPNO's value.
7855 (gs_assign_lhs): Rename from gs_assign_operand_lhs.
7856 (gs_assign_binary_rhs1): Rename from gs_assign_operand_rhs.
7857 Assert that GS is GSS_ASSIGN_BINARY
7858 (gs_assign_binary_set_rhs1): Rename from gs_assign_set_rhs.
7859 Assert that GS is GSS_ASSIGN_BINARY.
7860 (gs_assign_binary_set_rhs2): Rename from gs_assign_set_rhs2.
7861 Assert that GS is GSS_ASSIGN_BINARY.
7862 (gs_assign_unary_rhs): New.
7863 (gs_assign_unary_set_rhs): New.
7864 (gs_call_fn, gs_call_lhs, gs_call_chain, gs_call_arg,
7865 gs_cond_lhs, gs_cond_rhs, gs_label_label, gs_goto_dest,
7866 gs_bind_vars, gs_asm_in_op, gs_asm_out_op, gs_asm_clobber_op,
7867 gs_catch_types, gs_catch_handler, gs_eh_filter_types,
7868 gs_eh_filter_failure, gs_try_eval, gs_try_cleanup,
7869 gs_phi_result, gs_switch_index, gs_switch_default_label,
7870 gs_switch_label,gs_omp_critical_name, gs_omp_for_clauses,
7871 gs_omp_for_index, gs_omp_for_initial, gs_omp_for_final,
7872 gs_omp_for_incr, gs_omp_parallel_clauses,
7873 gs_omp_parallel_child_fn, gs_omp_parallel_data_arg,
7874 gs_omp_single_clauses, gs_omp_sections_clauses,
7875 gs_return_retval): Change return type to 'tree'.
7876 * Makefile.in (OBJS-common): Add gimple-pretty-print.o.
7877 (gimple-pretty-print.o): New rule.
7878
78792007-06-20 Aldy Hernandez <aldyh@redhat.com>
7880
7881 * tree-pretty-print.c (dump_gimple_stmt): Change pred_symbol_code
7882 to op_symbol_code.
7883
78842007-06-19 Aldy Hernandez <aldyh@redhat.com>
7885
7886 * gimplify.c (gimplify_modify_expr_rhs): Enable. Adjust for tuples.
7887 (gimplify_modify_expr): Call gimplify_modify_expr_rhs.
7888 (gimplify_compound_expr): Enable. Adjust for tuples. Remove comment
7889 that no longer applies.
7890 (gimplify_expr): Enable call to gimplify_compound_expr.
7891
78922007-06-18 Chris Matthews <chrismatthews@google.com>
7893
7894 * Makefile.in (GTFILES): Added gimeple-ir.h.
7895
7896 * gimple-ir.c (gs_build_return, gs_build_call, gs_build_assign):
7897 Changed to use new accessors.
7898 (gs_build_cond, gs_build_label, gs_build_goto,
7899 gs_build_nop, gs_build_bind gs_build_asm, gs_build_catch,
7900 gs_build_eh_filter, gs_build_try, gs_build_phi,
7901 gs_build_resx, gs_build_switch, gs_omp_build_critical,
7902 gs_omp_build_for, gs_omp_build_parallel,
7903 gs_omp_build_section, gs_omp_build_master,
7904 gs_omp_build_ordered, gs_omp_continue,
7905 gs_omp_build_ordered, gs_omp_build_return,
7906 gs_omp_build_sections, gs_omp_build_single): New
7907 functions.
7908
7909 * gimple-ir.h (struct gimple_statement_switch): Changed
7910 default label to be in labels[0].
7911
7912 (struct gimple_statement_asm): Corrected the allocation
7913 length.
7914
7915 (enum gs_cond): New enum.
7916 (gs_assign_set_operand): Changed to work with new accessors.
7917 (gs_assign_operand_lhs, gs_assign_operand_rhs,
7918 gs_assign_operand_set_lhs, gs_assign_set_rhs,
7919 gs_assign_operand_rhs2, gs_assign_set_rhs2, gs_call_fn,
7920 gs_call_set_fn, gs_call_lhs, gs_call_set_lhs,
7921 gs_call_chain, gs_call_set_chain, gs_call_nargs,
7922 gs_call_set_nargs, gs_call_arg, gs_call_set_arg,
7923 gs_cond_lhs, gs_cond_set_lhs, gs_cond_rhs,
7924 gs_cond_set_rhs, gs_cond_true_label,
7925 gs_cond_set_true_label, gs_cond_set_false_label,
7926 gs_cond_false_label, gs_label_label, gs_label_set_label,
7927 gs_goto_dest, gs_goto_set_dest, gs_bind_vars,
7928 gs_bind_set_vars, gs_bind_body, gs_bind_set_body,
7929 gs_asm_ni, gs_asm_set_ni, gs_asm_no, gs_asm_set_no,
7930 gs_asm_nc, gs_asm_set_nc, gs_asm_in_op, gs_asm_set_in_op,
7931 gs_asm_out_op, gs_asm_set_out_op, gs_asm_clobber_op,
7932 gs_asm_set_clobber_op, gs_asm_string, gs_asm_set_string,
7933 gs_catch_types, gs_catch_handler, gs_catch_set_types,
7934 gs_catch_set_handler, gs_eh_filter_types,
7935 gs_eh_filter_failure, gs_eh_filter_set_types,
7936 gs_eh_filter_set_failure, gs_try_eval, gs_try_cleanup,
7937 gs_try_set_eval, gs_try_set_cleanup, gs_phi_capacity,
7938 gs_phi_set_capacity, gs_phi_nargs, gs_phi_set_nargs,
7939 gs_phi_result, gs_phi_set_result, gs_phi_arg,
7940 gs_phi_set_arg, gs_resx_region, gs_resx_set_region,
7941 gs_switch_nlabels, gs_switch_set_nlabels,
7942 gs_switch_index, gs_switch_set_index,
7943 gs_switch_default_label, gs_switch_set_default_label,
7944 gs_switch_label, gs_switch_set_label, gs_omp_body,
7945 gs_omp_set_body, gs_omp_critical_name,
7946 gs_omp_critical_set_name, gs_omp_for_clauses,
7947 gs_omp_for_set_clauses, gs_omp_for_index,
7948 gs_omp_for_set_index, gs_omp_for_initial,
7949 gs_omp_for_set_initial, gs_omp_for_final,
7950 gs_omp_for_set_final, gs_omp_for_incr,
7951 gs_omp_for_set_incr, gs_omp_for_pre_body,
7952 gs_omp_for_set_pre_body, gs_omp_parallel_clauses,
7953 gs_omp_parallel_set_clauses, gs_omp_parallel_child_fn,
7954 gs_omp_parallel_set_child_fn, gs_omp_parallel_data_arg,
7955 gs_omp_parallel_set_data_arg, gs_omp_single_clauses,
7956 gs_omp_single_set_clauses, gs_omp_sections_clauses,
7957 gs_omp_sections_set_clauses, gs_assign_omp_for_cond,
7958 gs_omp_for_cond gs_return_set_retval,
7959 gs_add_subcode_flag): New accessor functions.
7960 (gs_return_retval): Renamed gs_return_operand_retval to match accessor
7961 conventions.
7962
79632007-05-31 Aldy Hernandez <aldyh@redhat.com>
7964
7965 * gimple-ir.c (gs_build_call): New.
7966 * gimple-ir.h (GS_CALL_LHS): New.
7967 (GS_CALL_FN): New.
7968 (GS_CALL_CHAIN): New.
7969 (GS_CALL_NARGS): New.
7970 (GS_CALL_ARG): New.
7971 (gs_call_lhs): New.
7972 (gs_call_fn): New.
7973 (gs_call_chain): New.
7974 (gs_call_nargs): New.
7975 (gs_call_arg): New.
7976 * gimplify.c (gimplify_modify_expr_to_memcpy): Enable and rewrite for
7977 tuples.
7978 (gimplify_modify_expr_to_memset): Same.
7979 (gimplify_statement_list): Same.
7980 (gimplify_expr): Enable STATEMENT_LIST case.
7981
79822007-05-29 Aldy Hernandez <aldyh@redhat.com>
7983
7984 Merged revisions 124007-125166 from mainline.
7985
79862007-05-23 Aldy Hernandez <aldyh@redhat.com>
7987
7988 * builtins.c (std_gimplify_va_arg_expr): Add argument to gimplify_expr.
7989 Remove seq argument.
7990 (gimplify_va_arg_expr): Same.
7991 * tree-gimple.h: Same.
7992 * langhooks.c (lhd_gimplify_expr): Change pre_p and post_p types to
7993 sequences.
7994 * langhooks-def.h (lhd_gimplify_expr): Change
7995 * langhooks.h (struct lang_hooks): Remove argument.
7996 * gimplify.c (internal_get_tmp_var): Adjust calls to gimplify_expr
7997 for new arguments.
7998 (gimplify_switch_expr): Same.
7999 (gimplify_var_or_parm_decl): Same.
8000 (gimplify_compound_lval): Same.
8001 (gimplify_self_mod_expr): Same.
8002 (gimplify_arg): Same.
8003 (gimplify_call_expr): Same.
8004 (gimplify_init_ctor_preeval): Same.
8005 (gimplify_init_constructor): Same.
8006 (gimplify_modify_expr_rhs): Same.
8007 (gimplify_modify_expr): Same.
8008 (gimplify_save_expr): Same.
8009 (gimplify_addr_expr): Same.
8010 (gimplify_asm_expr): Same.
8011 (gimplify_target_expr): Same.
8012 (omp_check_private): Same.
8013 (gimplify_scan_omp_clauses): Same.
8014 (gimplify_omp_parallel): Same.
8015 (gimplify_omp_for): Same.
8016 (goa_stabilize_expr): Same.
8017 (gimplify_omp_atomic): Same.
8018 (gimplify_one_sizepos): Same.
8019 (force_gimple_operand): Same.
8020 (gimplify_expr): Remove seq_p argument. Add new is_statement
8021 argument. Adjust accordingly. Make seq_p required.
8022
80232007-05-07 Aldy Hernandez <aldyh@redhat.com>
8024
8025 * function.c (gimplify_parameters): Use new GS_SEQ_INIT definition.
8026 * gimple-ir.h (GS_SEQ_INIT): Do not use C99 constructs.
8027 * gimplify.c: Disable non working code throughout.
8028 Pass additional call to gimplify_expr throughout.
8029 (gimplify_ctx): Make conditional_cleanups a sequence.
8030 (gimple_push_condition): Use GS_SEQ_EMPTY_P.
8031 (gimple_pop_condition): Adapt for sequences.
8032 (gimplify_and_add): Use gs_seq_append regardless of side effects.
8033 (internal_get_tmp_var): Use sequences.
8034 (get_formal_tmp_var): Same.
8035 (get_initialized_tmp_var): Same.
8036 (annotate_one_with_locus): Change GS_LOCUS to GS_LOCUS_EMPTY_P.
8037 (gimplify_bind_expr): Use sequences.
8038 Change append_to_statement_list to gimplify_and_add.
8039 (gimplify_return_expr): Add gimplified code to pre_p.
8040 (gimplify_decl_expr): New seq_p parameter.
8041 (gimplify_loop_expr): Adapt for sequences.
8042 Use gimplify_and_add instead of append_to_statement_list.
8043 (gimplify_switch_expr): Same.
8044 (gimplify_compound_lval): Use sequences.
8045 (gimplify_self_mod_expr): Same.
8046 Use gs_seq_append instead of append_to_statement_list.
8047 (gimplify_arg): Use sequences.
8048 (gimplify_call_expr): Same.
8049 (gimplify_cond_expr): Use sequences.
8050 (gimplify_init_ctor_preeval): Use sequences.
8051 (gimplify_init_ctor_eval_range): Same.
8052 Use gimplify_and_add instead of append_to_statement_list.
8053 (gimplify_init_ctor_eval): Use sequences.
8054 (gimplify_init_constructor): Same.
8055 Remove one call to append_to_statement_list.
8056 (gimplify_modify_expr_rhs): Use sequences.
8057 (gimplify_modify_expr_complex_part): Use sequences.
8058 Remove call to tree_to_gimple_tuple.
8059 Build GS_ASSIGN tuple.
8060 (gimplify_modify_expr): Use new argument. Use sequences.
8061 Do not call append_to_statement_list.
8062 Build GS_ASSIGN tuple.
8063 Do not call tree_to_gimple_tuple.
8064 Set *expr_p to NULL when we do not want the value.
8065 (gimplify_compound_expr): Use sequences.
8066 (gimplify_save_expr): Same.
8067 (gimplify_addr_expr): Same.
8068 (gimplify_asm_expr): Same.
8069 (gimplify_cleanup_point_expr): Same.
8070 (gimple_push_cleanup): Same.
8071 Build GS_ASSIGN tuples.
8072 (gimplify_target_expr): Use sequences.
8073 (gimplify_scan_omp_clauses): Same.
8074 Add argument to gimplify_stmt calls.
8075 (gimplify_omp_parallel): Same.
8076 (gimplify_omp_for): Use sequences.
8077 (gimplify_omp_workshare): Same.
8078 (goa_stabilize_expr): Same.
8079 (gimplify_omp_atomic_pipeline): Same.
8080 (gimplify_omp_atomic_mutex): Same.
8081 (gimplify_omp_atomic): Same.
8082 (gimplify_expr): Same.
8083 Call GS_SEQ_INIT with argument.
8084 Use new seq_p argument.
8085 Do not call tree_to_gimple_tuple.
8086 Pass additional argument to gimplify_decl_expr.
8087 Do not pass seq_p argument to gimplify_return_expr.
8088 Call gs_seq_append instead of append_to_statement_list.
8089 Check that all statements have been converted to tuples.
8090 Make pre_p and seq_p sequences coexist.
8091 (gimplify_type_sizes): Use sequences.
8092 (gimplify_one_sizepos): Same.
8093 (gimplify_body): Make parm_stmts a sequence.
8094 Add argument to seq_p.
8095 (gimplify_function_tree): Call debug_gimple_seq.
8096 (force_gimple_operand): Use sequences.
8097 (force_gimple_operand_bsi): Use sequences.
8098
80992007-05-04 Aldy Hernandez <aldyh@redhat.com>
8100
8101 * omp-low.c (build_omp_barrier): Adjust arguments for sequences.
8102 (lower_rec_input_clauses): Disable non working code.
8103 (lower_regimplify): Pass additional argument to gimplify_expr.
8104 * tree-mudflap.c (mx_register_decls): Disable non working code.
8105 * tree-inline.c (copy_bb): Disable non working code.
8106 (setup_one_parameter): Same.
8107 * tree-cfg.c (make_edges): Same.
8108
81092007-05-04 Aldy Hernandez <aldyh@redhat.com>
8110
8111 * tree-gimple.h (get_initialized_tmp_var): Adjust prototype
8112 for sequences.
8113 (get_formal_tmp_var): Same.
8114 (gimplify_type_sizes): Same.
8115 (gimplify_one_sizepos): Same.
8116 (gimplify_stmt): Same.
8117 (gimplify_and_add): Same.
8118 (gimplify_va_arg_expr): Same.
8119 * langhooks.h (lang_hooks): Same.
8120 * function.c (gimplify_parm_type): Adjust for sequences.
8121 (gimplify_parameters): Same.
8122 * c-gimplify.c (gimplify_compound_literal_expr): Same.
8123 (c_gimplify_expr): Same.
8124 * tree-flow.h (force_gimple_operand): Same.
8125 * c-common.h (c_gimplify_expr): Adjust prototype for sequences.
8126 * config/i386/i386.c (ix86_gimplify_va_arg): Adjust for sequences.
8127 Change call to append_to_statement_list to gimplify_and_add.
8128 Add parameter to gimplify_expr.
8129
81302007-05-04 Aldy Hernandez <aldyh@redhat.com>
8131
8132 * gimple-ir.c (gs_code_name): Constify.
8133 (gs_build_assign): New.
8134 (gimple_statement_structure): Abstract code out to...
8135 (gss_for_assign): ...here.
8136 (gs_add): Set the last item correctly.
8137 * gimple-ir.h (GS_LOCUS_EMPTY_P): New.
8138 (GS_SEQ_INIT): Add a cast.
8139 (gimple_statement_base): Make code a gs_code enum.
8140 (gimple_statement_with_ops): Remove address_taken.
8141 (GS_ASSIGN_BINARY_LHS): New.
8142 (GS_ASSIGN_BINARY_RHS1): New.
8143 (GS_ASSIGN_BINARY_RHS2): New.
8144 (GS_ASSIGN_UNARY_REG_LHS): New.
8145 (GS_ASSIGN_UNARY_REG_RHS): New.
8146 (GS_ASSIGN_UNARY_MEM_LHS): New.
8147 (GS_ASSIGN_UNARY_MEM_RHS): New.
8148 (gs_seq_append): New.
8149 Move gs_seq typedef to...
8150 * coretypes.h: ...here.
8151 * gimple-iterator.h (gsi_stmt_ptr): Add FIXME note.
8152
81532007-05-04 Aldy Hernandez <aldyh@redhat.com>
8154
8155 * tree.h (std_gimplify_va_arg_expr): Change tree * to a sequence
8156 in prototype.
8157 (gimplify_parameters): Return a sequence.
8158 * target.h (gimplify_va_arg_expr): Change tree * to a sequence.
8159 * builtins.c (std_gimplify_va_arg_expr): Same.
8160 Pass additional argument to gimplify_expr.
8161 (gimplify_va_arg_expr): Change tree * to a sequence.
8162 Change append_to_statement_list call to gimplify_and_add.
8163 Pass additional argument to gimplify_expr calls.
8164
81652007-05-04 Aldy Hernandez <aldyh@redhat.com>
8166
8167 * tree-pretty-print.c (do_gs_niy): New.
8168 (debug_gimple_stmt): New.
8169 (debug_gimple_seq): New.
8170 (print_gimple_stmt): New.
8171 (dump_gimple_stmt): New.
8172 * diagnostic.h: Add prototypes for dump_gimple_stmt,
8173 print_gimple_stmt, debug_gimple_stmt, debug_gimple_seq.
8174
81752007-04-26 Aldy Hernandez <aldyh@redhat.com>
8176
8177 * tree-gimple.h (annotate_all_with_locus): First argument is now a
8178 sequence.
8179 * gimple-ir.h (GS_LOCUS): New.
8180 (gimple_statement_base): Locus is of type location_t.
8181 * gimplify.c (internal_get_tmp_var): Use sequences.
8182 (should_carry_locus_p): Adjust for gimple ir.
8183 (annotate_one_with_locus): Same.
8184 (annotate_all_with_locus): Same.
8185 (gimplify_stmt): Adjust for sequences.
8186 (gimplify_expr): Same.
8187
81882007-04-25 Aldy Hernandez <aldyh@redhat.com>
8189
8190 * gimple-ir.h (GS_SEQ_EMPTY_P): New.
8191 Move gs_build_return, gs_add, and gimple_statement_structure
8192 prototypes.
8193 (gs_assign_operand): Fix typos in gss.
8194 Include gimple-iterator.h.
8195 * Makefile.in (GIMPLE_IR_H): Add gimple-iterator.h.
8196 (TREE_GIMPLE_H): Same.
8197
81982007-04-25 Aldy Hernandez <aldyh@redhat.com>
8199
8200 * gimple-iterator.h (gsi_one_before_end_p): Use GS_SEQ_LAST.
8201
82022007-04-25 Aldy Hernandez <aldyh@redhat.com>
8203
8204 * gimple-iterator.h: New file.
8205
82062007-04-23 Aldy Hernandez <aldyh@redhat.com>
8207
8208 * gimple-ir.c: New file.
8209 * gimple-ir.h: New file.
8210 * gsstruct.def: New file.
8211 * gs.def: New file.
8212 * gengtype.c (open_base_files): Add gimple-ir.h.
8213 * tree-gimple.h: Include gimple-ir.h.
8214 Add sequence to gimplify_expr and gimplify_body prototypes.
8215 * gimplify.c: Include gimple-ir.h.
8216 (gimplify_and_add): Adjust for gimple IR.
8217 (gimplify_return_expr): Same.
8218 (gimplify_stmt): Add seq_p argument.
8219 (gimplify_expr): Add seq_p sequence and adjust accordingly.
8220 (gimplify_body): Same.
8221 * coretypes.h: Add gimple_statement_d and gimple definitions.
8222 * Makefile.in (GIMPLE_IR_H): New.
8223 (TREE_GIMPLE_H): Add gimple-ir.h.
8224 (OBJS-common): Add gimple-ir.o.
8225 (gimplify.o): Add GIMPLE_IR_H.
8226 (gimple-ir.o): New.
8227 (build/gencheck.o): Add gs.def.
8228
8229Local Variables:
8230mode: change-log
8231End:
ad41bd84
JM
8232
8233\f
d1e082c2 8234Copyright (C) 2007-2008 Free Software Foundation, Inc.
ad41bd84
JM
8235
8236Copying and distribution of this file, with or without modification,
8237are permitted in any medium without royalty provided the copyright
8238notice and this notice are preserved.