aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-structalias.c
AgeCommit message (Collapse)AuthorFilesLines
2017-08-17tree-ssa-structalias.c (solve_graph): When propagating to successors update ↵Richard Biener1-6/+23
the graphs succ edges and avoid duplicate... 2017-08-17 Richard Biener <rguenther@suse.de> * tree-ssa-structalias.c (solve_graph): When propagating to successors update the graphs succ edges and avoid duplicate work. From-SVN: r251146
2017-08-17re PR fortran/81827 (Large compile time with derived-type rrays)Richard Biener1-1/+48
2017-08-17 Richard Biener <rguenther@suse.de> PR tree-optimization/81827 * tree-ssa-structalias.c (struct variable_info): Add is_reg_var flag. (new_var_info): Initialize it conservatively. (get_call_vi): Mark register vars. (new_scalar_tmp_constraint_exp): Likewise. (handle_rhs_call): Likewise. (handle_const_call): Likewise. (create_function_info_for): Likewise. (solve_constraints): Sort varinfos to separate register from non-register vars to pack points-to solution bitmaps during iteration. From-SVN: r251143
2017-08-08trans.c: Include header files.Martin Liska1-1/+2
. 2017-08-08 Martin Liska <mliska@suse.cz> * gcc-interface/trans.c: Include header files. 2017-08-08 Martin Liska <mliska@suse.cz> * objc-gnu-runtime-abi-01.c: Include header files. * objc-next-runtime-abi-01.c: Likewise. * objc-next-runtime-abi-02.c: Likewise. 2017-08-08 Martin Liska <mliska@suse.cz> * asan.c: Include header files. * attribs.c (build_decl_attribute_variant): New function moved from tree.[ch]. (build_type_attribute_qual_variant): Likewise. (cmp_attrib_identifiers): Likewise. (simple_cst_list_equal): Likewise. (omp_declare_simd_clauses_equal): Likewise. (attribute_value_equal): Likewise. (comp_type_attributes): Likewise. (build_type_attribute_variant): Likewise. (lookup_ident_attribute): Likewise. (remove_attribute): Likewise. (merge_attributes): Likewise. (merge_type_attributes): Likewise. (merge_decl_attributes): Likewise. (merge_dllimport_decl_attributes): Likewise. (handle_dll_attribute): Likewise. (attribute_list_equal): Likewise. (attribute_list_contained): Likewise. * attribs.h (lookup_attribute): New function moved from tree.[ch]. (lookup_attribute_by_prefix): Likewise. * bb-reorder.c: Include header files. * builtins.c: Likewise. * calls.c: Likewise. * cfgexpand.c: Likewise. * cgraph.c: Likewise. * cgraphunit.c: Likewise. * convert.c: Likewise. * dwarf2out.c: Likewise. * final.c: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * gimple-expr.c: Likewise. * gimple-fold.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimplify.c: Likewise. * hsa-common.c: Likewise. * hsa-gen.c: Likewise. * internal-fn.c: Likewise. * ipa-chkp.c: Likewise. * ipa-cp.c: Likewise. * ipa-devirt.c: Likewise. * ipa-fnsummary.c: Likewise. * ipa-inline.c: Likewise. * ipa-visibility.c: Likewise. * ipa.c: Likewise. * lto-cgraph.c: Likewise. * omp-expand.c: Likewise. * omp-general.c: Likewise. * omp-low.c: Likewise. * omp-offload.c: Likewise. * omp-simd-clone.c: Likewise. * opts-global.c: Likewise. * passes.c: Likewise. * predict.c: Likewise. * sancov.c: Likewise. * sanopt.c: Likewise. * symtab.c: Likewise. * toplev.c: Likewise. * trans-mem.c: Likewise. * tree-chkp.c: Likewise. * tree-eh.c: Likewise. * tree-into-ssa.c: Likewise. * tree-object-size.c: Likewise. * tree-parloops.c: Likewise. * tree-profile.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa.c: Likewise. * tree-streamer-in.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vrp.c: Likewise. * tsan.c: Likewise. * ubsan.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * tree.c: Remove functions moved to attribs.[ch]. * tree.h: Likewise. * config/aarch64/aarch64.c: Add attrs.h header file. * config/alpha/alpha.c: Likewise. * config/arc/arc.c: Likewise. * config/arm/arm.c: Likewise. * config/avr/avr.c: Likewise. * config/bfin/bfin.c: Likewise. * config/c6x/c6x.c: Likewise. * config/cr16/cr16.c: Likewise. * config/cris/cris.c: Likewise. * config/darwin.c: Likewise. * config/epiphany/epiphany.c: Likewise. * config/fr30/fr30.c: Likewise. * config/frv/frv.c: Likewise. * config/ft32/ft32.c: Likewise. * config/h8300/h8300.c: Likewise. * config/i386/winnt.c: Likewise. * config/ia64/ia64.c: Likewise. * config/iq2000/iq2000.c: Likewise. * config/lm32/lm32.c: Likewise. * config/m32c/m32c.c: Likewise. * config/m32r/m32r.c: Likewise. * config/m68k/m68k.c: Likewise. * config/mcore/mcore.c: Likewise. * config/microblaze/microblaze.c: Likewise. * config/mips/mips.c: Likewise. * config/mmix/mmix.c: Likewise. * config/mn10300/mn10300.c: Likewise. * config/moxie/moxie.c: Likewise. * config/msp430/msp430.c: Likewise. * config/nds32/nds32-isr.c: Likewise. * config/nds32/nds32.c: Likewise. * config/nios2/nios2.c: Likewise. * config/nvptx/nvptx.c: Likewise. * config/pa/pa.c: Likewise. * config/pdp11/pdp11.c: Likewise. * config/powerpcspe/powerpcspe.c: Likewise. * config/riscv/riscv.c: Likewise. * config/rl78/rl78.c: Likewise. * config/rx/rx.c: Likewise. * config/s390/s390.c: Likewise. * config/sh/sh.c: Likewise. * config/sol2.c: Likewise. * config/sparc/sparc.c: Likewise. * config/spu/spu.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/tilegx/tilegx.c: Likewise. * config/tilepro/tilepro.c: Likewise. * config/v850/v850.c: Likewise. * config/vax/vax.c: Likewise. * config/visium/visium.c: Likewise. * config/xtensa/xtensa.c: Likewise. 2017-08-08 Martin Liska <mliska@suse.cz> * call.c: Include header files. * cp-gimplify.c: Likewise. * cp-ubsan.c: Likewise. * cvt.c: Likewise. * init.c: Likewise. * search.c: Likewise. * semantics.c: Likewise. * typeck.c: Likewise. 2017-08-08 Martin Liska <mliska@suse.cz> * lto-lang.c: Include header files. * lto-symtab.c: Likewise. 2017-08-08 Martin Liska <mliska@suse.cz> * c-convert.c: Include header files. * c-typeck.c: Likewise. 2017-08-08 Martin Liska <mliska@suse.cz> * c-ada-spec.c: Include header files. * c-ubsan.c: Likewise. * c-warn.c: Likewise. 2017-08-08 Martin Liska <mliska@suse.cz> * trans-types.c: Include header files. From-SVN: r250946
2017-07-27attribs.c (decl_attributes): Imply noinline, noclone and no_icf attributes ↵Jakub Jelinek1-2/+5
for noipa attribute. * attribs.c (decl_attributes): Imply noinline, noclone and no_icf attributes for noipa attribute. For naked attribute use lookup_attribute first before lookup_attribute_spec. * final.c (rest_of_handle_final): Disable IPA RA for functions with noipa attribute. * ipa-visibility.c (non_local_p): Fix comment typos. Return true for functions with noipa attribute. (cgraph_externally_visible_p): Return true for functions with noipa attribute. * cgraph.c (cgraph_node::get_availability): Return AVAIL_INTERPOSABLE for functions with noipa attribute. * doc/extend.texi: Document noipa function attribute. * tree-ssa-structalias.c (refered_from_nonlocal_fn): Set *nonlocal_p also for functions with noipa attribute. (ipa_pta_execute): Set nonlocal_p also for nodes with noipa attribute. c-family/ * c-attribs.c (c_common_attribute_table): Add noipa attribute. (handle_noipa_attribute): New function. testsuite/ * gcc.dg/attr-noipa.c: New test. * gcc.dg/ipa/ipa-pta-18.c: New test. * gcc.dg/ipa/ipa-sra-11.c: New test. From-SVN: r250607
2017-07-25re PR lto/81487 ([mingw32] ld.exe: error: asprintf failed)Georg-Johann Lay1-14/+7
gcc/ PR 81487 * hsa-brig.c (brig_init): Use xasprintf instead of asprintf. * gimple-pretty-print.c (dump_profile, dump_probability): Same. * tree-ssa-structalias.c (alias_get_name): Same. From-SVN: r250499
2017-06-19tree-ssa-structalias.c (get_constraint_for_ptr_offset): Multiply in UWHI to ↵Jakub Jelinek1-1/+1
avoid undefined overflow. * tree-ssa-structalias.c (get_constraint_for_ptr_offset): Multiply in UWHI to avoid undefined overflow. From-SVN: r249381
2017-05-23Move symtab_node::dump_table to symbol_table::dumpMartin Liska1-1/+1
2017-05-23 Martin Liska <mliska@suse.cz> * cgraph.h: Move symtab_node::dump_table to symbol_table::dump and symtab_node::debug_symtab to symbol_table::debug. * cgraphunit.c (analyze_functions): Use the renamed function. (symbol_table::compile): Likewise. * ipa-cp.c (ipcp_verify_propagated_values): Likewise. * ipa-icf.c (sem_item_optimizer::execute): Likewise. * passes.c (execute_todo): Likewise. * symtab.c (symbol_table::dump): New function. * tree-ssa-structalias.c (ipa_pta_execute): Use the renamed function. 2017-05-23 Martin Liska <mliska@suse.cz> * lto.c (read_cgraph_and_symbols): Use the renamed function. (do_whole_program_analysis): Use the renamed function. From-SVN: r248368
2017-05-16Add default value for last argument of dump functions.Martin Liska1-1/+1
2017-05-16 Martin Liska <mliska@suse.cz> * parser.c (cp_lexer_print_token): Add default value for flags argument of print_gimple_stmt, print_gimple_expr, print_generic_stmt and print_generic_expr. 2017-05-16 Martin Liska <mliska@suse.cz> * cgraph.c (cgraph_edge::resolve_speculation): Add default value for flags argument of print_gimple_stmt, print_gimple_expr, print_generic_stmt and print_generic_expr. * cgraphclones.c (symbol_table::materialize_all_clones): Likewise. * coretypes.h: Likewise. * except.c (dump_eh_tree): Likewise. * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise. * gimple-pretty-print.h: Likewise. * gimple-ssa-backprop.c (dump_usage_prefix): Likewise. (backprop::push_to_worklist): Likewise. (backprop::pop_from_worklist): Likewise. (backprop::process_use): Likewise. (backprop::intersect_uses): Likewise. (note_replacement): Likewise. * gimple-ssa-store-merging.c (pass_store_merging::terminate_all_aliasing_chains): Likewise. (imm_store_chain_info::coalesce_immediate_stores): Likewise. (pass_store_merging::execute): Likewise. * gimple-ssa-strength-reduction.c (dump_candidate): Likewise. (ssa_base_cand_dump_callback): Likewise. (dump_incr_vec): Likewise. (replace_refs): Likewise. (replace_mult_candidate): Likewise. (create_add_on_incoming_edge): Likewise. (create_phi_basis): Likewise. (insert_initializers): Likewise. (all_phi_incrs_profitable): Likewise. (introduce_cast_before_cand): Likewise. (replace_one_candidate): Likewise. * gimplify.c (gimplify_expr): Likewise. * graphite-isl-ast-to-gimple.c (is_valid_rename): Likewise. (set_rename): Likewise. (rename_uses): Likewise. (copy_loop_phi_nodes): Likewise. (add_close_phis_to_merge_points): Likewise. (copy_loop_close_phi_args): Likewise. (copy_cond_phi_args): Likewise. (graphite_copy_stmts_from_block): Likewise. (translate_pending_phi_nodes): Likewise. * graphite-poly.c (print_pdr): Likewise. (dump_gbb_cases): Likewise. (dump_gbb_conditions): Likewise. (print_scop_params): Likewise. * graphite-scop-detection.c (build_cross_bb_scalars_def): Likewise. (build_cross_bb_scalars_use): Likewise. (gather_bbs::before_dom_children): Likewise. * hsa-dump.c (dump_hsa_immed): Likewise. * ipa-cp.c (print_ipcp_constant_value): Likewise. (get_replacement_map): Likewise. * ipa-inline-analysis.c (dump_condition): Likewise. (estimate_function_body_sizes): Likewise. * ipa-polymorphic-call.c (check_stmt_for_type_change): Likewise. (ipa_polymorphic_call_context::get_dynamic_type): Likewise. * ipa-prop.c (ipa_dump_param): Likewise. (ipa_print_node_jump_functions_for_edge): Likewise. (ipa_modify_call_arguments): Likewise. (ipa_modify_expr): Likewise. (ipa_dump_param_adjustments): Likewise. (ipa_dump_agg_replacement_values): Likewise. (ipcp_modif_dom_walker::before_dom_children): Likewise. * ipa-pure-const.c (check_stmt): Likewise. (pass_nothrow::execute): Likewise. * ipa-split.c (execute_split_functions): Likewise. * omp-offload.c (dump_oacc_loop_part): Likewise. (dump_oacc_loop): Likewise. * trans-mem.c (tm_log_emit): Likewise. (tm_memopt_accumulate_memops): Likewise. (dump_tm_memopt_set): Likewise. (dump_tm_memopt_transform): Likewise. * tree-cfg.c (gimple_verify_flow_info): Likewise. (print_loop): Likewise. * tree-chkp-opt.c (chkp_print_addr): Likewise. (chkp_gather_checks_info): Likewise. (chkp_get_check_result): Likewise. (chkp_remove_check_if_pass): Likewise. (chkp_use_outer_bounds_if_possible): Likewise. (chkp_reduce_bounds_lifetime): Likewise. * tree-chkp.c (chkp_register_addr_bounds): Likewise. (chkp_mark_completed_bounds): Likewise. (chkp_register_incomplete_bounds): Likewise. (chkp_mark_invalid_bounds): Likewise. (chkp_maybe_copy_and_register_bounds): Likewise. (chkp_build_returned_bound): Likewise. (chkp_get_bound_for_parm): Likewise. (chkp_build_bndldx): Likewise. (chkp_get_bounds_by_definition): Likewise. (chkp_generate_extern_var_bounds): Likewise. (chkp_get_bounds_for_decl_addr): Likewise. * tree-chrec.c (chrec_apply): Likewise. * tree-data-ref.c (dump_data_reference): Likewise. (dump_subscript): Likewise. (dump_data_dependence_relation): Likewise. (analyze_overlapping_iterations): Likewise. * tree-inline.c (expand_call_inline): Likewise. (tree_function_versioning): Likewise. * tree-into-ssa.c (dump_defs_stack): Likewise. (dump_currdefs): Likewise. (dump_names_replaced_by): Likewise. (dump_update_ssa): Likewise. (update_ssa): Likewise. * tree-object-size.c (pass_object_sizes::execute): Likewise. * tree-parloops.c (build_new_reduction): Likewise. (try_create_reduction_list): Likewise. (ref_conflicts_with_region): Likewise. (oacc_entry_exit_ok_1): Likewise. (oacc_entry_exit_single_gang): Likewise. * tree-pretty-print.h: Likewise. * tree-scalar-evolution.c (set_scalar_evolution): Likewise. (get_scalar_evolution): Likewise. (add_to_evolution): Likewise. (get_loop_exit_condition): Likewise. (analyze_evolution_in_loop): Likewise. (analyze_initial_condition): Likewise. (analyze_scalar_evolution): Likewise. (instantiate_scev): Likewise. (number_of_latch_executions): Likewise. (gather_chrec_stats): Likewise. (final_value_replacement_loop): Likewise. (scev_const_prop): Likewise. * tree-sra.c (dump_access): Likewise. (disqualify_candidate): Likewise. (create_access): Likewise. (reject): Likewise. (maybe_add_sra_candidate): Likewise. (create_access_replacement): Likewise. (analyze_access_subtree): Likewise. (analyze_all_variable_accesses): Likewise. (sra_modify_assign): Likewise. (initialize_constant_pool_replacements): Likewise. (find_param_candidates): Likewise. (decide_one_param_reduction): Likewise. (replace_removed_params_ssa_names): Likewise. * tree-ssa-ccp.c (ccp_fold_stmt): Likewise. * tree-ssa-copy.c (dump_copy_of): Likewise. (copy_prop_visit_cond_stmt): Likewise. * tree-ssa-dce.c (mark_operand_necessary): Likewise. * tree-ssa-dom.c (pass_dominator::execute): Likewise. (record_equivalences_from_stmt): Likewise. * tree-ssa-dse.c (compute_trims): Likewise. (delete_dead_call): Likewise. (delete_dead_assignment): Likewise. * tree-ssa-forwprop.c (forward_propagate_into_gimple_cond): Likewise. (forward_propagate_into_cond): Likewise. (pass_forwprop::execute): Likewise. * tree-ssa-ifcombine.c (ifcombine_ifandif): Likewise. * tree-ssa-loop-im.c (invariantness_dom_walker::before_dom_children): Likewise. (move_computations_worker): Likewise. (execute_sm): Likewise. * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Likewise. (remove_exits_and_undefined_stmts): Likewise. (remove_redundant_iv_tests): Likewise. * tree-ssa-loop-ivopts.c (dump_use): Likewise. (adjust_iv_update_pos): Likewise. * tree-ssa-math-opts.c (bswap_replace): Likewise. * tree-ssa-phiopt.c (factor_out_conditional_conversion): Likewise. (value_replacement): Likewise. * tree-ssa-phiprop.c (phiprop_insert_phi): Likewise. * tree-ssa-pre.c (print_pre_expr): Likewise. (get_representative_for): Likewise. (create_expression_by_pieces): Likewise. (insert_into_preds_of_block): Likewise. (eliminate_insert): Likewise. (eliminate_dom_walker::before_dom_children): Likewise. (eliminate): Likewise. (remove_dead_inserted_code): Likewise. * tree-ssa-propagate.c (substitute_and_fold): Likewise. * tree-ssa-reassoc.c (get_rank): Likewise. (eliminate_duplicate_pair): Likewise. (eliminate_plus_minus_pair): Likewise. (eliminate_not_pairs): Likewise. (undistribute_ops_list): Likewise. (eliminate_redundant_comparison): Likewise. (update_range_test): Likewise. (optimize_range_tests_var_bound): Likewise. (optimize_vec_cond_expr): Likewise. (rewrite_expr_tree): Likewise. (rewrite_expr_tree_parallel): Likewise. (linearize_expr): Likewise. (break_up_subtract): Likewise. (linearize_expr_tree): Likewise. (attempt_builtin_powi): Likewise. (attempt_builtin_copysign): Likewise. (transform_stmt_to_copy): Likewise. (transform_stmt_to_multiply): Likewise. (dump_ops_vector): Likewise. * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Likewise. (print_scc): Likewise. (set_ssa_val_to): Likewise. (visit_reference_op_store): Likewise. (visit_use): Likewise. (sccvn_dom_walker::before_dom_children): Likewise. (run_scc_vn): Likewise. * tree-ssa-scopedtables.c (avail_exprs_stack::lookup_avail_expr): Likewise. (expr_hash_elt::print): Likewise. (const_and_copies::pop_to_marker): Likewise. (const_and_copies::record_const_or_copy_raw): Likewise. * tree-ssa-structalias.c (compute_dependence_clique): Likewise. * tree-ssa-uninit.c (collect_phi_def_edges): Likewise. (dump_predicates): Likewise. (find_uninit_use): Likewise. (warn_uninitialized_phi): Likewise. (pass_late_warn_uninitialized::execute): Likewise. * tree-ssa.c (verify_vssa): Likewise. (verify_ssa): Likewise. (maybe_optimize_var): Likewise. * tree-vrp.c (dump_value_range): Likewise. (dump_all_value_ranges): Likewise. (dump_asserts_for): Likewise. (register_edge_assert_for_2): Likewise. (vrp_visit_cond_stmt): Likewise. (vrp_visit_switch_stmt): Likewise. (vrp_visit_stmt): Likewise. (vrp_visit_phi_node): Likewise. (simplify_cond_using_ranges_1): Likewise. (fold_predicate_in): Likewise. (evrp_dom_walker::before_dom_children): Likewise. (evrp_dom_walker::push_value_range): Likewise. (evrp_dom_walker::pop_value_range): Likewise. (execute_early_vrp): Likewise. From-SVN: r248113
2017-05-02re PR tree-optimization/80591 (AArch64 kernel miscompilation starting with ↵Richard Biener1-2/+2
r246809) 2017-05-02 Richard Biener <rguenther@suse.de> PR tree-optimization/80591 Revert 2017-04-10 Richard Biener <rguenther@suse.de> * tree-ssa-structalias.c (find_func_aliases): Properly handle asm inputs. * gcc.dg/torture/pr80591.c: New testcase. From-SVN: r247488
2017-04-21re PR tree-optimization/79547 (duplicate strlen calls with same argument not ↵Richard Biener1-0/+34
folded) 2017-04-21 Richard Biener <rguenther@suse.de> PR tree-optimization/79547 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call): Handle strlen, strcmp, strncmp, strcasecmp, strncasecmp, memcmp, bcmp, strspn, strcspn, __builtin_object_size and __builtin_constant_p without any constraints. * gcc.dg/tree-ssa/strlen-2.c: New testcase. From-SVN: r247062
2017-04-10tree-ssa-structalias.c (find_func_aliases): Properly handle asm inputs.Richard Biener1-2/+2
2017-04-10 Richard Biener <rguenther@suse.de> * tree-ssa-structalias.c (find_func_aliases): Properly handle asm inputs. From-SVN: r246809
2017-03-27re PR ipa/79776 (ICE on valid code in insert_vi_for_tree, at ↵Richard Biener1-1/+3
tree-ssa-structalias.c:2807) 2017-03-27 Richard Biener <rguenther@suse.de> PR ipa/79776 * tree-ssa-structalias.c (associate_varinfo_to_alias): Skip inlined thunk clones. * g++.dg/ipa/pr79776.C: New testcase. From-SVN: r246494
2017-02-17re PR inline-asm/79552 (Wrong code generation due to -fschedule-insns, with ↵Richard Biener1-2/+8
__restrict__ and inline asm) 2017-02-17 Richard Biener <rguenther@suse.de> PR tree-optimization/79552 * tree-ssa-structalias.c (visit_loadstore): Properly verify default defs. From-SVN: r245528
2017-02-13cprop.c (cprop_jump): Add missing space in string literal.Jakub Jelinek1-3/+3
* cprop.c (cprop_jump): Add missing space in string literal. * tree-ssa-structalias.c (rewrite_constraints): Likewise. (get_constraint_for_component_ref): Likewise. * df-core.c (df_worklist_dataflow_doublequeue): Likewise. * tree-outof-ssa.c (insert_partition_copy_on_edge): Likewise. * lra-constraints.c (process_alt_operands): Likewise. * ipa-inline.c (inline_small_functions): Likewise. * tree-ssa-sccvn.c (visit_reference_op_store): Likewise. * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise. * trans-mem.c (diagnose_tm_1_op): Likewise. * omp-grid.c (grid_find_single_omp_among_assignments): Likewise. (grid_parallel_clauses_gridifiable): Likewise. c/ * c-parser.c (c_parser_oacc_declare): Add missing space in diagnostics. fortran/ * trans-expr.c (gfc_conv_substring): Add missing space in diagnostics. From-SVN: r245409
2017-01-01Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r243994
2016-11-02re PR tree-optimization/78035 (Inconsistency between address comparison and ↵Richard Biener1-1/+11
alias analysis) 2016-11-02 Richard Biener <rguenther@suse.de> PR tree-optimization/78035 PR tree-optimization/77964 * gimple-pretty-print.c (pp_points_to_solution): Print vars_contains_interposable. * tree-ssa-alias.c: Include varasm.h. (ptrs_compare_unequal): Check vars_contains_interposable and decl_binds_to_current_def_p. (dump_points_to_solution): Dump vars_contains_interposable. * tree-ssa-alias.h (struct pt_solution): Add vars_contains_interposable flag. * tree-ssa-structalias.c: Include varasm.h. (set_uids_in_ptset): Record whether vars contains a not decl_binds_to_current_def_p variable in vars_contains_interposable. (ipa_escaped_pt): Update initializer. * gcc.target/i386/pr78035.c: New testcase. From-SVN: r241776
2016-11-02re PR middle-end/78047 (Chromium apparently gets miscompiled)Richard Biener1-1/+1
2016-11-02 Richard Biener <rguenther@suse.de> PR tree-optimization/78047 * tree-ssa-structalias.c (push_fields_onto_fieldstack): Initialize fake field at offset zero conservatively regarding to may_have_pointers. From-SVN: r241775
2016-10-20tree-ssa-alias.c (ptrs_compare_unequal): Remove code duplication.Richard Biener1-0/+16
2016-10-20 Richard Biener <rguenther@suse.de> * tree-ssa-alias.c (ptrs_compare_unequal): Remove code duplication. Handle decls possibly not bound. * tree-ssa-structalias.c (get_constraint_for_ssa_var): Add nothing_id for decls that might not be bound if we are interested for the address. (get_constraint_for_component_ref): Deal with that. From-SVN: r241378
2016-10-17Set nonnull attribute to ptr_info_def based on VRPKugan Vivekanandarajah1-2/+10
Set nonnull attribute to ptr_info_def based on VRP gcc/ChangeLog: 2016-10-18 Kugan Vivekanandarajah <kuganv@linaro.org> * tree-ssa-alias.h (pt_solution_singleton_or_null_p): Renamed from pt_solution_singleton_p. * tree-ssa-ccp.c (fold_builtin_alloca_with_align): Use renamed pt_solution_singleton_or_null_p from pt_solution_singleton_p. * tree-ssa-structalias.c (find_what_p_points_to): Preserve pointer nonnull computed by VRP. Also Conservatively set pt.null to 1. (pt_solution_reset): Conservatively set pt.null to 1. (pt_solution_singleton_or_null_p): Renamed from pt_solution_singleton_p. * tree-ssanames.h (set_ptr_nonnull): Declare. (get_ptr_nonnull): Likewise. * tree-ssanames.c (set_ptr_nonnull): New. (get_ptr_nonnull): Likewise. * tree-vrp.c (vrp_finalize): Set ptr that are nonnull. (evrp_dom_walker::before_dom_children): Likewise. gcc/testsuite/ChangeLog: 2016-10-18 Kugan Vivekanandarajah <kuganv@linaro.org> * gcc.dg/torture/pr39074-2.c: Adjust testcase. * gcc.dg/torture/pr39074.c: Likewise. From-SVN: r241287
2016-10-09tree-ssa.c (target_for_debug_bind, [...]): Use VAR_P and/or ↵Jakub Jelinek1-8/+6
VAR_OR_FUNCTION_DECL_P macros. * tree-ssa.c (target_for_debug_bind, verify_phi_args, ssa_undefined_value_p, maybe_optimize_var): Use VAR_P and/or VAR_OR_FUNCTION_DECL_P macros. * tree-chkp.c (chkp_register_var_initializer, chkp_make_static_bounds, chkp_get_bounds_for_decl_addr, chkp_parse_array_and_component_ref, chkp_find_bounds_1): Likewise. * ipa-polymorphic-call.c (decl_maybe_in_construction_p): Likewise. * hsa-gen.c (get_symbol_for_decl): Likewise. * cgraphunit.c (check_global_declaration, analyze_functions, handle_alias_pairs, thunk_adjust, cgraph_node::expand_thunk): Likewise. * gimple-fold.c (can_refer_decl_in_current_unit_p, canonicalize_constructor_val, gimple_get_virt_method_for_vtable): Likewise. * tree.c (set_decl_section_name, copy_node_stat, need_assembler_name_p, free_lang_data_in_decl, find_decls_types_r, merge_dllimport_decl_attributes, handle_dll_attribute, decl_init_priority_insert, auto_var_in_fn_p, array_at_struct_end_p, verify_type): Likewise. * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior, find_explicit_erroneous_behavior): Likewise. * sdbout.c (sdbout_toplevel_data, sdbout_late_global_decl): Likewise. * ipa.c (process_references): Likewise. * tree-chkp-opt.c (chkp_get_check_result): Likewise. * varasm.c (get_block_for_decl, use_blocks_for_decl_p, make_decl_rtl, notice_global_symbol, assemble_variable, mark_decl_referenced, build_constant_desc, output_constant_def_contents, do_assemble_alias, make_decl_one_only, default_section_type_flags, categorize_decl_for_section, default_encode_section_info): Likewise. * trans-mem.c (requires_barrier): Likewise. * gimple-expr.c (mark_addressable): Likewise. * cfgexpand.c (add_scope_conflicts_1, expand_one_var, expand_used_vars_for_block, clear_tree_used, stack_protect_decl_p, expand_debug_expr): Likewise. * tree-dump.c (dequeue_and_dump): Likewise. * ubsan.c (instrument_bool_enum_load): Likewise. * tree-pretty-print.c (print_declaration): Likewise. * simplify-rtx.c (delegitimize_mem_from_attrs): Likewise. * tree-ssa-uninit.c (warn_uninitialized_vars): Likewise. * asan.c (asan_protect_global, instrument_derefs): Likewise. * tree-into-ssa.c (rewrite_stmt, maybe_register_def, pass_build_ssa::execute): Likewise. * var-tracking.c (var_debug_decl, track_expr_p): Likewise. * tree-ssa-loop-ivopts.c (force_expr_to_var_cost, split_address_cost): Likewise. * ipa-split.c (test_nonssa_use, consider_split, mark_nonssa_use): Likewise. * tree-inline.c (insert_debug_decl_map, remap_ssa_name, can_be_nonlocal, remap_decls, copy_debug_stmt, initialize_inlined_parameters, add_local_variables, reset_debug_binding, replace_locals_op): Likewise. * dse.c (can_escape): Likewise. * ipa-devirt.c (compare_virtual_tables, referenced_from_vtable_p): Likewise. * tree-diagnostic.c (default_tree_printer): Likewise. * tree-streamer-in.c (unpack_ts_decl_common_value_fields, unpack_ts_decl_with_vis_value_fields, lto_input_ts_decl_common_tree_pointers): Likewise. * builtins.c (builtin_save_expr, fold_builtin_expect, readonly_data_expr): Likewise. * tree-ssa-structalias.c (new_var_info, get_constraint_for_ssa_var, create_variable_info_for, set_uids_in_ptset, visit_loadstore): Likewise. * gimple-streamer-out.c (output_gimple_stmt): Likewise. * gimplify.c (force_constant_size, gimplify_bind_expr, gimplify_decl_expr, gimplify_var_or_parm_decl, gimplify_compound_lval, gimplify_init_constructor, gimplify_modify_expr, gimplify_asm_expr, gimplify_oacc_declare, gimplify_type_sizes): Likewise. * cgraphbuild.c (record_reference, record_type_list, mark_address, mark_load, mark_store, pass_build_cgraph_edges::execute): Likewise. * tree-ssa-live.c (mark_all_vars_used_1, remove_unused_scope_block_p, remove_unused_locals): Likewise. * tree-ssa-alias.c (ptr_deref_may_alias_decl_p, ptrs_compare_unequal, ref_maybe_used_by_call_p_1, call_may_clobber_ref_p_1): Likewise. * function.c (instantiate_expr, instantiate_decls_1, setjmp_vars_warning, add_local_decl): Likewise. * alias.c (ao_ref_from_mem, get_alias_set, compare_base_symbol_refs): Likewise. * tree-stdarg.c (find_va_list_reference, va_list_counter_struct_op, va_list_ptr_read, va_list_ptr_write, check_all_va_list_escapes, optimize_va_list_gpr_fpr_size): Likewise. * tree-nrv.c (pass_nrv::execute): Likewise. * tsan.c (instrument_expr): Likewise. * tree-ssa-dce.c (remove_dead_stmt): Likewise. * vtable-verify.c (verify_bb_vtables): Likewise. * tree-dfa.c (ssa_default_def, set_ssa_default_def, get_ref_base_and_extent): Likewise. * toplev.c (wrapup_global_declaration_1, wrapup_global_declaration_2): Likewise. * tree-sra.c (static bool constant_decl_p, find_var_candidates, analyze_all_variable_accesses): Likewise. * tree-nested.c (get_nonlocal_debug_decl, convert_nonlocal_omp_clauses, note_nonlocal_vla_type, note_nonlocal_block_vlas, convert_nonlocal_reference_stmt, get_local_debug_decl, convert_local_omp_clauses, convert_local_reference_stmt, nesting_copy_decl, remap_vla_decls): Likewise. * tree-vect-data-refs.c (vect_can_force_dr_alignment_p): Likewise. * stmt.c (decl_overlaps_hard_reg_set_p): Likewise. * dbxout.c (dbxout_late_global_decl, dbxout_type_fields, dbxout_symbol, dbxout_common_check): Likewise. * expr.c (expand_assignment, expand_expr_real_2, expand_expr_real_1, string_constant): Likewise. * hsa.c (hsa_get_declaration_name): Likewise. * passes.c (rest_of_decl_compilation): Likewise. * tree-ssanames.c (make_ssa_name_fn): Likewise. * tree-streamer-out.c (pack_ts_decl_common_value_fields, pack_ts_decl_with_vis_value_fields, write_ts_decl_common_tree_pointers): Likewise. * stor-layout.c (place_field): Likewise. * symtab.c (symtab_node::maybe_create_reference, symtab_node::verify_base, symtab_node::make_decl_local, symtab_node::copy_visibility_from, symtab_node::can_increase_alignment_p): Likewise. * dwarf2out.c (add_var_loc_to_decl, tls_mem_loc_descriptor, decl_by_reference_p, reference_to_unused, rtl_for_decl_location, fortran_common, add_location_or_const_value_attribute, add_scalar_info, add_linkage_name, set_block_abstract_flags, local_function_static, gen_variable_die, dwarf2out_late_global_decl, optimize_one_addr_into_implicit_ptr, optimize_location_into_implicit_ptr): Likewise. * gimple-low.c (record_vars_into): Likewise. * ipa-visibility.c (update_vtable_references): Likewise. * tree-ssa-address.c (fixed_address_object_p, copy_ref_info): Likewise. * lto-streamer-out.c (tree_is_indexable, get_symbol_initial_value, DFS::DFS_write_tree_body, write_symbol): Likewise. * langhooks.c (lhd_warn_unused_global_decl, lhd_set_decl_assembler_name): Likewise. * attribs.c (decl_attributes): Likewise. * except.c (output_ttype): Likewise. * varpool.c (varpool_node::get_create, ctor_for_folding, varpool_node::assemble_decl, varpool_node::create_alias): Likewise. * fold-const.c (fold_unary_loc): Likewise. * ipa-prop.c (ipa_compute_jump_functions_for_edge, ipa_find_agg_cst_from_init): Likewise. * omp-low.c (expand_omp_regimplify_p, expand_omp_taskreg, expand_omp_target, lower_omp_regimplify_p, grid_reg_assignment_to_local_var_p, grid_remap_prebody_decls, find_link_var_op): Likewise. * tree-chrec.c (chrec_contains_symbols): Likewise. * tree-cfg.c (verify_address, verify_expr, verify_expr_location_1, gimple_duplicate_bb, move_stmt_op, replace_block_vars_by_duplicates, execute_fixup_cfg): Likewise. From-SVN: r240900
2016-10-07re PR tree-optimization/77879 (mpd gets miscompiled since r235622)Richard Biener1-1/+36
2016-10-07 Richard Biener <rguenther@suse.de> PR tree-optimization/77879 * tree-ssa-structalias.c (handle_const_call): Properly handle NRV return slots. (handle_pure_call): Likewise. From-SVN: r240854
2016-09-21re PR tree-optimization/77648 (Setting conversion to a integer to double to ↵Richard Biener1-16/+42
0 3/4 through a loop) 2016-09-21 Richard Biener <rguenther@suse.de> PR tree-optimization/77648 * tree-ssa-structalias.c (process_constraint): Handle all DEREF with complex RHS. (make_transitive_closure_constraints): Adjust comment. (make_any_offset_constraints): New function. (handle_rhs_call): Make sure to first expand a pointer to all subfields before transitively closing it. (handle_const_call): Likewise. Properly expand returned pointers as well. (handle_pure_call): Likewise. * gcc.dg/torture/pr77648-1.c: New testcase. * gcc.dg/torture/pr77648-2.c: Likewise. From-SVN: r240303
2016-09-15Iterator to visit SSAKugan Vivekanandarajah1-5/+5
Iterator to visit SSA gcc/ChangeLog: 2016-09-15 Kugan Vivekanandarajah <kuganv@linaro.org> * tree-ssanames.h (FOR_EACH_SSA_NAME): New. * cfgexpand.c (update_alias_info_with_stack_vars): Use FOR_EACH_SSA_NAME to iterate over SSA variables. (pass_expand::execute): Likewise. * omp-simd-clone.c (ipa_simd_modify_function_body): Likewise. * tree-cfg.c (dump_function_to_file): Likewise. * tree-into-ssa.c (pass_build_ssa::execute): Likewise. (update_ssa): Likewise. * tree-ssa-alias.c (dump_alias_info): Likewise. * tree-ssa-ccp.c (ccp_finalize): Likewise. * tree-ssa-coalesce.c (build_ssa_conflict_graph): Likewise. (create_outofssa_var_map): Likewise. (coalesce_ssa_name): Likewise. * tree-ssa-operands.c (dump_immediate_uses): Likewise. * tree-ssa-pre.c (compute_avail): Likewise. * tree-ssa-sccvn.c (init_scc_vn): Likewise. (scc_vn_restore_ssa_info): Likewise. (free_scc_vn): Likwise. (run_scc_vn): Likewise. * tree-ssa-structalias.c (compute_points_to_sets): Likewise. * tree-ssa-ter.c (new_temp_expr_table): Likewise. * tree-ssa-copy.c (fini_copy_prop): Likewise. * tree-ssa.c (verify_ssa): Likewise. From-SVN: r240152
2016-07-26add [cd]tors to scc_infoTrevor Saunders1-35/+22
gcc/ChangeLog: 2016-07-26 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * tree-ssa-structalias.c (struct scc_info): Change types of members to auto_sbitmap and auto_vec. (scc_info::scc_info): New constructor. (scc_info::~scc_info): New destructor. (init_scc_info): Remove. (free_scc_info): Remove. (find_indirect_cycles): Adjust. (perform_var_substitution): Likewise. (free_var_substitution_info): Likewise. From-SVN: r238751
2016-07-19re PR tree-optimization/71908 (ICE at -Os and above in both 32-bit and ↵Richard Biener1-2/+16
64-bit modes on x86_64-linux-gnu (get_constraint_for_component_ref)) 2016-07-18 Richard Biener <rguenther@suse.de> PR tree-optimization/71908 * tree-ssa-structalias.c (get_constraint_for_component_ref): Handle symbolic constants in a more reliable way. * gcc.dg/torture/pr71908.c: New testcase. From-SVN: r238467
2016-05-12re PR middle-end/71062 (r235622 and restrict pointers)Richard Biener1-1/+4
2016-05-12 Richard Biener <rguenther@suse.de> PR tree-optimization/71062 * tree-ssa-alias.h (struct pt_solution): Add vars_contains_restrict field. * tree-ssa-structalias.c (set_uids_in_ptset): Set vars_contains_restrict if the var is a restrict tag. * tree-ssa-alias.c (ptrs_compare_unequal): If vars_contains_restrict do not disambiguate pointers against it. (dump_points_to_solution): Re-structure and adjust for new vars_contains_restrict flag. * gimple-pretty-print.c (pp_points_to_solution): Likewise. * gcc.dg/torture/pr71062.c: New testcase. From-SVN: r236174
2016-05-06re PR tree-optimization/70948 (r235622 caused ↵Richard Biener1-1/+1
gcc.c-torture/execute/va-arg-pack-1.c execution failure AArch64) 2016-05-06 Richard Biener <rguenther@suse.de> PR tree-optimization/70948 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call): Properly clobber all fields of va_list for __builtin_va_start. From-SVN: r235963
2016-05-02Fix ICE in dump_pred_graphMarek Polacek1-1/+5
2016-05-02 Marek Polacek <polacek@redhat.com> Tom de Vries <tom@codesourcery.com> PR tree-optimization/70700 * tree-ssa-structalias.c (dump_pred_graph): Fix getting varinfo for ids bigger than FIRST_REF_NODE. * gcc.dg/pr70700.c: New test. Co-Authored-By: Tom de Vries <tom@codesourcery.com> From-SVN: r235700
2016-04-27re PR ipa/70760 (wrong generated code for std::make_unique with -fipa-pta)Richard Biener1-35/+14
2016-04-27 Richard Biener <rguenther@suse.de> PR ipa/70760 * tree-ssa-structalias.c (find_func_aliases_for_call): Use aggregate_value_p to determine if a function result is returned by reference. (ipa_pta_execute): Functions having their address taken are not automatically nonlocal. * g++.dg/ipa/ipa-pta-2.C: New testcase. * gcc.dg/ipa/ipa-pta-1.c: Adjust. From-SVN: r235511
2016-04-27re PR ipa/70785 (LTO bootstrap with IPA PTA is broken)Richard Biener1-1/+28
2016-04-27 Richard Biener <rguenther@suse.de> PR ipa/70785 * tree-ssa-structalias.c (refered_from_nonlocal_fn): New function cummulating used_from_other_partition, externally_visible and force_output from aliases. (refered_from_nonlocal_var): Likewise. (ipa_pta_execute): Use call_for_symbol_and_aliases to cummulate node flags properly. From-SVN: r235477
2016-04-18re PR tree-optimization/43434 (Missed vectorization: "not vectorized: data ↵Richard Biener1-28/+48
ref analysis": pointer incremented by a parameter) 2016-04-18 Richard Biener <rguenther@suse.de> PR tree-optimization/43434 * tree-ssa-structalias.c (struct vls_data): New. (visit_loadstore): Handle all pointer-based accesses. (compute_dependence_clique): Compute a bitmap of restrict tags assigned bases and pass it to visit_loadstore. * gcc.dg/vect/pr43434.c: New testcase. * c-c++-common/goacc/kernels-alias-3.c: Adjust. * c-c++-common/goacc/kernels-alias-4.c: Likewise. * c-c++-common/goacc/kernels-alias-5.c: Likewise. * c-c++-common/goacc/kernels-alias-6.c: Likewise. * c-c++-common/goacc/kernels-alias-7.c: Likewise. * c-c++-common/goacc/kernels-alias-8.c: Likewise. * gcc.dg/gomp/pr68640.c: Likewise. * gfortran.dg/goacc/kernels-alias-3.f95: Likewise. * gfortran.dg/goacc/kernels-alias-4.f95: Likewise. From-SVN: r235147
2016-04-17Add debug_varinfo and debug_varmapTom de Vries1-0/+108
2016-04-17 Tom de Vries <tom@codesourcery.com> PR tree-optimization/70256 * tree-ssa-structalias.c (dump_varinfo, debug_varinfo, dump_varmap) (debug_varmap): New function. From-SVN: r235073
2016-03-10re PR tree-optimization/70128 (Linux kernel div patching optimized away)Richard Biener1-0/+10
2016-03-10 Richard Biener <rguenther@suse.de> PR tree-optimization/70128 * tree-ssa-structalias.c (set_uids_in_ptset): Set vars_contains_nonlocal for any FUNCTION_DECL or LABEL_DECL. * gcc.dg/tree-ssa/alias-34.c: New testcase. * gcc.dg/tree-ssa/alias-35.c: Likewise. From-SVN: r234099
2016-02-26re PR target/69551 (Wrong code with single element vector insert)Richard Biener1-0/+8
2016-02-26 Richard Biener <rguenther@suse.de> PR tree-optimization/69551 * tree-ssa-structalias.c (get_constraint_for_ssa_var): When looking through aliases adjust DECL_PT_UID to refer to the ultimate alias target. * gcc.dg/torture/pr69951.c: New testcase. From-SVN: r233734
2016-02-09Fix GOMP/GOACC_parallel optimization in ipa-ptaTom de Vries1-9/+40
2016-02-09 Tom de Vries <tom@codesourcery.com> PR tree-optimization/69599 * tree-ssa-structalias.c (fndecl_maybe_in_other_partition): New function. (find_func_aliases_for_builtin_call, find_func_clobbers) (ipa_pta_execute): Handle case that foo and foo._0 are not in same lto partition. * testsuite/libgomp.c/omp-nested-3.c: New test. * testsuite/libgomp.c/pr46032-2.c: New test. * testsuite/libgomp.oacc-c-c++-common/kernels-2.c: New test. * testsuite/libgomp.oacc-c-c++-common/parallel-2.c: New test. From-SVN: r233240
2016-01-13Fix infinite recursion in create_variable_info_for_1Tom de Vries1-8/+34
PR tree-optimization/69169 * tree-ssa-structalias.c (create_variable_info_for_1): Add and handle handled_struct_type param. (create_variable_info_for, intra_create_variable_infos): Call create_variable_info_for_1 with extra arg. * gcc.dg/pr69169.c: New test. From-SVN: r232326
2016-01-04Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r232055
2015-12-16Add pass_oacc_ipaTom de Vries1-0/+2
2015-12-16 Tom de Vries <tom@codesourcery.com> * opts.c (default_options_optimization): Set fipa-pta on by default for fopenacc. * passes.def: Move kernels pass group to pass_ipa_oacc. * tree-pass.h (make_pass_oacc_kernels2): Remove. (make_pass_ipa_oacc, make_pass_ipa_oacc_kernels): Declare. * tree-ssa-loop.c (pass_oacc_kernels2, make_pass_oacc_kernels2): Remove. (pass_ipa_oacc, pass_ipa_oacc_kernels): New pass. (make_pass_ipa_oacc, make_pass_ipa_oacc_kernels): New function. * tree-ssa-structalias.c (pass_ipa_pta::clone): New function. * g++.dg/ipa/devirt-37.C: Update for new fre2 pass. * g++.dg/ipa/devirt-40.C: Same. * g++.dg/tree-ssa/pr61034.C: Same. * gcc.dg/ipa/ipa-pta-1.c: Update for new pta1 pass. * gcc.dg/ipa/ipa-pta-10.c: Same. * gcc.dg/ipa/ipa-pta-11.c: Same. * gcc.dg/ipa/ipa-pta-14.c: Same. * gcc.dg/ipa/ipa-pta-16.c: Same. * gcc.dg/ipa/ipa-pta-2.c: Same. * gcc.dg/ipa/ipa-pta-5.c: Same. * gcc.dg/ipa/ipa-pta-6.c: Same. * gcc.dg/torture/ipa-pta-1.c: Same. * gcc.dg/ipa/ipa-pta-13.c: Update for new fre2 and pta1 pass. * gcc.dg/ipa/ipa-pta-3.c: Same. * gcc.dg/ipa/ipa-pta-4.c: Same. From-SVN: r231690
2015-12-13Handle sizes and kinds params of GOACC_paralllel in find_func_clobbersTom de Vries1-0/+16
2015-12-13 Tom de Vries <tom@codesourcery.com> * tree-ssa-structalias.c (find_func_clobbers): Handle sizes and kinds parameters of GOACC_paralllel. From-SVN: r231595
2015-12-10tree-ssa-structalias.c (struct variable_info): Add is_ipa_escape_point flag.Richard Biener1-8/+23
2015-12-10 Richard Biener <rguenther@suse.de> * tree-ssa-structalias.c (struct variable_info): Add is_ipa_escape_point flag. (new_var_info): Initialize to false. (find_func_aliases): Generate escape constraints for stores properly in IPA mode. (ipa_pta_execute): Compute is_ipa_escape_point for globals. From-SVN: r231514
2015-12-10re PR ipa/68331 ([meta-bug] fipa-pta issues)Richard Biener1-27/+42
2015-12-10 Richard Biener <rguenther@suse.de> PR ipa/68331 * tree-ssa-structalias.c (set_uids_in_ptset): Add fndecl parameter and make vars_contains_nonlocal properly have function-scope semantics in IPA mode. (find_what_var_points_to): Add fndecl parameter. (find_what_p_points_to): Likewise. (pt_solution_includes_global): Remove IPA PTA early out. (compute_points_to_sets): Adjust. (ipa_pta_execute): Likewise. Clear final_solutions after each function. * gcc.dg/torture/ipa-pta-3.c: New testcase. * g++.dg/ipa/ipa-pta-1.C: Likewise. From-SVN: r231498
2015-12-10tree-ssa-structalias.c (create_function_info_for): Add missing constraint ↵Richard Biener1-0/+5
from nonlocal for DECL_RESULT. 2015-12-10 Richard Biener <rguenther@suse.de> * tree-ssa-structalias.c (create_function_info_for): Add missing constraint from nonlocal for DECL_RESULT. From-SVN: r231496
2015-12-10Remove invalid assert in find_func_aliases_for_builtin_callTom de Vries1-1/+0
2015-12-10 Tom de Vries <tom@codesourcery.com> * tree-ssa-structalias.c (find_func_aliases_for_builtin_call): Remove invalid assert. From-SVN: r231491
2015-12-09Fix GOMP/GOACC_parallel handling in find_func_clobbersTom de Vries1-1/+46
2015-12-09 Tom de Vries <tom@codesourcery.com> PR tree-optimization/68716 * tree-ssa-structalias.c (find_func_clobbers): Fix handling of BUILT_IN_GOMP_PARALLEL and BUILT_IN_GOACC_PARALLEL. * testsuite/libgomp.c/omp-nested-2.c: New test. From-SVN: r231449
2015-12-02Handle BUILT_IN_GOACC_PARALLEL in ipa-ptaTom de Vries1-4/+24
2015-12-02 Tom de Vries <tom@codesourcery.com> * tree-ssa-structalias.c (find_func_aliases_for_builtin_call) (find_func_clobbers, ipa_pta_execute): Handle BUILT_IN_GOACC_PARALLEL. * c-c++-common/goacc/kernels-alias-ipa-pta-2.c: New test. * c-c++-common/goacc/kernels-alias-ipa-pta-3.c: New test. * c-c++-common/goacc/kernels-alias-ipa-pta.c: New test. From-SVN: r231169
2015-11-30Handle BUILT_IN_GOMP_PARALLEL in ipa-ptaTom de Vries1-13/+58
2015-11-30 Tom de Vries <tom@codesourcery.com> PR tree-optimization/46032 * tree-ssa-structalias.c (find_func_aliases_for_call_arg): New function, factored out of ... (find_func_aliases_for_call): ... here. (find_func_aliases_for_builtin_call, find_func_clobbers): Handle BUILT_IN_GOMP_PARALLEL. (ipa_pta_execute): Same. Handle node->parallelized_function as a local function. * gcc.dg/pr46032.c: New test. * testsuite/libgomp.c/pr46032.c: New test. From-SVN: r231076
2015-11-08Merge of the scalar-storage-order branch.Eric Botcazou1-3/+7
From-SVN: r229965
2015-11-04Handle recursive restrict in function parameterTom de Vries1-33/+45
2015-11-04 Tom de Vries <tom@codesourcery.com> PR tree-optimization/67742 * tree-ssa-structalias.c (struct fieldoff): Add restrict_pointed_type field. (push_fields_onto_fieldstack): Handle restrict_pointed_type field. (create_variable_info_for_1): Add and handle handle_param parameter. Add restrict handling. (create_variable_info_for): Call create_variable_info_for_1 with extra arg. (make_param_constraints): Drop restrict_name parameter. Ignore vi->only_restrict_pointers. (intra_create_variable_infos): Call create_variable_info_for_1 with extra arg. Remove restrict handling. Call make_param_constraints with one less arg. * gcc.dg/tree-ssa/restrict-7.c: New test. * gcc.dg/tree-ssa/restrict-8.c: New test. From-SVN: r229755
2015-11-04Use decl_type in create_variable_info_for_1Tom de Vries1-2/+2
2015-11-04 Tom de Vries <tom@codesourcery.com> * tree-ssa-structalias.c (create_variable_info_for_1): Use decl_type variable. From-SVN: r229754
2015-11-02Rename make_restrict_var_constraints to make_param_constraintsTom de Vries1-19/+14
2015-11-03 Tom de Vries <tom@codesourcery.com> * tree-ssa-structalias.c (make_restrict_var_constraints): Rename to ... (make_param_constraints): ... this. Add and handle restrict_name parameter. Handle is_full_var case. (intra_create_variable_infos): Use make_param_constraints. From-SVN: r229684