From f3dccf50915b31fcc3e03e82fd09ccef243b30e3 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Mon, 24 Nov 2014 09:24:26 +0000 Subject: re PR tree-optimization/55334 (mgrid regression (ipa-cp disables vectorization)) 2014-11-24 Richard Biener PR tree-optimization/55334 * function.h (struct function): Add last_clique member. * tree-inline.c (remap_dependence_clique): New function. (remap_gimple_op_r): Remap dependence cliques in MEM_REFs. (copy_tree_body_r): Likewise. (copy_cfg_body): Free dependence map. (copy_gimple_seq_and_replace_locals): Likewise. * tree-pretty-print.c (dump_generic_node): Dump dependence info. * tree-ssa-alias.c (refs_may_alias_p_1): Use dependence info to answer alias query. * tree-ssa-structalias.c: Include tree-phinodes.h, ssa-iterators.h, tree-pretty-print.h and gimple-walk.h. (struct variable_info): Add is_restrict_var flag and ruid member. (new_var_info): Initialize is_restrict_var. (make_constraint_from_restrict): Likewise. (create_variable_info_for): Exclude restricts from global vars from new handling. (intra_create_variable_infos): But not those from parameters. (visit_loadstore): New function. (maybe_set_dependence_info): Likewise. (compute_dependence_clique): Likewise. (compute_may_aliases): Call compute_dependence_clique. * tree-data-ref.c (dr_analyze_indices): Copy dependence info to fake MEM_REF. (dr_may_alias_p): Use recorded dependence info to answer alias query. * tree-core.h (struct tree_base): Add clique, base struct in union. * tree.h (MR_DEPENDENCE_CLIQUE): New macro. (MR_DEPENDENCE_BASE): Likewise. * tree-inline.h (dependence_hasher): New hash-map kind. (struct copy_body_data): Add dependence_map pointer. * gimple-fold.c (maybe_canonicalize_mem_ref_addr): Avoid throwing away dependence info. * tree-streamer-in.c (unpack_value_fields): Stream dependence info. * tree-streamer-out.c (streamer_pack_tree_bitfields): Likewise. * gcc.dg/tree-ssa/restrict-5.c: New testcase. From-SVN: r218004 --- gcc/tree-inline.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'gcc/tree-inline.h') diff --git a/gcc/tree-inline.h b/gcc/tree-inline.h index 453b9cd..3271ba4 100644 --- a/gcc/tree-inline.h +++ b/gcc/tree-inline.h @@ -37,6 +37,26 @@ enum copy_body_cge_which CB_CGE_MOVE_CLONES }; +struct dependence_hasher : default_hashmap_traits +{ + template + static void + mark_deleted (T &e) + { gcc_unreachable (); } + + template + static void + mark_empty (T &e) + { e.m_key = 0; } + + template + static bool + is_deleted (T &) + { return false; } + + template static bool is_empty (T &e) { return e.m_key == 0; } +}; + /* Data required for function body duplication. */ struct copy_body_data @@ -144,6 +164,10 @@ struct copy_body_data /* Cilk keywords currently need to replace some variables that ordinary nested functions do not. */ bool remap_var_for_cilk; + + /* A map from the inlined functions dependence info cliques to + equivalents in the function into which it is being inlined. */ + hash_map *dependence_map; }; /* Weights of constructions for estimate_num_insns. */ -- cgit v1.1