aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-pre.c
AgeCommit message (Collapse)AuthorFilesLines
2012-05-14tree-vect-data-refs.c (vect_setup_realignment): Remove call to ↵Richard Guenther1-4/+0
mark_symbols_for_renaming. 2012-05-14 Richard Guenther <rguenther@suse.de> * tree-vect-data-refs.c (vect_setup_realignment): Remove call to mark_symbols_for_renaming. (vect_permute_load_chain): Likewise. * tree-vect-loop.c (vect_is_slp_reduction): Update stmt instead of calling mark_symbols_for_renaming. * tree-vect-stmts.c (read_vector_array): Remove call to mark_symbols_for_renaming. (write_vector_array): Likewise. (vectorizable_call): Likewise. (vectorizable_store): Likewise. (vectorizable_load): Likewise. * matrix-reorg.c (transform_allocation_sites): Likewise. * tree-ssa-pre.c (create_expression_by_pieces): Likewise. (create_expression_by_pieces): Likewise. From-SVN: r187469
2012-05-14re PR tree-optimization/53340 (rnflow.f90 is ~20% slower after revision 187092)Richard Guenther1-2/+2
2012-05-14 Richard Guenther <rguenther@suse.de> PR tree-optimization/53340 * tree-ssa-pre.c (op_valid_in_sets): Fix error in last commit. From-SVN: r187457
2012-05-14stor-layout.c (bit_from_pos): Distribute conversion to bitsizetype into a ↵Eric Botcazou1-18/+4
PLUS_EXPR byte offset. * stor-layout.c (bit_from_pos): Distribute conversion to bitsizetype into a PLUS_EXPR byte offset. * tree-ssa-pre.c (can_value_number_call): Delete. (compute_avail): Skip all statements with side effects. <GIMPLE_CALL>: Skip calls to internal functions. From-SVN: r187450
2012-05-04re PR tree-optimization/53168 (ICE in find_or_generate_expression, at ↵Richard Guenther1-56/+22
tree-ssa-pre.c:3053) 2012-05-04 Richard Guenther <rguenther@suse.de> PR tree-optimization/53168 * tree-ssa-pre.c (phi_translate_1): Only handle type-punned memory reads when the result is a constant we can pun. * gcc.dg/torture/pr53168.c: New testcase. * gcc.dg/tree-ssa/ssa-pre-30.c: Likewise. From-SVN: r187153
2012-05-03tree-ssa-pre.c (valid_in_sets): Remove checking of trapping operations.Richard Guenther1-26/+35
2012-05-03 Richard Guenther <rguenther@suse.de> * tree-ssa-pre.c (valid_in_sets): Remove checking of trapping operations. (prune_clobbered_mems): Do it here. Do not uselessly sort expressions. (compute_avail): Do not add possibly trapping operations to EXP_GEN if they might not be executed in the block. * gcc.dg/tree-ssa/ssa-pre-27.c: Remove XFAIL. From-SVN: r187096
2012-05-03tree-ssa-pre.c (debug_bitmap_sets_for): New function.Richard Guenther1-73/+55
2012-05-03 Richard Guenther <rguenther@suse.de> * tree-ssa-pre.c (debug_bitmap_sets_for): New function. (union_contains_value): Remove. (vro_valid_in_sets): Likewise. (op_valid_in_sets): New function. (valid_in_sets): Use op_valid_in_sets. (insert_into_preds_of_block): Move dumping ... (do_regular_insertion): ... here. (do_partial_partial_insertion): ... and here. Dump that we've found a partial partial redundancy. (insert): Dump the current insert iteration. From-SVN: r187092
2012-04-28re PR tree-optimization/38785 (huge performance regression on EEMBC bitmnp01)Joern Rennecke1-8/+40
PR tree-optimization/38785 * common.opt (ftree-partial-pre): New option. * doc/invoke.texi: Document it. * opts.c (default_options_table): Initialize flag_tree_partial_pre. * tree-ssa-pre.c (do_partial_partial_insertion): Insert only if it will benefit speed path. (execute_pre): Use flag_tree_partial_pre. Co-Authored-By: Maxim Kuvyrkov <maxim@codesourcery.com> Co-Authored-By: Steven Bosscher <steven@gcc.gnu.org> From-SVN: r186928
2012-04-24re PR tree-optimization/53085 (writes to volatile struct members is missing)Richard Guenther1-0/+1
2012-04-24 Richard Guenther <rguenther@suse.de> PR tree-optimization/53085 * tree-ssa-pre.c (eliminate): Do not eliminate volatile redundant stores. * g++.dg/torture/pr53085.C: New testcase. From-SVN: r186764
2012-04-05gimple-iterator.c (gsi_remove): Return whether EH edges need to be cleanup.Richard Guenther1-5/+2
2012-04-05 Richard Guenther <rguenther@suse.de> * gimple-iterator.c (gsi_remove): Return whether EH edges need to be cleanup. * gimple.h (gsi_remove): Adjust. * tree-ssa-operands.c (unlink_stmt_vdef): Optimize. * tree-ssa-dom.c (optimize_stmt): Use gsi_remove result. * tree-ssa-dse.c (dse_optimize_stmt): Likewise. * tree-ssa-forwprop.c (remove_prop_source_from_use): Likewise. * tree-ssa-math-opts.c (execute_optimize_widening_mul): Likewise. * tree-ssa-pre.c (eliminate): Likewise. From-SVN: r186159
2012-03-29tree-flow.h (struct pre_expr_d): Remove forward declaration.Richard Guenther1-2/+2
2012-03-29 Richard Guenther <rguenther@suse.de> * tree-flow.h (struct pre_expr_d): Remove forward declaration. (add_to_value): Remove. (print_value_expressions): Likewise. * tree-ssa-pre.c (add_to_value): Make static. (print_value_expressions): Likewise. * gimple.h (gimple_adjust_this_by_delta): Remove. * gimple-fold.c (gimple_adjust_this_by_delta): Likewise. From-SVN: r185956
2012-03-22re PR tree-optimization/52548 (missed PRE optimization when function call ↵Richard Guenther1-18/+86
follows to-be hoisted variable) 2012-03-22 Richard Guenther <rguenther@suse.de> PR tree-optimization/52548 * tree-ssa-pre.c (valid_in_sets): Remove handling of invalidation because of clobbers. (prune_clobbered_mems): New function. (compute_antic_aux): Use it to prune ANTIC_OUT. (compute_partial_antic_aux): Use it to prune PA_IN. (compute_avail): Only insert expressions into EXP_GEN that are not invalidated when translated up to the beginning of the block. * gcc.dg/tree-ssa/ssa-pre-29.c: New testcase. From-SVN: r185691
2012-03-22re PR tree-optimization/52459 (PRE performs stupid inserts)Richard Guenther1-0/+4
2012-03-22 Richard Guenther <rguenther@suse.de> PR tree-optimization/52459 * tree-ssa-pre.c (inhibit_phi_insertion): Do not inhibit PHI insertion for calls. From-SVN: r185676
2012-02-15re PR lto/52178 (Ada bootstrap failure in LTO mode)Eric Botcazou1-12/+11
PR lto/52178 * gimple.c (iterative_hash_gimple_type): Use RECORD_OR_UNION_TYPE_P. (iterative_hash_canonical_type): Likewise. * tree-ssa-pre.c (fini_pre): Clean up the CFG only after purging all the dead edges. From-SVN: r184246
2012-01-27re PR tree-optimization/51990 (ICE in copy_reference_ops_from_ref)Tom de Vries1-0/+17
2012-01-27 Tom de Vries <tom@codesourcery.com> PR tree-optimization/51990 * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Handle WITH_SIZE_EXPR. * tree-ssa-pre.c (create_component_ref_by_pieces_1): Same. From-SVN: r183614
2012-01-20re PR tree-optimization/51903 (ICE: in gimple_purge_all_dead_eh_edges, at ↵Richard Guenther1-2/+4
tree-cfg.c:7196 with -fnon-call-exceptions) 2012-01-20 Richard Guenther <rguenther@suse.de> PR tree-optimization/51903 * tree-ssa-pre.c (eliminate): Properly purging of EH edges when removing stmts. * g++.dg/torture/pr51903.C: New testcase. From-SVN: r183329
2012-01-09re PR tree-optimization/51775 (FAIL: gnat.dg/pack9.adb scan-tree-dump-not ↵Richard Guenther1-1/+12
optimized "gnat_rcheck") 2012-01-09 Richard Guenther <rguenther@suse.de> PR tree-optimization/51775 * tree-ssa-sccvn.c (visit_use): Value-number throwing stmts. * tree-ssa-pre.c (eliminate): Properly fixup EH info. From-SVN: r183012
2011-12-23re PR tree-optimization/43491 (Unnecessary temporary for global register ↵Bin Cheng1-12/+23
variable) 2011-12-22 Bin Cheng <bin.cheng@arm.com> Richard Guenther <rguenther@suse.de> PR tree-optimization/43491 * tree-ssa-pre.c (eliminate): Don't replace global register variable when it is the RHS of a single assign. testsuite: * gcc.dg/tree-ssa/pr43491.c: New test. Co-Authored-By: Richard Guenther <rguenther@suse.de> From-SVN: r182650
2011-11-10re PR tree-optimization/51042 (endless recursion in phi_translate)Richard Guenther1-65/+48
2011-11-10 Richard Guenther <rguenther@suse.de> PR tree-optimization/51042 * tree-ssa-pre.c (phi_translate_1): Avoid recursing on self-referential expressions. Refactor code to avoid duplication. * gcc.dg/torture/pr51042.c: New testcase. From-SVN: r181256
2011-10-18re PR tree-optimization/50767 (ICE: in refs_may_alias_p_1, at ↵Richard Guenther1-1/+2
tree-ssa-alias.c:1004 with -O2 -fno-tree-copy-prop -fno-tree-dominator-opts) 2011-10-18 Richard Guenther <rguenther@suse.de> PR tree-optimization/50767 * tree-ssa-pre.c (create_expression_by_pieces): Update the folded statement. * gcc.dg/torture/pr50767.c: New testcase. From-SVN: r180134
2011-09-27re PR middle-end/43864 (Same basic blocks should be merged)Tom de Vries1-1/+11
2011-09-27 Tom de Vries <tom@codesourcery.com> PR middle-end/43864 * tree-ssa-tail-merge.c: New file. (struct same_succ_def): Define. (same_succ, const_same_succ): New typedef. (struct bb_cluster_def): Define. (bb_cluster, const_bb_cluster): New typedef. (struct aux_bb_info): Define. (BB_SIZE, BB_SAME_SUCC, BB_CLUSTER, BB_VOP_AT_EXIT): Define. (gvn_uses_equal): New function. (same_succ_print, same_succ_print_traverse, update_dep_bb) (stmt_update_dep_bb, local_def, same_succ_hash) (inverse_flags, same_succ_equal, same_succ_alloc, same_succ_delete) (same_succ_reset): New function. (same_succ_htab, same_succ_edge_flags) (deleted_bbs, deleted_bb_preds): New var. (debug_same_succ): New function. (worklist): New var. (print_worklist, add_to_worklist, find_same_succ_bb, find_same_succ) (init_worklist, delete_worklist, delete_basic_block_same_succ) (same_succ_flush_bbs, purge_bbs, update_worklist): New function. (print_cluster, debug_cluster, update_rep_bb) (add_bb_to_cluster, new_cluster, delete_cluster): New function. (all_clusters): New var. (alloc_cluster_vectors, reset_cluster_vectors, delete_cluster_vectors) (merge_clusters, set_cluster): New function. (gimple_equal_p, gsi_advance_bw_nondebug_nonlocal, find_duplicate) (same_phi_alternatives_1, same_phi_alternatives, bb_has_non_vop_phi) (deps_ok_for_redirect_from_bb_to_bb, deps_ok_for_redirect) (find_clusters_1, find_clusters): New function. (update_vuses, vop_phi, vop_at_entry, replace_block_by): New function. (update_bbs): New var. (apply_clusters): New function. (update_debug_stmt, update_debug_stmts): New function. (tail_merge_optimize): New function. tree-pass.h (tail_merge_optimize): Declare. * tree-ssa-pre.c (execute_pre): Use tail_merge_optimize. * Makefile.in (OBJS-common): Add tree-ssa-tail-merge.o. (tree-ssa-tail-merge.o): New rule. * opts.c (default_options_table): Set OPT_ftree_tail_merge by default at OPT_LEVELS_2_PLUS. * tree-ssa-sccvn.c (vn_valueize): Move to ... * tree-ssa-sccvn.h (vn_valueize): Here. * timevar.def (TV_TREE_TAIL_MERGE): New timevar. * common.opt (ftree-tail-merge): New switch. * params.def (PARAM_MAX_TAIL_MERGE_COMPARISONS) (PARAM_MAX_TAIL_MERGE_ITERATIONS): New parameter. * doc/invoke.texi (Optimization Options, -O2): Add -ftree-tail-merge. (-ftree-tail-merge, max-tail-merge-comparisons) (max-tail-merge-iterations): New item. From-SVN: r179275
2011-09-27re PR tree-optimization/50363 (internal compiler error: verify_gimple failed)Richard Guenther1-5/+9
2011-09-27 Richard Guenther <rguenther@suse.de> PR tree-optimization/50363 * tree-ssa-pre.c (create_expression_by_pieces): Handle pointer conversions in POINTER_PLUS_EXPRs properly. * gcc.dg/torture/pr50363.c: New testcase. From-SVN: r179247
2011-09-09tree-ssa-pre.c (create_expression_by_pieces): Fold the last statement.Richard Guenther1-0/+4
2011-09-09 Richard Guenther <rguenther@suse.de> * tree-ssa-pre.c (create_expression_by_pieces): Fold the last statement. From-SVN: r178727
2011-09-06re PR tree-optimization/48317 (SCCVN does not handle vector constructors)Richard Guenther1-76/+63
2011-09-06 Richard Guenther <rguenther@suse.de> PR tree-optimization/48317 * tree-ssa-sccvn.h (struct vn_nary_op_s): Make op a true trailing array. (sizeof_vn_nary_op): New inline function. (vn_nary_op_lookup_pieces): Adjust. (vn_nary_op_insert_pieces): Likewise. * tree-ssa-sccvn.c (vn_nary_op_eq): Also compare the length. (init_vn_nary_op_from_pieces): Adjust signature. Deal with any number of operands. (vn_nary_length_from_stmt): New function. (init_vn_nary_op_from_stmt): Adjust for CONSTRUCTOR handling. (vn_nary_op_lookup_pieces): Adjust signature and allocate properly sized temporary. (vn_nary_op_lookup): Likewise. (vn_nary_op_lookup_stmt): Likewise. (vn_nary_op_insert_into): Likewise. (vn_nary_op_insert_stmt): Likewise. (visit_use): Handle CONSTRUCTOR as nary. * tree-ssa-pre.c (phi_translate_1): Adjust. (create_expression_by_pieces): Likewise. (compute_avail): Likewise. * gcc.dg/tree-ssa/ssa-fre-31.c: New testcase. From-SVN: r178595
2011-09-02re PR middle-end/50260 (internal compiler error: Segmentation fault at ↵Michael Matz1-9/+3
../../gcc/gcc/tree-ssa-live.c:88) PR middle-end/50260 * ipa-split.c (split_function): Call add_referenced_var. * tree-ssa-phiopt.c (cond_store_replacement): Don't call get_var_ann. (cond_if_else_store_replacement_1): Ditto. * tree-ssa-pre.c (get_representative_for): Ditto. (create_expression_by_pieces): Ditto. (insert_into_preds_of_block): Ditto. * tree-sra.c (create_access_replacement): Ditto. (get_replaced_param_substitute): Ditto. From-SVN: r178489
2011-08-17tree.h (convert_to_ptrofftype_loc): New function.Richard Guenther1-2/+2
2011-08-17 Richard Guenther <rguenther@suse.de> * tree.h (convert_to_ptrofftype_loc): New function. (convert_to_ptrofftype): Define. * builtins.c (expand_builtin_bzero): Use size_type_node. (fold_builtin_bzero): Likewise. (std_gimplify_va_arg_expr): Build the BIT_AND_EXPR on the pointer. * c-typeck.c (build_unary_op): Use convert_to_ptrofftype_loc. * cgraphunit.c (thunk_adjust): Use fold_build_pointer_plus_loc. (cgraph_redirect_edge_call_stmt_to_callee): Use size_int. * expr.c (expand_expr_addr_expr_1): Use fold_build_pointer_plus. * fold-const.c (build_range_check): Negate using the original type. (fold_unary_loc): Use fold_build_pointer_plus_loc. * gimple-fold.c (gimple_adjust_this_by_delta): Use convert_to_ptrofftype. * gimplify.c (gimplify_self_mod_expr): Likewise. * graphite-clast-to-gimple.c (clast_to_gcc_expression): Likewise. (graphite_create_new_loop_guard): Likewise. * graphite-sese-to-poly.c (my_long_long): Remove. (scop_ivs_can_be_represented): Adjust. * tree-cfg.c (verify_gimple_assign_unary): Use ptrofftype_p. * tree-chrec.c (chrec_fold_plus_1): Use fold_build_pointer_plus. * tree-loop-distribution.c (build_size_arg_loc): Use size_type_node. (generate_memset_zero): Simplify. * tree-mudflap.c: Use fold_convert, not convert. * tree-predcom.c (suitable_reference_p): Expand DR_OFFSET in its own type. (determine_offset): Likewise for DR_STEP. (valid_initializer_p): Likewise. * tree-profile.c (prepare_instrumented_value): Convert the pointer to an integer type of same size. * tree-scalar-evolution.c (interpret_rhs_expr): Do not refer to sizetype without need. * tree-ssa-address.c (tree_mem_ref_addr): Likewise. * tree-ssa-loop-ivopts.c (find_bivs): Use convert_to_ptrofftype. * tree-ssa-loop-manip.c (create_iv): Likewise. (determine_exit_conditions): Adjust comment. * tree-ssa-pre.c (create_expression_by_pieces): Use convert_to_ptrofftype. * tree-ssa-structalias.c (get_constraint_for_1): Likewise. * varasm.c (array_size_for_constructor): Compute using double_ints. From-SVN: r177828
2011-07-19tree-ssa-forwprop.c (lookup_logical_inverted_value): Remove TRUTH_*_EXPR ↵Richard Guenther1-9/+0
handling. 2011-07-19 Richard Guenther <rguenther@suse.de> * tree-ssa-forwprop.c (lookup_logical_inverted_value): Remove TRUTH_*_EXPR handling. * tree-ssa-operands.c (get_expr_operands): Likewise. * tree-ssa-pre.c (fully_constant_expression): Likewise. * tree-ssa-uninit.c (use_pred_not_overlap_with_undef_path_pre): Likewise. (is_and_or_or): Likewise. (is_norm_cond_subset_of): Likewise. From-SVN: r176463
2011-06-14dumping cleanup phase 1 -- Removing TODO_dump_funcDavid Li1-2/+2
From-SVN: r175051
2011-05-04tree.h (int_const_binop): Remove notrunc argument.Richard Guenther1-1/+1
2011-05-04 Richard Guenther <rguenther@suse.de> * tree.h (int_const_binop): Remove notrunc argument. * fold-const.c (int_const_binop): Remove notrunc argument. Always create integer constants that are properly truncated. (extract_muldiv_1): Expand one notrunc int_const_binop caller. (const_binop): Remove zero notrunc argument to int_const_binop. (size_binop_loc): Likewise. (fold_div_compare): Likewise. (maybe_canonicalize_comparison_1): Likewise. (fold_comparison): Likewise. (fold_binary_loc): Likewise. (multiple_of_p): Likewise. * expr.c (store_constructor): Likewise. * gimple-fold.c (maybe_fold_offset_to_array_ref): Likewise. (maybe_fold_stmt_addition): Likewise. * ipa-prop.c (ipa_modify_call_arguments): Likewise. * stor-layout.c (layout_type): Likewise. * tree-data-ref.c (tree_fold_divides_p): Likewise. * tree-sra.c (build_ref_for_offset): Likewise. (build_user_friendly_ref_for_offset): Likewise. * tree-ssa-address.c (maybe_fold_tmr): Likewise. * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Likewise. * tree-ssa-loop-niter.c (inverse): Likewise. * tree-ssa-pre.c (create_component_ref_by_pieces_1): Likewise. * tree-ssa.c (maybe_rewrite_mem_ref_base): Likewise. * tree-switch-conversion.c (check_range): Likewise. (build_constructors): Likewise. * tree-vect-generic.c (expand_vector_piecewise): Likewise. * tree-vrp.c (set_and_canonicalize_value_range): Likewise. (extract_range_from_assert): Likewise. (vrp_int_const_binop): Likewise. (extract_range_from_binary_expr): Likewise. (extract_range_from_unary_expr): Likewise. (check_array_ref): Likewise. (find_case_label_range): Likewise. (simplify_div_or_mod_using_ranges): Likewise. * tree-cfg.c (group_case_labels_stmt): Use double-ints for comparing case labels for merging. ada/ * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to int_const_binop. (pos_to_constructor): Likewise. fortran/ * trans-types.c (gfc_get_array_type_bounds): Remove zero notrunc argument to int_const_binop. From-SVN: r173356
2011-04-27re PR tree-optimization/48772 (ICE: SIGSEGV in walk_non_aliased_vuses ↵Richard Guenther1-1/+9
(gimple.h:1100) with -O -fnon-call-exceptions -fno-tree-ccp -fno-tree-dce) 2011-04-27 Richard Guenther <rguenther@suse.de> PR tree-optimization/48772 * tree-ssa-pre.c (eliminate): Update call stmts after elimination only. * g++.dg/pr48772.C: New testcase. From-SVN: r173019
2011-04-20remove useless if-before-free testsJim Meyering1-2/+1
Change "if (E) free (E);" to "free (E);" everywhere except in the libgo/, intl/, zlib/ and classpath/ directories. Also transform equivalent variants like "if (E != NULL) free (E);" and allow an extra cast on the argument to free. Otherwise, the tested and freed "E" expressions must be identical, modulo white space. From-SVN: r172785
2011-04-20Makefile.in (INTERNAL_FN_DEF, [...]): Define.Richard Sandiford1-1/+5
gcc/ * Makefile.in (INTERNAL_FN_DEF, INTERNAL_FN_H): Define. (GIMPLE_H): Include $(INTERNAL_FN_H). (OBJS-common): Add internal-fn.o. (internal-fn.o): New rule. * internal-fn.def: New file. * internal-fn.h: Likewise. * internal-fn.c: Likewise. * gimple.h: Include internal-fn.h. (GF_CALL_INTERNAL): New gf_mask. (gimple_statement_call): Put fntype into a union with a new internal_fn field. (gimple_build_call_internal): Declare. (gimple_build_call_internal_vec): Likewise. (gimple_call_same_target_p): Likewise. (gimple_call_internal_p): New function. (gimple_call_internal_fn): Likewise. (gimple_call_fntype): Return null for internal calls. (gimple_call_set_fntype): Assert that the function is not internal. (gimple_call_set_fn): Likewise. (gimple_call_set_fndecl): Likewise. (gimple_call_set_internal_fn): New function. (gimple_call_addr_fndecl): Handle null functions. (gimple_call_return_type): Likewise null types. * gimple.c (gimple_build_call_internal_1): New function. (gimple_build_call_internal): Likewise. (gimple_build_call_internal_vec): Likewise. (gimple_call_same_target_p): Likewise. (gimple_call_flags): Handle calls to internal functions. (gimple_call_fnspec): New function. (gimple_call_arg_flags, gimple_call_return_flags): Use it. (gimple_has_side_effects): Handle null functions. (gimple_rhs_has_side_effects): Likewise. (gimple_call_copy_skip_args): Handle calls to internal functions. * cfgexpand.c (expand_call_stmt): Likewise. * expr.c (expand_expr_real_1): Assert that the call isn't internal. * gimple-fold.c (gimple_fold_call): Handle null functions. (gimple_fold_stmt_to_constant_1): Don't fold calls to internal functions. * gimple-low.c (gimple_check_call_args): Handle calls to internal functions. * gimple-pretty-print.c (dump_gimple_call): Likewise. * ipa-prop.c (ipa_analyze_call_uses): Handle null functions. * tree-cfg.c (verify_gimple_call): Handle calls to internal functions. (do_warn_unused_result): Likewise. * tree-eh.c (same_handler_p): Use gimple_call_same_target_p. * tree-ssa-ccp.c (ccp_fold_stmt): Handle calls to internal functions. * tree-ssa-dom.c (hashable_expr): Use the gimple statement to record the target of a call. (initialize_hash_element): Update accordingly. (hashable_expr_equal_p): Use gimple_call_same_target_p. (iterative_hash_hashable_expr): Handle calls to internal functions. (print_expr_hash_elt): Likewise. * tree-ssa-pre.c (can_value_number_call): Likewise. (eliminate): Handle null functions. * tree-ssa-sccvn.c (visit_use): Handle calls to internal functions. * tree-ssa-structalias.c (get_fi_for_callee): Likewise. (find_func_aliases): Likewise. * value-prof.c (gimple_ic_transform): Likewise. (gimple_indirect_call_to_profile): Likewise. * lto-streamer-in.c (input_gimple_stmt): Likewise. * lto-streamer-out.c (output_gimple_stmt): Likewise. From-SVN: r172758
2011-04-18gimple.h (gimple_call_addr_fndecl): New function.Richard Guenther1-5/+10
2011-04-18 Richard Guenther <rguenther@suse.de> * gimple.h (gimple_call_addr_fndecl): New function. (gimple_call_fndecl): Use it. * gimple-fold.c (gimple_fold_call): Fold away OBJ_TYPE_REFs for direct calls. * tree-ssa-ccp.c (ccp_fold_stmt): Remove OBJ_TYPE_REF folding. * tree-ssa-pre.c (eliminate): Also simplify indirect OBJ_TYPE_REFs. From-SVN: r172644
2011-03-31tree-ssa-pre.c (create_component_ref_by_pieces_1): Drop a zero minimum index ↵Eric Botcazou1-2/+5
only if it is redundant. * tree-ssa-pre.c (create_component_ref_by_pieces_1) <ARRAY_REF>: Drop a zero minimum index only if it is redundant. From-SVN: r171800
2011-03-24re PR tree-optimization/46562 (CCP currently needs iteration for &a[i])Richard Guenther1-2/+5
2011-03-24 Richard Guenther <rguenther@suse.de> PR tree-optimization/46562 * tree.c (build_invariant_address): New function. * tree.h (build_invariant_address): Declare. * tree-dfa.c (get_addr_base_and_unit_offset): Wrap around a renamed function moved ... * tree-flow-inline.h (get_addr_base_and_unit_offset_1): ... here. Take valueization callback parameter. * tree-flow.h (gimple_fold_stmt_to_constant): Declare. * gimple-fold.h: New file. * tree-ssa-ccp.c (ccp_fold): Use gimple_fold_stmt_to_constant_1. (ccp_fold, fold_const_aggregate_ref, fold_ctor_reference, fold_nonarray_ctor_reference, fold_array_ctor_reference, fold_string_cst_ctor_reference, get_base_constructor): Move ... * gimple-fold.c: ... here. (gimple_fold_stmt_to_constant_1): New function split out from ccp_fold. Take a valueization callback parameter. Valueize all operands. (gimple_fold_stmt_to_constant): New wrapper function. (fold_const_aggregate_ref_1): New function split out from fold_const_aggregate_ref. Take a valueization callback parameter. (fold_const_aggregate_ref): Wrap fold_const_aggregate_ref_1. * tree-ssa-sccvn.c (simplify_binary_expression): Simplify invariant POINTER_PLUS_EXPRs to invariant form. (vn_valueize): New function. (try_to_simplify): Simplify by using gimple_fold_stmt_to_constant. * tree-vrp.c (vrp_valueize): New function. (vrp_visit_assignment_or_call): Use gimple_fold_stmt_to_constant to fold statements to constants. * tree-ssa-pre.c (eliminate): Properly guard propagation of function declarations. * Makefile.in (tree-ssa-sccvn.o, tree-vrp.o, gimple-fold.o, tree-ssa-ccp.o): Add gimple-fold.h dependencies. * c-c++-common/pr46562-2.c: New testcase. * c-c++-common/pr46562.c: Likewise. From-SVN: r171386
2011-02-15re PR middle-end/47743 (PRE ICE in fold_convert_loc)Richard Guenther1-0/+6
2011-02-15 Richard Guenther <rguenther@suse.de> PR tree-optimization/47743 * tree-ssa-pre.c (phi_translate_1): If we didn't get a value-number for a non-type-compatible VN lookup bail out. * gcc.dg/torture/pr47743.c: New testcase. From-SVN: r170173
2011-02-14re PR tree-optimization/46494 (ICE: verify_flow_info failed when casting-out ↵Eric Botcazou1-1/+4
attribute noreturn with -fno-tree-ccp -fno-tree-fre -ftree-vrp) PR tree-optimization/46494 * loop-unroll.c (split_edge_and_insert): Adjust comment. * loop-init.c (loop_optimizer_finalize): Do not call verify_flow_info. (pass_rtl_loop_done): Add TODO_verify_flow. * fwprop.c (pass_rtl_fwprop): Likewise. * modulo-sched.c (pass_sms): Likewise. * tree-ssa-dom.c (pass_dominator): Likewise. * tree-ssa-loop-ch.c (pass_ch): Likewise. * tree-ssa-loop.c (pass_complete_unrolli): Likewise. (pass_tree_loop_done): Likewise. * tree-ssa-pre.c (execute_pre): Likewise. * tree-ssa-reassoc.c (pass_reassoc): Likewise. * tree-ssa-sink.c (pass_sink_code): Likewise. * tree-vrp.c (pass_vrp): Likewise. From-SVN: r170141
2011-02-07re PR tree-optimization/47615 (ICE: too deep recursion in ↵Richard Guenther1-1/+1
phi_translate/phi_translate_1 with -ftree-pre -fno-tree-fre -fno-tree-sra) 2011-02-07 Richard Guenther <rguenther@suse.de> PR tree-optimization/47615 * tree-ssa-sccvn.h (run_scc_vn): Take a vn-walk mode argument. * tree-ssa-sccvn.c (default_vn_walk_kind): New global. (run_scc_vn): Initialize it. (visit_reference_op_load): Use it. * tree-ssa-pre.c (execute_pre): Use VN_WALK if in PRE. * g++.dg/opt/pr47615.C: New testcase. From-SVN: r169888
2011-01-21re PR tree-optimization/47365 (wrong code with -O -ftree-pre)Richard Guenther1-8/+24
2011-01-21 Richard Guenther <rguenther@suse.de> PR tree-optimization/47365 * tree-ssa-sccvn.h (vn_lookup_kind): Declare. (vn_reference_lookup_pieces): Adjust. (vn_reference_lookup): Likewise. * tree-ssa-sccvn.c (vn_walk_kind): New static global. (vn_reference_lookup_3): Only look through kills if in VN_WALKREWRITE mode. (vn_reference_lookup_pieces): Adjust. (vn_reference_lookup): Likewise. (visit_reference_op_load): Likewise. (visit_reference_op_store): Likewise. * tree-ssa-pre.c (phi_translate_1): Use VN_WALK mode. (compute_avail): Likewise. (eliminate): Likewise. * gcc.dg/torture/pr47365.c: New testcase. * gcc.dg/tree-ssa/pr47392.c: Likewise. From-SVN: r169089
2010-11-03re PR tree-optimization/46165 (ICE: verify_flow_info failed when casting-out ↵Jakub Jelinek1-0/+6
attribute noreturn with -fno-tree-ccp -fno-tree-copy-prop -fno-tree-dce) PR tree-optimization/46165 * tree-ssa-pre.c (eliminate): Return TODO_cleanup_cfg if changing a normal call into noreturn call. * gcc.dg/pr46165.c: New test. From-SVN: r166236
2010-10-21basic-block.h (single_succ_edge): Use gcc_checking_assert.Nathan Froyd1-9/+3
* basic-block.h (single_succ_edge): Use gcc_checking_assert. (single_pred_edge, ei_container, ei_next, ei_prev): Likewise. * cfghooks.c (fixup_reorder_chain): Likewise. * cfgrtl.c (cfg_layout_merge_blocks): Likewise. * cgraph.c (cgraph_add_thunk): Likewise. (cgraph_create_edge_1): Likewise. (cgraph_create_virtual_clone): Likewise. * ddg.c (add_cross_iteration_register_deps): Likewise. * dwarf2out.c (modified_type_die): Likewise. * emit-rtl.c (set_mem_alias_set): Likewise. * ggc-zone.c (zone_allocate_marks): Likewise. * gimple-iterator.c (gsi_move_to_bb_end): Likewise. * gimple.c (iterative_hash_gimple_type): Likewise. * graphite-scop-detection.c (create_single_entry_edge): Likewise. (create_single_exit_edge): Likewise. * haifa-sched.c (choose_ready): Likewise. * lto-streamer-in.c (input_gimple_stmt): Likewise. * passes.c (execute_todo): Likewise. * sched-ebb.c (begin_schedule_ready): Likewise. * sel-sched.c (code_motion_process_successors): Likewise. * tree-call-cdce.c (gen_conditions_for_pow): Likewise. * tree-cfg-cleanup.c (tree_forwarder_block_p): Likewise. * tree-flow-inline.h (link_imm_use, move_use_after_head): Likewise. (phi_arg_index_from_use, phi_ssa_name_p): Likewise. * tree-into-ssa.c (insert_updated_phi_nodes_for): Likewise. * tree-ssa-coalesce.c (ssa_conflicts_test_p): Likewise. (ssa_conflicts_add): Likewise. * tree-ssa-copy.c (replace_exp): Likewise. * tree-ssa-dom.c (eliminate_redundant_computations): Likewise. * tree-ssa-forwprop.c (simple_gimple_switch): Likewise. * tree-ssa-math-opts.c (execute_cse_reciprocals): Likewise. * tree-ssa-pre.c (bitmap_value_insert_into_set): Likewise. (compute_antic): Likewise. * tree-ssa-ter.c (add_to_partition_kill_list): Likewise. (add_dependence): Likewise. (process_replaceable, kill_expr, find_replaceable_exprs): Likewise. * tree-vrp.c (supports_overflow_infinity): Likewise. (make_overflow_infinity, negative_overflow_infinity): Likewise. (avoid_overflow_infinity, register_new_assert_for): Likewise. (process_assert_insertions_for): Likewise. * var-tracking.c (dv_is_value_p, dv_as_decl, dv_from_decl): Likewise. (dv_from_value, variable_union, find_loc_in_1pdv): Likewise. (intersect_loc_chains, variable_merge_over_cur): Likewise. From-SVN: r165774
2010-10-18tree-flow.h (gimple_purge_all_dead_abnormal_call_edges): Declare.Eric Botcazou1-6/+47
* tree-flow.h (gimple_purge_all_dead_abnormal_call_edges): Declare. * tree-cfg.c (gimple_purge_dead_abnormal_call_edges): Move around and rewrite modelled on gimple_purge_dead_eh_edges. (gimple_purge_all_dead_abnormal_call_edges): New function. * tree-inline.c (expand_call_inline): Call gimple_purge_dead_eh_edges directly instead of through gimple_purge_dead_abnormal_call_edges. * tree-ssa-pre.c (need_ab_cleanup): New static variable. (eliminate): Set bit in need_ab_cleanup for the basic block if we have removed AB side-effects from one of its statements. (init_pre): Initialize need_ab_cleanup. (fini_pre): Purge dead abnormal call edges and clean up the CFG if bits are set in need_ab_cleanup. Free need_ab_cleanup afterward. From-SVN: r165646
2010-09-06tree.def (MISALIGNED_INDIRECT_REF): Remove.Richard Guenther1-20/+0
2010-09-06 Richard Guenther <rguenther@suse.de> * tree.def (MISALIGNED_INDIRECT_REF): Remove. * tree.h (INDIRECT_REF_P): Only check for INDIRECT_REF. (build_aligned_type): Declare. * tree.c (check_qualified_type): Also compare TYPE_ALIGN. (check_aligned_type): New function. (build_aligned_type): Likewise. * expr.c (expand_assignment): Handle misaligned stores via TARGET_MEM_REF and MEM_REF using movmisalign_optab. (expand_expr_real_1): Likewise. (safe_from_p): Remove MISALIGNED_INDIRECT_REF handling. * tree-vect-stmts.c (vectorizable_store): Do not build MISALIGNED_INDIRECT_REF but initialize alignment information. (vectorizable_load): Likewise. * builtins.c (get_object_alignment): Remove MISALIGNED_INDIRECT_REF handling. * cfgexpand.c (expand_debug_expr): Likewise. * dwarf2out.c (loc_list_from_tree): Likewise. * fold-const.c (maybe_lvalue_p): Likewise. (operand_equal_p): Likewise. (build_fold_addr_expr_with_type_loc): Likewise. * gimplify.c (gimplify_addr_expr): Likewise. (gimplify_expr): Likewise. * tree-cfg.c (verify_types_in_gimple_min_lval): Likewise. (verify_gimple_assign_single): Likewise. * tree-dump.c (dequeue_and_dump): Likewise. (tree_could_trap_p): Likewise. * tree-predcom.c (ref_at_iteration): Likewise. * tree-pretty-print.c (dump_generic_node): Likewise. (op_code_prio): Likewise. (op_symbol_code): Likewise. * tree-ssa-ccp.c (get_value_from_alignment): Likewise. * tree-ssa-loop-im.c (for_each_index): Likewise. (gen_lsm_tmp_name): Likewise. * tree-ssa-loop-ivopts.c (idx_find_step): Likewise. (find_interesting_uses_address): Likewise. * tree-ssa-loop-prefetch.c (idx_analyze_ref): Likewise. * tree-ssa-operands.c (get_expr_operands): Likewise. * tree-ssa-pre.c (create_component_ref_by_pieces_1): Likewise. * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Likewise. (ao_ref_init_from_vn_reference): Likewise. * tree.c (staticp): Likewise. (build1_stat): Likewise. (reference_alias_ptr_type): Likewise. * emit-rtl.c (set_mem_attributes_minus_bitpos): Likewise. * config/rs6000/rs6000.c (rs6000_check_sdmode): Remove MISALIGNED_INDIRECT_REF handling. From-SVN: r163915
2010-09-03tree.def (TARGET_MEM_REF): Merge TMR_SYMBOL and TMR_BASE.Richard Guenther1-10/+14
2010-09-03 Richard Guenther <rguenther@suse.de> * tree.def (TARGET_MEM_REF): Merge TMR_SYMBOL and TMR_BASE. Move TMR_OFFSET to second operand. Add TMR_INDEX2. * tree.h (TMR_SYMBOL): Remove. (TMR_BASE, TMR_OFFSET): Adjust. (TMR_INDEX2): New. * alias.c (ao_ref_from_mem): Use TMR_BASE. * builtins.c (get_object_alignment): Merge TMR_BASE and TMR_SYMBOL handling. * cfgexpand.c (expand_debug_expr): Use TMR_BASE. * gimple.c (get_base_address): Merge MEM_REF and TARGET_MEM_REF handling. Also allow TARGET_MEM_REF as base address. (walk_stmt_load_store_addr_ops): TMR_BASE is always non-NULL. * gimplify.c (gimplify_expr): Gimplify TMR_BASE like MEM_REF base. Gimplify TMR_INDEX2. * tree-cfg.c (verify_types_in_gimple_reference): Adjust. * tree-dfa.c (get_ref_base_and_extent): Likewise. (get_addr_base_and_unit_offset): Likewise. * tree-eh.c (tree_could_trap_p): Likewise. * tree-pretty-print.c (dump_generic_node): Likewise. * tree-ssa-address.c (tree_mem_ref_addr): Simplify. Handle TMR_INDEX2. (create_mem_ref_raw): Merge symbol and base. Move 2ndary base to index2. (get_address_description): Reconstruct addres description from merged TMR_BASE and TMR_INDEX2. (maybe_fold_tmr): Fold propagated addresses. * tree-ssa-alias.c (indirect_ref_may_alias_decl_p): Merge MEM_REF and TARGET_MEM_REF paths. (indirect_refs_may_alias_p): Likewise. * tree-ssa-live.c (mark_all_vars_used_1): Handle TMR_INDEX2 instead of TMR_SYMBOL. * tree-ssa-operands.c (get_tmr_operands): Simplify. * tree-ssa-pre.c (create_component_ref_by_pieces_1): Adjust according to changes ... * tree-ssa-sccvn.c (copy_reference_ops_from_ref): ... here. Split TARGET_MEM_REF into two fields plus the base. * tree.c (mem_ref_offset): Simplify. * tree-ssa-loop-im.c (for_each_index): Handle TMR_INDEX2. * tree-ssa-loop-ivopts.c (find_interesting_uses_address): Likewise. Strip NOPs when folding MEM_REF addresses. * tree-ssa-sink.c (is_hidden_global_store): Handle TARGET_MEM_REF. * gimple-fold.c (maybe_fold_reference): Fold TARGET_MEM_REF here ... (fold_gimple_assign): ... not here. From-SVN: r163802
2010-08-25re PR middle-end/45316 (ICE: verify_flow_info failed: BB 3 can not throw but ↵Richard Guenther1-0/+3
has an EH edge with -O1 -ftree-pre -fnon-call-exceptions) 2010-08-25 Richard Guenther <rguenther@suse.de> PR tree-optimization/45316 * tree-ssa-pre.c (eliminate): Properly clean EH info. * g++.dg/opt/pr45316.C: New testcase. From-SVN: r163543
2010-08-20vec.h (FOR_EACH_VEC_ELT): Define.Nathan Froyd1-10/+10
gcc/ * vec.h (FOR_EACH_VEC_ELT): Define. * c-decl.c: Use it. * cfgloop.c: Likewise. * cfgloopmanip.c: Likewise. * cgraph.c: Likewise. * cgraphunit.c: Likewise. * combine.c: Likewise. * config/bfin/bfin.c: Likewise. * config/mips/mips.c: Likewise. * config/rs6000/rs6000.c: Likewise. * dbxout.c: Likewise. * df-scan.c: Likewise. * dominance.c: Likewise. * dse.c: Likewise. * dwarf2out.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * function.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * ggc-common.c: Likewise. * gimplify.c: Likewise. * graphite-blocking.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * graphite-dependences.c: Likewise. * graphite-interchange.c: Likewise. * graphite-poly.c: Likewise. * graphite-scop-detection.c: Likewise. * graphite-sese-to-poly.c: Likewise. * graphite.c: Likewise. * haifa-sched.c: Likewise. * ifcvt.c: Likewise. * implicit-zee.c: Likewise. * ipa-prop.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-emit.c: Likewise. * lambda-code.c: Likewise. * loop-invariant.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-opts.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-symtab.c: Likewise. * matrix-reorg.c: Likewise. * opts.c: Likewise. * predict.c: Likewise. * print-tree.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-ir.c: Likewise. * sel-sched.c: Likewise. * sese.c: Likewise. * stor-layout.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-data-ref.c: Likewise. * tree-emutls.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * value-prof.c: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * vmsdbgout.c: Likewise. gcc/ada/ * gcc-interface/decl.c: Use FOR_EACH_VEC_ELT. * gcc-interface/trans.c: Likewise. * gcc-interface/utils.c: Likewise. gcc/c-family/ * c-common.c: Use FOR_EACH_VEC_ELT. * c-gimplify.c: Likewise. * c-pragma.c: Likewise. gcc/cp/ * call.c: Use FOR_EACH_VEC_ELT. * class.c: Likewise. * decl.c: Likewise. * decl2.c: Likewise. * error.c: Likewise. * except.c: Likewise. * mangle.c: Likewise. * method.c: Likewise. * name-lookup.c: Likewise. * parser.c: Likewise. * pt.c: Likewise. * repo.c: Likewise. * semantics.c: Likewise. * typeck2.c: Likewise. gcc/fortran/ * trans-openmp.c: Use FOR_EACH_VEC_ELT. gcc/java/ * class.c: Use FOR_EACH_VEC_ELT. * expr.c: Likewise. * jcf-parse.c: Likewise. * resource.c: Likewise. gcc/lto/ * lto.c: Use FOR_EACH_VEC_ELT. From-SVN: r163401
2010-08-19cfgloop.c (get_loop_body_in_bfs_order): Avoid redundant call to bitmap_bit_p.Nathan Froyd1-2/+1
* cfgloop.c (get_loop_body_in_bfs_order): Avoid redundant call to bitmap_bit_p. * config/bfin/bifn.c (bfin_discover_loop): Likewise. * dominance.c (iterate_fix_dominators): Likewise. * dse.c (set_usage_bits): Likewise. (set_position_unneeded, record_store): Likewise. * gimple-fold.c (get_maxval_strlen): Likewise. * haifa-sched.c (fix_inter_tick, fix_recovery_deps): Likewise. * ipa-inline.c (update_caller_keys): Likewise. * ipa-split.c (verify_non_ssa_vars): Likewise. * ipa-type-escape.c (mark_type, close_type_seen): Likewise. (close_type_exposed_parameter, close_type_full_escape): Likewise. (close_addressof_down): Likewise. * ira-color.c (assign_hard_reg, push_allocno_to_stack): Likewise. (setup_allocno_left_conflicts_size): Likewise. (ira_reassign_conflict_allocnos): Likewise. (ira_reassign_pseudos): Likewise. * ira-emit.c (change_loop): Likewise. * loop-invariant.c (mark_regno_live, mark_regno_death): Likewise. * lto-streamer-out.c (write_symbol): Likewise. * predict.c (expr_expected_value_1): Likewise. * regstat.c (regstat_bb_compute_ri): Likewise. * sel-sched.c (create_block_for_bookkeeping): Likewise. (track_scheduled_insns_and_blocks, sel_sched_region_1): Likewise. * stmt.c (expand_case): Likewise. * tree-eh.c (emit_eh_dispatch): Likewise. * tree-into-ssa.c (prune_unused_phi_nodes): Likewise. * tree-loop-distribution.c (make_nodes_having_upstream_mem_writes): Likewise. (rdg_flag_vertex, rdg_flag_loop_exits): Likewise. (rdg_build_components): Likewise. * tree-object-size.c (collect_object_sizes_for): Likewise. * tree-sra.c (convert_callers): Likewise. * tree-ssa-coalesce.c (live_track_add_partition): Likewise. * tree-ssa-live.c (mark_all_vars_used_1): Likewise. * tree-ssa-pre.c (bitmap_set_replace_value): Likewise. From-SVN: r163378
2010-08-16tree-cfg.c (verify_types_in_gimple_reference): Verify TARGET_MEM_REF a bit.Richard Guenther1-8/+4
2010-08-16 Richard Guenther <rguenther@suse.de> * tree-cfg.c (verify_types_in_gimple_reference): Verify TARGET_MEM_REF a bit. * tree-ssa-address.c (addr_for_mem_ref): Adjust. (create_mem_ref_raw): Always create TMR_OFFSET, store the alias pointer type via it. (copy_mem_ref_info): Adjust. (maybe_fold_tmr): Likewise. * tree.c (mem_ref_offset): Also handle TARGET_MEM_REF. (reference_alias_ptr_type): Likewise. * tree.def (TARGET_MEM_REF): Remove TMR_ORIGINAL operand, adjust documentation of TMR_OFFSET operand. * alias.c (get_alias_set): Do not look at TMR_ORIGINAL but use the alias pointer type. * expr.c (expand_expr_real_1): Do not use TMR_ORIGINAL to initialize mem attrs but the TMR itself. * tree-eh.c (tree_could_trap_p): Handle TARGET_MEM_REF similar to MEM_REF. * tree-pretty-print.c (dump_generic_node): Do not dump TMR_ORIGINAL. * tree-ssa-loop-ivopts.c (idx_remove_ssa_names): Remove. (unshare_and_remove_ssa_names): Likewise. (copy_ref_info): Adjust. * tree-ssa-pre.c (create_component_ref_by_pieces_1): Simplify TARGET_MEM_REF case. * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Do not look at TMR_ORIGINAL. * tree.h (TMR_ORIGINAL): Remove. * gimple.c (get_base_address): For TARGET_MEM_REF with a symbol return that. * tree-dfa.c (get_ref_base_and_extent): Handle TARGET_MEM_REF with a symbol. (get_addr_base_and_unit_offset): Likewise. * tree-ssa-alias.c (indirect_ref_may_alias_decl_p): Handle TARGET_MEM_REFs. (indirect_ref_may_alias_decl_p): Likewise. (refs_may_alias_p_1): Do not bail out for TARGET_MEM_REFs. From-SVN: r163278
2010-08-10* tree-ssa-prec. (init_pre): Call alloc_aux_for_blocks.Nathan Froyd1-9/+2
(fini_pre): Call free_aux_for_blocks. Delete unused bb variable. From-SVN: r163069
2010-07-05tree-ssa-loop-im.c (for_each_index): Do not handle ALIGN_INDIRECT_REF.Richard Guenther1-1/+0
2010-07-05 Richard Guenther <rguenther@suse.de> * tree-ssa-loop-im.c (for_each_index): Do not handle ALIGN_INDIRECT_REF. (gen_lsm_tmp_name): Likewise. * tree-dump.c (dequeue_and_dump): Likewise. * tree-pretty-print.c (dump_generic_node): Likewise. (op_code_prio): Likewise. (op_symbol_code): Likewise. * tree.c (staticp): Likewise. (build1_stat): Likewise. * tree.h (INDIRECT_REF_P): Likewise. * fold-const.c (maybe_lvalue_p): Likewise. (operand_equal_p): Likewise. * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Likewise. (ao_ref_init_from_vn_reference): Likewise. * tree-ssa-loop-ivopts.c (idx_find_step): Likewise. (find_interesting_uses_address): Likewise. * dwarf2out.c (loc_list_from_tree): Likewise. * gimplify.c (gimplify_expr): Likewise. * tree-eh.c (tree_could_trap_p): Likewise. * emit-rtl.c (set_mem_attributes_minus_bitpos): Likewise. * cfgexpand.c (expand_debug_expr): Likewise. * tree-ssa-pre.c (create_component_ref_by_pieces_1): Likewise. * tree-ssa-loop-prefetch.c (idx_analyze_ref): Likewise. * tree-cfg.c (verify_types_in_gimple_min_lval): Likewise. * config/rs6000/rs6000 (rs6000_check_sdmode): Likewise. * tree-ssa-operands.c (get_expr_operands): Likewise. * expr.c (safe_from_p): Likewise. (expand_expr_real_1): Likewise. TER BIT_AND_EXPRs into MEM_REFs. * tree-vect-data-refs.c (vect_setup_realignment): Build BIT_AND_EXPR and MEM_REF instead of ALIGN_INDIRECT_REF. * tree-vect-stmts.c (vectorizable_load): Likewise. * tree.def (ALIGN_INDIRECT_REF): Remove. From-SVN: r161830
2010-07-05re PR middle-end/44784 (Failed to build 403.gcc in SPEC CPU 2006)Richard Guenther1-3/+7
2010-07-05 Richard Guenther <rguenther@suse.de> PR tree-optimization/44784 * tree-ssa-pre.c (bitmap_find_leader): Fix dominance check for inserted stmts. (find_or_generate_expression): Fix SCCVN insertion check. * gcc.c-torture/compile/pr44784.c: New testcase. From-SVN: r161829