aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-structalias.c
AgeCommit message (Collapse)AuthorFilesLines
2005-07-13Missed part of commitDaniel Berlin1-3/+2
From-SVN: r101969
2005-07-13re PR tree-optimization/22422 (ICE in first_vi_for_offset, at ↵Daniel Berlin1-13/+34
tree-ssa-structalias.c:2843) 2005-07-12 Daniel Berlin <dberlin@dberlin.org> Fix PR tree-optimization/22422 * tree-ssa-structalias.c (struct variable_info): Add flag for special vars. (get_varinfo): Now a static function. (new_varinfo): init has_union and is_special_var to false. (solution_set_add): Check has_union. (do_da_constraint): Move temporary variable so it gets reset properly. Also check for special variable. (do_ds_constraint): Ditto. (do_sd_constraint): Ditto. (do_structure_copy): Check for special variable. (find_func_aliases): Ditto. (init_base_vars): Set special vars properly. From-SVN: r101959
2005-07-11re PR tree-optimization/22404 (ICE in first_vi_for_offset)Daniel Berlin1-0/+1
2005-07-11 Daniel Berlin <dberlin@dberlin.org> * print-tree.c (print_node): Use DECL_ARGUMENT_FLD. * tree.h (DECL_ARGUMENT_FLD): New macro. 2005-07-11 Daniel Berlin <dberlin@dberlin.org> Fix PR tree-optimization/22404 * tree-ssa-structalias.c (create_variable_info_for): Use correct offset. From-SVN: r101894
2005-07-11tree-ssa-structalias.c (struct variable_info): Heapify complex.Daniel Berlin1-47/+67
2005-07-07 Daniel Berlin <dberlin@dberlin.org> * tree-ssa-structalias.c (struct variable_info): Heapify complex. (varmap): Heapify varmap. (constraints): Heapify constraints. (struct constraint_graph): Heapify succs and preds. (constraint_vec_find): Update for heapification. (constraint_set_union): Ditto. (insert_into_complex): Ditto. (constraint_edge_vec_find): Ditto. (erase_graph_self_edge): Ditto. (add_graph_edge): Ditto. (get_graph_weights): Ditto. (merge_graph_nodes): Ditto. (build_constraint_graph): Ditto. (topo_visit): Ditto. (solve_graph): Ditto. (create_variable_info_for): Ditto. (init_base_vars): Ditto. (delete_points_to_sets): Free graph, varmap, and complex constraints. (condese_varmap_nodes): Free complex vector. (clear_edges_for_node): Clear succs and preds vector. From-SVN: r101862
2005-07-11tree-ssa-structalias.c (update_alias_info): Change counting of references to ↵Daniel Berlin1-5/+16
not include vdefs. 2005-07-10 Daniel Berlin <dberlin@dberlin.org> * tree-ssa-structalias.c (update_alias_info): Change counting of references to not include vdefs. From-SVN: r101861
2005-07-09Makefile.in (tree-ssa-alias.o): Depend on tree-ssa-structalias.hDiego Novillo1-201/+449
* Makefile.in (tree-ssa-alias.o): Depend on tree-ssa-structalias.h * tree-cfg.c (CHECK_OP): Only test for is_gimple_val. * tree-dfa.c (dump_subvars_for): New. (debug_subvars_for): New. (dump_variable): Show subvariables if VAR has them. * tree-flow-inline.h (get_subvar_at): New. (overlap_subvar): Change offset and size to unsigned HOST_WIDE_INT. * tree-flow.h (struct ptr_info_def): Remove field pt_malloc. Update all users. (struct subvar): Change fields offset and size to unsigned HOST_WIDE_INT. (dump_subvars_for): Declare. (debug_subvars_for): Declare. (get_subvar_at): Declare. (okay_component_ref_for_subvars): Change 2nd and 3rd argument to unsigned HOST_WIDE_INT *. (overlap_subvar): Likewise. * tree-gimple.c (is_gimple_reg): Always return false for SFTs and memory tags. * tree-pass.h (pass_build_pta, pass_del_pta): Remove. Update all callers. * tree-ssa-alias.c: Include tree-ssa-structalias.h. (compute_may_aliases): Call compute_points_to_sets. (collect_points_to_info_for): Remove. (compute_points_to_and_addr_escape): Remove. (delete_alias_info): Call delete_points_to_sets. (compute_flow_sensitive_aliasing): If the call to find_what_p_points_to returns false, call set_pt_anything. (add_may_alias): Set TREE_ADDRESSABLE when adding a new alias. (set_pt_anything): Clear pi->pt_vars. (set_pt_malloc): Remove. (merge_pointed_to_info): Remove. (add_pointed_to_expr): Remove. (add_pointed_to_var): Remove. (collect_points_to_info_r): Remove. (is_escape_site): Make extern. (create_sft): New. (create_overlap_variables_for): Call it. * tree-ssa-copy.c (merge_alias_info): Never merge flow-sensitive alias information. * tree-ssa-operands.c (get_expr_operands): Adjust variables offset and size to be unsigned HOST_WIDE_INT. (add_to_addressable_set): Rename from note_addressable. Set TREE_ADDRESSABLE as the variables are added to the set. Update all users. (add_stmt_operand): Do not try to micro-optimize unmodifiable operands into VUSEs when adding V_MAY_DEFs for members in an alias set. * tree-ssa-operands.h (add_to_addressable_set): Declare. * tree-ssa-structalias.c: Include tree-ssa-structalias.h last. (struct variable_info): Add bitfield is_heap_var. (var_anyoffset, anyoffset_tree, anyoffset_id): Declare. (new_var_info): Initialize is_heap_var. (get_constraint_for): Add HEAP variables to the symbol table. Mark them with is_heap_var. (update_alias_info): New. Taken mostly from the old compute_points_to_and_addr_escape. (handle_ptr_arith): New. (find_func_aliases): Call update_alias_info. Call handle_ptr_info for tcc_binary expressions. Call mark_stmt_modified. (create_variable_info_for): If DECL has subvars, do not create variables for its subvars. Always add all the fields. (set_uids_in_ptset): If the solution includes ANYOFFSET and SFTs, then add all the SFTs of the structure. If VI->DECL is an aggregate with subvariables, add the SFT at VI->OFFSET. (find_what_p_points_to): If VI is an artificial variable, translate to bitfields in SSA_NAME_PTR_INFO. If the solution is empty, set pi->pt_vars to NULL (init_base_vars): Create ANYOFFSET. (compute_points_to_sets): Rename from create_alias_vars. Make extern. (pass_build_pta): Remove. (delete_points_to_sets): Rename from delete_alias_vars. (pass_del_pta): Remove. * tree-ssa-structalias.h (struct alias_info): Move from tree-ssa-alias.h. (NUM_REFERENCES, NUM_REFERENCES_CLEAR, NUM_REFERENCES_INC, NUM_REFERENCES_SET): Likewise. (compute_points_to_sets, delete_points_to_sets): Declare. testsuite/ChangeLog * gcc.dg/tree-ssa/pta-fp.c: Use -fdump-tree-alias1. From-SVN: r101841
2005-07-06Fix PR tree-optimization/22319 Fix PR tree-optimization/22140 Fix PR ↵Daniel Berlin1-5/+24
tree-optimization/22310 2005-07-06 Daniel Berlin <dberlin@dberlin.org> Fix PR tree-optimization/22319 Fix PR tree-optimization/22140 Fix PR tree-optimization/22310 * tree-ssa-structalias.c (do_structure_copy): Give up earlier on variable sized types. Use correct type for intermediate structure on *a = *b structure copies. From-SVN: r101658
2005-07-05tree-ssa-structalias.c (get_constraint_exp_from_ssa_var): Only fall back to ↵Daniel Berlin1-3/+4
saying it points to readonly memory if we can't do better. 2005-07-04 Daniel Berlin <dberlin@dberlin.org> * tree-ssa-structalias.c (get_constraint_exp_from_ssa_var): Only fall back to saying it points to readonly memory if we can't do better. From-SVN: r101625
2005-07-04* tree-ssa-structalias.c: Don't include expr.h.Diego Novillo1-1/+0
From-SVN: r101609
2005-07-04re PR tree-optimization/22279 (ICE in first_vi_for_offset, at ↵Daniel Berlin1-1/+1
tree-ssa-structalias.c:2566) 2005-07-04 Daniel Berlin <dberlin@dberlin.org> Fix PR tree-optimization/22279 * tree-ssa-structalias.c (offset_overlaps_with_access): Use correct operator. From-SVN: r101603
2005-07-01re PR tree-optimization/22071 (ICE in first_vi_for_offset, at ↵Daniel Berlin1-2/+40
tree-ssa-structalias.c:2506) 2005-06-29 Daniel Berlin <dberlin@dberlin.org> Fix PR tree-optimization/22071 * tree-ssa-structalias.c (offset_overlaps_with_access): New function. (get_constraint_for_component_ref): Use it. From-SVN: r101516
2005-06-30[multiple changes]Daniel Berlin1-2/+2
2005-06-29 Daniel Berlin <dberlin@dberlin.org> * tree-complex.c (complex_variable_components): Now a hashtable. (cvc_lookup): Ditto. (cvc_insert): Ditto. (create_components): Use referenced var iterator. Initialize hashtable. Use cvc_insert/lookup. (extract_components): Use cvc_insert/lookup. (update_complex_components): Ditto. (update_complex_components_on_edge): Ditto. * tree-dfa.c (referenced_vars): Now a hashtable. (dump_referenced_vars): Use iterator. (referenced_var_lookup): New function. (referenced_var_insert): Ditto. (add_referenced_var): Use referenced_var_insert. (mark_new_vars_to_rename): Use DECL_UID. * tree-flow-inline.h (first_htab_element): New function. (end_htab_p): Ditto. (next_htab_element): Ditto. (first_referenced_var): Ditto. (end_referenced_vars_p): Ditto. (next_referenced_var): Ditto. (is_call_clobbered): Use DECL_UID. (mark_call_clobbered): Ditto. (clear_call_clobbered): Ditto. (mark_non_addressable): Ditto. * tree-flow.h (htab_iterator): New struct. (FOR_EACH_HTAB_ELEMENT): New macro. (struct int_tree_map): New struct. (int_tree_map_hash): Prototype. (int_tree_map_eq): Ditto. (referenced_var_iterator): Ditto. (FOR_EACH_REFERENCED_VAR): New macro. (referenced_vars): Now a hashtable. * tree-into-ssa.c (symbol_marked_for_renaming): Use DECL_UID. (add_new_name_mapping): Ditto. (mark_def_sites): Ditto. (insert_phi_nodes): Use referenced_var iterator. (mark_def_site_blocks): Ditto. (mark_sym_for_renaming): Use DECL_UID. * tree-sra.c (is_sra_candidate_decl): Use DECL_UID. (lookup_element): Ditto. (find_candidates_for_sra): Use referenced_vars iterator. Use DECL_UID. * tree-ssa-alias.c (NUM_REFERENCES): New macro. (NUM_REFERENCES_CLEAR): Ditto. (NUM_REFERENCES_INC): Ditto. (NUM_REFERENCES_SET): Ditto. (alias_obstack): New bitmap obstack. (struct alias_map_d): Use bitmap, not sbitmap. (struct alias_info): Remove num_references. (init_alias_info): Use referenced_var iterator. Initialize bitmap obstack. (delete_alias_info): Use referenced_var iterator. Free bitmap obstack. (compute_points_to_and_addr_escape): Use DECL_UID. Use new NUM_REFERENCES macros. (compute_flow_sensitive_aliasing): may_aliases is now a bitmap. Use new NUM_REFERENCES macros. (group_aliases_into): Update prototype to use bitmap. (setup_pointers_and_addressables): Use referenced_vars iterator. Use DECL_UID. Use new NUM_REFERENCES macros. (add_pointed_to_var): Use DECL_UID. (dump_alias_info): Use referenced_var iterator. (add_type_alias): Ditto. (used_portions): Now a hashtable. (used_part_map_eq): New function. (used_part_map_hash): Ditto. (free_used_part_map): Ditto. (up_lookup): Ditto. (up_insert): Ditto. (get_or_create_used_part_for): Use up_lookup. (create_overlap_variables_for): Ditto. (find_used_portions): Use up_insert. Use DECL_UID. (create_structure_vars): Init used_portions hashtable, use referenced_vars iterator. * tree-ssa-live.c (create_ssa_var_map): sbitmaps became bitmaps. Use DECL_UID. * tree-ssa-loop-im.c (gather_mem_refs_stmt): Use DECL_UID. * tree-ssa-operands.c (get_asm_expr_operands): Ditto. (note_addressable): Ditto. * tree-ssa-structalias.c (set_uids_in_ptset): Ditto. * tree-ssa.c (verify_flow_insensitive_alias_info): Use referenced_var iterator. Use DECL_UID. (delete_tree_ssa): Ditto. (int_tree_map_eq): New function. (int_tree_map_hash): Ditto. * tree-stdarg.c (find_va_list_reference): Use DECL_UID. (va_list_ptr_read): Ditto. (va_list_counter_struct_op): Ditto. (va_list_ptr_write): Ditto. (check_va_list_escapes): Ditto. (check_all_va_list_escapes): Ditto. (execute_optimize_stdarg): Ditto. * tree-tailcall.c (suitable_for_tail_opt_p): Used referenced_var iterator. 2005-06-30 Daniel Berlin <dberlin@dberlin.org> * hashtab.h (HTAB_DELETED_ENTRY): New macro. (HTAB_EMPTY_ENTRY): New macro. 2005-06-30 Daniel Berlin <dberlin@dberlin.org> * hashtab.c (EMPTY_ENTRY): Moved and renamed. (DELETED_ENTRY): Ditto. From-SVN: r101480
2005-06-30re PR middle-end/22247 (tree-ssa-structalias.c: `uint' undeclared)Francois-Xavier Coudert1-25/+25
PR middle-end/22247 * tree-ssa-structalias.c (build_constraint_graph, scc_visit, process_unification_queue, init_topo_info, topo_visit, init_scc_info, free_scc_info, perform_var_substitution, solve_graph): Use unsigned instead of uint. From-SVN: r101475
2005-06-25Update FSF address.Kelley Cook1-1/+1
From-SVN: r101317
2005-06-21c-typeck.c (build_function_call): Set fundecl = function again.Daniel Berlin1-18/+46
2005-06-20 Daniel Berlin <dberlin@dberlin.org> * c-typeck.c (build_function_call): Set fundecl = function again. * tree-ssa-alias.c (find_used_portions): Address taking causes the entire variable to be used. * tree-ssa-structalias.c (do_structure_copy): Fix handling of unknown size variables, and structure copies from addressof operations. Simplify how we do *a = *b type structure copies. (init_base_vars): Add ANYTHING = &ANYTHING constraint the right way. READONLY's address is not taken by default. INTEGER dereference should point to anything. (create_variable_info_for): It's okay for the first field to not start at 0. From-SVN: r101227
2005-06-15tree-ssa-structalias.c (dump_solution_for_var): Reformat output.Diego Novillo1-10/+26
* tree-ssa-structalias.c (dump_solution_for_var): Reformat output. (dump_sa_points_to_info): Make extern. (debug_sa_points_to_info): New. * tree-ssa-structalias.h (TREE_SSA_STRUCTALIAS_H): Rename from TREE_ALIAS_COMMON. (dump_sa_points_to_info): Declare. (debug_sa_points_to_info): Declare. From-SVN: r100987
2005-06-12cgraphunit.c, [...]: Fix comment typos.Kazu Hirata1-6/+6
* cgraphunit.c, tree-ssa-loop-ivopts.c, tree-ssa-structalias.c, tree-vectorizer.c, tree-vectorizer.h, config/sparc/sparc.c: Fix comment typos. From-SVN: r100856
2005-06-12Fix PR tree-optimization/22005 Fix PR tree-optimization/22025Daniel Berlin1-11/+39
2005-06-11 Daniel Berlin <dberlin@dberlin.org> Fix PR tree-optimization/22005 Fix PR tree-optimization/22025 * tree-ssa-structalias.c (struct variable_info): Add has_union member. (create_variable_info_for): Mark variables containing unions. Don't sort the field stack if notokay is true. (find_what_p_points_to): Convert variables containing unions back to their SFT's if necessary. From-SVN: r100851
2005-06-09Makefile.in (OBJS-common): Add tree-ssa-structalias.o.Daniel Berlin1-0/+3165
2005-06-08 Daniel Berlin <dberlin@dberlin.org> * Makefile.in (OBJS-common): Add tree-ssa-structalias.o. * tree-flow.h (find_what_p_points_to): Add prototype. (push_fields_onto_fieldstack): Ditto. (sort_fieldstack): Ditto. * tree-optimize.c (init_tree_optimization_passes): Add pass_build_pta and pass_del_pta. * tree-pass.h (pass_build_pta): New structure. (pass_del_pta): Ditto. * tree-ssa-alias.c (compute_flow_sensitive_aliasing): Disambiguate using new alias analyzer. (push_fields_onto_fieldstack): Removed from here. (bitpos_of_field): Ditto. (fieldoff_compare): Ditto. * tree-ssa-structalias.c: New file. * tree-ssa-structalias.h: Ditto. From-SVN: r100800