aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-structalias.c
AgeCommit message (Collapse)AuthorFilesLines
2011-11-08Merge from transactional-memory branch.Aldy Hernandez1-0/+47
From-SVN: r181154
2011-10-18tree-ssa-alias.h (struct pt_solution): Remove vars_contains_restrict member.Richard Guenther1-62/+37
2011-10-18 Richard Guenther <rguenther@suse.de> * tree-ssa-alias.h (struct pt_solution): Remove vars_contains_restrict member. (pt_solutions_same_restrict_base): Remove. (pt_solution_set): Adjust. * tree-ssa-alias.c (ptr_deref_may_alias_decl_p): Remove vars_contains_restrict handling. (dump_points_to_solution): Likewise. (ptr_derefs_may_alias_p): Do not call pt_solutions_same_restrict_base. * tree-ssa-structalias.c (struct variable_info): Remove is_restrict_var field. (new_var_info): Do not initialize it. (ipa_escaped_pt): Adjust. (make_constraint_from_restrict): Make the tag global. (make_constraint_from_global_restrict): New function. (make_constraint_from_heapvar): Remove. (create_variable_info_for): Do not make restrict vars point to NONLOCAL. (intra_create_variable_infos): Likewise. (find_what_var_points_to): Remove vars_contains_restrict handling. (pt_solution_set): Adjust. (pt_solution_ior_into): Likewise. (pt_solutions_same_restrict_base): Remove. (compute_points_to_sets): Do not test is_restrict_var. * cfgexpand.c (update_alias_info_with_stack_vars): Adjust. * gimple-pretty-print.c (pp_points_to_solution): Likewise. * gcc.dg/torture/restrict-1.c: New testcase. From-SVN: r180127
2011-10-06re PR tree-optimization/49279 (Optimization incorrectly presuming constant ↵Jakub Jelinek1-9/+0
variable inside loop in g++ 4.5 and 4.6 with -O2 and -O3 for x86_64 targets) PR tree-optimization/49279 * tree-ssa-structalias.c (find_func_aliases): Don't handle CAST_RESTRICT. * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Allow restrict propagation. * tree-ssa.c (useless_type_conversion_p): Don't return false if TYPE_RESTRICT differs. * gcc.dg/tree-ssa/restrict-4.c: XFAIL. * gcc.c-torture/execute/pr49279.c: New test. From-SVN: r179620
2011-09-30tree-ssa-structalias.c (find_func_aliases_for_builtin_call): Handle ↵Jakub Jelinek1-0/+18
BUILT_IN_STRDUP and BUILT_IN_STRNDUP. * tree-ssa-structalias.c (find_func_aliases_for_builtin_call): Handle BUILT_IN_STRDUP and BUILT_IN_STRNDUP. * tree-ssa-alias.c (call_may_clobber_ref_p_1): Likewise. Fix handling of BUILT_IN_STRNCAT and BUILT_IN_STRNCAT_CHK. (ref_maybe_used_by_call_p_1): Fix handling of BUILT_IN_STRCAT, BUILT_IN_STRNCAT, BUILT_IN_STRCAT_CHK and BUILT_IN_STRNCAT_CHK. * gcc.dg/strlenopt-21.c: New test. Co-Authored-By: Richard Guenther <rguenther@suse.de> From-SVN: r179387
2011-09-26tree-ssa-alias.h (pt_solution_singleton_p): Declare.Tom de Vries1-0/+15
2011-09-26 Tom de Vries <tom@codesourcery.com> * tree-ssa-alias.h (pt_solution_singleton_p): Declare. * tree-ssa-structalias.c (pt_solution_singleton_p): New function. * tree-ssa-ccp.c (fold_builtin_alloca_for_var): Set points-to solution of new var. From-SVN: r179193
2011-09-25tree-ssa-structalias.c (intra_create_variable_infos): Treat TYPE_RESTRICT ↵Jakub Jelinek1-4/+5
REFERENCE_TYPE parameters like restricted DECL_BY_REFERENCE... * tree-ssa-structalias.c (intra_create_variable_infos): Treat TYPE_RESTRICT REFERENCE_TYPE parameters like restricted DECL_BY_REFERENCE parameters. * g++.dg/tree-ssa/restrict2.C: New test. From-SVN: r179166
2011-09-06re PR target/47025 (Dead stores in variadic functions not eliminated)Richard Guenther1-15/+20
2011-09-06 Richard Guenther <rguenther@suse.de> PR tree-optimization/47025 * tree-ssa-alias.c (ref_maybe_used_by_call_p_1): BUILT_IN_VA_END uses nothing. (call_may_clobber_ref_p_1): BUILT_IN_VA_END is a barrier like BUILT_IN_FREE. (stmt_kills_ref_p_1): BUILT_IN_VA_END kills what its argument definitely points to. * tree-ssa-structalias.c (find_func_aliases_for_builtin_call): BUILT_IN_VA_START doesn't let its va_list argument escape. * tree-ssa-dce.c (propagate_necessity): BUILT_IN_VA_END does not make any previous stores necessary. From-SVN: r178601
2011-08-18expr.c (get_inner_reference): Sign-extend the constant twos-complement ↵Richard Guenther1-8/+17
offset before doing arbitrary... 2011-08-18 Richard Guenther <rguenther@suse.de> * expr.c (get_inner_reference): Sign-extend the constant twos-complement offset before doing arbitrary precision arithmetic on it. * tree-ssa-structalias.c (get_constraint_for_ptr_offset): Likewise. (get_constraint_for_1): Pass the offset of a MEM_REF unchanged to get_constraint_for_ptr_offset. From-SVN: r177847
2011-08-17tree.h (convert_to_ptrofftype_loc): New function.Richard Guenther1-1/+1
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-20tree-ssa-structalias.c (new_var_info): Allocate oldsolution lazily.Richard Guenther1-11/+19
2011-07-20 Richard Guenther <rguenther@suse.de> * tree-ssa-structalias.c (new_var_info): Allocate oldsolution lazily. (unify_nodes): Deal with that. (solve_graph): Likewise. From-SVN: r176505
2011-07-14re PR tree-optimization/49651 (nested lambdas and -O3 produced incorrect ↵Richard Guenther1-2/+11
integer variable increments) 2011-07-14 Richard Guenther <rguenther@suse.de> PR tree-optimization/49651 * tree-ssa-structalias.c (get_constraint_for_1): Properly handle dereferences with subvariables. * gcc.dg/torture/pr49651.c: New testcase. From-SVN: r176274
2011-06-30opts.c (finish_options): Do not disable IPA-PTA during ltrans.Richard Guenther1-32/+58
2011-06-30 Richard Guenther <rguenther@suse.de> * opts.c (finish_options): Do not disable IPA-PTA during ltrans. * tree-ssa-structalias.c (create_variable_info_for): Do not add initial constraints for non-var-decls. Properly handle globals in other ltrans partitions. (intra_create_variable_infos): Manually create constraints for the fake no-alias parameter. (ipa_pta_execute): Dump the cgraph, handle ltrans partitions properly and assert there are no clones. From-SVN: r175707
2011-06-30tree-ssa-structalias.c (find_func_aliases_for_builtin_call): Fix handling of ↵Jakub Jelinek1-1/+14
BUILT_IN_ASSUME_ALIGNED. * tree-ssa-structalias.c (find_func_aliases_for_builtin_call): Fix handling of BUILT_IN_ASSUME_ALIGNED. From-SVN: r175695
2011-06-30tree-ssa-structalias.c (find_func_aliases_for_builtin_call): Fix handling of ↵Jakub Jelinek1-1/+3
BUILT_IN_MEMPCPY_CHK and BUILT_IN_STPCPY_CHK. * tree-ssa-structalias.c (find_func_aliases_for_builtin_call): Fix handling of BUILT_IN_MEMPCPY_CHK and BUILT_IN_STPCPY_CHK. From-SVN: r175682
2011-06-27builtin-types.def (BT_FN_PTR_CONST_PTR_SIZE_VAR): New.Jakub Jelinek1-0/+2
* builtin-types.def (BT_FN_PTR_CONST_PTR_SIZE_VAR): New. * builtins.def (BUILT_IN_ASSUME_ALIGNED): New builtin. * tree-ssa-structalias.c (find_func_aliases_for_builtin_call, find_func_clobbers): Handle BUILT_IN_ASSUME_ALIGNED. * tree-ssa-ccp.c (bit_value_assume_aligned): New function. (evaluate_stmt, execute_fold_all_builtins): Handle BUILT_IN_ASSUME_ALIGNED. * tree-ssa-dce.c (propagate_necessity): Likewise. * tree-ssa-alias.c (ref_maybe_used_by_call_p_1, call_may_clobber_ref_p_1): Likewise. * builtins.c (is_simple_builtin, expand_builtin): Likewise. (expand_builtin_assume_aligned): New function. * doc/extend.texi (__builtin_assume_aligned): Document. * c-common.c (check_builtin_function_arguments): Handle BUILT_IN_ASSUME_ALIGNED. * gcc.dg/builtin-assume-aligned-1.c: New test. * gcc.dg/builtin-assume-aligned-2.c: New test. * gcc.target/i386/builtin-assume-aligned-1.c: New test. From-SVN: r175541
2011-06-22re PR tree-optimization/49493 (ICE: in insert_vi_for_tree, at ↵Richard Guenther1-13/+13
tree-ssa-structalias.c:2637 with -O -fipa-pta) 2011-06-22 Richard Guenther <rguenther@suse.de> PR tree-optimization/49493 * tree-ssa-structalias.c (get_constraint_for_ssa_var): Refer to the alias target of variables. (associate_varinfo_to_alias_1): Remove. (ipa_pta_execute): Do not associate aliases with anything. * cgraph.h (varpool_alias_aliased_node): Fix cut&paste errors. (cgraph_function_node): Likewise. (cgraph_function_or_thunk_node): Likewise. (varpool_variable_node): Likewise. * gcc.dg/ipa/ipa-pta-17.c: New testcase. From-SVN: r175300
2011-06-22tree-ssa-ccp.c (evaluate_stmt): Try bitwise tracking for builtin calls even ↵Jakub Jelinek1-1/+19
if likelyvalue is not CONSTANT. * tree-ssa-ccp.c (evaluate_stmt): Try bitwise tracking for builtin calls even if likelyvalue is not CONSTANT. Handle BUILT_IN_STRDUP and BUILT_IN_STRNDUP like BUILT_IN_MALLOC. Return get_value_for_expr of first operand for BUILT_IN_{MEM{CPY,MOVE,SET},STR{,N}CPY}{,_CHK}. * tree-ssa-alias.c (ref_maybe_used_by_call_p_1): Handle BUILT_IN_{MEM{{,P}CPY,MOVE,SET},STR{,N}C{PY,AT},STPCPY}_CHK like their non-checking counterparts. (call_may_clobber_ref_p_1): Likewise. (stmt_kills_ref_p_1): Handle BUILT_IN_MEM{{,P}CPY,MOVE,SET}_CHK like their non-checking counterparts. * tree-ssa-structalias.c (find_func_aliases_for_builtin_call): Handle BUILT_IN_{MEM{{,P}CPY,MOVE,SET},STR{,N}C{PY,AT},STPCPY}_CHK like their non-checking counterparts. (find_func_clobbers): Likewise. * tree-ssa-dce.c (propagate_necessity): Handle BUILT_IN_MEMSET_CHK like BUILT_IN_MEMSET and BUILT_IN_CALLOC like BUILT_IN_MALLOC. From-SVN: r175290
2011-06-18lto-symtab.c (lto_varpool_replace_node): Remove code handling extra name ↵Jan Hubicka1-5/+13
aliases. * lto-symtab.c (lto_varpool_replace_node): Remove code handling extra name aliases. (lto_symtab_resolve_can_prevail_p): Likewise. (lto_symtab_merge_cgraph_nodes): Update alias_of pointers. * cgraphbuild.c (record_reference): Remove extra body alias code. (mark_load): Likewise. (mark_store): Likewise. * cgraph.h (varpool_node): Remove extra_name filed; add alias_of and extraname_alias. (varpool_create_variable_alias, varpool_for_node_and_aliases): Declare. (varpool_alias_aliased_node): New inline function. (varpool_variable_node): New function. * cgraphunit.c (handle_alias_pairs): Handle also variable aliases. * ipa-ref.c (ipa_record_reference): Allow aliases on variables. * lto-cgraph.c (lto_output_varpool_node): Update streaming. (input_varpool_node): Likewise. * lto-streamer-out.c (produce_symtab): Remove extra name aliases. (varpool_externally_visible_p): Remove extra body alias code. (function_and_variable_visibility): Likewise. * tree-ssa-structalias.c (associate_varinfo_to_alias_1): New function. (ipa_pta_execute): Use it. * varpool.c (varpool_remove_node): Remove extra name alias code. (varpool_mark_needed_node): Likewise. (varpool_analyze_pending_decls): Analyze aliases. (assemble_aliases): New functoin. (varpool_assemble_decl): Use it. (varpool_create_variable_alias): New function. (varpool_extra_name_alias): Rewrite. (varpool_for_node_and_aliases): New function. From-SVN: r175167
2011-06-14dumping cleanup phase 1 -- Removing TODO_dump_funcDavid Li1-2/+2
From-SVN: r175051
2011-06-11lto-symtab.c (lto_cgraph_replace_node): Kill same body alias code.Jan Hubicka1-10/+15
* lto-symtab.c (lto_cgraph_replace_node): Kill same body alias code. (lto_symtab_resolve_can_prevail_p): Likewise. (lto_symtab_merge_cgraph_nodes): Update merging of aliases. * cgraph.c (same_body_aliases_done): New global var. (cgraph_same_body_alias_1): Rename to ... (cgraph_create_function_alias): ... this one; reorg to new representation. (cgraph_same_body_alias): Use cgraph_create_function_alias; record references when asked to. (cgraph_add_thunk): Fix formating. (cgraph_get_node): Kill same body alias code. (cgraph_node_for_asm): Likewise. (cgraph_remove_same_body_alias): Remove. (cgraph_remove_node): Kill same body alias code. (cgraph_mark_address_taken_node): Mark also the aliased function as having address taken. (dump_cgraph_node): Dump same body aliases. (cgraph_for_node_thunks_and_aliases): Update for new alias representation. (cgraph_for_node_and_aliases): Likewise. * cgraph.h (same_body): Kll pointer. (same_body_alias): Update comment. (same_body_aliases_done): Declare. (cgraph_remove_same_body_alias): Remove declaration. (cgraph_create_function_alias): Declare. (cgraph_process_same_body_aliases): Declare. (cgraph_function_with_gimple_body_p): Check for alias. (cgraph_can_remove_if_no_direct_calls_p): Look for aliases. (cgraph_alias_aliased_node): New function. (cgraph_function_node): Update for new aliases. (cgraph_function_or_thunk_node): Likewise. * ipa-inline-transform.c (can_remove_node_now_p): Look for aliases. (inline_call): Remove dead aliases. * cgraphunit.c (cgraph_decide_is_function_needed): Disable assembler name hack for same body aliases. (clone_of_p): Look through aliases. (verify_cgraph_node): Verify aliases. (cgraph_analyze_function): Analyze aliases; fixup C++ bugs. (cgraph_process_same_body_aliases): New function. (process_function_and_variable_attributes): Disable weakref warning on alias. (cgraph_analyze_functions): Handle aliases. (cgraph_mark_functions_to_output): Handle aliases same way as thunks. (assemble_thunks): Rename to ... (assemble_thunks_and_aliases): ... this one; handle aliases, too. (cgraph_expand_function): Remove alias output code. (cgraph_output_in_order): Skip aliases. (cgraph_preserve_function_body_p): Aliases don't need preserving. * ipa-ref.c (ipa_ref_use_name): Add alias reference. (ipa_record_reference): Do not assert on alias references. (ipa_ref_has_aliases_p): New function. * ipa-ref.h (enum ipa_ref_use): Add IPA_REF_ALIAS. (ipa_ref_has_aliases_p): Declare. * lto-cgraph.c (lto_output_node): Handle aliases. (input_node): Likewise. * lto-streamer-out.c (lto_output): Skip aliases. (produce_symtab): Kill same_body_alias code. * ipa-utils.c (ipa_reverse_postorder): Add FIXME. (ipa_reverse_postorder): Use cgraph_only_called_directly_or_aliased_p. * ipa-inline.c (update_caller_keys): Walk aliases. (inline_small_functions): Fix thinko in previous patch. * ipa.c (cgraph_externally_visible_p): Do not walk aliases. (function_and_variable_visibility): Do not walk same body aliases. * tree-ssa-structalias.c (associate_varinfo_to_alias): New function. (ipa_pta_execute): Use it. * lto.c (add_cgraph_node_to_partition_1): Break out from ... (add_cgraph_node_to_partition) ... here; walk aliases. (lto_1_to_1_map): Remove same body alias code. (promote_fn): Likewise. (lto_promote_cross_file_statics): Update comment. * decl2.c (cp_write_global_declarations): Process aliases; look trhough same body aliases. From-SVN: r174952
2011-04-29tree-ssa-structalias.c (get_fi_for_callee): Restructure.Richard Guenther1-28/+18
2011-04-29 Richard Guenther <rguenther@suse.de> * tree-ssa-structalias.c (get_fi_for_callee): Restructure. Handle OBJ_TYPE_REF. (find_func_aliases_for_call): Use it more consistently. From-SVN: r173152
2011-04-28re PR bootstrap/48804 (Bootstrap compare failure)Richard Guenther1-1/+2
2011-04-28 Richard Guenther <rguenther@suse.de> PR bootstrap/48804 Revert 2011-04-28 Richard Guenther <rguenther@suse.de> * tree-ssa-structalias.c (solve_constraints): Build succ graph as late as possible. From-SVN: r173067
2011-04-28tree-ssa-structalias.c (dump_constraint): Don't end the line.Richard Guenther1-68/+79
2011-04-28 Richard Guenther <rguenther@suse.de> * tree-ssa-structalias.c (dump_constraint): Don't end the line. (debug_constraint): Do it here. (dump_constraints): And here. (rewrite_constraints): And here. (dump_constraint_edge): Remove. (dump_constraint_graph): Rewrite to produce DOT output. (solve_constraints): Build succ graph as late as possible. Dump constraint graphs before and after solving. From-SVN: r173061
2011-04-28tree-ssa-structalias.c (find_func_aliases_for_builtin_call): New function ↵Richard Guenther1-318/+349
split out from ... 2011-04-28 Richard Guenther <rguenther@suse.de> * tree-ssa-structalias.c (find_func_aliases_for_builtin_call): New function split out from ... (find_func_aliases): ... here. Call it. (find_func_aliases_for_call): Likewise. From-SVN: r173060
2011-04-27tree-ssa-structalias.c (changed_count): Remove.Richard Guenther1-63/+20
2011-04-27 Richard Guenther <rguenther@suse.de> * tree-ssa-structalias.c (changed_count): Remove. (changed): Use a bitmap. (unify_nodes): Adjust. (do_sd_constraint): Likewise. (do_ds_constraint): Likewise. (do_complex_constraint): Likewise. (solve_graph): Likewise. From-SVN: r173040
2011-04-27Makefile.in (tree-ssa-structalias.o): Remove gt-tree-ssa-structalias.h ↵Richard Guenther1-119/+34
dependency. 2011-04-27 Richard Guenther <rguenther@suse.de> * Makefile.in (tree-ssa-structalias.o): Remove gt-tree-ssa-structalias.h dependency. (GTFILES): Remove tree-ssa-structalias.c. * tree.c (allocate_decl_uid): New function. (make_node_stat): Use it. (copy_node_stat): Likewise. * tree.h (allocate_decl_uid): Declare. * tree-ssa-alias.h (delete_alias_heapvars): Remove. * tree-ssa.c (delete_tree_ssa): Do not call delete_alias_heapvars. * tree-flow.h (struct var_ann_d): Remove is_heapvar flag. * tree-ssa-live.c (remove_unused_locals): Do not check is_heapvar flag. * tree-ssa-structalias.c (heapvar_for_stmt): Remove. (struct heapvar_map): Likewise. (heapvar_map_eq, heapvar_map_hash, heapvar_lookup, heapvar_insert): Likewise. (make_heapvar_for): Rename to ... (make_heapvar): ... this. Simplify. (fake_var_decl_obstack): New global var. (build_fake_var_decl): New function. (make_constraint_from_heapvar): Adjust. (handle_lhs_call): Likewise. (create_function_info_for): Likewise. (intra_create_variable_infos): Likewise. (init_alias_vars): Allocate fake_var_decl_obstack. (init_alias_heapvars, delete_alias_heapvars): Remove. (compute_points_to_sets): Do not call init_alias_heapvars. (ipa_pta_execute): Likewise. (delete_points_to_sets): Free fake_var_decl_obstack. * gcc.dg/tree-ssa/pr23382.c: Remove. From-SVN: r173030
2011-04-20Makefile.in (INTERNAL_FN_DEF, [...]): Define.Richard Sandiford1-0/+3
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-02-10tree-ssa-structalias.c (bitpos_of_field): Use BITS_PER_UNIT, not 8.Richard Guenther1-2/+1
2011-02-10 Richard Guenther <rguenther@suse.de> * tree-ssa-structalias.c (bitpos_of_field): Use BITS_PER_UNIT, not 8. From-SVN: r170003
2011-02-01re PR tree-optimization/47541 (For integer pointers, the value of ++*p is ↵Richard Guenther1-0/+13
not written back to memory) 2011-02-01 Richard Guenther <rguenther@suse.de> PR tree-optimization/47541 * tree-ssa-structalias.c (push_fields_onto_fieldstack): Make sure to have a field at offset zero. * g++.dg/torture/pr47541.C: New testcase. From-SVN: r169468
2011-01-25re PR tree-optimization/47426 (wrong code with -O2 -fipa-pta)Richard Guenther1-7/+36
2011-01-25 Richard Guenther <rguenther@suse.de> PR tree-optimization/47426 * tree-ssa-structalias.c (ipa_pta_execute): Make externally visible functions results escape. * gcc.dg/torture/pr47426-1.c: New testcase. * gcc.dg/torture/pr47426-2.c: Likewise. From-SVN: r169241
2011-01-14tree-ssa-structalias.c (new_var_info): Use DECL_HARD_REGISTER.Richard Guenther1-1/+2
2011-01-14 Richard Guenther <rguenther@suse.de> * tree-ssa-structalias.c (new_var_info): Use DECL_HARD_REGISTER. From-SVN: r168787
2011-01-14re PR tree-optimization/47286 (Invalid code when using register ... asm)Richard Guenther1-1/+4
2011-01-14 Richard Guenther <rguenther@suse.de> PR tree-optimization/47286 * tree-ssa-structalias.c (new_var_info): Register variables are global. * gcc.dg/tree-ssa/pr47286.c: New testcase. From-SVN: r168779
2010-11-30diagnostic-core.h: Include bversion.h.Joseph Myers1-1/+0
* diagnostic-core.h: Include bversion.h. * toplev.h: Don't include input.h or bversion.h. (parse_optimize_options): Don't declare here. * alias.c, auto-inc-dec.c, c-aux-info.c, c-convert.c, c-parser.c, caller-save.c, cfg.c, cfganal.c, cfgbuild.c, cfgcleanup.c, combine-stack-adj.c, config/arm/pe.c, config/darwin-c.c, config/host-darwin.c, config/i386/host-cygwin.c, config/i386/host-mingw32.c, config/i386/msformat-c.c, config/i386/netware.c, config/i386/nwld.c, config/i386/winnt-cxx.c, config/i386/winnt-stubs.c, config/ia64/ia64-c.c, config/m32c/m32c-pragma.c, config/mep/mep-pragma.c, config/microblaze/microblaze-c.c, config/rs6000/host-darwin.c, config/rs6000/rs6000-c.c, config/score/score3.c, config/score/score7.c, config/sh/symbian-base.c, config/sh/symbian-c.c, config/sh/symbian-cxx.c, config/sol2-c.c, config/sol2.c, config/v850/v850-c.c, config/vxworks.c, convert.c, cppbuiltin.c, cselib.c, dbgcnt.c, ddg.c, dfp.c, dominance.c, emit-rtl.c, fixed-value.c, fwprop.c, ggc-common.c, gimple.c, gimplify.c, graphite-blocking.c, graphite-clast-to-gimple.c, graphite-dependences.c, graphite-flattening.c, graphite-interchange.c, graphite-poly.c, graphite-scop-detection.c, graphite.c, haifa-sched.c, implicit-zee.c, integrate.c, ipa-pure-const.c, ipa-reference.c, ira-build.c, ira-conflicts.c, ira-costs.c, ira-lives.c, jump.c, lists.c, loop-doloop.c, loop-iv.c, lto-cgraph.c, lto-compress.c, lto-opts.c, lto-section-in.c, lto-section-out.c, lto-streamer-out.c, lto-symtab.c, modulo-sched.c, optabs.c, params.c, postreload-gcse.c, postreload.c, predict.c, profile.c, regcprop.c, reginfo.c, regmove.c, reorg.c, resource.c, sched-deps.c, sched-ebb.c, sched-rgn.c, sdbout.c, sel-sched-dump.c, sel-sched-ir.c, sese.c, stmt.c, targhooks.c, tree-cfgcleanup.c, tree-mudflap.c, tree-nomudflap.c, tree-object-size.c, tree-outof-ssa.c, tree-phinodes.c, tree-profile.c, tree-sra.c, tree-ssa-ccp.c, tree-ssa-coalesce.c, tree-ssa-live.c, tree-ssa-loop-prefetch.c, tree-ssa-loop.c, tree-ssa-operands.c, tree-ssa-structalias.c, tree-ssa-uninit.c, tree-vect-patterns.c, value-prof.c, var-tracking.c, web.c: Don't include toplev.h. * Makefile.in (TOPLEV_H): Remove. All uses changed to use toplev.h. Dependencies for above files and c-family files changed to remove $(TOPLEV_H) or toplev.h. (C_TREE_H): Don't include $(TOPLEV_H). (DIAGNOSTIC_CORE_H): Use $(INPUT_H) instead of input.h. Add bversion.h. * config/arm/t-pe, config/arm/t-wince-pe, config/i386/t-cygming, config/ia64/t-ia64, config/mep/t-mep, config/score/t-score-elf, config/t-darwin, config/t-sol2, config/t-vxworks, config/v850/t-v850, config/v850/t-v850e: Dependencies for above files changed to remove $(TOPLEV_H) or toplev.h. c-family: * c-common.h (parse_optimize_options): Declare. * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c, c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h. cp: * cp-gimplify.c, cp-lang.c, cvt.c, cxx-pretty-print.c, error.c, except.c, expr.c, friend.c, init.c, mangle.c, name-lookup.c, optimize.c, parser.c, rtti.c, tree.c, typeck2.c: Don't include toplev.h. * Make-lang.in: Dependencies for above files changed to remove toplev.h. java: * expr.c, lang.c, mangle.c, mangle_name.c, typeck.c, verify-glue.c: Don't include toplev.h. * Make-lang.in: Dependencies for above files changed to remove toplev.h. lto: * Make-lang.in (lto/lto-object.o): Depend on toplev.h instead of $(TOPLEV_H). From-SVN: r167293
2010-11-26re PR rtl-optimization/46665 (two gfortran tests fail with -O[2s] -fipa-pta ↵Richard Guenther1-1/+1
-fno-tree-ccp -fno-tree-forwprop) 2010-11-26 Richard Guenther <rguenther@suse.de> PR tree-optimization/46665 * tree-ssa-structalias.c (pt_solution_set_var): Use DECL_PT_UID. From-SVN: r167176
2010-11-15re PR tree-optimization/46467 (gcc.dg/torture/pta-structcopy-1.c FAILs with ↵Richard Guenther1-4/+8
-fipa-pta without inlining) 2010-11-15 Richard Guenther <rguenther@suse.de> PR tree-optimization/46467 * tree-ssa-structalias.c (do_structure_copy): Properly treat variables without subvars. * gcc.dg/ipa/ipa-pta-16.c: New testcase. From-SVN: r166755
2010-11-03re PR tree-optimization/46286 (ICE in do_complex_constraint, at ↵Richard Guenther1-5/+4
tree-ssa-structalias.c:1882) 2010-11-03 Richard Guenther <rguenther@suse.de> PR tree-optimization/46286 * tree-ssa-structalias.c (get_constraint_for_1): Avoid referencing re-allocated vector data. From-SVN: r166241
2010-11-02re PR tree-optimization/46149 (26_numerics/valarray/27867.cc FAILs with -O2 ↵Richard Guenther1-0/+32
-fno-tree-sra) 2010-11-02 Richard Guenther <rguenther@suse.de> PR tree-optimization/46149 * tree-ssa-structalias.c (get_constraint_for_1): Properly handle non-indirect MEM_REF variants. * g++.dg/torture/pr46149.C: New testcase. From-SVN: r166204
2010-10-18re PR tree-optimization/45967 (gcc-4.5.x optimizes code with side-effects away)Richard Guenther1-131/+90
2010-10-18 Richard Guenther <rguenther@suse.de> PR tree-optimization/45967 * tree-ssa-structalias.c (type_could_have_pointers): Remove. (could_have_pointers): Likewise. (handle_rhs_call, handle_const_call, handle_pure_call, find_func_aliases, intra_create_variable_infos): Remove calls to them. (struct fieldoff): Add must_have_pointers field. (type_must_have_pointers): New function. (field_must_have_pointers): Likewise. (push_fields_onto_fieldstack): Remove must_have_pointers_p argument. Adjust field merging. (create_function_info_for): May-have-pointers of varinfo is almost always true. (create_variable_info_for_1): Likewise. * gcc.dg/torture/pr45967.c: New testcase. * gcc.dg/ipa/ipa-pta-10.c: Adjust. * gcc.dg/ipa/ipa-pta-13.c: Likewise * gcc.dg/torture/pr39074-2.c: Likewise * gcc.dg/torture/pta-escape-1.c: Likewise * gcc.dg/torture/pta-ptrarith-1.c: Likewise * gcc.dg/tree-ssa/pta-callused.c: Likewise * gcc.dg/tree-ssa/pta-escape-1.c: Likewise * gcc.dg/tree-ssa/pta-escape-2.c: Likewise * gcc.dg/tree-ssa/pta-escape-3.c: Likewise * gcc.dg/tree-ssa/ssa-pre-21.c: Likewise From-SVN: r165641
2010-10-13re PR tree-optimization/45982 (PTA does not track integers)Richard Guenther1-9/+24
2010-10-13 Richard Guenther <rguenther@suse.de> PR tree-optimization/45982 * tree-ssa-structalias.c (make_constraints_to): New function. (make_constraint_to): Implement in terms of make_constraints_to. (find_func_aliases): Properly make return values of pure/const functions escape if they assign to sth that is not a pointer. * gcc.dg/torture/pr45982.c: New testcase. * gcc.dg/tree-ssa/pr24287.c: Adjust. * gcc.dg/tree-ssa/pta-callused.c: Likewise. * gcc.dg/torture/pr39074-2.c: Likewise. From-SVN: r165418
2010-10-12tree-ssa-structalias.c (get_constraint_for_1): Constants only point to ↵Richard Guenther1-1/+10
nonlocal, not anything. 2010-10-12 Richard Guenther <rguenther@suse.de> * tree-ssa-structalias.c (get_constraint_for_1): Constants only point to nonlocal, not anything. From-SVN: r165372
2010-10-11vec.h (VEC_qsort): Define.Nathan Froyd1-4/+1
gcc/ * vec.h (VEC_qsort): Define. * dbxout.c (output_used_types): Use it. * df-scan.c (df_sort_and_compress_refs): Likewise. (df_sort_and_compress_mws): Likewise. * genautomata.c (uniq_sort_alt_states): Likewise. (evaluate_equiv_classes): Likewise. (output_trans_table): Likewise. (output_state): Likewise. * gimplify.c (compare_case_labels): Likewise. * graphite-sese-to-poly.c (graphite_sort_dominated_info): Likewise. * ipa.c (build_cdtor_fns): Likewise. * lto.c (lto_wpa_write_files): Likewise. * sel-sched.c (fill_vec_av_set): Likewise. * tree-predcom.c (determine_roots_comp): Likewise. * tree-sra.c (sort_and_spliace_var_accesses): Likewise. (splice_param_accesses): Likewise. * tree-ssa-live.c (dump_enumerated_decls): Likewise. * tree-ssa-reassoc.c (undistribute_ops_list): Likewise. (reassociate_bb): Likewise. * tree-ssa-sccvn.c (sort_scc): Likewise. * tree-ssa-structalias.c (sort_fieldstack): Likewise. gcc/ada/ * gcc-interface/utils2.c (gnat_build_constructor): Use VEC_qsort. From-SVN: r165314
2010-09-16re PR tree-optimization/45623 (GCC 4.5.[01] breaks our ffi on Linux64. ABI ↵Richard Guenther1-23/+60
break?) 2010-09-16 Richard Guenther <rguenther@suse.de> PR tree-optimization/45623 * tree-ssa-structalias.c (get_constraint_for_ptr_offset): Adjust. (get_constraint_for_component_ref): If computing a constraint for the rhs handle type punning through unions. (get_constraint_for_address_of): Adjust. (get_constraint_for_1): Likewise. (get_constraint_for): Likewise. (get_constraint_for_rhs): New function. (do_structure_copy): Adjust. (make_constraint_to): Likewise. (handle_const_call): Likewise. (find_func_aliases): Likewise. (process_ipa_clobber): Likewise. (create_variable_info_for): Likewise. * gcc.dg/torture/pr45623.c: New testcase. From-SVN: r164333
2010-08-20vec.h (FOR_EACH_VEC_ELT): Define.Nathan Froyd1-39/+39
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-07-29re PR tree-optimization/45120 (-fipa-pta causes FAIL: ↵Richard Guenther1-4/+5
gcc.c-torture/execute/pta-field-2.c execution) 2010-07-29 Richard Guenther <rguenther@suse.de> PR tree-optimization/45120 * tree-ssa-structalias.c (get_constraint_for_component_ref): Handle offset in DEREFs properly. (get_constraint_for_1): Handle MEM_REF offset properly. * gcc.dg/ipa/ipa-pta-15.c: New testcase. From-SVN: r162676
2010-07-15tree.h (DECL_CHAIN): Define.Nathan Froyd1-4/+4
gcc/ * tree.h (DECL_CHAIN): Define. * alias.c: Carefully replace TREE_CHAIN with DECL_CHAIN. * c-decl.c: Likewise. * c-parser.c: Likewise. * c-typeck.c: Likewise. * cfgexpand.c: Likewise. * cgraph.c: Likewise. * cgraphunit.c: Likewise. * combine.c: Likewise. * config/alpha/alpha.c: Likewise. * config/arm/arm.c: Likewise. * config/frv/frv.c: Likewise. * config/i386/i386.c: Likewise. * config/i386/winnt-cxx.c: Likewise. * config/ia64/ia64.c: Likewise. * config/iq2000/iq2000.c: Likewise. * config/mep/mep.c: Likewise. * config/mips/mips.c: Likewise. * config/pa/som.h: Likewise. * config/rs6000/rs6000.c: Likewise. * config/s390/s390.c: Likewise. * config/sh/sh.c: Likewise. * config/sh/symbian-cxx.c: Likewise. * config/sparc/sparc.c: Likewise. * config/spu/spu.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/vxworks.c: Likewise. * config/xtensa/xtensa.c: Likewise. * coverage.c: Likewise. * dbxout.c: Likewise. * dwarf2out.c: Likewise. * emit-rtl.c: Likewise. * expr.c: Likewise. * function.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimplify.c: Likewise. * integrate.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-split.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-type-escape.c: Likewise. * langhooks.c: Likewise. * lto-cgraph.c: Likewise. * omp-low.c: Likewise. * stor-layout.c: Likewise. * tree-cfg.c: Likewise. * tree-complex.c: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-inline.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-object-size.c: Likewise. * tree-pretty-print.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-tailcall.c: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. gcc/ada/ * gcc-interface/decl.c: Carefully replace TREE_CHAIN with DECL_CHAIN. * gcc-interface/trans.c: Likewise. * gcc-interface/utils.c: Likewise. * gcc-interface/utils2.c: Likewise. gcc/c-family/ * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN. * c-format.c: Likewise. gcc/cp/ * cp-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN. * call.c: Likewise. * class.c: Likewise. * cp-gimplify.c: Likewise. * decl.c: Likewise. * decl2.c: Likewise. * init.c: Likewise. * mangle.c: Likewise. * name-lookup.c: Likewise. * optimize.c: Likewise. * parser.c: Likewise. * pt.c: Likewise. * rtti.c: Likewise. * search.c: Likewise. * semantics.c: Likewise. * typeck.c: Likewise. * typeck2.c: Likewise. gcc/fortran/ * f95-lang.c: Carefully replace TREE_CHAIN with DECL_CHAIN. * trans-common.c: Likewise. * trans-decl.c: Likewise. * trans-types.c: Likewise. * trans.c: Likewise. gcc/java/ * java-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN. * boehm.c: Likewise. * class.c: Likewise. * decl.c: Likewise. * expr.c: Likewise. * jcf-parse.c: Likewise. * typeck.c: Likewise. * verify-glue.c: Likewise. gcc/objc/ * objc-act.c: Carefully replace TREE_CHAIN with DECL_CHAIN. gcc/testsuite/ * g++.dg/plugin/attribute_plugin.c: Carefully replace TREE_CHAIN with DECL_CHAIN. From-SVN: r162223
2010-07-15re PR tree-optimization/44946 (ICE: in get_constraint_for_component_ref, at ↵Richard Biener1-3/+9
tree-ssa-structalias.c:3184) 2010-07-15 Richard Guenther <rguenther@suse.de> PR tree-optimization/44946 * tree-ssa-structalias.c (get_constraint_for_component_ref): Deal with accessing only padding properly. * gcc.c-torture/compile/pr44946.c: New testcase. From-SVN: r162216
2010-07-08toplev.h: Do not include diagnostic-core.h.Manuel López-Ibáñez1-0/+1
2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org> * toplev.h: Do not include diagnostic-core.h. Include diagnostic-core.h in every file that includes toplev.h. * c-tree.h: Do not include toplev.h. * pretty-print.h: Update comment. * Makefile.in: Update dependencies. * alias.c: Include diagnostic-core.h in every file that includes toplev.h. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgbuild.c: Likewise. * cfgcleanup.c: Likewise. * cfghooks.c: Likewise. * cfgloop.c: Likewise. * combine.c: Likewise. * config/alpha/alpha.c: Likewise. * config/arc/arc.c: Likewise. * config/arm/arm.c: Likewise. * config/arm/pe.c: Likewise. * config/avr/avr.c: Likewise. * config/bfin/bfin.c: Likewise. * config/cris/cris.c: Likewise. * config/crx/crx.c: Likewise. * config/darwin-c.c: Likewise. * config/darwin.c: Likewise. * config/fr30/fr30.c: Likewise. * config/frv/frv.c: Likewise. * config/h8300/h8300.c: Likewise. * config/host-darwin.c: Likewise. * config/i386/i386.c: Likewise. * config/i386/netware.c: Likewise. * config/i386/nwld.c: Likewise. * config/i386/winnt-cxx.c: Likewise. * config/i386/winnt-stubs.c: Likewise. * config/i386/winnt.c: Likewise. * config/ia64/ia64-c.c: Likewise. * config/ia64/ia64.c: Likewise. * config/iq2000/iq2000.c: Likewise. * config/lm32/lm32.c: Likewise. * config/m32c/m32c-pragma.c: Likewise. * config/m32c/m32c.c: Likewise. * config/m32r/m32r.c: Likewise. * config/m68hc11/m68hc11.c: Likewise. * config/m68k/m68k.c: Likewise. * config/mcore/mcore.c: Likewise. * config/mep/mep-pragma.c: Likewise. * config/mep/mep.c: Likewise. * config/mmix/mmix.c: Likewise. * config/mn10300/mn10300.c: Likewise. * config/moxie/moxie.c: Likewise. * config/pa/pa.c: Likewise. * config/pdp11/pdp11.c: Likewise. * config/picochip/picochip.c: Likewise. * config/rs6000/rs6000-c.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/rx/rx.c: Likewise. * config/s390/s390.c: Likewise. * config/score/score.c: Likewise. * config/score/score3.c: Likewise. * config/score/score7.c: Likewise. * config/sh/sh.c: Likewise. * config/sh/symbian-base.c: Likewise. * config/sh/symbian-c.c: Likewise. * config/sh/symbian-cxx.c: Likewise. * config/sol2-c.c: Likewise. * config/sol2.c: Likewise. * config/sparc/sparc.c: Likewise. * config/spu/spu.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/v850/v850-c.c: Likewise. * config/v850/v850.c: Likewise. * config/vax/vax.c: Likewise. * config/vxworks.c: Likewise. * config/xtensa/xtensa.c: Likewise. * convert.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbxout.c: Likewise. * ddg.c: Likewise. * dominance.c: Likewise. * emit-rtl.c: Likewise. * explow.c: Likewise. * expmed.c: Likewise. * fixed-value.c: Likewise. * fold-const.c: Likewise. * fwprop.c: Likewise. * gcse.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * gimple-low.c: Likewise. * gimplify.c: Likewise. * graph.c: Likewise. * haifa-sched.c: Likewise. * ifcvt.c: Likewise. * implicit-zee.c: Likewise. * integrate.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-iv.c: Likewise. * lto-opts.c: Likewise. * lto-symtab.c: Likewise. * main.c: Likewise. * modulo-sched.c: Likewise. * optabs.c: Likewise. * params.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * profile.c: Likewise. * real.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * reorg.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtlanal.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-rgn.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-ir.c: Likewise. * simplify-rtx.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * targhooks.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-dump.c: Likewise. * tree-eh.c: Likewise. * tree-inline.c: Likewise. * tree-nomudflap.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-phinodes.c: Likewise. * tree-profile.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-uninit.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-stmts.c: Likewise. * tree-vrp.c: Likewise. * varasm.c: Likewise. * vec.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. c-family/ * c-common.h: Include diagnostic-core.h. Error if already included. * c-semantics.c: Do not define GCC_DIAG_STYLE here. cp/ * cp-tree.h: Do not include toplev.h. java/ * boehm.c: Include diagnostic-core.h in every file that includes toplev.h. * class.c: Likewise. * constants.c: Likewise. * decl.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * jcf-parse.c: Likewise. * mangle.c: Likewise. * mangle_name.c: Likewise. * resource.c: Likewise. * typeck.c: Likewise. * verify-glue.c: Likewise. ada/ * gcc-interface/utils.c: Include diagnostic-core.h in every file that includes toplev.h. lto/ * lto-coff.c: Include diagnostic-core.h in every file that includes toplev.h. * lto-elf.c: Likewise. * lto-lang.c: Likewise. * lto-macho.c: Likewise. From-SVN: r161943
2010-07-07re PR middle-end/44813 (ipa-split causes ice in ptr_deref_may_alias_decl_p, ↵Jan Hubicka1-3/+6
at tree-ssa-alias.c:173) PR middle-end/44813 * tree-ssa-uninit.c (ssa_undefined_value_p): Result decl is defined for functions passed by reference. * tree.c (needs_to_live_in_memory): RESULT_DECL don't need to live in memory when passed by reference. * tree-ssa-ccp.c (get_default_value): Only VAR_DECL is undefined at beggining. * ipa-split.c (split_function): Cleanup way return value is passed; handle SSA DECL_BY_REFERENCE retvals. * tree-ssa.c (verify_def): Verify that RESULT_DECL is read only when DECL_BY_REFERENCE is set. * tree-ssa-structalias.c (get_constraint_for_ssa_var, get_fi_for_callee, find_what_p_points_to): Handle RESULT_DECL. * tree-inline.c (declare_return_variable): Get new entry_block argument; when passing by reference ensure that RESULT_DECL is gimple_val. (remap_gimple_op_r): Remap RESULT_DECL ssa name. (remap_gimple_stmt): Handle SSA DECL_BY_REFERENCE returns. * g++.dg/torture/pr44813.C: New testcase. * g++.dg/torture/pr44826.C: New testcase. From-SVN: r161898
2010-07-02tree-ssa-structalias.c (pt_solution_set_var): New function.Richard Guenther1-0/+11
2010-07-02 Richard Guenther <rguenther@suse.de> * tree-ssa-structalias.c (pt_solution_set_var): New function. * tree-ssa-alias.h (pt_solution_set_var): Declare. * tree-ssa-loop-ivopts.c (copy_ref_info): Also copy or create points-to information. From-SVN: r161716
2010-07-02tree-ssa-structalias.c (find_func_aliases): Handle pointer alignment via ↵Richard Guenther1-0/+8
BIT_AND_EXPR. 2010-07-02 Richard Guenther <rguenther@suse.de> * tree-ssa-structalias.c (find_func_aliases): Handle pointer alignment via BIT_AND_EXPR. * tree-vrp.c (extract_range_from_binary_expr): Likewise. From-SVN: r161707