blob: a43bf1a5fb9197d72e3bdd6cf99a079e2071ea21 [file] [log] [blame]
</
2008-07-28 Richard Guenther <rguenther@suse.de>
Merge with mainline @138201.
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
2008-07-27 Jakub Jelinek <jakub@redhat.com>
* omp-low.c (expand_omp_atomic_fetch_op): Fix a merge glitch.
2008-07-27 Andrew Pinski <andrew_pinski@playstation.sony.com>
* config/spu/spu.c (spu_gimplify_va_arg_expr): Unshare the args
and skip trees.
2008-07-27 Richard Guenther <rguenther@suse.de>
* tree-eh.c (lookup_expr_eh_region): Do not allocate a tree
annotation.
* tree-dfa.c (create_tree_common_ann): Set eh region to -1.
* tree-flow.h (struct tree_ann_common_d): Reorder rn member
to pack with type.
2008-07-26 Richard Guenther <rguenther@suse.de>
Merge with mainline @138159.
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
2008-07-26 Richard Guenther <rguenther@suse.de>
* gimple.h (CALL_STMT_CANNOT_INLINE_P): Remove.
2008-07-26 Jan Hubicka <jh@suse.cz>
* ipa-inline.c (cgraph_decide_inlining_of_small_function): Use
gimple_call_set_cannot_inline.
(cgraph_decide_inlining): Likewise.
(cgraph_decide_inlining_incrementally): Likewise.
2008-07-26 Richard Guenther <rguenther@suse.de>
Merge with mainline @138092.
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
2008-07-26 Richard Guenther <rguenther@suse.de>
Merge with mainline @138091.
2008-07-25 Richard Guenther <rguenther@suse.de>
* config/ia64/ia64.c (ia64_gimplify_va_arg): Unshare valist
before reusing it.
2008-07-25 Andreas Krebbel <krebbel1@de.ibm.com>
* tree-tailcall.c (process_assignment): Prevent tail call
optimization if the modes of the return types don't match.
2008-07-24 Aldy Hernandez <aldyh@redhat.com>
* tree-inline.c (expand_call_inline): Allow casts in assert.
2008-07-24 Richard Guenther <rguenther@suse.de>
PR middle-end/36885
* tree.c (walk_tree_1): Also walk CHANGE_DYNAMIC_TYPE_EXPR operands.
* gimple.c (gss_for_code): GIMPLE_CHANGE_DYNAMIC_TYPE is GSS_WITH_OPS.
* gsstruct.def (GSS_CHANGE_DYNAMIC_TYPE): Remove.
2008-07-24 Richard Guenther <rguenther@suse.de>
* tree-sra.c (sra_walk_expr): Also handle CONVERT_EXPR.
(sra_walk_gimple_assign): Correctly detect assigns we can handle.
* expr.c (expand_expr_real_1): Pass MOVE_NONTEMPORAL to
expand_assignment.
2008-07-23 Richard Guenther <rguenther@suse.de>
* tree-ssa-dse.c (get_kill_of_stmt_lhs): Tuplify correct.
* gimple-pretty-print.c (dump_gimple_label): Dump non-local flag.
* tree.h (maybe_fold_stmt_addition): Declare.
* tree-ssa-ccp.c (maybe_fold_stmt_addition): Export.
(fold_gimple_assign): Return the new rhs instead of modifying the stmt.
(fold_stmt): Deal with that.
(fold_stmt_inplace): Only replace the rhs of a statement if
that has enough operand space to hold the new operands.
* tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Fix
POINTER_PLUS_EXPR handling.
2008-07-23 Richard Guenther <rguenther@suse.de>
* tree-eh.c (record_in_goto_queue): Fix bootstrap with
--disable-checking.
2008-07-23 Aldy Hernandez <aldyh@redhat.com>
Merge with mainline @138071.
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
2008-07-23 Richard Guenther <rguenther@suse.de>
* tree-eh.c (union treemple): Add tree * member.
(find_goto_replacement): Adjust.
(replace_goto_queue_cond_clause): Use the address of the
individual labels as unique identifier.
(replace_goto_queue_1): Use the statement as unique identifier
for GIMPLE_GOTO.
(record_in_goto_queue): Add checking.
(record_in_goto_queue_label): Adjust.
(maybe_record_in_goto_queue): Likewise.
(do_goto_redirection): Get leh_tf_state.
(lower_try_finally_nofallthru): Pass it.
(lower_try_finally_onedest): Likewise.
(lower_try_finally_copy): Likewise.
(lower_try_finally_switch): Likewise.
2008-07-22 Aldy Hernandez <aldyh@redhat.com>
Jakub Jelinek <jakub@redhat.com>
* gimplify.c (gimple_do_not_emit_location_p): New.
(gimple_set_do_not_emit_location): New.
(annotate_one_with_location): Do not annotate if
gimple_do_not_emit_location_p.
(gimplify_cond_expr): Do not optimize if the COND_EXPR and
GOTO_EXPR have different locations.
Do not emit location information for some GIMPLE_COND's.
2008-07-22 Richard Guenther <rguenther@suse.de>
* tree-ssa-ccp.c (ccp_fold): Use gimple_expr_type.
(fold_gimple_assign): Likewise.
* tree-inline.c (remap_gimple_op_r): Do not set TREE_BLOCK on
non-statements. Recurse to copy_tree_body_r with NULL block.
(copy_phis_for_bb): Likewise.
* tree-cfg.c (move_stmt_op): Do not set TREE_BLOCK on
non-statements.
2008-07-22 Diego Novillo <dnovillo@google.com>
Richard Guenther <rguenther@suse.de>
* tree-ssa-dom.c (hashable_expr_equal_p): Do nothing if
either TYPE0 or TYPE1 is NULL.
2008-07-21 Diego Novillo <dnovillo@google.com>
* tree-ssa-alias-warnings.c (struct gimple_tree_map): New.
Change every use of struct tree_map to struct gimple_tree_map.
(gimple_tree_map_eq): New.
(gimple_tree_map_hash): New.
* tree-ssa-ccp.c (evaluate_stmt): Remove stale FIXME note.
* gimplify.c (gimplify_expr): Remove stale FIXME note.
* tree-ssa-pre.c: Remove stale references to GIMPLE_MODIFY_STMT.
* tree-vect-generic.c (expand_vector_operations_1): Change
FIXME tuples to NOTE.
2008-07-21 Richard Guenther <rguenther@suse.de>
* tree-ssa-phiprop.c (propagate_with_phi): Only look through
SSA_NAME copies.
2008-07-21 Richard Guenther <rguenther@suse.de>
* gimplify.c (gimplify_init_constructor): Clear TREE_SIDE_EFFECTS
on the remaining empty constructor.
2008-07-21 Richard Guenther <rguenther@suse.de>
* tree-ssa-ccp.c (fold_gimple_assign): Handle pointer conversions
like fold_stmt_r did.
* gimple-pretty-print.c (dump_gimple_cond): Place semicolons
where trunk did.
* tree-inline.c (copy_bb): Do not insert GIMPLE_NOPs.
2008-07-21 Richard Guenther <rguenther@suse.de>
PR tree-optimization/36826
* tree-ssa-pre.c (eliminate): Do not eliminate in unused
statements.
2008-07-20 Richard Guenther <rguenther@suse.de>
* gimple.h (gimple_expr_type): The expression type is always
the base type of an integral sub-type result type.
* tree-eh.c (replace_goto_queue_cond_clause): Copy the sequence
before handing it off to gsi_insert_seq_after.
* tree-sra.c (insert_edge_copies_seq): Make sure to not keep an
uninserted but marked for update sequence.
2008-07-20 Richard Guenther <rguenther@suse.de>
* gimple.c (DEFTREECODE): Add REALIGN_LOAD_EXPR.
2008-07-19 Richard Guenther <rguenther@suse.de>
* tree-ssa-sccvn.h (get_constant_value_id): Declare.
(vn_constant_eq_with_type): Make sure an integral type is
never equal to a non-integral type.
(vn_hash_constant_with_type): Adjust.
* tree-ssa-sccvn.c (get_constant_value_id): New function.
* tree-ssa-pre.c (get_expr_value_id): For newly created
constant value-ids make sure to add the expression to its
expression-set.
2008-07-18 Jakub Jelinek <jakub@redhat.com>
* gimple.c (gimple_regimplify_operands): Moved to...
* gimplify.c (gimple_regimplify_operands): ... here. Rework using
lower_omp_1 regimplification code, if regimplified LHS of
GIMPLE_ASSIGN or GIMPLE_CALL requires simpler RHS, create a temporary.
* omp-low.c (gimple_regimplify_operands): Use
gimple_regimplify_operands.
2008-07-18 Richard Guenther <rguenther@suse.de>
* tree-ssa-reassoc.c (get_rank): For single rhs process its
operands.
2008-07-18 Richard Guenther <rguenther@suse.de>
* tree-ssa-loop-niter.c (expand_simple_operations): Expand
as much as trunk does.
* tree-ssa-sccvn.c (simplify_binary_expression): For comparisons
always expand the first operand.
2008-07-18 Jakub Jelinek <jakub@redhat.com>
* gimple-pretty-print.c (dump_gimple_cond): Print a semicolon if
goto or else goto has been printed.
(dump_gimple_goto): Print as goto instead of gimple_goto, print
a semicolon at the end.
(dump_gimple_asm): Print a semicolon at the end.
* gimplify.c (gimplify_cond_expr): If COND_EXPR has both non-trivial
THEN and ELSE statements and the THEN sequence can't fallthru, avoid
adding label_cont and jump to it.
2008-07-18 Aldy Hernandez <aldyh@redhat.com>
* Makefile.in. Remove TREE_GIMPLE_H definition.
Rename all TREE_GIMPLE_H uses to GIMPLE_H.
Depend on tree-iterator.h when necessary.
* tree-into-ssa.c: Include gimple.h instead of tree-gimple.h.
* tree-complex.c: Same.
* cgraphbuild.c: Same.
* cgraph.c: Same.
* builtins.c: Same.
* tree-ssa-sccvn.c: Same.
* tree-ssa-copyrename.c: Same.
* tree-nomudflap.c: Same.
* tree-call-cdce.c: Same.
* ipa-pure-const.c: Same.
* ipa-utils.c: Same.
* tree-ssa-alias.c: Same.
* tree-ssa-sink.c: Same.
* langhooks.c: Same.
* function.c: Same.
* ipa-type-escape.c: Same.
* tree-affine.c: Same.
* c-typeck.c: Same.
* tree-dfa.c: Same.
* tree-ssa-pre.c: Same.
* tree-sra.c: Same.
* c-omp.c: Same.
* tree-ssa-dce.c: Same.
* tree-nested.c: Same.
* tree-ssa.c: Same.
* tree-inline.c: Same.
* tree-iterator.c: Same.
* c-gimplify.c: Same.
* tree-vect-generic.c: Same.
* tree-flow.h: Same.
* tree-ssa-structalias.c: Same.
* ipa-struct-reorg.c: Same.
* tree-ssa-reassoc.c: Same.
* config/alpha/alpha.c: Same.
* config/s390/s390.c: Same.
* config/m32c/m32c.c: Same.
* config/spu/spu.c: Same.
* config/sparc/sparc.c: Same.
* config/i386/i386.c: Same.
* config/sh/sh.c: Same.
* config/xtensa/xtensa.c: Same.
* config/stormy16/stormy16.c: Same.
* config/ia64/ia64.c: Same.
* config/rs6000/rs6000: Same.
* config/mips/mips.c: Same.
* varpool.c: Same.
* cgraphunit.c: Same. Include tree-iterator.h
* tree-mudflap.c: Same.
* gimplify.c: Same.
* c-decl.c: Same.
* omp-low.c: Same.
* c-semantics: Same.
* gimple-low.c: Same.
* tree-gimple.c: Merge contents into...
* gimple.c: ...here.
* tree-gimple.h: Merge contents into...
* gimple.h: ...here.
2008-07-17 Jakub Jelinek <jakub@redhat.com>
* omp-low.c (expand_omp_atomic_pipeline): Call
force_gimple_operand_gsi on RHS for IADDR initialization.
* gimplify.c (gimplify_cond_expr): Push statements in between
gimple_push_condition and gimple_pop_condition into a new
gimple_seq, append it after gimple_pop_condition cleanups.
2008-07-17 Richard Guenther <rguenther@suse.de>
* tree-complex.c (init_dont_simulate_again): Handle
{REAL,IMAG}PART_EXPR correctly.
* gimple-pretty-print.c (dump_unary_rhs): Dump VIEW_CONVERT_EXPR
and ASSERT_EXPR the same way as on trunk.
* tree-ssa-dom.c (initialize_hash_element): Do not record
the type for single rhs assigns.
(hashable_expr_equal_p): Deal with NULL types.
(eliminate_redundant_computations): Use print_gimple_expr.
* tree-vrp.c (stmt_interesting_for_vrp): Fix builtin call check.
(vrp_visit_stmt): Likewise.
* tree-ssa-forwprop.c (simplify_gimple_switch): Fix typo.
2008-07-16 Richard Guenther <rguenther@suse.de>
PR tree-optimization/36792
* tree-ssa-pre.c (get_or_alloc_expr_for): Handle unary
expressions inserted by SCCVN.
(do_SCCVN_insertion): Adjust comment.
(execute_pre): Allow insertion for FRE again.
* tree-ssa-sccvn.c (simplify_unary_expression): Deal with
the GIMPLE_SINGLE_RHS statemens we get.
(init_scc_vn): Init VN_INFO->expr to NULL.
2008-07-16 Richard Guenther <rguenther@suse.de>
Revert
2008-07-16 Richard Guenther <rguenther@suse.de>
* tree-ssa-pre.c (get_constant_for_value_id): Only hand out
constants of the correct type.
(fully_constant_expression): Pass the required type to
get_constant_for_value_id.
* tree-ssa-sccvn.h (vn_hash_constant_with_type): New function.
(vn_constant_eq_with_type): Likewise.
* tree-ssa-sccvn.c (vn_constant_eq): Use vn_constant_eq_with_type.
(get_or_alloc_constant_value_id): Use vn_hash_constant_with_type.
* tree-ssa-pre.c (pre_expr_eq): Use vn_constant_eq_with_type.
(pre_expr_hash): Use vn_hash_constant_with_type.
(get_representative_for): Use constants as their representative.
(fully_constant_expression): Use constant parts in expressions
directly.
2008-07-15 Aldy Hernandez <aldyh@redhat.com>
* tree-ssa-propagate.c (valid_gimple_expression_p): Remove.
* tree-ssa-propagate.h (valid_gimple_expression_p): Remove.
* tree-eh.c: Factor out common code in operation_could_trap_p and
stmt_could_throw_1_p into...
(operation_could_trap_helper_p): New.
* gimplify.c (gimplify_expr): Rephrase fixme.
* tree-mudflap.c: Remove fixme.
2008-07-17 Jakub Jelinek <jakub@redhat.com>
* tree-eh.c (collect_finally_tree): Call collect_finally_tree_1
with region as second argument for GIMPLE_TRY_FINALLY's cleanup.
* gimplify.c (gimplify_expr): Call gimple_try_set_catch_is_cleanup
for TRY_CATCH_EXPR.
2008-07-16 Jakub Jelinek <jakub@redhat.com>
* tree-gimple.c (is_gimple_reg_rhs): Don't check for CALL_EXPRs
with side-effects.
* gimple.c (extract_ops_from_tree): Remove assert.
* gimplify.c (is_gimple_reg_or_call_rhs): New function.
(rhs_predicate_for): Return it instead of is_gimple_reg_rhs.
(gimplify_expr): Handle is_gimple_reg_or_call_rhs.
* tree-ssa-threadedge.c (record_temporary_equivalences_for_stmts,
simplify_control_stmt_condition): Pass stmt instead of NULL as second
argument to simplify callback.
* tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
gimple_call_set_lhs with lhs of last_stmt.
* tree-vect-transform.c (vectorizable_call): Build a new dummy
assignment, replace the call with it and move over stmt_info.
* tree-ssa-loop-niter.c (infer_loop_bounds_from_array): Use
is_gimple_assign instead of gimple_code () == GIMPLE_ASSIGN and
is_gimple_call instead of gimple_code () == GIMPLE_CALL.
* tree-ssa-propagate.c (update_call_from_tree, substitute_and_fold):
Likewise.
* tree-ssa-sccvn.c (visit_use): Likewise.
* tree-eh.c (stmt_could_throw_p): Likewise.
* tree-optimize.c (execute_fixup_cfg): Likewise.
* omp-low.c (check_omp_nesting_restrictions, scan_omp_1_stmt,
optimize_omp_library_calls): Likewise.
* tree-ssa-loop-im.c (movement_possibility, stmt_cost,
determine_invariantness_stmt): Likewise.
* tree-ssa-phiprop.c (phivn_valid_p, phiprop_insert_phi,
propagate_with_phi): Likewise.
* tree-ssa-ccp.c (get_default_value, surely_varying_stmt_p,
ccp_fold_builtin, gimplify_and_update_call_from_tree): Likewise.
* ipa-struct-reorg.c (is_result_of_mult, create_general_new_stmt):
Likewise.
* tree-ssa-coalesce.c (build_ssa_conflict_graph): Likewise.
* tree-object-size.c (alloc_object_size, call_object_size,
check_for_plus_in_loops): Likewise.
* tree-ssa.c (verify_ssa): Likewise.
* predict.c (expr_expected_value_1, tree_bb_level_predictions,
tree_estimate_probability): Likewise.
* tree-cfg.c (verify_stmt): Likewise.
* tree-ssa-loop-ch.c (should_duplicate_loop_header_p,
copy_loop_headers): Likewise.
* tree-ssa-ter.c (is_replaceable_p): Likewise.
* ipa-prop.c (ipa_count_arguments, ipa_compute_jump_functions):
Likewise.
* tree-ssa-dom.c (gimple_assign_unary_useless_conversion_p,
record_equivalences_from_stmt, optimize_stmt,
get_lhs_or_phi_result): Likewise.
* tree-ssa-sink.c (is_hidden_global_store): Likewise.
* tree-nrv.c (tree_nrv, execute_return_slot_opt): Likewise.
* value-prof.c (gimple_divmod_fixed_value,
gimple_mod_pow2, gimple_mod_subtract): Likewise.
* tree-predcom.c (name_for_ref, find_looparound_phi,
replace_ref_with, remove_name_from_operation): Likewise.
* tree-ssa-math-opts.c (is_division_by, execute_cse_reciprocals,
execute_cse_sincos, execute_convert_to_rsqrt): Likewise.
* tree-complex.c (expand_complex_move, expand_complex_operations_1):
Likewise.
* tree-outof-ssa.c (identical_copies_p): Likewise.
* tree-ssa-pre.c (is_exception_related): Likewise.
* tree-sra.c (scalarize_use, scalarize_copy): Likewise.
* tree-ssa-alias.c (count_uses_and_derefs, update_alias_info_1,
is_escape_site): Likewise.
* lambda-code.c (can_put_in_inner_loop,
cannot_convert_bb_to_perfect_nest): Likewise.
* tree-tailcall.c (find_tail_calls, eliminate_tail_call): Likewise.
* ipa-type-escape.c (look_for_casts_stmt, is_cast_from_non_pointer):
Likewise.
* tree-vect-transform.c (vectorizable_reduction): Likewise.
* tree-ssa-threadedge.c (record_temporary_equivalences_from_stmts):
Likewise.
* tree-ssa-phiopt.c (nt_init_block): Likewise.
* tree-ssa-structalias.c (find_func_aliases): Likewise.
* tree-ssa-forwprop.c (can_propagate_from,
forward_propagate_comparison, simplify_not_neg_expr,
simplify_gimple_switch, tree_ssa_forward_propagate_single_use_vars):
Likewise.
* tree-ssa-dce.c (eliminate_unnecessary_stmts): Likewise.
* tree-ssa-dse.c (get_kill_of_stmt_lhs, dse_possible_dead_store_p,
dse_optimize_stmt, execute_simple_dse): Likewise.
* tree-ssa-loop-ivopts.c (find_interesting_uses_op,
find_interesting_uses_stmt, rewrite_use_nonlinear_expr): Likewise.
* tree-vrp.c (stmt_overflow_infinity, vrp_stmt_computes_nonzero,
register_edge_assert_for_2, register_edge_assert_for,
find_assert_locations, check_all_array_refs,
remove_range_assertions, stmt_interesting_for_vrp, vrp_visit_stmt,
simplify_stmt_using_ranges): Likewise.
* tree-ssa-loop-prefetch.c (gather_memory_references): Likewise.
* tree-ssa-copy.c (may_propagate_copy_into_stmt,
propagate_tree_value_into_stmt): Likewise.
* tree-inline.c (copy_bb, expand_call_inline,
gimple_expand_calls_inline, fold_marked_statements): Likewise.
* tree-ssa-copyrename.c (rename_ssa_copies): Use
gimple_assign_ssa_name_copy_p.
* tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Check
gimple_assign_rhs_code, type of rhs is TREE_TYPE (lhs), update
rhs_code.
2008-07-16 Richard Guenther <rguenther@suse.de>
* tree-ssa-pre.c (get_constant_for_value_id): Only hand out
constants of the correct type.
(fully_constant_expression): Pass the required type to
get_constant_for_value_id.
2008-07-15 Aldy Hernandez <aldyh@redhat.com>
Merge with mainline @137837.
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
2008-07-15 Jakub Jelinek <jakub@redhat.com>
* common.opt (-fgimple-conversion=): Remove.
* tree-affine.c (aff_combination_expand): Tuplify.
* cfgexpand.c (gimple_assign_rhs_to_tree): Remove prototype.
* tree-outof-ssa.c (gimple_assign_rhs_to_tree): Likewise.
* tree-gimple.h (gimple_assign_rhs_to_tree): New prototype.
2008-07-15 Aldy Hernandez <aldyh@redhat.com>
* tree.h: Remove gimple_unreachable_1 prototype.
2008-07-15 Aldy Hernandez <aldyh@redhat.com>
* Makefile.in (gimple-dummy.o): Remove.
* gimple-dummy.c: Delete.
* tree-ssa-propagate.c (valid_gimple_expression_p): Change
gimple_unreachable to gcc_unreachable.
* tree-affine.c (aff_combination_expand): Same.
* tree-vect-transform.c (vectorizable_call): Same.
2008-07-15 Richard Guenther <rguenther@suse.de>
* gimplify.c (gimplify_expr): Gimplify an unused volatile load
properly.
2008-07-15 Richard Guenther <rguenther@suse.de>
* tree-ssa-pre.c: Tuplify. Enable FRE and PRE.
(execute_pre): Disable SCCVN insertion even for FRE.
* tree-ssa-sccvn.h (copy_reference_ops_from_call): Declare.
* tree-ssa-sccvn.c (copy_reference_ops_from_call): Export.
(vn_get_expr_for): Handle more expression kinds.
(visit_reference_op_load): Properly set a value id for
inserted names.
(simplify_binary_expression): Use valid_gimple_rhs_p instead of
valid_gimple_expression_p.
(simplify_unary_expression): Likewise.
(process_scc): Clear the cached/simplified expressions at the
start of the iteration.
(free_scc_vn): Do not clear SSA_NAME_VALUE.
(run_scc_vn): Remove broken special case in printing VNs.
* tree-ssa-propagate.c (valid_gimple_rhs_p): Allow
gimple-min-invariants and SSA names.
2008-07-14 Andreas Krebbel <krebbel1@de.ibm.com>
* config/s390/s390.c: (s390_gimplify_va_arg) Unshare the args* tree.
2008-07-14 Richard Guenther <rguenther@suse.de>
* tree-ssa-math-opts.c (execute_cse_reciprocals): Process
SSA_NAME defs of calls.
* gimple-pretty-print.c (dump_unary_rhs): Do not prefix
CONSTRUCTOR with [constructor].
2008-07-14 Aldy Hernandez <aldyh@redhat.com>
* config/alpha/alpha.c (va_list_skip_additions): Change
GIMPLE_STMT_OPERAND to TREE_OPERAND.
2008-07-14 Jakub Jelinek <jakub@redhat.com>
* tree-vect-transform.c (vect_create_data_ref_ptr): Update comment.
* config/s390/s390.c (s390_va_start): Build MODIFY_EXPR instead of
GIMPLE_MODIFY_STMT.
(s390_gimplify_va_arg): Use gimplify_assign.
* config/sh/sh.c (sh_va_start): Build MODIFY_EXPR instead of
GIMPLE_MODIFY_STMT.
(sh_gimplify_va_arg_expr): Use gimplify_assign.
* config/sparc/sparc.c (sparc_gimplify_va_arg): Likewise.
* config/spu/spu.c (spu_va_start): Build MODIFY_EXPR instead of
GIMPLE_MODIFY_STMT.
(spu_gimplify_va_arg_expr): Use gimplify_assign.
* config/stormy16/stormy16.c (xstormy16_expand_builtin_va_start):
Build MODIFY_EXPR instead of GIMPLE_MODIFY_STMT.
(xstormy16_gimplify_va_arg_expr): Likewise. Use gimplify_assign.
* config/xtensa/xtensa.c (xtensa_va_start): Build MODIFY_EXPR
instead of GIMPLE_MODIFY_STMT.
(xtensa_gimplify_va_arg_expr): Use gimplify_assign.
2008-07-14 Aldy Hernandez <aldyh@redhat.com>
* config/alpha/alpha.c (va_list_skip_additions): Rename
GIMPLE_MODIFY_STMT to MODIFY_EXPR.
(alpha_va_start): Same.
(alpha_gimplify_va_arg_1): Use gimplify_assign.
(alpha_gimplify_va_arg): Same.
* config/frv/frv.c (frv_expand_builtin_va_start): Rename
GIMPLE_MODIFY_STMT to MODIFY_EXPR.
* config/ia64/ia64.c (ia64_gimplify_va_arg): Use gimplify_assign.
* config/alpha/mips.c (mips_va_start): Rename GIMPLE_MODIFY_STMT to
MODIFY_EXPR or use gimplify_assign when appropriate.
(mips_gimplify_va_arg_expr): Same.
2008-07-14 Aldy Hernandez <aldyh@redhat.com>
* config/rs6000/rs6000.c (rs6000_va_start): Change
GIMPLE_MODIFY_STMT to MODIFY_EXPR.
(rs6000_gimplify_va_arg): Use gimplify_assign.
Build GIMPLE_GOTO directly.
2008-07-14 Aldy Hernandez <aldyh@redhat.com>
* tree-dump.c (dequeue_and_dump): Remove GIMPLE_MODIFY_STMT case.
* tree-ssa-loop-niter.c (simplify_replace_tree): Remove GIMPLE_STMT_P
call.
* tree-pretty-print.c (dump_generic_node): Remove any references to
GIMPLE_MODIFY_STMT, GIMPLE_STMT_P, GIMPLE_TUPLE_P.
(op_prio): Same.
(op_symbol_code): Same.
* java/java-gimplify.c (java_gimplify_expr): Same.
(java_gimplify_modify_expr): Same.
* java/java-tree.h: Rename GENERIC_NEXT to TREE_CHAIN.
* tree-tailcall.c (find_tail_calls): Update comment.
* tree.c (tree_code_class_string): Remove "gimple_stmt".
(tree_node_kind): Remove "gimple statments".
(tree_code_size): Remove tcc_gimple_stmt.
(make_node_stat): Same.
(copy_node_stat): Remove any references to
GIMPLE_MODIFY_STMT, GIMPLE_STMT_P, GIMPLE_TUPLE_P, tcc_gimple_stmt,
TS_GIMPLE_STATEMENT, GENERIC_TREE_OPERAND, GENERIC_TREE_TYPE,
GIMPLE_TUPLE_HAS_LOCUS_P, GIMPLE_STMT_LOCUS, GIMPLE_STMT_BLOCK,
IS_GIMPLE_STMT_CODE_CLASS, GIMPLE_STMT_BLOCK.
(expr_align): Same.
(tree_node_structure): Same.
(build2_stat): Same.
(set_expr_locus): Same.
(walk_tree_1): Same.
(tree_block): Same.
(build_gimple_modify_stmt_stat): Remove.
(expr_location): Remove.
(set_expr_location): Remove.
(expr_hash_location): Remove.
(expr_locus): Remove.
(expr_filename): Remove.
(expr_lineno): Remove.
(generic_tree_operand): Remove.
(generic_tree_type): Remove.
* tree.h (tree_code_class): Remove tcc_gimple_stmt.
(IS_GIMPLE_STMT_CODE_CLASS): Remove.
(struct gimple_stmt): Remove.
(GIMPLE_STMT_CHECK): Remove.
(TREE_OPERAND_CHECK): Remove GIMPLE_TUPLE_P.
(TREE_CHAIN): Same.
(GIMPLE_STMT_OPERAND_CHECK): Remove.
(GIMPLE_STMT_OPERAND_CHECK): Remove.
(GIMPLE_STMT_P): Remove.
(GIMPLE_TUPLE_P): Remove.
(GIMPLE_TUPLE_HAS_LOCUS_P): Remove.
(GENERIC_TREE_OPERAND): Remove.
(GENERIC_TREE_TYPE): Remove.
(GENERIC_NEXT): Remove.
(IS_CONVERT_EXPR_CODE_P): Rename GENERIC_TREE_TYPE to TREE_TYPE.
(MOVE_NONTEMPORAL): Remove GIMPLE_MODIFY_STMT_CHECK.
Remove GIMPLE_STMT_OPERAND, GIMPLE_STMT_LOCUS, GIMPLE_STMT_BLOCK.
(EXPR_LOCATION, SET_EXPR_LOCATION, EXPR_HAS_LOCATION, EXPR_LOCUS,
EXPR_FILENAME, EXPR_LINENO): Do ont call functions.
(CAN_HAVE_LOCATION_P): Remove GIMPLE_STMT_P.
(union tree_node): Remove gstmt.
(build_gimple_modify_stmt*): Remove.
(expr_location, set_expr_location, expr_has_location,
expr_locus, expr_filename, expr_lineno, generic_tree_operand,
generic_tree_type): Remove.
* tree-scalar-evolution.c (follow_ssa_edge): Update comment.
(interpret_condition_phi): Same.
* gimple.h (gimplify_assign): New.
* builtins.c, fold-const.c, omp-low.c, tree-ssa-dse.c, tree-gimple.c,
tree-ssa-math-opts.c, tree-nrv.c, gimple-low.c, dwarf2out.c,
expr.c, tree-parloops.c, matrix-reorg.c, c-decl.c, tree-eh.c,
c-pretty-print.c, langhooks.c, function.c, tree-affine.c,
gimplify.c, tree.def, cfgexpand.c, tree-predcom.c, print-tree.c,
tree-ssa-ter.c, tree-ssa.c, tree-inline.c, gimple.c, gimple.h,
tree-cfg.c, config/i386/i386.c, stmt.c, tree-ssa-operands.c)
Remove any references to
GIMPLE_MODIFY_STMT, GIMPLE_STMT_P, GIMPLE_TUPLE_P, tcc_gimple_stmt,
TS_GIMPLE_STATEMENT, GENERIC_TREE_OPERAND, GENERIC_TREE_TYPE,
GIMPLE_TUPLE_HAS_LOCUS_P, GIMPLE_STMT_LOCUS, GIMPLE_STMT_BLOCK,
IS_GIMPLE_STMT_CODE_CLASS, GIMPLE_STMT_BLOCK.
Call gimplify_assign or generate a GIMPLE_ASSIGN directly when
appropriate.
2008-07-14 Jakub Jelinek <jakub@redhat.com>
* cfgexpand.c (gimple_cond_pred_to_tree): New function.
(gimple_to_tree) <case GIMPLE_COND>: Use it.
(release_stmt_tree): New function.
(expand_gimple_cond): Call just gimple_cond_pred_to_tree
instead of gimple_to_tree, ggc_free pred before returning.
(expand_gimple_tailcall): Call release_stmt_tree.
(expand_gimple_basic_block): Call release_stmt_tree instead
of ggc_free.
* gimplify.c (internal_get_tmp_var, gimplify_decl_expr,
gimplify_init_ctor_eval, gimplify_target_expr): Call ggc_free
on the INIT_EXPR.
2008-07-14 Richard Guenther <rguenther@suse.de>
* tree-ssa-ccp.c (ccp_fold): Move ADDR_EXPR handing to
GIMPLE_SINGLE_RHS case.
* tree-ssa-ifcombine.c (ifcombine_iforif): Fix typo.
2008-07-14 Jakub Jelinek <jakub@redhat.com>
* system.h (CONST_CAST2): Avoid using a union for all GCCs <= 4.0.x.
2008-07-12 Diego Novillo <dnovillo@google.com>
* tree-loop-distribution.c: Tuplify.
* tree-ssa-propagate.c (substitute_and_fold): Remove
stale FIXME tuples note.
2008-07-11 Jakub Jelinek <jakub@redhat.com>
* tree-dump.c (dump_options): Don't set TDF_RHS_ONLY for -all.
* omp-low.c (lower_omp_1): Only use rhs_predicate_for if
GIMPLE_SINGLE_RHS.
* tree-vect-analyze.c (vect_determine_vectorization_factor): Handle
GIMPLE_CALL with non-NULL lhs.
(vect_build_slp_tree): Likewise. Fix reversed check for references.
* tree-vectorizer.c (stmt_vec_info_htab, stmt_vec_info_eq,
stmt_vec_info_hash, init_stmt_vec_info_htab,
free_stmt_vec_info_htab): Remove.
(stmt_vec_info_vec): New variable.
(init_stmt_vec_info_vec, free_stmt_vec_info_vec): New functions.
(new_loop_vec_info): Clear stmt uid before calling
set_vinfo_for_stmt.
(vect_is_simple_use): Handle GIMPLE_CALL with non-NULL lhs.
(vectorize_loops): Call {init,free}_stmt_vec_info_vec instead of
{init,free}_stmt_vec_info_htab.
* tree-parloops.c (parallelize_loops): Likewise.
* tree-ssa-operands.c (get_expr_operands): Handle VEC_COND_EXPR.
* tree-vectorizer.h (stmt_vec_info_htab): Removed.
(init_stmt_vec_info_htab, free_stmt_vec_info_htab): Remove
prototypes.
(stmt_vec_info_vec): New extern decl.
(init_stmt_vec_info_vec, free_stmt_vec_info_vec): New prototypes.
(vinfo_for_stmt, set_vinfo_for_stmt): Rewritten using stmt uid
and vector instead of a hash table.
* tree-vect-patterns.c (vect_recog_pow_pattern): Request
a GIMPLE_CALL with non-NULL lhs instead of GIMPLE_ASSIGN.
(vect_pattern_recog_1): Use is_gimple_call instead of comparing
gimple_code with GIMPLE_CALL.
* gimple.c (gimple_rhs_class_table): Use GIMPLE_SINGLE_RHS for
DOT_PROD_EXPR and VEC_COND_EXPR.
* tree-vect-transform.c (vect_get_slp_vect_defs): Use gimple_get_lhs
instead of gimple_assign_lhs.
(get_initial_def_for_induction): Use build_int_cst even for
pointers. Use POINTER_PLUS_EXPR for POINTER_TYPE_P (scalar_type).
(vect_get_vec_def_for_operand): Use is_gimple_call instead of
comparing gimple_code with GIMPLE_CALL.
(vectorizable_call): Likewise. Use gimple_call_lhs instead of
gimple_assign_lhs. Build a vector of arguments, use
gimple_build_call_vec.
(vect_get_vec_def_for_stmt_copy): Use gimple_get_lhs.
(vectorizable_live_operation): Handle GIMPLE_SINGLE_RHS operands.
2008-07-11 Doug Kwan <dougkwan@google.com>
* gimple-dummy.c (vectorizable_induction, vectorizable_type_promotion,
vectorizable_type_demotion, vectorizable_conversion,
vectorizable_operation, vectorizable_assignment,
vectorizable_load, vectorizable_call, vectorizable_store,
vectorizable_condition, vectorizable_reduction,
vectorizable_live_operation, vectorizable_function,
vect_estimate_min_profitable_iters, vect_model_simple_cost,
vect_model_store_cost, vect_model_load_cost, vect_transform_loop):
Remove DUMMY_FNs.
* tree-ssa-loop.c (gate_tree_vectorize): Reenable vectorizer.
* tree-vectorizer.c (vect_is_simple_use): Fix handling of
GIMPLE_NOP.
* tree-vectorizer.h (vectorizable_load, vectorizable_store,
vectorizable_operation, vectorizable_type_promotion,
vectorizable_type_demotion, vectorizable_conversion,
vectorizable_assignment, vectorizable_call, vectorizable_condition,
vectorizable_live_operation, vectorizable_reduction,
vectorizable_induction): Adjust prototypes.
* tree-vect-transform.c (vectorizable_load, vectorizable_store,
vectorizable_operation, vectorizable_type_promotion,
vectorizable_type_demotion, vectorizable_conversion,
vectorizable_assignment, vectorizable_call, vectorizable_condition,
vectorizable_live_operation, vectorizable_reduction,
vectorizable_induction, vect_transform_stmt,
vect_create_data_ref_ptr, vect_create_addr_base_for_vector_ref,
vect_get_vec_def_for_operand, vect_init_vector,
vect_finish_stmt_generation, vect_create_epilog_for_reduction,
get_initial_def_for_reduction, cost_for_stmt,
vect_estimate_min_profitable_iters, vect_model_reduction_cost,
vect_cost_strided_group_size, vect_model_load_cost, bump_vector_ptr,
vect_get_constant_vectors, vect_get_slp_vect_defs,
vect_get_slp_defs, get_initial_def_for_induction,
vect_get_vec_def_for_stmt_copy, vect_get_vec_defs,
vectorizable_function, vect_gen_widened_results_half,
vect_permute_store_chain, vect_setup_realignment,
vect_permute_load_chain, vect_transform_strided_load,
vect_is_simple_cond, vect_build_loop_niters,
vect_generate_tmps_on_preheader, vect_update_ivs_after_vectorizer,
vect_do_peeling_for_loop_bound, vect_gen_niters_for_prolog_loop,
vect_do_peeling_for_alignment, vect_create_cond_for_align_checks,
vect_create_cond_for_alias_checks, vect_loop_versioning,
vect_remove_stores, vect_schedule_slp_instance,
vect_transform_loop): Tuplify.
2008-07-10 Richard Guenther <rguenther@suse.de>
* gimple.h (gimple_assign_ssa_name_copy_p): Declare.
(gimple_has_lhs): New function.
* gimple.c (gimple_assign_ssa_name_copy_p): New function.
* tree-ssa-copy.c (propagate_tree_value_into_stmt): Remove
redundant gimple_set_location call.
* gimple-iterator.c (gsi_remove): Do not free stmt operands.
* tree-ssa-structalias.c (find_func_aliases): Correctly let
all things with pointers escape.
* tree-pass.h (TDF_RHS_ONLY): New flag.
* diagnostic.h (print_gimple_expr): Declare.
* gimple-pretty-print.c (print_gimple_expr): New function.
(dump_gimple_assign): Dump the RHS as expression if TDF_RHS_ONLY.
(dump_gimple_call): Likewise.
(dump_gimple_cond): Likewise.
* tree-ssa-propagate.c (fold_predicate_in): Use print_gimple_expr.
* tree-ssa-sccvn.c (visit_use): Use gimple_has_lhs.
Use print_gimple_expr. Handle tcc_expression correctly.
2008-07-09 Jakub Jelinek <jakub@redhat.com>
* gimplify.c (struct gimplify_ctx): Move to tree-gimple.h.
(push_gimplify_context): Don't allocate bind_expr_stack,
temp_htab nor c itself here. Add c argument.
(pop_gimplify_context): Allow bind_expr_stack being NULL. Check
c->temp_htab instead of optimize whether htab_delete should be called.
Don't free c.
(gimple_push_bind_expr): Create bind_expr_stack lazily.
(lookup_tmp_var): Create temp_htab lazily.
(gimplify_scan_omp_clauses, gimplify_omp_parallel, gimplify_omp_task,
gimplify_body, force_gimple_operand): Adjust push_gimplify_context
callers.
* omp-low.c (lower_omp_sections, lower_omp_single, lower_omp_master,
lower_omp_ordered, lower_omp_critical, lower_omp_for,
create_task_copyfn, lower_omp_taskreg, execute_lower_omp):
* tree-ssa-ccp.c (gimplify_and_update_call_from_tree): Likewise.
* tree-sra.c (generate_element_init): Likewise.
* tree-mudflap.c (execute_mudflap_function_ops,
execute_mudflap_function_decls): Likewise.
* tree-inline.c (setup_one_parameter, optimize_inline_calls): Likewise.
* tree-gimple.h (struct gimplify_ctx): New type.
(push_gimplify_context): Adjust prototype.
* gimple.h (gimple_rhs_class_table): New extern decl.
(get_gimple_rhs_class): Change into inline.
* gimple.c (get_gimple_rhs_class): Removed.
(gimple_rhs_class_table): New variable.
2008-07-09 Doug Kwan <dougkwan@google.com>
Diego Novillo <dnovillo@google.com>
* tree-ssa-ccp.c (fold_stmt_r): Remove gcc_unreachable
call from COND_EXPR handler.
* tree-if-conv.c: Tuplify.
* gimple.c (gimple_could_trap_p_1): Factor out of ...
(gimple_could_trap_p): ... here.
Call it.
(gimple_assign_rhs_could_trap_p): New.
* gimple.h (gimple_assign_rhs_could_trap_p): Declare.
* tree-ssa-operands.c (get_expr_operands): Handle
COND_EXPR.
2008-07-08 Jakub Jelinek <jakub@redhat.com>
Merge with mainline @137633.
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
2008-07-08 Jakub Jelinek <jakub@redhat.com>
* tree-cfg.c (remove_useless_stmts_cond): Avoid calling
fold_binary.
2008-07-07 Jakub Jelinek <jakub@redhat.com>
* gimple-pretty-print.c (dump_gimple_return): Don't print space
after return if return has no argument.
(dump_gimple_seq): Don't print newline after last statement in
the sequence.
(dump_gimple_fmt, dump_gimple_try, dump_gimple_omp_for,
dump_gimple_omp_single, dump_gimple_omp_sections,
dump_gimple_omp_block, dump_gimple_omp_critical,
dump_gimple_omp_parallel, dump_gimple_omp_task): Use
newline_and_indent after dump_gimple_seq instead of INDENT.
(dump_gimple_bind): Likewise. If there are no bind vars, don't
print two newlines before the sequence, just one.
* tree-cfg.c (dump_function_to_file): Fix dumping lowered gimple
before CFG is built.
2008-07-07 Diego Novillo <dnovillo@google.com>
* tree-vrp.c (ssa_name_nonnegative_p): Tuplify.
(ssa_name_nonzero_p): Tuplify.
(extract_range_from_comparison): Tidy.
(vrp_evaluate_conditional_warnv_with_ops): Tidy.
(vrp_evaluate_conditional): Change STMT argument to gimple.
Update all users.
(simplify_stmt_for_jump_threading): Change WITHIN_STMT argument
to gimple.
Update all users.
(identify_jump_threads): Tidy.
* tree-tailcall.c (find_tail_calls): Remove stale FIXME note.
* tree.c (tree_node_structure): Likewise.
* tree.h (struct tree_base): Likewise.
(struct gimple_stmt): Likewise.
* builtins.c (expand_builtin_memcpy): Likewise.
(expand_builtin_memset_args): Likewise.
* tree-chrec.h (build_polynomial_chrec): Do not initialize VAL.
* tree-ssa-ccp.c (fold_stmt_r): Do not handle COND_EXPR.
(fold_stmt): Remove #if 0 code.
* tree-ssa-dom.c (EXTRA_DETAILS): Remove.
Update all users.
(hashable_expr_equal_p): Remove stale FIXME note.
(simplify_stmt_for_jump_threading): Convert WITHIN_STMT
argument to gimple. Update all users.
* tree-ssa-propagate.c: Include gimple.h
(get_rhs): Remove.
(set_rhs): Remove.
(fold_predicate_in): Tuplify.
* Makefile.in (tree-ssa-propagate.o): Add dependency on
GIMPLE_H.
* tree-ssa-propagate.h (get_rhs, set_rhs): Remove.
* tree-parloops.c (create_parallel_loop): Remove FIXME
tuples note.
* tree-eh.c (lookup_stmt_eh_region): Remove FIXME tuples
editorial note.
* cfgexpand.c (gimple_to_tree): Likewise.
* tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Tidy.
Do not handle GIMPLE_BIND.
* tree-inline.c (remap_gimple_op_r): Remove stale FIXME notes.
* tree-optimize.c (execute_fixup_cfg): Likewise.
* tree-flow.h (struct tree_ann_common_d): Remove stale
FIXME tuples notes.
(tree_vrp_evaluate_conditional): Change last argument type to
gimple. Update all users.
(thread_across_edge): Likewise.
* gimple.c (gimple_has_side_effects): If any argument has
TREE_SIDE_EFFECTS set, assert that S has volatile operands.
(gimple_rhs_has_side_effects): Likewise.
* gimple.h (gimple_phi_capacity): Remove stale FIXME tuples note.
* tree-cfg.c (group_case_labels): Remove FIXME tuples note.
Assert that the new size is smaller than the old size.
(remove_useless_stmts_warn_notreached): Remove #if 0 code.
(remove_useless_stmts_cond): Remove stale FIXME tuples note.
(remove_useless_stmts_1): Likewise.
(verify_types_in_gimple_assign): Likewise.
* passes.c (init_optimization_passes): Re-enable
pass_ipa_increase_alignment.
* tree-ssa-threadedge.c
(record_temporary_equivalences_from_stmts_at_dest):
Change SIMPLIFY to accept two arguments of type gimple.
Update all users.
(simplify_control_stmt_condition): Likewise.
(thread_accross_edge): Likewise.
* tree-ssa-operands.c (add_call_clobber_ops): Re-enable
calls to ipa_reference_get_not_read_globals and
ipa_reference_get_not_written_global.
2008-07-07 Aldy Hernandez <aldyh@redhat.com>
* tree-ssa-dom.c: Remove FIXME tuples.
2008-07-07 Aldy Hernandez <aldyh@redhat.com>
* tree-cfg.c (verify_types_in_gimple_assign): Remove
FIXME tuples.
2008-07-04 Jakub Jelinek <jakub@redhat.com>
* cfgexpand.c (gimple_to_tree) <case GIMPLE_CALL>: Copy
CALL_EXPR_VA_ARG_PACK.
* gimple.c (gimple_build_bind): Set gimple_bind_block rather
than gimple_block.
(gimple_copy) <case GIMPLE_BIND>: Don't unshare gimple_bind_block.
* gimple.h (GF_ASM_INPUT, GF_ASM_VOLATILE, GF_CALL_CANNOT_INLINE,
GF_CALL_FROM_TRUNK, GF_CALL_RETURN_SLOT_OPT, GF_CALL_TAILCALL,
GF_CALL_VA_ARG_PACK, GF_OMP_PARALLEL_COMBINED, GF_OMP_RETURN_NOWAIT,
GF_OMP_SECTION_LAST, GF_PREDICT_TAKEN): Change from static const ints
into enum values.
(struct gimple_statement_base): Move subcode after flags to make it
16-bit aligned.
* tree-ssa-structalias.c (find_func_aliases): Handle ADDR_EXPR
as GIMPLE_SINGLE_RHS instead of GIMPLE_UNARY_RHS.
* tree-ssa-operands.c (get_expr_operands): Don't handle
OMP_FOR, OMP_PARALLEL, OMP_TASK, OMP_SECTIONS and PREDICT_EXPR
here.
* gimple.def (GIMPLE_PREDICT): New.
* gimple.h: Update comment above GF_* flags.
(GF_PREDICT_TAKEN): New.
(gimple_build_predict): New prototype.
(gimple_predict_predictor, gimple_predict_outcome,
gimple_predict_set_predictor, gimple_predict_set_outcome): New
inlines.
* gimple.c (gss_for_code): Handle GIMPLE_PREDICT.
(gimple_size, walk_gimple_op): Likewise.
(gimple_build_predict): New function.
* gimple-pretty-print.c (dump_gimple_stmt): Handle GIMPLE_PREDICT.
* predict.c (tree_bb_level_predictions): Likewise.
* cfgexpand.c (gimple_to_tree): Likewise.
* tree-inline.c (estimate_num_insns): Likewise.
* tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
* gimple-low.c (lower_stmt): Likewise.
* tree-cfg.c (verify_types_in_gimple_seq_2): Likewise.
(verify_types_in_gimple_stmt): Likewise. Don't handle PREDICT_EXPR.
* gimplify.c (gimplify_expr): Gimplify PREDICT_EXPR into
GIMPLE_PREDICT.
* expr.c (expand_expr_real): Don't handle PREDICT_EXPR.
2008-07-04 Aldy Hernandez <aldyh@redhat.com>
* tree-ssa-forwprop.c (rhs_to_tree): Remove fixme.
(forward_propagate_into_cond): Add comment.
(forward_propagate_into_gimple_cond): Add comment.
(forward_propagate_addr_expr_1): Enable optimization.
2008-07-04 David Edelsohn <edelsohn@gnu.org>
Revert:
* config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Unshare t.
* config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Unshare reg.
2008-07-03 David Edelsohn <edelsohn@gnu.org>
* config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Unshare t.
2008-07-03 Doug Kwan <dougkwan@google.com>
* gimple-dummy.c (vectorizable_function): New dummy.
(vect_pattern_recog): Remove dummy.
* tree-vectorizer.h (vect_recog_func_ptr): Adjust types for tuples.
* tree-vect-patterns.c (File): Re-enable all code.
(widened_name_p): Tuplify.
(vect_recog_temp_ssa_var): New.
(vect_recog_dot_prod_pattern): Tuplify.
(vect_recog_widen_mult_pattern): Same.
(vect_recog_pow_pattern): Same.
(vect_recog_widen_sum_pattern): Same.
(vect_pattern_recog_1): Tuplify. Factor out code to create SSA
temporaries to vect_recog_temp_ssa_var. Remove code for building
assignment statement.
(vect_pattern_recog): Tuplify.
2008-07-03 Janis Johnson <janis187@us.ibm.com>
David Edelsohn <edelsohn@gnu.org>
* config/rs6000/rs6000.c (rs6000_va_start): Unshare valist.
(rs6000_gimplify_va_arg): Unshare valist, reg, addr, ovf.
2008-07-03 Jakub Jelinek <jakub@redhat.com>
* tree-inline.c (remap_gimple_op_r): Remap TREE_BLOCK of
expressions.
* tree-switch-conversion.c (gen_inbound_check): Force RHS to be
gimple operand. Use fold_build* instead of build*.
(build_arrays): Likewise. Convert RHS to LHS's type.
* tree-switch-conversion.c (struct switch_conv_info): Change
arr_ref_first and arr_ref_last to gimple.
(check_range, check_final_bb, gather_default_values,
build_constructors, build_one_array, build_arrays, gen_def_assign,
fix_phi_nodes, gen_inbound_check, process_switch, do_switchconv):
Tuplify.
(create_temp_arrays): Formatting.
* gimple.h (gimple_try_set_kind): New inline function.
* tree-eh.c (same_handler_p, optimize_double_finally,
refactor_eh_r, refactor_eh): Tuplify.
* passes.c (init_optimization_passes): Reenable pass_refactor_eh.
2008-07-02 Jakub Jelinek <jakub@redhat.com>
* tree-parloops.c (struct reduction_info): Change reduc_stmt,
reduc_phi, keep_res and new_phi field types to gimple.
(struct elv_data): Add info field.
(reduction_phi, loop_parallel_p, take_address_of,
initialize_reductions, eliminate_local_variables_stmt,
eliminate_local_variables, expr_invariant_in_region_p,
separate_decls_in_region_name, separate_decls_in_region_stmt,
create_phi_for_local_result, create_call_for_reduction_1,
create_call_for_reduction, create_loads_for_reductions,
create_final_loads_for_reduction, create_stores_for_reduction,
create_loads_and_stores_for_name, separate_decls_in_region,
canonicalize_loop_ivs, transform_to_exit_first_loop,
create_parallel_loop, gen_parallel_loop,
loop_has_vector_phi_nodes, parallelize_loops): Tuplify.
* tree-cfg.c (gimple_duplicate_sese_tail): Tuplify.
(move_block_to_fn): Don't call gsi_next after calling
remove_phi_node.
2008-07-02 Aldy Hernandez <aldyh@redhat.com>
Richard Guenther <rguenther@suse.de>
* tree-ssa-forwprop.c (can_propagate_from): Exclude loads
from decls explicitly.
(gate_forwprop): Enable.
2008-07-02 Jakub Jelinek <jakub@redhat.com>
* tree-vectorizer.h (vinfo_for_stmt): Use htab_find_slot_with_hash.
(set_vinfo_for_stmt): Likewise. If info is NULL, delete entry from
hash table.
* tree-vectorizer.c (stmt_vec_info_eq, stmt_vec_info_hash): New
functions.
(init_stmt_vec_info_htab): Use them instead of htab_hash_pointer
and htab_eq_pointer.
(free_stmt_vec_info): Free stmt_info only after set_vinfo_for_stmt
call.
Merge with mainline @137346.
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
* builtins.c (gimple_rewrite_call_expr): Fix -Wc++-compat and/or
-Wcast-qual warnings.
* gimple.c (gimple_alloc_stat, gimple_build_omp_for,
gimple_range_check_failed, gimple_copy): Likewise.
* tree-mudflap.c (mx_xfn_xform_decls): Likewise.
* tree-nested.c (convert_nonlocal_reference_stmt,
convert_local_reference_stmt): Likewise.
* gimple-iterator.c (gsi_insert_before_without_update,
gsi_insert_after_without_update): Likewise.
* tree-ssa-loop-im.c (init_lim_data, get_lim_data,
clear_lim_data): Likewise.
* tree-ssa-sccvn.c (vn_nary_op_insert_stmt): Likewise.
* tree-vrp.c (check_all_array_refs): Likewise.
* value-prof.c (histogram_eq): Likewise.
* cgraphbuild.c (record_reference): Don't handle OMP_PARALLEL
and OMP_TASK here.
(build_cgraph_edges): Handle GIMPLE_OMP_{PARALLEL,TASK}.
* cgraph.c (cgraph_add_new_function): Call gimple_register_cfg_hooks
instead of tree_register_cfg_hooks.
* omp-low.c (finalize_task_copyfn): Ensure the new function's
body is a gimple_seq with just GIMPLE_BIND in it.
(scan_omp_1_stmt): Fix -Wc++-compat and/or -Wcast-qual warnings.
* tree-cfg.c (move_stmt_op, have_similar_memory_accesses_1,
ref_base_address_1): Likewise.
(move_stmt_r): Handle gimple_block updating.
* tree-ssa-alias.c (update_alias_info_1): Tuplify.
(update_alias_info): Likewise.
* tree-switch-conversion.c: Stub out temporarily.
2008-06-30 Aldy Hernandez <aldyh@redhat.com>
* tree-ssa-forwprop.c: Remove obsolete comment.
(get_prop_source_stmt): Wrap call to gimple_assign_lhs with a
TREE_TYPE.
(forward_propagate_comparison): Use build2 instead of
fold_binary.
2008-06-27 Diego Novillo <dnovillo@google.com>
* cfgexpand.c (gimple_assign_rhs_to_tree): Factor out of ...
(gimple_to_tree): ... here.
Update comments referring to mainline merge.
* tree-ssa-ter.c: Tuplify.
* tree-outof-ssa.c (gimple_assign_rhs_to_tree): Declare.
(replace_use_variable): Call it.
(rewrite_trees): Tuplify.
(remove_ssa_form): Call it.
* gimple.h: Tidy some formatting.
* ipa-struct-reorg.c: Include gimple.h
* Makefile.in (ipa-struct-reorg.o): Add dependency on
GIMPLE_H.
2008-06-27 Richard Guenther <rguenther@suse.de>
* tree-ssa-sccvn.c (vn_get_expr_for): New function.
(vuses_to_vec): Tuplify.
(copy_vuses_from_stmt): Likewise.
(vdefs_to_vec): Likewise.
(copy_vdefs_from_stmt): Likewise.
(shared_vuses_from_stmt): Likewise.
(copy_reference_ops_from_call): New function split out from
copy_reference_ops_from_ref.
(create_reference_ops_from_call): New function.
(shared_reference_ops_from_call): Likewise.
(get_def_ref_stmt_vuses): Tuplify.
(vn_reference_lookup): Likewise.
(vn_nary_op_lookup_stmt): New function.
(vn_nary_op_insert_stmt): Likewise.
(vn_phi_lookup): Tuplify.
(vn_phi_insert): Likewise.
(defs_to_varying): Likewise.
(visit_unary_op): Likewise.
(visit_binary_op): Likewise.
(visit_reference_op_call): New function.
(visit_reference_op_load): Tuplify.
(visit_reference_op_store): Likewise.
(visit_phi): Likewise.
(stmt_has_constants): New function.
(simplify_binary_expression): Tuplify.
(simplify_unary_expression): Likewise.
(try_to_simplify): Likewise.
(visit_use): Likewise.
(compare_ops): Likewise.
(DFS): Likewise.
(run_scc_vn): Likewise.
* tree-ssa-sccvn.h (shared_vuses_from_stmt): Adjust prototype.
(copy_vuses_from_stmt): Likewise.
(vn_get_expr_for): Declare.
(vn_nary_op_lookup_stmt): Likewise.
(vn_nary_op_insert_stmt): Likewise.
* tree-dfa.c (get_single_def_stmt): Tuplify.
(get_single_def_stmt_from_phi): Likewise.
(get_single_def_stmt_with_phi): Likewise.
* tree-ssa-pre.c (do_SCCVN_insertion): Use vn_get_expr_for.
(eliminate): Likewise.
(execute_pre): Enable SCCVN.
(gate_fre): Enable.
* tree-flow.h (get_single_def_stmt): Adjust prototype.
(get_single_def_stmt_from_phi): Likewise.
(get_single_def_stmt_with_phi): Likewise.
(vn_lookup_or_add_with_stmt): Likewise.
(vn_lookup_with_stmt): Likewise.
* gimple.c (gimple_fold): Fix.
* tree-vn.c (vn_add): Disable call to add_to_value.
(vn_add_with_vuses): Likewise.
(vn_lookup_with_stmt): Tuplify.
(vn_lookup_or_add_with_stmt): Likewise.
2008-06-27 Aldy Hernandez <aldyh@redhat.com>
* gimple.c (gimple_cond_get_ops_from_tree): Handle TRUTH_NOT_EXPR.
2008-06-25 Diego Novillo <dnovillo@google.com>
* gimple.h (enum gimple_rhs_class): Move from tree-gimple.h
(struct gimple_statement_base): Change CODE field to 8
bits.
Change SUBCODE field to 16 bits.
(gimple_set_subcode): Move to gimple.c.
(gimple_subcode): Remove.
(gimple_expr_type): Handle GIMPLE_ASSIGN, GIMPLE_CALL and
GIMPLE_COND explicitly.
Move earlier in the file.
(gimple_expr_code): New.
(gimple_omp_subcode): New.
(gimple_omp_set_subcode): New.
(gimple_omp_return_nowait_p): Call gimple_omp_subcode.
(gimple_omp_section_last_p): Likewise.
(gimple_omp_parallel_combined_p): Likewise.
(gimple_assign_rhs_code): New.
(gimple_assign_set_rhs_code): New.
(gimple_assign_cast_p): Call gimple_assign_rhs_code.
Handle VIEW_CONVERT_EXPR.
(gimple_call_tail_p): Access subcode field directly.
(gimple_call_cannot_inline_p): Likewise.
(gimple_call_return_slot_opt_p): Likewise.
(gimple_call_from_thunk_p): Likewise.
(gimple_call_va_arg_pack_p): Likewise.
(gimple_call_copy_flags): Likewise.
(gimple_cond_code): Likewise.
(gimple_cond_set_code): Likewise.
(gimple_cond_make_false): Likewise.
(gimple_cond_make_true): Likewise.
(gimple_asm_volatile_p): Likewise.
(gimple_asm_input_p): Likewise.
(gimple_eh_filter_must_not_throw): Likewise.
(gimple_eh_filter_set_must_not_throw): Likewise.
(gimple_try_kind): Likewise.
(gimple_try_catch_is_cleanup): Likewise.
(gimple_wce_cleanup_eh_only): Likewise.
* tree-vrp.c (simplify_div_or_mod_using_ranges): Call
gimple_assign_set_rhs_code instead of gimple_set_subcode.
(simplify_abs_using_ranges): Likewise.
* tree-complex.c (init_dont_simulate_again): Call
gimple_expr_code instead of gimple_subcode.
(complex_visit_stmt): Likewise.
(expand_complex_move): Call gimple_assign_rhs_code
instead of gimple_subcode.
(expand_complex_operations_1): Likewise.
* value-prof.c (gimple_divmod_fixed_value): Likewise.
(gimple_mod_pow2): Likewise.
(gimple_mod_subtract): Likewise.
(gimple_divmod_values_to_profile): Likewise.
* tree-ssa-alias-warnings.c (find_alias_site_helper):
Call gimple_assign_cast_p.
(already_warned_in_frontend_p): Likewise.
* gimple.def: Add comments warning about code orderings.
* omp-low.c (expand_omp_taskreg): Call gimple_omp_set_subcode.
(expand_omp_atomic_fetch_op): Call gimple_assign_rhs_code.
* tree-gimple.c (get_gimple_rhs_class): Move to gimple.c
(get_gimple_rhs_num_ops): Likewise.
(gimple_assign_rhs_code): Move to gimple.h.
* tree-gimple.h (enum gimple_rhs_class): Move to gimple.h.
* tree-ssa-ccp.c (fold_gimple_assign): Call
gimple_assign_rhs_code instead of gimple_subcode.
* tree-stdarg.c (va_list_counter_bump): Likewise.
(check_all_va_list_escapes): Likewise.
(execute_optimize_stdarg): Likewise.
* tree-ssa-math-opts.c (is_division_by): Likewise.
(replace_reciprocal): Likewise.
(execute_cse_reciprocals): Likewise.
(execute_convert_to_rsqrt): Likewise.
* tree-ssa-dom.c (initialize_hash_element): Likewise.
(simple_iv_increment_p): Likewise.
(gimple_assign_unary_useless_conversion_p): Likewise.
* tree-ssa-alias.c (is_escape_site): Call gimple_assign_cast_p.
* predict.c (expr_expected_value_1): Call gimple_assign_rhs_code
instead of gimple_subcode.
* tree-eh.c (tree_could_trap_p): Call gimple_expr_code
instead of gimple_subcode.
* ipa-type-escape.c (is_array_access_through_pointer_and_index):
Call gimple_assign_rhs_code instead of gimple_subcode.
(check_assign): Likewise.
* gimplify.c (gimplify_omp_parallel): Call gimple_omp_set_subcode
instead of gimple_set_subcode.
* tree-mudflap.c (mf_xform_derefs): Call gimple_assign_rhs_code
instead of gimple_subcode.
* tree-ssa-forwprop.c (get_prop_source_stmt): Likewise.
(can_propagate_from): Likewise.
(remove_prop_source_from_use): Likewise.
(forward_propagate_addr_into_variable_array): Likewise.
* tree-object-size.c (plus_stmt_object_size): Likewise.
(collect_object_sizes_for): Likewise.
(check_for_plus_in_loops_1): Likewise.
(check_for_plus_in_loops): Likewise.
* gimple.c (gimple_set_subcode): Move from gimple.h
(gimple_check_failed): Access subcode field directly.
(gimple_assign_single_p): Call gimple_assign_rhs_code
instead of gimple_subcode.
(gimple_assign_unary_nop_p): Likewise.
(gimple_get_lhs): Change argument type to const_gimple.
(gimple_could_trap_p): Call gimple_assign_rhs_code
instead of gimple_subcode.
(get_gimple_rhs_class): Move from tree-gimple.c.
(get_gimple_rhs_num_ops): Likewise.
* tree-ssa-structalias.c (update_alias_info): Call
gimple_assign_rhs_code instead of gimple_subcode.
(find_func_aliases): Likewise.
* tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
Likewise.
2008-06-25 Doug Kwan <dougkwan@google.com>
* gimple-dummy.c: (vect_free_slp_tree) Remove dummy.
(vect_analyze_loop): Same.
(vectorizable_induction): New dummy.
(vectorizable_type_promotion): Same.
(vectorizable_type_demotion): Same.
(vectorizable_conversion): Same.
(vectorizable_operation): Same.
(vectorizable_assignment): Same.
(vectorizable_load): Same.
(vectorizable_call): Same.
(vectorizable_store): Same.
(vectorizable_condition): Same.
(vectorizable_reduction): Same.
(vectorizable_live_operation): Same.
(vect_estimate_min_profitable_iters): Same.
(vect_model_simple_cost): Same.
(vect_model_store_cost): Same.
(vect_model_load_cost): Same.
(vect_pattern_recog): Same.
* tree-vectorizer.h (struct _stmt_vec_info): Change fields FIRST_DR
and NEXT_DR from tree to gimple type.
(vectorizable_load): Change type of parameter STMT to gimple.
(vectorizable_store): Same.
(vectorizable_operation): Same.
(vectorizable_type_promotion): Same.
(vectorizable_type_demotion): Same.
(vectorizable_conversion): Same.
(vectorizable_assignment): Same.
(vectorizable_function): Same.
(vectorizable_call): Same.
(vectorizable_condition): Same.
(vectorizable_live_operation): Same.
(vectorizable_reduction): Same.
(vectorizable_induction): Same.
* tree-vect-analyze.c (File): Re-enable all previously disabled code.
(vect_determine_vectorization_factor): Tuplify.
(vect_analyze_operations): Same.
(exist_non_indexing_operands_for_use_p): Same.
(vect_analyze_scalar_cycles_1): Same.
(vect_insert_into_interleaving_chain): Same.
(vect_same_range_drs): Same.
(vect_compute_data_ref_alignment): Same.
(vect_verify_datarefs_alignment): Same.
(vector_alignment_reachable_p): Same.
(vect_enhance_data_refs_alignment): Same.
(vect_analyze_group_access): Same.
(vect_analyze_data_ref_access): Same.
(vect_free_slp_tree): Same.
(vect_get_and_check_slp_defs): Same.
(vect_build_slp_tree): Same.
(vect_print_slp_tree): Same.
(vect_mark_slp_stmts): Same.
(vect_analyze_slp_instance): Same.
(vect_analyze_slp): Same.
(vect_detect_hybrid_slp_stmts): Same.
(vect_analyze_data_refs): Same.
(vect_mark_relevant): Same.
(process_use): Same.
(vect_mark_stmts_to_be_vectorized): Same.
(vect_can_advance_ivs_p): Same.
(vect_get_loop_niters): Same.
(vect_analyze_loop_form): Same.
2008-06-25 Diego Novillo <dnovillo@google.com>
* tree-vectorizer.c (hash_gimple_stmt): Remove.
(eq_gimple_stmt): Remove.
(init_stmt_vec_info_htab): Use htab_hash_pointer and
htab_eq_pointer for STMT_VEC_INFO_HTAB.
2008-06-24 Doug Kwan <dougkwan@google.com>
* gimple-dummy.c (vect_set_verbosity_level): Remove.
(vectorize_loops): Same.
(vect_free_slp_tree): New dummy.
(vect_analyze_loop): Same.
(vect_transform_loop): Same.
* tree-vectorize.c (hashtab.h): New include.
(File): Re-enable all previously commented out code.
(stmt_vec_info_htab): New var.
(rename_variables_in_bb): Tuplify.
(slpeel_update_phis_for_duplicate_loop): Same.
(slpeel_update_phi_nodes_for_guard1): Same.
(slpeel_update_phi_nodes_for_guard2): Same.
(slpeel_make_loop_iterate_ntimes): Same.
(slpeel_tree_duplicate_loop_to_edge_cfg): Same.
(slpeel_add_loop_guard): Same.
(slpeel_can_duplicate_loop_p): Same.
(set_prologue_iterations): Same.
(find_loop_location): Same.
(new_stmt_vec_info): Same.
(hash_gimple_stmt): New function.
(init_stmt_vec_info_htab): New function.
(free_stmt_vec_info_htab): New function.
(free_stmt_vec_info): Replace statement info with hash table entry.
(new_loop_vec_info): Tuplify.
(destroy_loop_vec_info): Same.
(vect_supportable_dr_alignment): Same
(vect_is_simple_use): Same.
(supportable_widening_operation): Same.
(supportable_narrowing_operation): Same.
(report_vec_op): New function. Code factored out from ...
(vect_is_simple_reduction): Call it. Tuplify.
(vectorize_loops): Set up and tear down stmt_vec_info hash table.
* tree-vectorizer.h (struct _slp_tree): Change statement fields
(struct _loop_vec_info): Same.
(struct _stmt_vec_info):
(nested_in_vect_loop): Re-enable.
(init_stmt_vec_info_htab): New prototype.
(free_stmt_vec_info_htab): New prototype.
(vinfo_for_stmt): Use hash table instead of statement info.
(set_stmt_info): Remove.
(set_vinfo_for_stmt): New inline.
(is_pattern_stmt_p): Tuplify.
(vect_is_simple_use): Tuplify prototype.
(vect_is_simple_reduction): Same.
(supportable_widening_operation): Same.
(supportable_narrowing_operation): Same.
(new_stmt_vec_info): Same.
(free_stmt_vec_info): Same.
Makefile.in (tree-vectorize.o): Add HASTAB_H dependency.
2008-06-22 Andrew Pinski <pinskia@gmail.com>
* gimple-pretty-print.c (dump_binary_rhs): Print out MIN_EXPR and
MAX_EXPR specially.
2008-06-20 Doug Kwan <dougkwan@google.com>
* tree-loop-linear.c (File): Re-enable all previously disabled code.
(gather_interchange_stats): Tuplify.
(linear_transform_loops): Likewise.
* gimple-dummy.c (get_type): Remove unused dummy.
(ipa_add_method): Same.
(ipa_callsite_callee): Same.
(ipa_callsite_compute_count): Same.
(ipa_callsite_compute_param): Same.
(ipa_callsite_param): Same.
(ipa_callsite_param_count): Same.
(ipa_callsite_param_count_set): Same.
(ipa_edges_create): Same.
(ipa_edges_free): Same.
(ipa_free): Same.
(ipa_jf_get_info_type): Same.
(ipa_method_compute_modify): Same.
(ipa_method_compute_tree_map): Same.
(ipa_method_formal_compute_count): Same.
(ipa_method_formal_count): Same.
(ipa_method_formal_count_set): Same.
(ipa_method_get_tree): Same.
(ipa_method_modify_print): Same.
(ipa_method_tree_print): Same.
(ipa_methodlist_init): Same.
(ipa_methodlist_not_empty): Same.
(ipa_node_create): Same.
(ipa_nodes_create): Same.
(ipa_nodes_free): Same.
(ipa_remove_method): Same.
(vec_set_verbosity_level): Same.
* tree-ssa-loop.c (tree_linear_transform): Re-enable.
2008-06-19 Jan Hubicka <jh@suse.cz>
* gimple.c (gimple_alloc): Annotate with MEM_STAT_INFO
(gimple_build_with_ops): Likewise.
(gimple_build_assign): Likewise.
(gimple_build_assign_with_ops): Likewise.
* gimple.h (gimple_build_assign, gimple_build_assign_with_ops):
Annotate with MEM_STAT_INFO.
2008-06-17 Jan Hubicka <jh@suse.cz>
* config/i386.c (ix86_gimplify_va_arg): Fix sharing issue.
2008-06-17 Jan Hubicka <jh@suse.cz>
* gimplify.c (gimplify_modify_expr): Unshare only returned value when
want_value is set instead of copying operands all the time.
2008-06-17 Diego Novillo <dnovillo@google.com>
* tree-ssa-loop-niter.c (get_val_for): Fix FIXME note.
2008-06-17 Steven Bosscher <stevenb.gcc@gmail.com>
* gimple-dummy.c (canonicalize_induction_variables): Remove dummy.
(remove_empty_loops): Likewise.
(tree_unroll_loops_completely): Likewise.
* tree-ssa-ivcanon.c (tree_num_loop_insns): Replace bsi with gsi.
(create_canonical_iv): Convert to tuples.
(try_unroll_loop_completely): Likewise.
(empty_loop_p): Likewise.
(remove_empty_loop): Likewise.
* tree-ssa-loop.c (tree_ssa_loop_ivcanon): Re-enable.
(tree_ssa_empty_loop): Likewise.
(tree_complete_unroll): Likewise.
(tree_complete_unroll_inner): Likewise.
2008-06-16 Doug Kwan <dougkwan@google.com>
* tree-ssa-ifcombine.c (File): Re-enable all previously diabled code.
(bb_no_side_effects_p): Tuplify.
(same_phi_args_p): Likewise.
(get_name_for_bit_test): Likewise.
(operand_precision): New.
(integral_operand_p): New.
(recognize_single_bit_test): Tuplify.
(regcognize_bits_test): Tuplify.
(ifcombine_ifandif): Likewise.
(ifcombine_iforif): Likewise.
(tree_ssa_ifcombine): Likewise.
* passes.c: Re-enable pass_tree_ifcombine.
2008-06-16 Doug Kwan <dougkwan@google.com>
* tree-ssa-loop-unswitch.c (File): Re-enable all previously disabled
code.
(tree_may_unswitch_on): Tuplify.
(simplify_using_entry_checks): Likewise.
(tree_unswitch_single_loop): Likewise.
* gimple-dummy.c (tree_ssa_unswitch_loops): Remove dummy.
* tree-ssa-loop.c (gate_tree_ssa_loop_unswitch): Re-enable.
2008-06-16 Steven Bosscher <steven@gcc.gnu.org>
* tree-ssa-reassoc.c: Convrt to tuples.
2008-06-15 Diego Novillo <dnovillo@google.com>
* tree-ssa-live.c (mark_all_vars_used_1): Mark as used
the TREE_BLOCK of any _EXPR node.
2008-06-13 Doug Kwan <dougkwan@google.com>
* tree-mudflap.c (File): Re-enable previously disabled code.
(mf_decl_cache_locals): Tuplify.
(mf_build_check_statement_for): Likewise.
(mf_xform_derefs_1): Re-enable.
(mf_xform_derefs): Tuplify.
(execute_mudflap_function_decls): Likewise.
(mx_register_decls): Tuplify. Add a new formal parameter for
the location of newly generated statements. Change function to
return modified gimple sequence instead of of modifying in-place.
(mx_xfn_xform_decls): Tuplify.
(mf_xform_decls): Tuplify.
* passes.c (init_optimization_passes): Re-enable mudflap passes.
2008-06-13 Jakub Jelinek <jakub@redhat.com>
Merge with mainline @136757.
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
2008-06-13 Doug Kwan <dougkwan@google.com>
* ipa-reference.c (scan_stmt_for_static_refs): Rename walk_subtrees
parameter to handled_ops_p and correct bug of using walk_tree callback
semantics.
* ipa-pure-const.c (scan_function_stmt): Likewise.
* tree-inline.c (mark_local_labes_stmt): Rename walk_subtrees
parameter to handle_ops_p.
(replace_locals_stmt): Likewise.
2008-06-10 Steven Bosscher <steven@gcc.gnu.org>
* passes.c (init_optimization_passes): Re-enable pass_uncprop.
* tree-ssa-uncprop (associate_equivalences_with_edges): Convert
to tuples.
(uncprop_into_successor_phis): Likewise.
2008-06-09 Diego Novillo <dnovillo@google.com>
* ipa-cp.c (cgraph_gate_cp): Fix 'FIXME tuples' note.
* cfg.c (compact_blocks): Likewise.
* dominance.c (free_dominance_info): Likewise.
* gimple-low.c (gimple_stmt_may_fallthru): Likewise
* c-gimplify.c (add_block_to_enclosing): Likewise.
* lambda-mat.c: Include tree-flow.h.
* lambda-trans.c: Likewise.
* Makefile.in (lambda-mat.o, lambda-trans.o): Add dependency
on $(TREE_FLOW_H).
* builtins.c (expand_builtin_setjmp_receiver): Remove #if 0 markers.
(fold_call_stmt): Call gimple_call_va_arg_pack_p.
* tree-gimple.h (gimple_bind_expr_stack): Declare.
* cgraphunit.c (update_call_expr): Do not try to access operand 0
of a FUNCTION_DECL.
* tree-ssa-loop-ivopts.c (stmt_invariant_in_loop_p): New.
* tree-flow.h (stmt_invariant_in_loop_p): Declare.
* gimple-dummy.c (remove_iv): Remove.
(gimple_stmt_may_fallthru):
* ipa-type-escape.c (check_tree): Call DECL_P before testing
DECL_INITIAL.
(check_assign): Do not access TREE_OPERAND 0 on the RHS
operand.
* gimplify.c (gimple_bind_expr_stack): New.
* gimple.h (struct gimple_statement_bind): Add more comments
for field BLOCK.
(gimple_cond_set_condition): New.
* gimple.c (gimple_cond_set_condition_from_tree): Call it.
(gimple_copy_no_def_use): Remove. Update all users.
(gimple_has_side_effects):
(gimple_rhs_has_side_effects):
* passes.c (init_optimization_passes): Enable
pass_release_ssa_names, pass_ipa_type_escape, pass_ipa_pta,
pass_ipa_struct_reorg, pass_record_bounds,
pass_late_warn_uninitialized and pass_rename_ssa_copies.
* lambda-code.c: Tuplify.
* ipa-struct-reorg.c: Tuplify.
* ipa-struct-reorg.h: Tuplify.
2008-06-09 Jakub Jelinek <jakub@redhat.com>
* gimplify.c (gimplify_omp_for): Call gimple_omp_for_set_incr
with the RHS of the GIMPLE_MODIFY_STMT instead of the
GIMPLE_MODIFY_STMT itself.
* gimple-pretty-print.c (dump_gimple_omp_for): Adjust for it.
* tree-nested.c (walk_gimple_omp_for): Likewise.
* omp-low.c (extract_omp_for_data, lower_omp_for): Likewise.
2008-06-09 Aldy Hernandez <aldyh@redhat.com>
* tree-ssa-forwprop.c (forward_propagate_into_cond): First argument is
a GSI.
(forward_propagate_addr_into_variable_array_index): Accept a GSI
instead of a gimple statement. Update accordingly.
(forward_propagate_addr_expr_1): Same.
(forward_propagate_addr_expr): Pass a GSI to
forward_propagate_addr_expr_1.
(simplify_not_neg_expr): Argument is a GSI.
Adjust accordingly.
(tree_ssa_forward_propagate_single_use_va): Pass GSI to
simplify_not_neg_expr and forward_propagate_into_cond.
2008-06-09 Aldy Hernandez <aldyh@redhat.com>
* tree.h (IS_CONVERT_EXPR_P): New.
(CONVERT_EXPR_P): Use IS_CONVERT_EXPR_P.
* tree-ssa-forwprop.c (get_prop_dest_stmt): Convert to tuples.
(get_prop_source_stmt): Same.
(can_propagate_from): Same.
(remove_prop_source_from_use): Same.
(combine_cond_expr_cond): Same.
(forward_propagate_into_cond): Same.
(tidy_after_forward_propagate_addr): Same.
(forward_propagate_addr_into_variable_array_index): Same.
(forward_propagate_addr_expr_1): Same.
(forward_propagate_addr_expr): Same.
(forward_propagate_comparison): Same.
(simplify_not_neg_expr): Same.
(tree_ssa_forward_propagate_single_use_vars): Same.
(simplify_gimple_switch): Rename from -simplify_switch_expr.
(rhs_to_tree): New.
(forward_propagate_into_gimple_cond): New.
* Makefile.in (tree-ssa-forwprop.o): Depend on GIMPLE_H.
* passes.c (init_optimization_passes): Enable pass_forwprop.
2008-06-09 Jakub Jelinek <jakub@redhat.com>
* tree.def (OMP_SECTIONS_SWITCH, OMP_ATOMIC_LOAD, OMP_ATOMIC_STORE):
Removed.
* tree-gimple.c (is_gimple_stmt): Don't handle them.
* gimplify.c (gimplify_expr): Likewise.
* tree-pretty-print.c (dump_generic_node): Likewise.
* tree-ssa-operands.c (get_expr_operands): Likewise.
* expr.c (expand_expr_real_1): Likewise.
* omp-low.c (expand_omp_atomic_pipeline): Adjust comment.
2008-06-09 Jakub Jelinek <jakub@redhat.com>
Merge with mainline @136433.
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
2008-06-08 Diego Novillo <dnovillo@google.com>
Merge with mainline @136432.
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
2008-06-08 Diego Novillo <dnovillo@google.com>
* tree-call-cdce.c: Tuplify.
2008-06-06 Diego Novillo <dnovillo@google.com>
http://gcc.gnu.org/ml/gcc-patches/2008-06/msg00353.html
* gimple.def: Add a third argument to all GIMPLE codes.
Update all users.
* calls.c (gimple_alloca_call_p): Fix comment.
* system.h (CONST_CAST_GIMPLE): Define.
* gimple.c (gimple_ops_offset_): Declare. Fill in from
third argument in gimple.def.
(gimple_set_stored_syms, gimple_set_loaded_syms): Move
from tree-ssa-operands.c
(gimple_alloc): Add argument NUM_OPS. Update all users.
Compute size by adding enough space for NUM_OPS operands.
(gimple_alloc_ops): Remove. Update all users.
(gimple_assign_set_rhs_from_tree): Change first argument
to gimple_stmt_iterator *. Update all users.
Allocate a new statement, if there are more operands that
can fit in the old one.
(gimple_assign_set_rhs_with_ops): Likewise.
(gimple_copy): Fix clearing of stores/loads sets in the
copied statement.
* gimple.h (struct gimple_statement_base): Remove fields
UNUSED_1, UNUSED_2, UNUSED_3.
Add fields MODIFIED, HAS_VOLATILE_OPS, REFERENCES_MEMORY_P,
UID and NUM_OPS.
Re-organize existing fields to eliminate holes on 64 bit
hosts.
Update all users.
(struct gimple_statement_with_ops_base): Define.
Factor out struct gimple_statement_with_ops. Include fields GSBASE,
ADDRESSES_TAKEN, DEF_OPS and USE_OPS.
(struct gimple_statement_with_ops): Include struct
gimple_statement_with_ops_base.
Remove field NUM_OPS.
(struct gimple_statement_with_memory_ops_base): Define.
Factor out of struct gimple_statement_with_memory_ops.
Include fields OPBASE, VDEF_OPS, VUSE_OPS, STORES and
LOADS.
Remove fields HAS_VOLATILE_OPS and REFERENCES_MEMORY_P.
(struct gimple_statement_with_memory_ops): Include
struct gimple_statement_with_memory_ops_base.
(struct gimple_statement_phi): Change size_t fields to
unsigned. Update all users.
(struct gimple_statement_asm): Include struct
gimple_statement_with_memory_ops_base.
Change fields NI and NO to unsigned char.
Change field NC to short.
Update all users.
Add field OP.
(struct gimple_statement_change_dynamic_type): Remove.
Update all users.
(union gimple_statement_d): Rename field WITH_OPS to GSOPS.
Rename field WITH_MEM_OPS to GSMEM.
Update all users.
(gimple_addresses_taken): New.
(gimple_addresses_taken_ptr): New.
(gimple_set_addresses_taken): New.
(gimple_num_ops): Move earlier.
(gimple_ops): Use gimple_ops_offset_ to compute address
of the operand vector.
(gimple_op): Call gimple_ops.
(gimple_op_ptr): Likewise.
(gimple_set_op): Likewise.
(gimple_switch_num_labels): Call gimple_num_ops.
(gimple_switch_set_num_labels): Call gimple_set_num_ops.
(gimple_switch_set_label): Call gimple_num_ops.
(gimple_return_retval_ptr): Likewise.
(gimple_return_retval): Likewise.
(gimple_set_retval): Likewise.
(gimple_cdt_new_type): Use operand 1.
(gimple_cdt_new_type_ptr): Likewise.
(gimple_cdt_set_new_type): Likewise.
* tree-cfg.c (gimple_block_ends_with_call_p): Use
CONST_CAST_BB.
* tree-ssa-operands.c (gimple_set_stored_syms,
gimple_set_loaded_syms): Declare.
* value-prof.c (gimple_divmod_fixed_value_transform,
gimple_mod_pow2_value_transform,
gimple_mod_subtract_transform): Change argument to
gimple_stmt_iterator *. Update all users.
* tree-ssa-ccp.c (fold_gimple_assign): Change parameter
to gimple_stmt_iterator *. Update all users
2008-06-05 Jakub Jelinek <jakub@redhat.com>
* gimplify.c (gimplify_modify_expr_to_memcpy): Use gimplify_arg
for gimplification of call arguments.
(gimplify_modify_expr_to_memset): Likewise.
2008-06-02 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/36389
* gimplify.c (gimplify_cond_expr): If one or both branches are
GOTO_EXPRs jumping to LABEL_DECLs, don't create unnecessary
extra LABEL_DECLs and jumps around.
* tree-cfg.c (remove_useless_stmts_cond): Set may_branch also
for GIMPLE_COND stmts.
* tree-eh.c (replace_goto_queue_cond_clause): Set label to
create_artificial_label () rather than LABEL_EXPR.
2008-05-30 Diego Novillo <dnovillo@google.com>
* calls.c (gimple_alloca_call_p): Fix detection of
alloca() calls.
2008-05-30 Diego Novillo <dnovillo@google.com>
* toplev.c: Include gimple.h.
(dump_memory_report): Call dump_gimple_statistics.
* Makefile.in (toplev.o): Add dependency on GIMPLE_H.
* gimple-low.c (pass_lower_cf): Restore disabled bits.
* tree-dfa.c (pass_referenced_vars): Likewise.
* cfgexpand.c (pass_expand): Likewise.
* tree-outof-ssa.c (pass_del_ssa): Likewise.
* gimple.c (gimple_alloc): Fix non-C99 declaration.
* gimplify.c (gimplify_function_tree): Remove calls to
dump_tree_statistics and dump_gimple_statistics.
2008-05-30 Jakub Jelinek <jakub@redhat.com>
* omp-low.c (diagnose_omp_structured_block_errors): Temporarily
switch cfun to DECL_STRUCT_FUNCTION (fndecl).
* omp-low.c (scan_sharing_clauses): Call scan_omp on
OMP_CLAUSE_REDUCTION_GIMPLE_{INIT,MERGE} instead of
scan_omp_op on OMP_CLAUSE_REDUCTION_{INIT,MERGE}.
(lower_rec_input_clauses): Clear
OMP_CLAUSE_REDUCTION_GIMPLE_{INIT,MERGE} instead of
OMP_CLAUSE_REDUCTION_{INIT,MERGE}. Call lower_omp
on OMP_CLAUSE_REDUCTION_GIMPLE_MERGE before gimple_seq_add_seq
to replace all occurences of placeholder in the seq.
* gimplify.c (gimplify_scan_omp_clauses): Clear
OMP_CLAUSE_REDUCTION_{INIT,MERGE} after gimplifying it.
* tree-nested.c (init_tmp_var_with_call, init_tmp_var, save_tmp_var):
Only set location if not gsi_end_p.
(walk_gimple_omp_for): Avoid adding an empty statement to seq.
* tree-inline.c (remap_gimple_stmt): Remap body of
GIMPLE_OMP_{MASTER,ORDERED,SECTION,SECTIONS,SINGLE}.
2008-05-28 Andrew Pinski <pinskia@gmail.com>
* gimple-pretty-print.c (dump_unary_rhs): Handle conversions correctly.
Handle PAREN_EXPR, ABS_EXPR, and NEGATE_EXPR.
2008-05-29 Jakub Jelinek <jakub@redhat.com>
* omp-low.c (lower_omp_1): Handle regimplification of GIMPLE_ASM.
Fix GIMPLE_ASSIGN regimplification.
* gimple-pretty-print.c (dump_gimple_omp_sections,
dump_gimple_omp_block, dump_gimple_omp_critical): New functions.
(dump_gimple_omp_parallel): Formatting.
(dump_gimple_stmt): Handle remaining GIMPLE_OMP_* statements.
2008-05-29 Aldy Hernandez <aldyh@redhat.com>
* tree-inline.c (remap_gimple_stmt): Handle GIMPLE_OMP_* cases.
2008-05-29 Aldy Hernandez <aldyh@redhat.com>
* gimple-pretty-print.c (dump_gimple_stmt): Add cases for
GIMPLE_OMP_MASTER and GIMPLE_OMP_ORDERED.
2008-05-29 Aldy Hernandez <aldyh@redhat.com>
* omp-low.c (expand_omp_parallel): Parse an assignment from an
ADDR_EXPR correctly.
* gimple-pretty-print.c (dump_gimple_omp_parallel): Print braces when
appropriate.
2008-05-29 Jakub Jelinek <jakub@redhat.com>
* omp-low.c (lower_omp_1): Fix regimplification of GIMPLE_COND and
GIMPLE_CALL.
2008-05-28 Jakub Jelinek <jakub@redhat.com>
* gimple.c (gimple_regimplify_operands): Don't call gimple_num_ops
twice. Write regimplified operand to the correct operand slot.
* gimplify.c (rhs_predicate_for): No longer static.
* tree-gimple.h (rhs_predicate_for): New prototype.
* omp-low.c (lower_omp_1): Don't call gimple_regimplify_operands,
instead forcefully gimplify_expr each operand with the right
predicate.
* gimple.h (gimple_omp_atomic_store_val_ptr,
gimple_omp_atomic_load_lhs_ptr, gimple_omp_atomic_load_rhs_ptr): New
inlines.
* gimple.c (walk_gimple_op): Handle GIMPLE_OMP_ATOMIC_LOAD and
GIMPLE_OMP_ATOMIC_STORE.
* omp-low.c (lower_omp_1): Handle GIMPLE_OMP_ATOMIC_LOAD.
* gimple-pretty-print.c (dump_gimple_omp_for): Don't indent twice
before gimple_omp_body, don't emit extra newline after it.
(dump_gimple_omp_single): Likewise.
2008-05-27 Aldy Hernandez <aldyh@redhat.com>
* tree-nested.c (walk_omp_for): Rename to...
(walk_gimple_omp_for): Enable and convert to tuples.
(convert_nonlocal_reference_stmt): Enable call to walk_gimple_omp_for.
(convert_local_reference_stmt): Same.
* gimple.c (walk_gimple_op): Remove fixme note.
2008-05-27 Diego Novillo <dnovillo@google.com>
* tree-gimple.c (get_gimple_rhs_class): Handle
POLYNOMIAL_CHREC.
* tree-cfg.c (verify_types_in_gimple_assign): Do not
check every operand against the LHS type for tcc_binary
expressions.
2008-05-26 Diego Novillo <dnovillo@google.com>
Merge with mainline @135951.
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
2008-05-22 Aldy Hernandez <aldyh@redhat.com>
* tree-cfg.c (make_edges): Change OMP_SECTION to GIMPLE_OMP_SECTIONS.
Update comments.
(verify_types_in_gimple_stmt): Update comments.
(verify_stmt): Same.
2008-05-21 Andreas Tobler <a.tobler@schweiz.org>
* ../configure: Regenerate with the correct autoconf version: 2.59.
2008-05-21 Aldy Hernandez <aldyh@redhat.com>
* omp-low.c (lower_reduction_clauses): Generate OMP_ATOMIC_* directly.
Concatenate atomic code correctly.
2008-05-20 Aldy Hernandez <aldyh@redhat.com>
* omp-low.c (WALK_SUBSTMTS): New.
(check_combined_parallel): Walk sub-statements.
(diagnose_sb_1): Same.
(diagnose_sb_2): Same.
Handle switch labels and return statements correctly.
* testsuite/gcc.dg/gomp/block-7.c: Adjust for new error message.
* testsuite/gcc.dg/gomp/block-2.c: Same.
* testsuite/gcc.dg/gomp/block-4.c: Same.
* testsuite/gcc.dg/gomp/block-6.c: Same.
* testsuite/gcc.dg/gomp/block-8.c: Same.
* testsuite/gcc.dg/gomp/block-1.c: Same.
* testsuite/gcc.dg/gomp/block-3.c: Same.
* testsuite/gcc.dg/gomp/block-5.c: Same.
2008-05-20 Aldy Hernandez <aldyh@redhat.com>
* omp-low.c (lower_omp_single): Append to bind variables.
(lower_omp_master): Same.
(lower_omp_ordered): Same.
(lower_omp_critical): Same.
* gimplify.c (gimplify_modify_expr_to_memcpy): Make sure we are
fully gimplified.
(gimplify_omp_for): Same.
* gimple.h (gimple_bind_set_vars): New.
2008-05-16 Andreas Tobler <a.tobler@schweiz.org>
* config/alpha/alpha.c (alpha_gimplify_va_arg): Adjust arguments.
* config/ia64/ia64.c (ia64_gimplify_va_arg): Likewise.
* config/pa/pa.c (hppa_gimplify_va_arg_expr): Likewise.
* config/m32c/m32c-protos.h (m32c_gimplify_va_arg_expr): Likewise.
* config/spu/spu.c (spu_gimplify_va_arg_expr): Likewise.
* config/stormy16/stormy16.c (xstormy16_gimplify_va_arg_expr): Likewise.
* config/xtensa/xtensa.c (xtensa_gimplify_va_arg_expr): Likewise.
* config/sparc/sparc.c (sparc_gimplify_va_arg): Adjust arguments.
2008-05-16 Diego Novillo <dnovillo@google.com>
* tree-into-ssa.c (rewrite_uses_p): Fix return type.
* tree-vectorizer.h (nested_in_vect_loop_p): Add return value.
* tree-ssa-pre.c (execute_pre): Add return value.
2008-05-15 Aldy Hernandez <aldyh@redhat.com>
* config/s390/s390.c (s390_gimplify_va_arg): Adjust for tuples.
2008-05-15 Diego Novillo <dnovillo@google.com>
* Makefile.in (STRICT_WARN): Revert to mainline behaviour.
(builtins.o-warn, expr.o-warn, dse.o-warn,
ebitmap.o-warn, lower-subreg.o-warn, tree-chrec.o-warn,
tree-ssa-structalias.o-warn, varasm.o-warn): Remove.
* config/arm/arm.c (arm_return_in_memory): Fix return type.
* config/arm/arm-protos.h (arm_return_in_memory): Likewise.
2008-05-15 Aldy Hernandez <aldyh@redhat.com>
* gimplify.c (gimplify_omp_for): Handle a MODIFY_EXPR in
gimple_omp_for_incr.
* cfgexpand.c (gimple_to_tree): Do not die on compile errors.
2008-05-15 Aldy Hernandez <aldyh@redhat.com>
* omp-low.c (check_omp_nesting_restrictions): Fetch clauses from for.
(expand_omp_atomic): Parse GIMPLE_OMP_ATOMIC correctly.
(lower_omp_single_simple): Create GIMPLE_COND with both tlabel and
flabel.
(lower_omp_for): Make sure we have a body before look inside.
* gimple-low.c (lower_stmt): Add case for GIMPLE_OMP_SECTIONS_SWITCH.
* gimple-pretty-print.c (dump_gimple_omp_single): New.
(dump_gimple_stmt): Add case for GIMPLE_OMP_SINGLE.
* gimplify.c (gimplify_omp_workshare): Remove fixme. Enable code.
* gimple.c (gss_for_code): Add case for GIMPLE_OMP_{RETURN,
SECTIONS_SWITCH}.
(gimple_regimplify_operands): Do not regimplify GIMPLE_ASM
operands. Do not look inside empty operands.
* gimple.h (is_gimple_omp): Fix typo for GIMPLE_OMP_ATOMIC*.
* tree-cfg.c (make_edges): Rename OMP_SECTION to GIMPLE_OMP_SECTION.
2008-05-14 Aldy Hernandez <aldyh@redhat.com>
* omp-low.c (optimize_omp_library_calls): Make sure statement is
a GIMPLE_CALL before we look inside of it.
* tree-cfg.c (move_stmt_op): Exit gracefully.
2008-05-13 Aldy Hernandez <aldyh@redhat.com>
* omp-low.c (scan_omp_op): Remove walk_subtrees. Call walk_tree.
(scan_omp_for): Scan OMP body.
(scan_omp_1_stmt): Set handled_ops_p.
(expand_omp_parallel): Parse ADDR_EXPR correctly.
(diagnose_sb_1): Rename walk_subtrees to handled_ops_p and set
appropriately.
(diagnose_sb_2): Same.
* gimple-pretty-print.c (dump_gimple_omp_for): Print braces around
OMP body.
* tree-inline.c (estimate_num_insns): GIMPLE_OMP_CONTINUE does not
have a body.
* tree-cfg.c (move_stmt_op): Parse move_stmt_d out of data correctly.
(move_stmt_r): Rename walk_subtrees to handled_ops_p and set
appropriately.
2008-05-12 Diego Novillo <dnovillo@google.com>
Merge with mainline @135126.
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
2008-05-11 Doug Kwan <dougkwan@google.com>
* gimplify.c (gimple_pop_condition): Clear
conditional_cleanups field after the associated gimple sequence has
been freed implicitly.
(gimplify_cleanup_point_expr): Clear conditional_cleanups field
of gimplfiy_ctxp after resetting the conditions field.
* gimple.h (gimple_call_return_type): Handle REFERENCE_TYPE like
POINTER_TYPE.
2008-05-10 Kaz Kojima <kkojima@gcc.gnu.org>
* config/sh/sh.c (sh_gimplify_va_arg_expr): Change pre_p and
post_p types to gimple_seq *.
2008-05-09 Aldy Hernandez <aldyh@redhat.com>
* omp-low.c (maybe_catch_exception): Return body when no exceptions.
(gate_lower_omp): Enable pass.
* gimple-low.c (lower_stmt): Add GIMPLE_OMP_ATOMIC_* cases.
2008-05-08 Aldy Hernandez <aldyh@redhat.com>
* omp-low.c (extract_omp_for_data): Update comment.
(get_ws_args_for): Same.
(lower_send_shared_vars): Same.
(expand_omp_parallel): Same.
(expand_omp_for_static_nochunk): Same.
(expand_omp_for_static_chunk): Same.
(expand_omp_sections): Same.
(expand_omp_atomic_fetch_op): Same.
(expand_omp_atomic_pipeline): Same.
(build_omp_regions_1): Same.
(lower_omp_for): Same.
(expand_omp_atomic_mutex): Change OMP_ATOMIC_STORE to
GIMPLE_OMP_ATOMIC_STORE.
* gimple-pretty-print.c (dump_gimple_omp_parallel): Print child fn
and data_arg.
* tree-cfg.c (make_edges): Enable commented out code and convert
to tuples.
(replace_by_duplicate_decl): Same.
(replace_ssa_name): Same.
(move_stmt_r): Same.
(move_stmt_op): New.
(mark_virtual_ops_in_bb): Enable and convert to tuples.
(makr_virtual_ops_in_region): Same.
(move_block_to_fn): Convert to tuples.
(find_outermost_region_in_block): Enable and convert to tuples.
(move_sese_region_to_fn): Same.
2008-05-05 Aldy Hernandez <aldyh@redhat.com>
* omp-low.c (expand_omp_parallel): Remove fixmes.
(expand_omp_for_static_chunk): Enable and tuplify code.
(expand_omp_sections): Remove fixmes. Tuplify.
(lower_omp_sections): Same.
(diagnose_sb_0): Remove fixme.
* tree-ssa.c (redirect_edge_var_map_dup): Fix typo in comment.
* gimple.c (gimple_size): Add case for GIMPLE_OMP_SECTIONS_SWITCH.
(gimple_build_omp_sections): New.
* gimple.h (gimple_build_omp_sections_switch): New prototype.
2008-05-03 Aldy Hernandez <aldyh@redhat.com>
* omp-low.c (diagnose_sb_0): Tuplify and enable.
(diagnose_sb_1): Same.
(diagnose_sb_2): Same.
(diagnose_omp_structured_block_errors): Tuplify.
* gimple-dummy.c (DUMMY_FN): Remove
diagnose_omp_structured_block_errors.
* c-decl.c (c_gimple_diagnostics_recursively): Remove fixme
and enable call to diagnose_omp_structured_block_errors.
* Makefile.in (GTFILES): Add omp-low.c again.
2008-05-02 Rafael Espíndola <espindola@google.com>
* tree-gimple.c (is_gimple_condexpr): Do not allow
trapping comparisons.
* tree-eh.c (tree_could_trap_p): Fix handling of floating
point comparisons.
2008-05-02 Doug Kwan <dougkwan@google.com>
* value-prof.c (gimple_divmod_fixed_value): Remove formal parameters
OPERATION, OP1 and OP2 and derive their values from parameter STMT
instead. Update prototype and caller.
(gimple_mod_pow2): Remove formal parameters OPERATION, OP1 and OP2
and derive their values from parameter STMT instead. Update prototype
and caller.
(gimple_mod_pow2_value_transform): Remove temporares OP, OP1 and OP2.
Use a new tempory LHS_TYPE to store assignment LHS type.
(gimple_mode_subtract): Remove formal parameters OPERATION, OP1 and OP2
and derive their values from parameter STMT instead. Update prototype
and caller. Fix a bug in a call to gimple_build_assign_with_ops.
(gimple_mod_subtract_transform): Remove temporares OP, OP1 and OP2.
Use a new tempory LHS_TYPE to store assignment LHS type.
(gimple_ic, gimple_indirect_call_to_profile): Fix bug in tree-code
tests.
* tree-profile.c (File): Re-enable all previously disabled code.
(tree_gen_edge_profiler): Tuplify.
(prepare_instrumented_value): Ditto.
(tree_gen_interval_profiler): Ditto.
(tree_gen_pow2_profiler): Ditto.
(tree_gen_one_value_profiler): Ditto.
(tree_gen_ic_profiler): Ditto.
(tree_gen_ic_func_profiler): Ditto.
(tree_gen_const_delta_profiler): Re-format formal parameters for
proper alignement.
(tree_gen_average_profiler): Tuplify.
(tree_gen_ior_profiler): Ditto.
(do_tree_profiling): Re-enable previously disabled code. Remove
FIXME.
(tree_profiling): Ditto.
* gimple.c (gimple_set_bb): Remove assertion.
* tree-cfg.c (change_bb_for_stmt): Remove. Redirect callers to
gimple_set_bb.
(gimple_merge_blocks): Call gimple_set_bb instead of
change_bb_for_stmt.
(gimple_split_block): Ditto.
(verify_stmts): Add code to check that label_to_block_map and labels
are consistent.
2008-04-22 Rafael Espíndola <espindola@google.com>
Merge with mainline @134843.
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
2008-05-01 Diego Novillo <dnovillo@google.com>
http://gcc.gnu.org/ml/gcc-patches/2008-05/msg00053.html
* tree-vrp.c (vrp_visit_phi_node): Cast variable I to int
for printing.
* cgraph.c (cgraph_release_function_body): Only call
gimple_set_body if NODE->DECL has a struct function.
* tree.c (make_node_stat): Do not call gimple_set_body.
* cp/Make-lang.in (cp/semantics.o): Add dependency on
$(GIMPLE_H).
* cp/semantics.c: Include gimple.h
(expand_or_defer_fn): Assert that FN has a gimple body.
* function.h (struct function): Add field GIMPLE_BODY.
* gimple.c (gimple_bodies_vec): Remove.
(gimple_bodies_map): Remove.
(gimple_set_body): Re-write to use GIMPLE_BODY in FN's
function object.
(gimple_body): Likewise.
2008-05-01 Oleg Ryjkov <olegr@google.com>
http://gcc.gnu.org/ml/gcc-patches/2008-05/msg00053.html
* tree-eh.c (record_in_goto_queue, record_in_goto_queue_label):
New functions.
(maybe_record_in_goto_queue): Refactored and added support for
recording labels embedded in GIMPLE_CONDs.
(lower_catch, lower_cleanup): Fix 3 typos that were introduced
during the conversion to tuples.
(lower_eh_constructs_2): Call maybe_record_in_goto_queue for
GIMPLE_CONDs.
2008-05-01 Rafael Espíndola <espindola@google.com>
* gimple-pretty-print.c (dump_gimple_try): Print like trunk does.
(dump_gimple_catch): Print like trunk does.
2008-05-01 Rafael Espíndola <espindola@google.com>
* passes.c (gimple_verify_flow_info): Enable remaining
pass_rename_ssa_copies passes.
2008-05-01 Rafael Espíndola <espindola@google.com>
* tree-cfg.c (gimple_verify_flow_info): Handle switches with only the
default label.
2008-04-30 Doug Kwan <dougkwan@google.com>
* cfgexpand.c (gimple_to_tree): Change code to annotate EH region
numbers only if numbers are greater than zero. Also propagate EH
region number to CALL_EXPRs nested in assignments.
2008-04-29 Doug Kwan <dougkwan@google.com>
* tree-eh.c (lower_try_finally_dup_block): Call
copy_gimple_seq_and_replace_locals instead of gimple_seq_copy.
(optimize_double_finally): Add a note about replacing unsave_expr_now
with copy_gimple_seq_and_replace_locals.
* tree-inline.c (mark_local_labels_stmt, replace_locals_op,
replace_locals_stmt, copy_gimple_seq_and_replace_locals): New.
* tree-inline.h (copy_gimple_seq_and_replace_locals): New prototype.
2008-04-29 Rafael Espíndola <espindola@google.com>
* gimple-pretty-print.c (dump_gimple_return): Add missing space.
* tree-ssa-threadedge.c (simplify_control_stmt_condition): Fix type
of variable.
2008-04-29 Rafael Espíndola <espindola@google.com>
* gimple-pretty-print.c (pp_cfg_jump): add missing ";".
2008-04-29 Rafael Espíndola <espindola@google.com>
* gimple-pretty-print.c (dump_gimple_assign): print ";" at the end.
(dump_gimple_return):print ";" at the end.
(dump_gimple_call): print ";" at the end.
(dump_gimple_cond): use op_symbol_code instead of tree_code_name.
(pp_cfg_jump): print ";" at the end.
2008-04-29 Rafael Espíndola <espindola@google.com>
* ipa-cp.c (ipcp_driver): Disable.
* matrix-reorg.c (matrix_reorg): Comment body.
(gate_matrix_reorg): Disable.
* passes.c (init_optimization_passes): Enable first pass_merge_phi,
pass_ipa_cp and pass_ipa_matrix_reorg.
2008-04-29 Doug Kwan <dougkwan@google.com>
* tree-eh.c (lower_catch): Fix bug of accessing sub-statements
using gimple_catch_handler. Fix bug of mixing up GIMPLE_GOTO and
GIMPLE_LABEL in statement building.
(lower_cleanup): Fix bug of mixing up gimple_try_clean and
gimple_try_eval.
(lower_cleanup): Use gimple codes instead of tree codes in switch
statement.
(tree-cfg.c): Add code to generate EH edges of GIMPLE_ASSIGN.
2008-04-28 Diego Novillo <dnovillo@google.com>
http://gcc.gnu.org/ml/gcc-patches/2008-04/msg02051.html
* tree-ssa-phiprop.c (phiprop_insert_phi): Remove
OLD_ARG_CODE. Use TREE_CODE (ARG) instead.
Assert that NEW_VAR is a GIMPLE register.
(propagate_with_phi): Fix test of is_gimple_reg_type for
ARG.
Do not set subcode of USE_STMT to NOP_EXPR.
2008-04-28 Doug Kwan <dougkwan@google.com>
* tree-inline.c (remap_gimple_op_r): Remove code to handle RESX_EXPR
region number remapping.
(remap_gimple_stmt): Add code to handle GIMPLE_RESX region number
remapping.
2008-04-28 Rafael Espíndola <espindola@google.com>
* cfgexpand.c (gimple_to_tree): Add support for switch stmts without
a default label.
* fold-const.c (tree_call_nonnegative_warnv_p): Remove the code
argument.
(tree_invalid_nonnegative_warnv_p): Update call to
tree_call_nonnegative_warnv_p.
* gimple.h (gimple_location_ptr): New.
* tree-flow.h (simplify_stmt_using_ranges): Change signature.
* tree-ssa-propagate.c (substitute_and_fold): Call
simplify_stmt_using_ranges.
* tree-vrp.c (struct assert_locus_d): Tuplify.
(switch_update): Tuplify.
(stmt_overflow_infinity): New.
(gimple_assign_nonnegative_warnv_p): New.
(gimple_call_nonnegative_warnv_p): New.
(gimple_stmt_nonnegative_warnv_p): New.
(gimple_assign_nonzero_warnv_p): New.
(gimple_stmt_nonzero_warnv_p): New.
(vrp_stmt_computes_nonzero): Tuplify.
(extract_range_basic): Tuplify.
(extract_range_from_expr): Tuplify. Rename to
extract_range_from_assignment.
(adjust_range_with_scev): Tuplify.
(vrp_var_may_overflow): Tuplify.
(build_assert_expr_for): Tuplify.
(fp_predicate): Tuplify.
(infer_value_range): Tuplify.
(dump_asserts_for): Tuplify.
(register_new_assert_for): Tuplify.
(register_edge_assert_for_2): Tuplify.
(register_edge_assert_for_1): Tuplify.
(register_edge_assert_for): Tuplify.
(find_conditional_asserts): Tuplify.
(find_switch_asserts): Tuplify.
(find_assert_locations): Tuplify.
(process_assert_insertions_for): Tuplify.
(process_assert_insertions): Tuplify.
(check_array_ref): Tuplify.
(search_for_addr_array): Tuplify.
(check_array_bounds): Tuplify.
(check_all_array_refs): Tuplify.
(remove_range_assertions): Tuplify.
(stmt_interesting_for_vrp): Tuplify.
(vrp_initialize): Tuplify.
(vrp_visit_assignment): Tuplify. Rename to vrp_visit_assignment_or_call.
(vrp_visit_cond_stmt): Tuplify.
(find_case_label_index): Tuplify.
(find_case_label_range): Tuplify.
(vrp_visit_switch_stmt): Tuplify.
(vrp_visit_stmt): Tuplify.
(vrp_visit_phi_node): Tuplify.
(simplify_div_or_mod_using_ranges): Tuplify.
(simplify_abs_using_ranges): Tuplify.
(simplify_cond_using_ranges): Tuplify.
(simplify_switch_using_ranges): Tuplify.
(simplify_stmt_using_ranges): Tuplify.
(simplify_stmt_for_jump_threading): Tuplify.
(identify_jump_threads): Tuplify.
(execute_vrp): Tuplify.
(gate_vrp): Enable.
* tree.h (tree_call_nonnegative_warnv_p): Remove the code argument.
2008-04-28 Doug Kwan <dougkwan@google.com>
* cp/cp-gimplify.c (finish_bc_block): Tuplify.
(build_bc_goto): Renamed to get_bc_label. Return a label
only. Uupdate callers.
(get_bc_label): New
(gimplify_cp_loop): Tuplify. Also check COND for error_mark_node
before gimplifying it.
(gimplify_for_stmt): Tuplify.
(gimplify_while_stmt): Tuplify.
(gimplify_for_stmt): Tuplify.
(gimplify_do_stmt): Tuplify.
(gimplify_switch_stmt): Tuplify.
(cp_gimplify_omp_switch_stmt): Add temporary code to pop block
label stack.
(cp_gimplify_expr): Pass pre_p to gimplify_while_stmt,
gimplify_do_stmt and gimplify_switch_stmt. Tuplify
gimplification of CONTINUE_STMT and BREAK_STMT.
2008-04-26 Rafael Espíndola <espindola@google.com>
* gimple.c (gimple_build_assign_with_ops): Don't set SSA_NAME_DEF_STMT.
* gimple.h (gimple_assign_set_lhs): Set SSA_NAME_DEF_STMT.
(gimple_call_set_lhs): Set SSA_NAME_DEF_STMT.
* omp-low.c (expand_parallel_call): Don't set SSA_NAME_DEF_STMT if not
needed.
(expand_omp_for_generic): Same.
(expand_omp_for_static_nochunk): Same.
(expand_omp_for_static_chunk): Same.
(expand_omp_sections): Same.
(expand_omp_atomic_mutex): Same.
* predict.c (strip_builtin_expect): Same.
* tree-cfg.c (gimple_merge_blocks): Same.
* tree-inline.c (remap_ssa_name): Same.
(setup_one_parameter): Same.
* tree-predcom.c (replace_ref_with): Same.
(replace_ref_with): Same.
(initialize_root_vars_lm): Same.
(reassociate_to_the_same_stmt): Same.
* tree-scalar-evolution.c (scev_const_prop): Same.
* tree-ssa-loop-im.c (rewrite_reciprocal): Same.
* tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Same.
* tree-ssa-loop-manip.c (create_iv): Same.
* tree-ssa-math-opts.c (execute_cse_sincos_1): Same.
* tree-ssa-phiopt.c (minmax_replacement): Same.
(abs_replacement): Same.
2008-04-25 Diego Novillo <dnovillo@google.com>
http://gcc.gnu.org/ml/gcc-patches/2008-04/msg01965.html
* gimplify.c (annotate_all_with_location_after): New.
(gimplify_expr): Call it.
2008-04-25 Diego Novillo <dnovillo@google.com>
Merge with mainline @134692.
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
2008-04-25 Doug Kwan <dougkwan@google.com>
* tree-inline.c (expand_call_inline): Save old call statement
and use it to look up correct EH region.
2008-04-24 Doug Kwan <dougkwan@google.com>
* Makefile.in (STRICT_WARN): Remove -Wno-format and
-Wno-missing-format-attribute.
* gimplify.c (gimple_pop_condition): Remove redundant and incorrect
gimple_seq_free.
(gimplify_init_ctor_eval_range): Add a fall-through label for
GIMPLE_COND statement.
2008-04-25 Rafael Espíndola <espindola@google.com>
* tree-ssa-dom.c (avail_expr_eq): Return false if the hashes don't
match.
2008-04-24 Oleg Ryjkov <olegr@google.com>
* gimplify.c (gimplify_expr): Fix the assertion that verifies validity
of parameters.
* tree-inline.c (estimate_num_insns): Handle
GIMPLE_CHANGE_DYNAMIC_TYPE.
* tree-cfg.c (verify_types_in_gimple_stmt): Likewise.
2008-04-24 Rafael Espíndola <espindola@google.com>
* tree-ssa-dom.c (initialize_hash_element): Fix the type of the code
variable.
2008-04-23 Rafael Espíndola <espindola@google.com>
* omp-low.c (gate_lower_omp): Return 0.
* passes.c (init_optimization_passes): Enable all passes whose
corresponding dump options are used in the testsuite.
* tree-loop-distribution.c (tree_loop_distribution): Comment body.
(gate_tree_loop_distribution): Return 0.
* tree-ssa-forwprop.c (tree_ssa_forward_propagate_single_use_vars):
Comment body.
(gate_forwprop): Return 0.
* tree-ssa-loop.c (gate_tree_ssa_loop_unswitch): Return 0.
(gate_tree_vectorize): Return 0.
(gate_tree_ssa_loop_ivcanon): Return 0.
(tree_ssa_empty_loop): Return 0.
(gate_tree_complete_unroll): Return 0.
* tree-ssa-pre.c (gate_fre): Return 0.
* tree-ssa-reassoc.c (execute_reassoc): Comment body.
(gate_tree_ssa_reassoc): Return 0.
* tree-stdarg.c (gate_optimize_stdarg): Return 0.
(execute_optimize_stdarg): Comment body.
* tree-vrp.c (execute_vrp): Comment body.
(gate_vrp): Return 0.
2008-04-22 Aldy Hernandez <aldyh@redhat.com>
* omp-low.c (lower_omp_parallel): Add new argument to
gimple_omp_parallel_set_combined_p.
(lower_omp_1): Remove debugging code.
* gimple.h (gimple_omp_parallel_combined_p): Add new argument.
2008-04-22 Rafael Espíndola <espindola@google.com>
Merge with mainline @134552.
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
2008-04-21 Doug Kwan <dougkwan@google.com>
* tree-ssa-phiopt.c (FILE): Uncomment all previously disabled code.
(tree_ssa_phiopt): Remove FIXME and re-enable code.
(tree_ssa_cs_elim): Remove FIXME and re-enable code.
(tree_ssa_phiopt_worker): Tuplify.
(replace_phi_edge_with_variable): Tuplify.
(conditional_replacement): Tuplify and simplify optimization logic.
Construct a boolean tree and let fold and force_gimple_operand_gsi
do optimization and code genaration.
(value_replacement): Tuplify.
(minmax_replacement): Tuplify.
(abs_replacement): Tuplify.
(nt_init_block): Tuplify.
(cond_store_replacement): Tuplify.
* gimple.h (gimple_seq_singleton_p): Fix empty sequence bug.
* passes.c (init_optimization_passes): Re-enable pass_cselim
and pass_phiopt.
2008-04-21 Diego Novillo <dnovillo@google.com>
* tree.c (make_node_stat): Clear gimple_body() for newly
created FUNCTION_DECLs.
* tree-gimple.c (rhs_predicate_for): Move to gimplify.c.
* tree-gimple.h (rhs_predicate_for): Remove declaration.
* gimple-pretty-print.c (dump_gimple_assign): Add support
for showing volatile operands.
(dump_gimple_call): Likewise.
Add support for showing __builtin_va_arg_pack, static
chains, return slot optimized and tail calls.
(dump_gimple_phi): Remove code to print memory symbols.
* gimplify.c (is_gimple_formal_tmp_or_call_rhs): New.
(is_gimple_mem_or_call_rhs): New.
(rhs_predicate_for): Call them.
(internal_get_tmp_var): Use is_gimple_formal_tmp_or_call_rhs as
the gimplification predicate.
Use the last statement in *PRE_P to get the temporary to
be updated when in SSA form.
(gimplify_bind_expr): Clear out *EXPR_P before returning.
(gimplify_call_expr): Do not build a GIMPLE_CALL if
WANT_VALUE is true.
Call gimple_build_call_from_tree if WANT_VALUE is false.
Remove local variable ARGS.
(gimplify_modify_expr): If after gimplification *FROM_P
is a CALL_EXPR, create a GIMPLE_CALL instead of a
GIMPLE_ASSIGN.
Document why the gimplification of the RHS should accept
CALL_EXPRs.
(gimplify_expr): Document where the generated statement
is stored.
Accept is_gimple_formal_tmp_or_call_rhs and
is_gimple_mem_or_call_rhs as gimplification predicates.
When gimplifying statements, clear out *EXPR_P before
returning.
When generating an rvalue, call is_gimple_formal_tmp_or_call_rhs
to test *EXPR_P.
* tree-dfa.c (mark_symbols_for_renaming): Remove
ATTRIBUTE_UNUSED.
* tree-flow.h (stmt_references_memory_p): Remove.
* gimple.c (gimple_build_call_from_tree): New.
* gimple.h (struct gimple_statement_with_memory_ops): Add
bitfield references_memory_p.
(gimple_build_call_from_tree): Declare.
(gimple_references_memory_p): Rename from
stmt_references_memory_p. Move here. Update all users.
(gimple_set_references_memory): New.
(gimple_assign_set_rhs1): When the assignment has more
than one operand on the RHS, assert that the operands are
gimple values.
(gimple_assign_set_rhs2): Assert that the operand is a
gimple value.
(gimple_call_set_return_slot_opt): Fix mask clearing.
(gimple_call_set_from_thunk): Likewise.
(gimple_call_set_va_arg_pack): Likewise.
* tree-cfg.c (dump_function_to_file): Do not indent when
doing a GIMPLE dump.
* tree-ssa-operands.c (add_virtual_operand): Call
gimple_set_references_memory.
(get_addr_dereference_operands): Likewise.
(get_tmr_operands): Likewise.
(maybe_add_call_clobbered_vops): Likewise.
(get_asm_expr_operands): Likewise.
(parse_ssa_operands): Likewise.
(build_ssa_operands): Likewise.
(stmt_references_memory_p): Remove.
2008-04-21 Rafael Espíndola <espindola@google.com>
Cherry pick http://gcc.gnu.org/ml/gcc-patches/2008-04/msg01213.html
* params.def (PARAM_MAX_FIELDS_FOR_FIELD_SENSITIVE): Set default
to zero, thus disable creation of SFTs.
* gcc.dg/tree-ssa/salias-1.c: Remove.
* gcc.dg/tree-ssa/pr26421.c: Adjust pattern.
* gcc.dg/tree-ssa/alias-15.c: Likewise.
* gcc.dg/tree-ssa/ssa-lim-3.c: Run at -O2.
2008-04-20 Zdenek Dvorak <ook@ucw.cz>
* passes.c (init_optimization_passes): Enable pass_dce_loop.
2008-04-20 Zdenek Dvorak <ook@ucw.cz>
* tree-data-ref.c (split_constant_offset_1): Use POINTER_PLUS_EXPR
for pointer addition.
(split_constant_offset): Set VAR to EXP before conversions are
stripped, when no offset is removed. Handle chrec_dont_know.
* tree-predcom.c: Tuplified.
* passes.c (init_optimization_passes): Enable pass_predcom.
2008-04-18 Aldy Hernandez <aldyh@redhat.com>
* omp-low.c (lower_rec_input_clauses): Remove fixme and
ATTRIBUTE_UNUSED.
(lower_lastprivate_clauses): Same.
(lower_reduction_clauses): Same.
(lower_copyprivate_clauses): Same.
(lower_send_clauses): Same.
(lower_send_shared_vars): Same.
(maybe_catch_exception): Convert to tuples.
(lower_omp_sections): Same.
(lower_omp_single_simple): Same.
(lower_omp_single_copy): Same.
(lower_omp_single): Same.
(lower_omp_master): Same.
(lower_omp_ordered): Same.
(lower_omp_critical): Same.
(lower_omp_for_lastprivate): Same.
(lower_omp_for): Same.
(check_combined_parallel): Same.
(lower_omp_parallel): Same.
(lower_omp_1): Same.
(execute_lower_omp): Enable.
* gimple-dummy.c: Remove dummy functions for lower_omp_*.
* gimple-low.c (lower_omp_directive): Convert to tuples.
(lower_stmt): Remove fixme.
* gimple.h (gimple_seq_alloc_with_stmt): New.
(gimple_omp_section_set_last): New.
(gimple_omp_parallel_set_combined_p): New.
(gimple_bind_add_stmt): New.
(gimple_bind_add_seq): New.
* tree-cfg.c (verify_node_sharing): Fix typo in comment.
2008-04-17 Oleg Ryjkov <olegr@google.com>
* Reverting forwprop patch.
2008-04-16 Oleg Ryjkov <olegr@google.com>
* tree-ssa-forwprop.c (get_prop_dest_stmtm get_prop_source_stmt,
can_propagate_from, remove_prop_source_from_use,
tidy_after_forward_propagate_addr,
forward_propagate_addr_into_variable_array_index,
forward_propagate_addr_expr_1, forward_propagate_addr_expr,
forward_propagate_comparison, simplify_not_neg_expr,
simplify_switch_expr,
tree_ssa_forward_propagate_single_use_variables): Tuplified.
(forward_propagate_into_cond): Tuplified and moved some functionality
into forward_propagate_into_cond_gimple.
(rhs_to_tree, forward_propagate_into_cond_gimple): New functions.
* passes.c (init_optimization_passes): Enabled pass_forwprop.
* tree-cfg.c (find_taken_edge_cond_expr): Fixed comment.
2008-04-16 Oleg Ryjkov <olegr@google.com>
* tree-ssa-forwprop.c (get_prop_dest_stmtm get_prop_source_stmt,
can_propagate_from, remove_prop_source_from_use,
tidy_after_forward_propagate_addr,
forward_propagate_addr_into_variable_array_index,
forward_propagate_addr_expr_1, forward_propagate_addr_expr,
forward_propagate_comparison, simplify_not_neg_expr,
simplify_switch_expr,
tree_ssa_forward_propagate_single_use_variables): Tuplified.
(forward_propagate_into_cond): Tuplified and moved some functionality
into forward_propagate_into_cond_gimple.
(rhs_to_tree, forward_propagate_into_cond_gimple): New functions.
* passes.c (init_optimization_passes): Enabled pass_forwprop.
* tree-cfg.c (find_taken_edge_cond_expr): Fixed comment.
2008-04-16 Doug Kwan <dougkwan@google.com>
* Makefile.in (STRICT_WARN): Disable -Wmissing-format-attribute
and -Wformat temporarily for bootstrapping.
* lambda-code.c (invariant_in_loop_and_outer_loops): Comment out
to avoid defined-and-not-used warning.
* tree-cfg.c (gather_blocks_in_sese_region): Comment out to avoid
defined-and-not-used warning.
2008-04-16 Doug Kwan <dougkwan@google.com>
* Makefile.in (GTFILES): Add back ipa-reference.h and ipa-reference.c.
* gimple-dummy.c (memory_identifier_string): Remove.
* ipa-cp.c (constant_val_insert): Tuplify.
* ipa-prop.c (File): Uncomment all previously disabled code.
(ipa_method_modify_stmt): Tuplify.
(ipa_method_compute_modify): Tuplify.
(ipa_callsite_tree): Renamed to ipa_callsite_stmt. Update callers.
(ipa_callsite_stmt): New.
(ipa_callsite_compute_count): Tuplify.
(ipa_callsite_compute_param): Tuplify.
* ipa-reference.c (File): Uncomment all previously disabled code.
(get_asm_stmt_operands): Tuplify.
(check_call): Tuplify. Also add code to handle assignment of
returned value.
(scan_for_static_refs): Remove. Tuplify body and split into two
new functions scan_stmt_for_static_refs and scan_op_for_static_refs.
Update callers.
(scan_stmt_for_static_refs): New. Split from scan_for_static_refs.
(scan_op_for_static_refs): New. Split from scan_for_static_refs.
(analyze_variable): Update walk_tree call.
(analyze_function): Tuplify.
* passes.c (init_optimization_passes): Re-enable pass_ipa_reference.
* tree-flow.h (struct function_ann_d): Uncomment field
ipa_reference_vars_info.
2008-04-15 Doug Kwan <dougkwan@google.com>
* tree-eh.c (operation_could_trap_p): Fix filtering logic.
2008-04-15 Bill Maddox <maddox@google.com>
* tree-ssa-dom.c: (degenerate_phi_result, remove_stmt_or_phi,
get_rhs_or_phi_arg, get_lhs_or_phi_result, propagate_rhs_into_lhs,
eliminate_const_or_copy, eliminate_degenerate_phis_1,
eliminate_degenerate_phis): Convert to tuples.
* passes.c (init_optimization_passes): Enable pass_phi_only_cprop.
2008-04-15 Oleg Ryjkov <olegr@google.com>
* tree-ssa-dom.c (record_const_or_copy): Moving a variable declaration to
the top of a block.
2008-04-15 Doug Kwan <dougkwan@google.com>
* tree-ssa-sink.c (File): Uncomment all previously disabled code.
(find_bb_for_arg): Tuplify.
(all_immediate_uses_sample_place): Tuplify.
(nearest_common_dominator_of_uses): Tuplify.
(statement_sink_location): Tuplify. Remove parameter tobb and update
caller.
(sink_code_in_bb): Tuplify.
* passes.c (init_optimization_passes): Re-enable pass_sink_code.
2008-04-14 Bill Maddox <maddox@google.com>
* tree-ssa-threadupdate.c (remove_ctrl_stmt_and_useless_edge,
create_edge_and_update_destination_phis, redirection_block_p):
Convert to tuples.
* tree.c (iterative_hash_exprs_commutative): New function.
* tree.h (iterative_hash_exprs_commutative): Declare.
* tree-ssa_dom.c (enum expr_kind, struct hashable_expr,
struct cond_equivalence): New types.
(struct edge_info): Use struct cond_equivalence.
(avail_exprs_stack): Stack of expr_hash_elt*, not expressions.
(stmts_to_rescan): Use type gimple for statements.
(struct expr_hash_elt): Represent statement RHS with hashable_expr,
not a tree. Add unique stamp to each entry for efficient and reliable
element removal.
(struct eq_expr_value): Delete unused type.
(initialize_hash_element): Convert to tuples. Now applies
only to statements.
(initialize_expr_from_cond, initialize_hash_element_from_expr):
New functions. Replace former functionality of initialize_hash_element
for conditions presented as trees.
(hashable_expr_equal_p, iterative_hash_hashable_expr): New functions.
(print_expr_hash_elt): New function.
(free_expr_hash_elt): New function.
(tree_ssa_dominator_optimize): Convert to tuples
(canonicalize_comparison): Convert to tuples.
(remove_local_expressions_from_table): Use new avail_exprs_stack
representation. Add optional extra diagnostic details.
(simplify_stmt_for_jump_threading, dom_thread_across_edge,
dom_opt_finalize_block): Convert to tuples.
(record_cond, build_and_record_new_cond): Convert to tuples.
Use new hashable_expr type. Extra diagnostic details.
(record_const_or_copy_1): Extra diagnostic details.
(record_const_or_copy): Add assertion.
(simple_iv_increment_p, cprop_into_successor_phis, record_edge_info):
Convert to tuples.
(eliminate_redundant_computations): Convert to tuples.
Additional diagnostic details.
(gimple_assign_unary_useless_conversion_p): New function.
(record_equivalences_from_statement): Convert to tuples.
Additional diagnostic details.
(cprop_operand, cprop_into_stmt): Convert to tuples.
(optimize_stmt): Convert to tuples.
(lookup_avail_expr): Use hashable_expr. Additional diagnostic details.
(avail_expr_hash, avail_expr_eq): Use hashable_expr.
* tree-ssa-copy.c (may_propagate_copy_into_stmt,
propagate_tree_value_into_stmt): New functions.
* tree-flow.h: (may_propagate_copy_into_stmt,
propagate_tree_value_into_stmt): Declare.
(thread_across_edge): Change declaration of callback to accept a
gimple statement.
* gimple.c (gimple_call_flags): Declare argument as a constant.
(gimple_has_side_effects): Declare argument as a constant.
Examine function arguments for side-effects.
(gimple_rhs_has_side_effects): New function.
* gimple.h (gimple_call_flags): Declare argument as a constant.
(gimple_has_side_effects): Declare argument as a constant.
(gimple_rhs_has_side_effects): Declare new function.
(is_gimple_assign): New inline function.
(gimple_switch_index_ptr): New function.
* passes.c (init_optimization_passes): Enable pass_dominator.
* tree-ssa_threadedge.c (potentially_threadable_block,
lhs_of_dominating_assert, record_temporary_equivalences_from_phis):
Convert to tuples.
(fold_assignment_stmt): New function.
(record_temporary_equivalences_from_stmts_at_dest,
simplify_control_stmt_condition, thread_across_edge): Convert to tuples.
2008-04-14 Doug Kwan <dougkwan@google.com>
* c-typeck.c (convert_for_assignment): Call c_common_unsigned_type
2008-04-14 Doug Kwan <dougkwan@google.com>
* gimple-iterator.c (gsi_move_to_bb_end): Use gsi_last_bb
instead of calling both gsi_last and bb_seq.
* passes.c (init_optimization_passes): Re-eanble second tail-recursion
pass.
2008-04-14 Doug Kwan <dougkwan@google.com>
* tree-nrv.c (dest_safe_for_nrv_p): Uncomment.
(execute_return_slot_opt): Tuplify.
* passes.c (init_optimization_passes): Re-enable pass_return_slot.
2008-04-14 Aldy Hernandez <aldyh@redhat.com>
* tree-cfg.c (gimple_can_merge_blocks_p): Fix typo.
* omp-low.c (maybe_lookup_ctx): Uncomment and set ATTRIBUTE_UNUSED.
(lower_lastprivate_clauses): Same.
(lower_reduction_clauses): Same.
(lower_send_clauses): Same.
(expand_omp_for_generic): Uncomment and convert for tuples.
(expand_omp_for): Remove fixme.
(expand_omp_sections): Same.
(lower_omp_parallel): Partially convert for tuples.
(lower_omp_regimplify_p): Rename from lower_omp_2.
(lower_omp_1): Convert for tuples.
(lower_omp): Same.
(gimple-dummy.c): Add lower_omp_parallel, lower_omp_for,
lower_omp_sections, lower_omp_single, lower_omp_master,
lower_omp_ordered, lower_omp_critical.
2008-04-13 Diego Novillo <dnovillo@google.com>
* tree-cfg.c (need_fake_edge_p): Initialize CALL_FLAGS.
2008-04-12 Rafael Espíndola <espindola@google.com>
Merge with mainline @134237.
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
2008-04-13 Rafael Espíndola <espindola@google.com>
* config/extensions.m4: Add. Was missing from previous merge.
2008-04-12 Rafael Espíndola <espindola@google.com>
Merge with mainline @133860.
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
2008-04-11 Oleg Ryjkov <olegr@google.com>
* tree-sra.c (scalarize_use): Moving a variable declaration to
the top of a block.
2008-04-11 Oleg Ryjkov <olegr@google.com>
* tree-sra.c (insert_edge_copies_seq): Removed unused variable.
2008-04-11 Oleg Ryjkov <olegr@google.com>
* tree-sra.c (sra_build_assignment): Tuplified.
(mark_all_v_defs): Removed.
(mark_all_v_defs_seq, mark_all_v_defs_stmt): New functions.
(sra_walk_expr): Tuplified.
(sra_walk_tree_list): Removed.
(sra_walk_call_expr, sra_walk_gimple_asm,
sra_walk_gimple_modifY_stmt, ): Tuplified and renamed.
(sra_walk_gimple_call, sra_walk_gimple_asm,
sra_walk_gimple_assign): New names for tuplified functions.
(sra_walk_function, find_candidates_for_sra, scan_use, scan_copy,
scan_ldst, instantiate_element, decide_instantiations,
mark_all_v_defs_1, sra_build_assignment, sra_build_bf_assignment,
sra_build_elt_assignment, generate_copy_inout,
generate_element_copy, generate_element_zero,
generate_one_element_init, generate_element_init_1): Tuplified.
(insert_edge_copies): Removed.
(insert_edge_copies_seq): New function.
(sra_insert_before, sra_insert_after, sra_replace,
sra_explode_bitfield_assignment, sra_sync_for_bitfield_assignment,
scalarize_use, scalarize_copy, scalarize_init, mark_no_trap,
scalarize_ldst, scalarize_parms, scalarize_function): Tuplified.
(tree_sra, tree_sra_early): Enabled
(sra_init_cache): Removed extra space.
* tree-flow.h (insert_edge_copies_seq): New declaration.
* gimple.h (gimple_asm_input_op_ptr, gimple_asm_output_op_ptr,
gimple_return_retval_ptr): New functions.
* passes.c (init_optimization_passes): Enabled pass_sra,
pass_early_sra.
2008-04-11 Doug Kwan <dougkwan@google.com>
* ipa-pure-const.c (get_asm_expr_operands): Tuplify.
(get_asm_expr_operands): Tuplify.
(check_call): Tuplify. Add code to handle return value assignment.
(scan_function): Remove. Original code is tuplified and split into
two new functions scan_function_op and scan_function_stmt.
(scan_function_op): New function.
(scan_function_stmt): New function.
(analyze_function): Tuplify and re-enable previously disabled code.
* passes.c (init_optimization_passes): Re-enable pass_ipa_pure_const.
2008-04-11 Oleg Ryjkov <olegr@google.com>
* builtins.c (fold_call_stmt): Return the proper value.
* tree-ssa-ccp.c (maybe_fold_stmt_addition): Modify arguments to
allow this function to be called on a GIMPLE_ASSIGN.
(fold_stmt_r): Update the call to maybe_fold_stmt_addition.
(fold_gimple_assign): Manually call maybe_fold_stmt_addition to
fold a POINTER_PLUS_EXPR.
2008-04-11 Doug Kwan <dougkwan@google.com>
* tree-ssa-phiprop.c (File): Uncomment all previously disabled code.
(struct phiprop_d): Change type of vop_stmt to gimple.
(phivn_valid_p): Tuplify.
(phiprop_insert_phi): Tuplify.
(propagate_with_phi): Tuplify.
(tree_ssa_phiprop_1): Tuplify.
(tree_ssa_phiprop): Tuplify.
* passes.c (init_optimization_passes): Re-enable pass_phiprop.
2008-04-11 Rafael Espíndola <espindola@google.com>
* tree-ssa-math-opts.c (execute_cse_sincos_1): fix warning.
2008-04-10 Diego Novillo <dnovillo@google.com>
http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00913.html
* ipa-inline.c (cgraph_clone_inlined_nodes): Change uses
of DECL_SAVED_TREE with gimple_body.
(cgraph_decide_inlining_incrementally): Likewise.
* gimple-iterator.c (gsi_insert_seq_before_without_update):
Do nothing if SEQ is NULL.
(gsi_insert_seq_after_without_update): Likewise.
* tree-ssa-live.c (mark_all_vars_used_1): Do not handle
EXPR trees.
(remove_unused_locals): Mark the gimple_block of every
statement as used.
* tree-inline.c (remap_gimple_stmt): Forward declare.
(remap_decls): Tidy comments.
(remap_gimple_seq): New.
(copy_gimple_bind): New.
(remap_gimple_stmt): Call it.
Handle High GIMPLE statements.
(copy_bb): Regimplify operands on COPY_GSI instead of
GSI.
(copy_cfg_body): Tidy.
(copy_generic_body): Remove unused function.
(clone_body): Tuplify.
* c-common.c (c_warn_unused_result): Remove assertion for
FUNCTION_TYPE.
* gimple.c (gimple_seq_copy): Rename from
gimple_seq_deep_copy. Update all users.
(walk_gimple_stmt): Assert that STMT has no substatements
in the default case.
(gimple_copy_1): Merge into gimple_copy.
(gimple_copy): Always do deep copying.
Handle statements with substatements.
(gimple_shallow_copy): Remove unused function.
(gimple_deep_copy): Remove. Update all users.
* gimple.h: Tidy comments and structure fields
everywhere.
(gimple_has_substatements): New.
(walk_stmt_fn): Change last argument to struct walk_stmt_info *.
Update all users.
2008-04-10 Oleg Ryjkov <olegr@google.com>
* tree.h (struct tree_base): Added a new flag default_def_flag.
(SSA_NAME_IS_DEFAULT_DEF): Changed to use the new flag.
2008-04-08 Doug Kwan <dougkwan@google.com>
* gimplify.c (gimple_push_cleanup): Initialize cleanup_stmts to NULL.
2008-04-08 Doug Kwan <dougkwan@google.com>
* tree-tailcall.c (struct tailcall): Remove call_block and replace
call_bsi by call_gsi.
(independent_of_stmt_p): Change type of parameter 'at' to GIMPLE and
change all tree using code to GIMPLE using equivalent.
Remove parameter block_stmt_iterator type parameter bsi with
gimple_stmt_iterator type parameter gsi. Replace uses of bsi with
that of gsi in function body as appropriate.
(process_assignment): Remove parameter 'ass' and change type of
parameter 'stmt' to GIMPLE. Change all tree using code to GIMPLE
using equivalent.
(propagate_through_phis, eliminate_tail_call, optimize_tail_call):
Change all tree using code to GIMPLE using equivalent.
(find_tail_calls): Change all tree using code to GIMPLE using
equivalent. Remove code that handles GIMPLE_MODIFY_STMT containing
a CALL_EXPR.
(add_successor_phi_arg, adjust_return_value_with_ops,
update_accumulator_with_ops, adjust_accumulator_values,
create_tailcall_accumulator): New functions from refactoring of
duplicated logic.
(adjust_accumulator_values, adjust_return_value): Refactor.
(tree_optimize_tail_calls_1): Refactor and change all tree using code
to GIMPLE using equivalent. Remove code to reverse phi list.
* passes.c (init_optimization_passes): Re-enable pass_tail_recursion
and pass_tail_calls.
2008-04-04 Doug Kwan <dougkwan@google.com>
* tree-ssa-math-opts.c (struct occurrence): Change field type of
recip_def_stmt to gimple.
(is_division_by): Tuplify.
(insert_reciprocals): Tuplify.
(replace_reciprocals): Tuplify.
(execute_cse_reciprocals_1): Tuplify.
(execute_cse_reciprocals): Tuplify.
(maybe_record_sincos): Use vector of gimples instead of vector of
trees.
(execute_cse_sincos_1): Tuplify. When adjusting recorded old call
sites, generate new gimple assign statements and remove old gimple
call statements.
(execute_cse_sincos): Tuplify.
(execute_convert_to_rsqrt): Tuplify.
* passes.c (init_optimization_passes): Enable pass_cse_sincos,
pass_cse_reciprocals and pass_convert_to_rsqrt.
2008-04-04 Aldy Hernandez <aldyh@redhat.com>
* omp-low.c (gimple_build_cond_empty): New.
(expand_parallel_call): Convert COND_EXPR to GIMPLE_COND.
(expand_omp_for_generic): Same.
(expand_omp_for_static_nochunk): Same.
(expand_omp_for_static_chunk): Same.
(expand_omp_atomic_pipeline): Same.
2008-04-04 Diego Novillo <dnovillo@google.com>
http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00413.html
* tree-ssa-loop-im.c (movement_possibility): Return
MOVE_IMPOSSIBLE if that statement makes no assignment.
* tree-complex.c (get_component_ssa_name): Fix comment.
(set_component_ssa_name): Assert that COMP's definition
is LAST.
* cgraph.c (cgraph_update_edges_for_call_stmt): Tuplify.
(dump_cgraph_node): Likewise.
* tree.c (auto_var_in_fn_p): Fix comment.
* cgraphunit.c (verify_cgraph_node): Remove tuples hack
that avoided verifying nodes.
* gimple-pretty-print.c (dump_gimple_asm): Show the
volatile flag.
* gimple-dummy.c (optimize_inline_calls): Remove.
(tree_function_versioning): Remove.
(tree_versionalbe_function_p): Remove.
* ipa-inline.c (cgraph_clone_inlined_bodies): Re-format.
(cgraph_decide_inlining): Re-format.
(cgraph_decide_inlining_incrementally): Re-format.
(pass_ipa_inline): Re-format.
* gimplify.c (gimplify_call_expr): Carry all the
CALL_EXPR flags to the newly created GIMPLE_CALL.
(gimplify_asm_expr): Carry ASM_VOLATILE_P and ASM_INPUT_P
over to the new GIMPLE_ASM.
* tree-dfa.c (find_new_referenced_vars): Change argument
to gimple. Update all callers.
* cfgexpand.c (set_expr_location_r): New private.
(gimple_to_tree): Call it.
Set ASM_VOLATILE_P and ASM_INPUT_P for ASM_EXPRs.
Carry flags from GIMPLE_CALL for CALL_EXPRs.
Set TREE_BLOCK on the newly created expression.
* tree-inline.c: Tuplify.
* tree-inline.h: Tuplify.
* tree-optimize.c (execute_fixup_cfg): Tuplify.
* gimple.c (gimple_build_call_vec): Change second
argument type to VEC(tree, heap). Update all callers.
(gimple_build_assign_with_ops): If the LHS is an
SSA_NAME, set SSA_NAME_DEF_STMT on it.
(walk_gimple_seq): Change return type to gimple. Update
all users.
If walk_gimple_stmt returned a value, store it in
WI->CALLBACK_RESULT.
(walk_gimple_op): Walk gimple_call_chain_ptr() and
gimple_call_fn_ptr() for GIMPLE_CALL.
(walk_gimple_stmt): Add new local HANDLED_OPS.
If callback_stmt() sets HANDLED_OPS, return its return
value.
If any call to walk_gimple_seq returns a non-NULL value,
return WI->CALLBACK_RESULT.
(gimple_copy_1): New function.
(gimple_deep_copy): Rename from gimple_copy. Update all
users.
Call gimple_copy_1.
(gimple_shallow_copy): New.
(gimple_regimplify_operands): New.
* gimple.h (GF_ASM_INPUT): Define.
(GF_ASM_VOLATILE): Define.
(GF_CALL_CANNOT_INLINE): Define.
(GF_CALL_FROM_THUNK): Define.
(GF_CALL_RETURN_SLOT_OPT): Define.
(GF_CALL_VA_ARG_PACK): Define.
(gimple_stmt_iterator): Move earlier in the file.
(gimple_omp_return_nowait_p): Fix return expression.
(gimple_omp_section_last_p): Likewise.
(gimple_omp_parallel_combined_p): Likewise.
(gimple_call_noreturn_p): Likewise.
(gimple_call_nothrow_p): Likewise.
(gimple_asm_volatile_p): Likewise.
(gimple_try_catch_is_cleanup): Likewise.
(gimple_assign_set_rhs1): assert that RHS is a gimple
operand.
(is_gimple_call): New. Change all users that tested
gimple_code() == GIMPLE_CALL.
(gimple_call_fn_ptr): New.
(gimple_call_chain_ptr): New.
(gimple_call_set_chain): Accept NULL values for CHAIN.
(gimple_call_set_tail): Add bool argument specifying the
value of the flag. Update all users.
(gimple_asm_set_volatile): Likewise.
(gimple_call_set_cannot_inline): Rename from
gimple_call_mark_uninlinable. Add bool argument
specifying the value of the flag. Update all users.
(gimple_call_set_return_slot_opt): New.
(gimple_call_return_slot_opt_p): New.
(gimple_call_set_from_thunk): New.
(gimple_call_from_thunk_p): New.
(gimple_call_va_arg_pack_p): New.
(gimple_call_copy_flags): New.
(gimple_asm_set_input): New.
(gimple_asm_input_p): New.
(gimple_asm_clear_volatile): Remove.
(walk_stmt_fn): Add second argument bool *. Update all
users.
(struct walk_stmt_info): Add new field callback_result.
* tree-cfg.c (gimple_split_block): Tuplify.
(gimple_block_ends_with_condjump_p): Tuplify.
(need_fake_edge_p): Tuplify.
(gimple_flow_call_edges_add): Tuplify.
(gimple_purge_dead_abnormal_call_edges): Tuplify.
(gimple_purge_dead_eh_edges): Remove ATTRIBUTE_UNUSED.
(gimple_cfg_hooks): Add gimple_block_ends_with_condjump_p
and gimple_flow_call_edges_add
* passes.c (init_optimization_passes): Enable
pass_cleanup_cfg, pass_inline_parameters,
pass_ipa_inline and pass_apply_inline.
(execute_todo): Re-enable check for TODO_update_ssa_any
if need_ssa_update_p() returns true.
* tree-ssa-operands.c (ssa_operands_active): Return false
if cfun is NULL.
2008-04-04 Rafael Espíndola <espindola@google.com>
Merge with mainline @133632.
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
2008-04-04 Rafael Espíndola <espindola@google.com>
Merge with mainline @133631.
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
2008-04-04 Rafael Espíndola <espindola@google.com>
Merge with mainline @133630.
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
2008-04-03 Aldy Hernandez <aldyh@redhat.com>
* omp-low.c (expand_omp_sections): Use
gimple_omp_sections_control.
(lower_omp_sections): Same.
* gimplify.c (gimplify_omp_workshare): Adjust OMP clauses before
creating gimple tuple.
Add gimple tuple to sequence.
Set OMP_SECTIONS_CONTROL in newly created tuple.
* gimple.h (gimple_statement_omp_sections): Add control.
(gimple_omp_sections_control): New.
(gimple_omp_sections_control_ptr): New.
(gimple_omp_sections_set_control): New.
2008-04-03 Oleg Ryjkov <olegr@google.com>
* tree-nested.c (convert_nl_goto_receiver): Changed to hadle gimple
statements instead of trees.
(lower_nested_functions): Pass convert_nl_goto_receiver as the first
parameter to walk_all_functions.
2008-04-03 Rafael Espíndola <espindola@google.com>
Merge with mainline @133624.
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
2008-04-03 Rafael Espíndola <espindola@google.com>
Merge with mainline @133612.
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
2008-04-03 Aldy Hernandez <aldyh@redhat.com>
* tree-pretty-print.c (dump_generic_node): Remove
OMP_{RETURN,CONTINUE} cases.
* tree.h (OMP_RETURN_NOWAIT): Remove.
* omp-low.c (dump_omp_region): Rename OMP_{CONTINUE,RETURN} to
GIMPLE_OMP_{CONTINUE,RETURN}.
(expand_omp_for_generic): Handle new arguments to
GIMPLE_OMP_CONTINUE.
(expand_omp_for_static_nochunk): Same.
(expand_omp_for_static_chunk): Same.
(expand_omp_sections): Same.
(expand_omp): Rename all OMP_* to GIMPLE_OMP_*.
(lower_omp_sections): Rename OMP_CONTINUE to GIMPLE_OMP_CONTINUE.
(lower_omp_for): Same.
* tree-gimple.c (is_gimple_stmt): Remove OMP_{RETURN,CONTINUE}
cases.
* gsstruct.def: Add GSS_OMP_CONTINUE.
* gimple-pretty-print.c (dump_gimple_omp_continue): New.
(dump_gimple_omp_return): New.
(dump_gimple_stmt): Add cases for GIMPLE_OMP_{CONTINUE,RETURN}.
* gimplify.c (gimplify_expr): Remove cases for
OMP_{CONTINUE,RETURN}.
* tree.def (DEFTREECODE): Remove OMP_{RETURN,CONTINUE}.
* tree-cfgcleanup.c (cleanup_omp_return): Rename
OMP_SECTIONS_SWITCH to GIMPLE_OMP_SECTIONS_SWITCH.
* gimple.c (gss_for_code): GIMPLE_OMP_RETURN returns GSS_BASE.
GIMPLE_OMP_CONTINUE return GSS_OMP_CONTINUE.
(gimple_size): Adjust size of GIMPLE_OMP_{RETURN,CONTINUE}.
(gimple_build_omp_continue): Change arguments.
(walk_gimple_op): Walk GIMPLE_OMP_CONTINUE operands.
(walk_gimple_stmt): Remove GIMPLE_OMP_CONTINUE case.
* gimple.h (struct gimple_statement_omp_continue): New.
(union gimple_statement_d): Add gimple_omp_continue.
(gimple_build_omp_continue): Change argument types in prototype.
(gimple_omp_return_set_nowait): Rename OMP_RETURN to
GIMPLE_OMP_RETURN.
(gimple_omp_continue_control_def): New.
(gimple_omp_continue_control_def_ptr): New.
(gimple_omp_continue_set_control_def): New.
(gimple_omp_continue_control_use): New.
(gimple_omp_continue_control_use_ptr): New.
(gimple_omp_continue_set_control_use): New.
* tree-cfg.c (make_edges): Rename OMP_ to GIMPLE_OMP_.
(gimple_redirect_edge_and_branch): Same.
* tree-ssa-operands.c (get_expr_operands): Remove OMP_CONTINUE
case.
2008-04-02 Doug Kwan <dougkwan@google.com>
* tree-complex.c (expand_complex_comparison): Set condition code
correctly for the NE_EXPR case.
* cfgexpand.c (gimple_to_tree): Generate assignment to return value
if necessary.
2008-04-02 Rafael Espíndola <espindola@google.com>
Merge with mainline @133597.
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
2008-04-02 Rafael Espíndola <espindola@google.com>
Merge with mainline @133527.
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
2008-04-02 Rafael Espíndola <espindola@google.com>
Merge with mainline @133519.
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
2008-04-02 Rafael Espíndola <espindola@google.com>
Merge with mainline @133453.
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
2008-04-01 Doug Kwan <dougkwan@google.com>
Bill Maddox <maddox@google.com>.
* value-prof.c (interesting_stringop_to_profile_p) Call
validate_gimple_arglist instead of validate_arglist.
* tree.h (validate_arglist): New declaration.
* builtins.c (expand_builtin_setjmp_receiver, expand_builtin_longjmp,
expand_builtin_nonlocal_goto, expand_builtin_nonlocal_goto,
expand_builtin_update_setjmp_buf, expand_builtin_prefetch,
expand_builtin_apply, expand_builtin_return, expand_builtin_mathfn,
expand_builtin_mathfn_2, expand_builtin_mathfn_3,
expand_builtin_interclass_mathfn, expand_builtin_sincos,
expand_builtin_cexpi, expand_builtin_int_roundingfn,
expand_builtin_int_roundingfn_2, expand_builtin_pow,
expand_builtin_powi, expand_builtin_strlen, expand_builtin_strlen,
expand_builtin_strstr, expand_builtin_strchr, expand_builtin_strrchr,
expand_builtin_memcpy, expand_builtin_memcpy,
expand_builtin_mempcpy_args, expand_builtin_bcopy, expand_movstr,
expand_builtin_stpcpy, expand_builtin_strncpy, builtin_memset_gen_str,
expand_builtin_bzero, expand_builtin_memchr, expand_builtin_memcmp,
expand_builtin_strcmp, expand_builtin_strncmp, expand_builtin_strcat,
expand_builtin_strncat, expand_builtin_strspn, expand_builtin_alloca,
expand_builtin_bswap, expand_builtin_unop, expand_builtin_fputs,
expand_builtin_fabs, expand_builtin_copysign,
expand_builtin___clear_cache, expand_builtin_init_trampoline,
expand_builtin_adjust_trampoline, expand_builtin_signbit,
expand_builtin, validate_arg, expand_builtin_object_size,
expand_builtin_object_size, expand_builtin_memory_chk) Re-enable code
previously disabled for GIMPLE.
(expand_builtin_memcpy, expand_builtin_memset_args): Re-enable code
previously disabled for GIMPLE. Look up tree attribute for original
GIMPLE statement.
(validate_arglist): Use old interface of tree node instead of GIMPLE
statement.
(validate_gimple_arglist): New function.
* cfgexpand.c (gimple_to_tree): Set GIMPLE statement tree attribute
for builtin function calls.
* tree-flow.h (struct tree_ann_common_d): New field stmt.
* gimple.h (validate_gimple_arglist): New declaration.
(validate_arglist): Moved to tree.h.
2008-03-31 Oleg Ryjkov <olegr@google.com>
* gimplify.c (gimplify_switch_expr): Verify the return value from
gimplify_expr.
2008-03-31 Rafael Espíndola <espindola@google.com>
Merge with mainline @133452.
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
2008-03-31 Rafael Espíndola <espindola@google.com>
Merge with mainline @133440.
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
2008-03-31 Rafael Espíndola <espindola@google.com>
Merge with mainline @133423.
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
2008-03-30 Rafael Espíndola <espindola@google.com>
Merge with mainline @133342.
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
2008-03-28 Rafael Espíndola <espindola@google.com>
Merge with mainline @133341.
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
2008-03-28 Oleg Ryjkov <olegr@google.com>
* tree-eh.c (replace_goto_queue_1): Do a deep copy of the replacement
sequence.
(maybe_record_in_goto_queue): Set is_label flag when recording
GIMPLE_GOTOs.
(do_return_redirection, do_return_redirection): Changed to set
cont_stmt.
(lower_try_finally_onedest): Fix the code that assumes that gotos
themselves(instead of the labels) are recorded in the goto_queue.
(lower_try_finally_copy): Likewise.
(lower_try_finally_switch): Likewise, also fix the VEC_* operations.
* gimple.h (gimple_build_switch): Fixed comment.
2008-03-28 Doug Kwan <dougkwan@google.com>
* omp-low.c (expand_omp_sections): Fix build breakage due to an
uninitialized variable.
2008-03-28 Rafael Espíndola <espindola@google.com>
Merge with mainline @133315.
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
2008-03-28 Diego Novillo <dnovillo@google.com>
* omp-low.c (expand_omp_for_static_chunk): Initialize
V_MAIN and V_BACK.
(expand_omp_for): Initialize VIN.
2008-03-28 Rafael Espíndola <espindola@google.com>
Merge with mainline @133313.
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
2008-03-27 Doug Kwan <dougkwan@google.com>
* c-decl.c (merge_decls): Also copy gimple bodies of decls.
* gimplify.c (gimplify_call_expr): Do not exit early when
gimplifying __builtin_va_start().
2008-03-27 Oleg Ryjkov <olegr@google.com>
* gimple.c (walk_gimple_op): Add a check for assignments with more
than one operand on the LHS.
2008-03-27 Aldy Hernandez <aldyh@redhat.com>
* tree.c (empty_body_p): Remove.
* tree.h (empty_body_p): Remove prototype.
* omp-low.c (struct omp_context): Convert to tuples.
(struct omp_context): Comment and convert to tuples.
(scan_omp_op): New.
(is_parallel_ctx): Convert to tuples.
(extract_omp_for_data): Same.
(workshare_safe_to_combine_p): Same.
(get_ws_args_for): Same.
(determine_parallel_type): Same.
(use_pointer_for_field): Same.
(dump_omp_region): Same.
(debug_all_omp_regions): Same.
(new_omp_region): Same.
(new_omp_context): Same.
(scan_sharing_clauses): Same.
(create_omp_child_function): Same.
(scan_omp_parallel): Same.
(scan_omp_for): Same.
(scan_omp_sections): Same.
(scan_omp_single): Same.
(check_omp_nesting_restrictions): Same.
(scan_omp_1_op): New.
(scan_omp_1_stmt): Rename from scan_omp_1. Rewrite for tuples.
(scan_omp): Convert to tuples.
(build_omp_barrier): Same.
(maybe_lookup_ctx): Same.
(lower_rec_input_clauses): Same.
(lower_lastprivate_clauses): Same.
(lower_reduction_clauses): Same.
(lower_copyprivate_clauses): Same.
(lower_send_clauses): Same.
(lower_send_shared_vars): Same.
(expand_parallel_call): Same.
(remove_exit_barrier): Same.
(remove_exit_barriers): Same.
(optimize_omp_library_calls): Same.
(expand_omp_parallel): Same.
(expand_omp_for_generic): Comment out, and convert to tuples.
(expand_omp_for_static_nochunk): Convert to tuples.
(expand_omp_for_static_chunk): Same.
(expand_omp_for): Same.
(expand_omp_sections): Same.
(expand_omp_synch): Same.
(expand_omp_atomic_fetch_op): Same.
(expand_omp_atomic_pipeline): Same.
(expand_omp_atomic_mutex): Same.
(expand_omp_atomic): Same.
(expand_omp): Same.
(build_omp_regions_1): Same.
(execute_expand_omp): Enable.
(execute_lower_omp): Enable and convert to tuples.
* gimple-dummy.c (omp_reduction_init): Remove.
* tree-flow.h (struct omp_region): Convert 'type' to tuples.
(new_omp_region): Adjust prototype for tuples.
* gimple.c (empty_stmt_p): New.
(empty_body_p): New.
* gimple.h (empty_body_p): New prototype.
(gimple_has_location): Remove fixmes.
* tree-cfg.c (gimple_block_label): Remove ATTRIBUTE_UNUSED.
2008-03-27 Rafael Espíndola <espindola@google.com>
Merge with mainline @133311.
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
2008-03-27 Rafael Espíndola <espindola@google.com>
* gcc/tree-nested.c (save_tmp_var): Use gsi_insert_after_without_update
instead of gsi_insert_after.
2008-03-26 Jakub Staszak <kuba@et.pl>
* gimple.h (gimple_uid, gimple_set_uid): Defined.
(gimple_statement_base): Field UID added.
* tree-ssa-dse.c (execute_simple_dse): #if 0 removed, bitmap_empty_p
condition added. (memory_ssa_name_same, memory_address_same,
get_kill_of_stmt_lhs, dse_possible_dead_store_p, dse_optimize_stmt,
dse_record_phis, dse_finalize_block, tree_ssa_dse): Tuplified.
* passes.c (init_optimization_passes): pass_simple_dse and pass_dse
enabled.
* testsuite/gcc.dg/tree-ssa/ssa-dse-10.c: {dg-final} changed.
* testsuite/gcc.dg/tree-ssa/pr30375.c: {dg-final} changed.
2008-03-26 Rafael Espíndola <espindola@google.com>
* gcc/tree-ssa-operands.c (ssa_operands_active): Assert that cfun is
not NULL.
* gcc/tree-nested.c (init_tmp_var): Use
gsi_insert_before_without_update instead of gsi_insert_before.
2008-03-25 Rafael Espíndola <espindola@google.com>
Merge with mainline @133309.
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
2008-03-25 Rafael Espíndola <espindola@google.com>
Merge with mainline @133306.
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
2008-03-25 Bill Maddox <maddox@google.com>
* tree-ssa-dom.c (loop_depth_of_name): Tuplify.
* tree-ssa-copy.c (stmt_may_generate_copy,
copy_prop_visit_assignment, copy_prop_visi_cond_stmt,
copy_prop_visit_stmt, copy_prop_visit_phi_node,
init_copy_prop, execute_copy_prop): Tuplify.
* passes.c (init_optimization_passes):
Enable pass_copy_prop.
2008-03-25 Rafael Espíndola <espindola@google.com>
Merge with mainline @133257.
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
2008-03-25 Oleg Ryjkov <olegr@google.com>
* gimple.c (gimple_build_bind): Added a new parameter - the
containing block.
* gimple.h (gimple_build_bind): Changed the header accordingly.
* gimplify.c (gimplify_bind_expr, gimplify_function_tree): Updated
the callers of gimple_build_bind.
(gimplify_body): Updated the call to gimple_build_bind and moved
the copying of block information into gimplify_bind_expr.
2008-03-25 Rafael Espíndola <espindola@google.com>
Merge with mainline @133255.
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
2008-03-25 Rafael Espíndola <espindola@google.com>
Merge with mainline @133251.
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
2008-03-25 Rafael Espíndola <espindola@google.com>
Merge with mainline @133250.
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
2008-03-24 Rafael Espíndola <espindola@google.com>
Merge with mainline @133246.
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
2008-03-24 Rafael Espíndola <espindola@google.com>
Merge with mainline @133222.
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
2008-03-24 Andrew Pinski <pinskia@gmail.com>
* passes.c (init_optimization_passes): Enable pass_split_crit_edges.
2008-03-24 Rafael Espíndola <espindola@google.com>
Merge with mainline @133169.
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
2008-03-21 Rafael Espíndola <espindola@google.com>
Merge with mainline @133168.
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
2008-03-21 Rafael Espíndola <espindola@google.com>
Merge with mainline @133167.
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
2008-03-20 Oleg Ryjkov <olegr@google.com>
* tree-eh.c (lower_try_finally): Correctly set the lowered sequence.
2008-03-20 Jakub Staszak <kuba@et.pl>
Oleg Ryjkov <olegr@google.com>
* tree-ssa-sink.c (is_hidden_global_store): Tuplified.
* tree-ssa-dce.c (mark_stmt_necessary, mark_operand_necessary,
mark_stmt_if_obviously_necessary,
mark_control_dependent_edges_necessary,
find_obviously_necessary_stmts, propagate_necessity,
remove_dead_phis, eliminate_unnecessary_stmts, tree_dce_init,
tree_dce_done): Tuplified.
* tree-flow.h (is_hidden_global_store): Tuplified the declaration.
* passes.c (init_optimization_passes): Enabled pass_dce and
pass_cd_dce.
2008-03-20 Oleg Ryjkov <olegr@google.com>
* tree-complex.c (init_dont_simulate_again, complex_visit_stmt,
update_complex_components, expand_complex_operations_1): Consider
GIMPLE_CALLs with a lhs, not only GIMPLE_ASSIGNs.
* gimplify.c (get_tmp_var_for): Removed.
(gimplify_call_expr): Remove call to get_tmp_var_for, set
gimple_register on a new lhs in some cases.
2008-03-20 Rafael Espíndola <espindola@google.com>
Merge with mainline @133162.
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
2008-03-20 Rafael Espíndola <espindola@google.com>
Merge with mainline @133161.
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
2008-03-20 Rafael Espíndola <espindola@google.com>
Merge with mainline @133140.
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
2008-03-20 Rafael Espíndola <espindola@google.com>
Merge with mainline @133138.
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
2008-03-18 Bill Maddox <maddox@google.com>
* builtins.c (fold_builtin_object_size):
Enable call to compute_builtin_object_size, previously
stubbed out awaiting tuplification.
* tree-ssa-ccp.c (valid_gimple_rhs_p, valid_gimple_call_p,
move_ssa_defining_stmt_for_defs, update_call_from_tree):
Deleted, moved to tree-ssa-propagate.c.
(get_maxval_strlen): Use gimple_assign_single_p.
Handle assignment with unary NOP correctly.
* tree-ssa-propagate.c (valid_gimple_rhs_p, valid_gimple_call_p,
move_ssa_defining_stmt_for_defs, update_call_from_tree):
Moved here from tree-ssa-ccp.c.
* tree-ssa-propagate.h (valid_gimple_rhs_p, valid_gimple_call_p,
move_ssa_defining_stmt_for_defs, update_call_from_tree): Declared.
* gimple-dummy.c (compute_builtin_object_size): Removed dummy.
* tree_object_size.c (addr_object_size, alloc_object_size)
Tuplified.
(pass_through_call, compute_builtin_object_size): Tuplified.
(expr_object_size): Tuplified. Some cases broken out.
(plus_expr_object_size): Deleted.
(call_object_size, unknown_object_size, plus_stmt_object_size):
New functions. Handle cases broken out from expr_object_size.
(cond_expr_object_size): Fix comment.
(collect_object_sizes_for): Tuplify.
(check_for_plus_in_loops_1, check_for_plus_in_loops): Tuplify.
(compute_object_sizes): Tuplify.
* gimple.c (gimple_assign_single_p, gimple_assign_unary_nop_p):
New functions.
* gimple.h (gimple_assign_single_p, gimple_assign_unary_nop_p):
Declare.
* passes.c (init_optimization_passes): Enable pass_object_sizes.
2008-03-18 Diego Novillo <dnovillo@google.com>
Oleg Ryjkov <olegr@google.com>
* gimplify.c (gimplify_body): Copy the block information from
the tree function body to gimple function body.
(gimplify_function_tree): Correctly wrap the function body
into the try/finally block if creating one.
* gimple.c (gimple_seq_has_side_effects): Removed.
* gimple.h (gimple_seq_has_side_effects): Removed declaration.
* tree-cfg.c (remove_useless_stmts_tf, remove_useless_stmts_tc):
Modified to use gimple_seq_empty_p instead of
gimple_seq_has_side_effects.
2008-03-18 Aldy Hernandez <aldyh@redhat.com>
* gimple.c (walk_gimple_stmt): Collapse common code.
Add case for GIMPLE_WITH_CLEANUP_EXPR.
2008-03-17 Zdenek Dvorak <ook@ucw.cz>
* gimple-iterator.c (gsi_for_stmt): Use gsi_start_phis.
(gsi_start_phis): New function.
* gimple.h (gsi_start_phis): Declare.
* tree-into-ssa.c (initialize_flags_in_bb, rewrite_initialize_block,
rewrite_add_phi_arguments, rewrite_update_init_block,
prepare_block_for_update): Use gsi_start_phis.
* tree-complex.c (init_dont_simulate_again, update_phi_components):
Ditto.
* tree-ssa-loop-manip.c (find_uses_to_rename_bb,
verify_loop_closed_ssa, split_loop_exit_edge,
tree_transform_and_unroll_loop): Ditto.
* tree-scalar-evolution.c (loop_closed_phi_def,
analyze_scalar_evolution_for_all_loop_phi_nodes, scev_const_prop):
Ditto.
* tree-phinodes.c (reserve_phi_args_for_new_edge, remove_phi_args):
Ditto.
* tree-ssa-copyrename.c (rename_ssa_copies): Ditto.
* tree-ssa-ccp.c (ccp_initialize): Ditto.
* tree-ssa-loop-ivopts.c (find_bivs, mark_bivs,
find_interesting_uses_outside, find_interesting_uses,
determine_set_costs): Ditto.
* tree-ssa-propagate.c (simulate_block, ssa_prop_init,
substitute_and_fold): Ditto.
* tree-ssa-alias.c (dump_points_to_info, create_structure_vars): Ditto.
* gimple-pretty-print.c (dump_phi_nodes): Ditto.
* tree-data-ref.c (stmts_from_loop): Ditto.
* tree-ssa-coalesce.c (build_ssa_conflict_graph,
create_outofssa_var_map, coalesce_partitions): Ditto.
* tree-dfa.c (collect_dfa_stats): Ditto.
* tree-cfgcleanup.c (phi_alternatives_equal, remove_forwarder_block,
remove_forwarder_block_with_phi, merge_phi_nodes): Ditto.
* tree-ssa-live.c (remove_unused_locals, calculate_live_on_exit,
verify_live_on_entry): Ditto.
* tree-ssa.c (ssa_redirect_edge, flush_pending_stmts, verify_ssa,
execute_late_warn_uninitialized, execute_update_addresses_taken):
Ditto.
* tree-outof-ssa.c (eliminate_build, eliminate_virtual_phis,
rewrite_trees, remove_ssa_form, insert_backedge_copies):
Ditto.
* cfgloop.c (find_subloop_latch_edge_by_ivs): Ditto.
* tree-ssa-structalias.c (compute_points_to_sets, ipa_pta_execute):
Ditto.
* tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block,
reinstall_phi_args, verify_stmts, gimple_make_forwarder_block,
add_phi_args_after_copy_edge, gimple_lv_adjust_loop_header_phi):
Ditto.
2008-03-16 Zdenek Dvorak <ook@ucw.cz>
* tree-ssa-loop-ivopts.c: Tuplify.
* gimple-dummy.c (multiplier_allowed_in_address_p, multiply_by_cost,
tree_ssa_iv_optimize): Removed.
* tree-ssa-phiopt.c (empty_block_p): Tuplify.
* gimple.h (gimple_cond_lhs_ptr, gimple_cond_rhs_ptr): New.
* passes.c (init_optimization_passes): Enable pass_iv_optimize.
* gimplify.c (gimplify_omp_workshare, gimplify_expr): Avoid using
uninitialized sequence.
2008-03-13 Bill Maddox <maddox@google.com>
* tree.h (fold_call_stmt, gimple_fold_builtin_snprintf_chk):
Declare new functions.
* builtins.c (fold_builtin_object_size): Disable call to
compute_builtin_object_size, which has not been converted.
(gimple_rewrite_call_expr, gimple_fold_builtin_sprintf_chk,
gimple_fold_builtin_snprintf_chk, gimple_fold_builtin_varargs,
fold_call_stmt): New functions.
* tree-chrec.h (build_polynomial_chrec): Silence uninitialized
variable warning.
* tree-ssa-ccp.c (likely_value): Recognize additional cases
of constant values.
(surely_varying_stmt_p): Note that return statements are not
interesting to CCP as they no longer contain assignments.
(ccp_fold): Add missing spaces.
(valid_gimple_call_p): New function.
(get_maxval_strlen): Don't trip over unary operator.
(ccp_fold_builtin): Use fold_call_stmt and
gimple_fold_builtin_snprintf_chk. Enable disabled
call now that target has been converted for tuples.
Add missing spaces.
(move_ssa_defining_stmt_for_defs): New function.
(update_call_from_tree): New function.
(fold_gimple_call): Use update_call_from_tree.
(fold_stmt_inplace): Assert that operand folding tree
walk goes to completion, i.e., does not return non-null.
(optimize_stack_restore, optimize_stdarg_builtin):
Convert to tuples
(convert_to_gimple_builtin): Removed.
(gimplify_and_update_call_from_tree): New function.
Replaces convert_to_gimple_builtin.
(execute_fold_all_builtins): Convert to tuples.
* tree-ssa-propagate.c (replace_uses_in): Removed
replaced_address argument. Made function static.
(replace_vuses_in): Removed replaced_address argument.
(substitute_and_fold): Removed replaced_address boolean,
which was set but never examined.
* tree-ssa-propagate.h (replace_uses_in): Removed declaration.
* gimple-iterator.c (update_modified_stmt): Moved to
head of file to avoid a forward declaration.
(update_modified_stmts): New function.
(gsi_insert_seq_before_without_update,
gsi_insert_before_without_update,
gsi_insert_seq_after_without_update,
gsi_insert_after_without_update): New functions.
(gsi_insert_before, gsi_insert_seq_before,
gsi_insert_after, gsi_insert_seq_after): Call the
_without_update variants.
* gimplify.c (gimplify_seq_add_stmt, gimplify_seq_add_seq):
New functions.
(gimple_pop_condition, gimplify_return_expr, gimplify_loop_expr,
gimplify_switch_expr, gimplify_case_label_expr,
gimplify_self_mod_expr, gimplify_call_expr,
gimplify_modify_expr_to_memcpy, gimplify_modify_expr_to_memset,
gimplify_init_ctor_eval_range, gimpllify_modify_expr_complex_part,
gimplify_modify_expr, gimplify_asm_expr, gimplify_cleanup_point_expr,
gimple_push_cleanup, gimplify_omp_parallel, gimplify_omp_atomic,
gimplify_expr, gimplify_body, gimplify_function_tree): When adding
to statement sequences in the gimplifier, do not update operands.
* tree-dfa.c (find_new_referenced_vars): Convert to tuples.
* tree-flow.h (find_new_referenced_vars): Declare with new signature.
* gimple.h (gimple_return_set_retval): Fix argument validation.
(gsi_insert_seq_before_without_update,
gsi_insert_before_without_update,
gsi_insert_seq_after_without_update,
gsi_insert_after_without_update): Declare new functions.
* gimple.c (gimple_build_return): Rely on gimple_return_set_retval
to perform argument validation.
* passes.c (init_optimization_passes): Enable pass_fold_builtins.
2008-03-13 Oleg Ryjkov <olegr@google.com>
* tree-cfg.c (gimplify_val): Removed.
(gimplify_build1, gimplify_build2, gimplify_build3): Use
force_gimple_operand_gsi instead of gimplify_val.
* tree-complex.c (extract_component): Use force_gimple_operand_gsi
instead of gimplify_val.
* tree-vect-generic.c (expand_vector_parallel): Ditto.
2008-03-13 Diego Novillo <dnovillo@google.com>
Oleg Ryjkov <olegr@google.com>
* tree-ssa-operands.c (get_expr_operands): Handle FILTER_EXPR and
EXC_PTR_EXPR.
2008-03-12 Diego Novillo <dnovillo@google.com>
Oleg Ryjkov <olegr@google.com>
* cfgexpand.c (gimple_to_tree): Record the correct type when
converting GIMPLE_CALL.
2008-03-12 Zdenek Dvorak <ook@ucw.cz>
* tree-ssa-loop-im.c (stmt_cost, rewrite_bittest,
determine_invariantness_stmt, gather_mem_refs_stmt):
Use gimple_assign_rhs_code.
* cfgexpand.c (gimple_to_tree): Ditto.
* tree-inline.c (estimate_num_insns): Ditto.
* tree-vect-generic.c (expand_vector_operations_1): Ditto.
* tree-ssa-ccp.c (likely_value, ccp_fold, evaluate_stmt,
* gimple.c (gimple_fold, gimple_assign_set_rhs_with_ops): Ditto.
* tree-ssa-structalias.c (handle_ptr_arith): Ditto.
fold_gimple_assign): Ditto.
* value-prof.c (gimple_divmod_fixed_value_transform): Ditto.
* tree-ssa-loop-ch.c (copy_loop_headers): Ditto.
* tree-ssa-propagate.c (stmt_makes_single_load,
substitute_and_fold): Ditto.
* tree-ssa-loop-niter.c (chain_of_csts_start): Exclude memory loads.
(get_val_for): Assert that the statement is an assignment.
(derive_constant_upper_bound_assign,
expand_simple_operations): Use gimple_assign_rhs_code.
* tree-ssa-loop-manip.c (create_iv, ip_normal_pos,
standard_iv_increment_position, determine_exit_conditions,
tree_transform_and_unroll_loop): Tuplify.
* tree-scalar-evolution.c (interpret_expr): Fail for chrecs.
(interpret_gimple_assign, follow_ssa_edge_in_rhs): Use
gimple_assign_rhs_code.
* tree-gimple.c (gimple_assign_rhs_code): New function.
* tree-gimple.h (gimple_assign_rhs_code): Declare.
* tree-ssa-loop-ivopts.c (single_dom_exit): Enable.
* gimple-dummy.c (compute_data_dependences_for_loop, dump_ddrs,
free_data_refs, free_dependence_relations,
gimple_duplicate_loop_to_header_edge, tree_ssa_prefetch_arrays,
estimated_loop_iterations_int): Removed.
* tree-ssa-loop-ivcanon.c (tree_num_loop_insns): Tuplify.
* predict.c, tree-data-ref.c, tree-ssa-loop-prefetch.c: Tuplify.
* tree-data-ref.h (struct data_reference, struct rdg_vertex): Change
the type of stmt to gimple.
(get_references_in_stmt, create_data_ref, rdg_vertex_for_stmt,
stores_from_loop, remove_similar_memory_refs,
have_similar_memory_accesses): Declaration changed.
* gimple-iterator.c (gsi_insert_seq_on_edge_immediate): New.
* gimple-pretty-print.c (dump_gimple_assign): Dump nontemporal
move. Use gimple_assign_rhs_code.
(dump_unary_rhs, dump_binary_rhs): Use gimple_assign_rhs_code.
* gimplify.c (gimplify_modify_expr): Set lhs of the assignment to
the new SSA name.
* tree-ssa-coalesce.c (build_ssa_conflict_graph,
create_outofssa_var_map): Use gimple_assign_copy_p.
* tree-predcom.c (mark_virtual_ops_for_renaming): Enable.
* tree-inline.c (estimate_num_insns): Use gimple_assign_rhs_code.
* tree-flow.h (mark_virtual_ops_for_renaming): Declaration changed.
* gimple.h (struct gimple_statement_base): Change unused_4 flag
to nontemporal_move flag.
(gimple_assign_nontemporal_move_p, gimple_assign_set_nontemporal_move):
New functions.
(gsi_insert_seq_on_edge_immediate): Declare.
(gimple_assign_rhs2): Return NULL if the statement does not have two
operands.
(gimple_assign_subcode): Removed.
* tree-cfg.c (verify_types_in_gimple_assign): Use
gimple_assign_rhs_code.
(gimple_lv_adjust_loop_header_phi, gimple_lv_add_condition_to_bb):
Tuplify.
(gimple_cfg_hooks): Enable lv_add_condition_to_bb and
lv_adjust_loop_header_phi hooks.
* passes.c (init_optimization_passes): Enable pass_profile,
pass_check_data_deps and pass_loop_prefetch.
2008-03-11 Diego Novillo <dnovillo@google.com>
* tree-ssa-operands.h: Added declaration of add_to_addressable_set.
* tree-ssa-operands.h (add_to_addressable_set): New function.
(gimple_add_to_addresses_taken): Moved most of the logic to
add_addressable_set.
* tree-ssa-structalias.c (update_alias_info): Record the variables
whose address is taken inside a phi node.
2008-03-11 Aldy Hernandez <aldyh@redhat.com>
* tree-phinodes.c (allocate_phi_node): Update for tuples.
* gimplify.c (gimplify_function_tree): Dump memory stats.
* gimple.c: Declare gimple_alloc_counts, gimple_alloc_sizes,
and gimple_alloc_kind_names.
(gimple_alloc): Gather statistics for tuples.
(gimple_build_asm_1): Same.
(gimple_seq_alloc): Same.
(dump_gimple_statistics): New.
* gimple.h: Define gimple_alloc_kind.
(gimple_alloc_kind): New.
(dump_gimple_statistics): Protoize.
* tree-ssa-copy.c (replace_exp_1): Mark for_propagation as unused
(merged from mainline).
2008-03-11 Diego Novillo <dnovillo@google.com>
Merge with mainline @133081.
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
2008-03-06 Diego Novillo <dnovillo@google.com>
Merge with mainline @132948
* configure.ac (ACX_PKGVERSION): Update revision merge string.
* configure: Regenerate.
2008-03-06 Diego Novillo <dnovillo@google.com>
* config/rs6000/rs6000.c (rs6000_alloc_sdmode_stack_slot):
Call walk_gimple_op.
* tree-complex.c (expand_complex_div_wide): Call
split_block with STMT.
2008-03-06 Diego Novillo <dnovillo@google.com>
* gimple.h (struct gimple_statement_base): Rename field
'locus' to 'location'. Update all users.
(gimple_location): Rename from gimple_locus. Update all
users.
(gimple_set_location): Rename from gimple_set_locus.
Update all users.
(gimple_has_location): Rename from gimple_location_empty_p.
Change sign of return value. Update all users.
* gimplify.c (tree_annotate_all_with_location): Rename
from tree_annotate_all_with_locus.
(annotate_all_with_location): Rename from
annotate_all_with_locus.
2008-03-05 Diego Novillo <dnovillo@google.com>
* gimple.c (gimple_set_lhs): Remove return keywords.
2008-03-05 David Daney <ddaney@avtrex.com>
* builtins.c (expand_builtin___clear_cache): Disable call to
validate_arglist.
* config/mips/mips.c (mips_gimplify_va_arg_expr): Tuplify.
2008-03-05 Bill Maddox <maddox@google.com>
* tree-ssa-ccp.c (dump_lattice_value, debug_lattice_value):
Re-enable functions #if'd out.
(test_default_value, likely_value, surely_varying_stmt_p,
ccp_initialize, ccp_visit_phi_node, ccp_fold, evaluate_stmt,
visit_assignment, visit_cond_stmt, ccp_visit_stmt):
Convert to tuples.
(fold_gimple_call): Don't trip over call that simplifies to
another call, not a constant.
* tree-ssa-propagate.c (ssa_prop_init): Initialize in-worklist
flag for phi nodes as well as statements.
(valid_gimple_expression_p): Add fixme comment to remove this.
function. It currently has static uses, but asserts when called.
(stmt_makes_single_load, stmt_makes_single_store):
Convert to tuples
(replace_phi_args_in): Convert to tuples. Fix typo in comment.
* gimple.c (gimple_copy_no_def_use, gimple_get_lhs,
gimple_set_lhs): New function.
* gimple.h (gimple_copy_no_def_use, gimple_get_lhs,
gimple_set_lhs): Declare new function.
* tree-cfg.c (replace_uses_by): Add comment regarding empty
operands.
* passes.c (init_optimization_passes): Enable pass_ccp and
pass_store_ccp.
2008-03-05 David Daney <ddaney@avtrex.com>
* tree-phinodes.c (allocate_phi_node): Fix syntax errors from
previous commit.
2008-03-05 Rafael Espíndola <espindola@google.com>
* tree-phinodes.c (allocate_phi_node): free free_phinodes[bucket]
if empty.
2008-03-05 Diego Novillo <dnovillo@google.com>
http://gcc.gnu.org/ml/gcc/2008-03/msg00256.html
* fold-const.c (tree_binary_nonnegative_warnv_p): Fix
invalid C90 declaration.
(tree_single_nonnegative_warnv_p): Likewise.
* gimplify.c (gimplify_bind_expr): Likewise.
(gimplify_return_expr): Likewise.
2008-03-04 Zdenek Dvorak <ook@ucw.cz>
* tree-ssa-loop-niter.c, tree-scalar-evolution.c: Tuplified.
* tree-ssa-loop-manip.c (split_loop_exit_edge): Ditto.
* tree-chrec.c (chrec_fold_plus, chrec_apply, chrec_convert_1,
convert_affine_scev, chrec_convert_rhs, chrec_convert,
chrec_convert_aggressive): Pass statements as gimple.
* tree-scalar-evolution.h (get_loop_exit_condition, simple_iv):
Type changed.
* tree-chrec.h (chrec_convert, chrec_convert_rhs): Ditto.
* tree-ssa-loop-ivopts.c (abnormal_ssa_name_p,
idx_contains_abnormal_ssa_name_p, contains_abnormal_ssa_name_p,
expr_invariant_in_loop_p, tree_int_cst_sign_bit): Enabled.
* gimple-dummy.c (chrec_dont_know, chrec_known, chrec_not_analyzed_yet,
analyze_scalar_evolution, chrec_contains_symbols_defined_in_loop,
estimate_numbers_of_iterations, expr_invariant_in_loop_p,
free_numbers_of_iterations_estimates,
free_numbers_of_iterations_estimates_loop, get_loop_exit_condition,
instantiate_parameters, nowrap_type_p. scev_const_prop. scev_finalize,
scev_initialize, scev_probably_wraps_p, scev_reset,
tree_int_cst_sign_bit, number_of_iterations_exit, loop_niter_by_eval,
substitute_in_loop_info): Removed.
* tree-ssa-loop.c (tree_loop_optimizer_init): Merged into...
(tree_ssa_loop_init): ... here. Enable scev_initialize call.
(tree_ssa_loop_done): Enable scev finalization.
* gimple-iterator.c (gsi_insert_seq_nodes_before): Allow inserting
at the end of basic block.
(gsi_for_stmt): Handle phi nodes.
* cfgloop.h (struct nb_iter_bound): Change type of stmt field to gimple.
* tree-flow.h (scev_probably_wraps_p, convert_affine_scev,
stmt_dominates_stmt_p): Types changed.
* Makefile.in (gt-tree-scalar-evolution.h): Enable.
* gimple.c (extract_ops_from_tree): Export.
(gimple_copy): Do not share bitmaps.
* gimple.h (extract_ops_from_tree): Declare.
(gimple_call_set_lhs): Allow lhs to be NULL.
* tree-cfg.c (add_phi_args_after_copy_edge,
add_phi_args_after_copy_bb): Tuplify.
* passes.c (init_optimization_passes): Enable pass_ch, pass_scev_cprop.
2008-03-04 Oleg Ryjkov <olegr@google.com>
* tree-ssa-dse.c (execute_simple_dse): Commented out.
* passes.c (init_optimization_passes): Disabling pass_simple_dse.
2008-03-04 Bill Maddox <maddox@google.com>
* tree-cfg.c (remove_useless_stmts_1):
Correctly distinguish try-catch and try-finally.
2008-03-04 Oleg Ryjkov <olegr@google.com>
* tree-ssa-dse.c (execute_simple_dse): Tuplified.
* gimplify.c (gimplify_return_expr): Copy the NO_WARNING flag
to the newly created expr from the tree.
* tree-cfg.c (gimplify_build1): Tuplified.
* passes.c (init_optimization_passes): Enabled
pass_warn_function_return, pass_update_address_taken,
pass_simple_dse and pass_build_alias passes.
2008-03-04 Rafael Espíndola <espindola@google.com>
* fold-const.c (tree_simple_nonnegative_warnv_p): New.
(tree_unary_nonnegative_warnv_p): New.
(tree_binary_nonnegative_warnv_p): New.
(tree_single_nonnegative_warnv_p): New.
(tree_invalid_nonnegative_warnv_p): New.
(tree_expr_nonnegative_warnv_p): Redefine in term of the new functions.
2008-03-04 Aldy Hernandez <aldyh@redhat.com>
* gimple.c (walk_gimple_seq): Do not set wi->gsi.
(walk_gimple_stmt): Set wi->gsi.
* tree-cfg.c (verify_stmt): Use walk_gimple_op instead of
walk_gimple_stmt.
(verify_stmts): Same.
2008-03-04 Diego Novillo <dnovillo@google.com>
http://gcc.gnu.org/ml/gcc-patches/2008-03/msg00219.html
* expr.c (expand_expr_real): Call lookup_expr_eh_region.
* tree-eh.c (lookup_stmt_eh_region_fn):
(lookup_stmt_eh_region): Fix comment.
(lookup_expr_eh_region): Handle missing cfun and missing
EH table.
(record_in_finally_tree): Fix comment.
(collect_finally_tree_1): Remove handler for
GIMPLE_SWITCH.
(maybe_record_in_goto_queue): Remove local variable
NEW_IS_LABEL.
Record GIMPLE_GOTOs instead of their label.
(verify_norecord_switch_expr): Retrieve the CASE_LABEL
from the case label expression.
(do_return_redirection): Change sign of assertion.
(lower_try_finally_onedest): Assert that
TF->GOTO_QUEUE[0] contains a GIMPLE statement.
(lower_try_finally_copy): Assert that Q contains a GIMPLE
statement.
(lower_try_finally_switch): Build a new GIMPLE label for
CONT_STMT.
(mark_eh_edge): Tuplify.
(verify_eh_edges): Tuplify.
(tree_can_throw_external): Remove unused function.
(optimize_double_finally): Remove #if 0.
* gimple-pretty-print.c (GIMPLE_NIY): Tidy.
(dump_gimple_resx): Fix format string for
dump_gimple_fmt.
* gimplify.c (gimplify_cleanup_point_expr): Initialize
BODY_SEQUENCE.
* calls.c (emit_call_1): Remove ATTRIBUTE_UNUSED markers.
* cfgexpand.c (gimple_to_tree) <GIMPLE_NOP>: Assign new
expression to T.
<GIMPLE_RESX>: Handle.
Always assign the value from lookup_stmt_eh_region to
ANN->RN.
* tree-cfg.c (start_recording_case_labels):
(recording_case_labels_p): Re-enable.
(get_cases_for_edge): Likewise.
(gimple_verify_flow_info): Re-enable call to
verify_eh_edges.
(gimple_redirect_edge_and_branch): Re-enable handling of
GIMPLE_SWITCH.
(gimple_block_ends_with_call_p): Tuplify.
(struct gimple_cfg_hooks): Enable block_ends_with_call_p
callback.
2008-03-04 Rafael Espíndola <espindola@google.com>
* fold-const.c (tree_unary_nonzero_warnv_p): New.
(tree_binary_nonzero_warnv_p): New.
(tree_single_nonzero_warnv_p): New.
(tree_expr_nonzero_warnv_p): Redefine using the new functions.
2008-03-04 Aldy Hernandez <aldyh@redhat.com>