public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jamborm at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/53787] Possible IPA-SRA / IPA-CP improvement
Date: Wed, 07 Nov 2012 15:56:00 -0000	[thread overview]
Message-ID: <bug-53787-4-9s0YZh39we@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-53787-4@http.gcc.gnu.org/bugzilla/>


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53787

--- Comment #12 from Martin Jambor <jamborm at gcc dot gnu.org> 2012-11-07 15:56:00 UTC ---
Author: jamborm
Date: Wed Nov  7 15:55:54 2012
New Revision: 193298

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=193298
Log:
2012-11-07  Martin Jambor  <mjambor@suse.cz>

    PR tree-optimization/53787
    * ipa-cp.c (ipcp_value_source): New field offset.
    (ipcp_agg_lattice): New type.
    (ipcp_param_lattices): Likewise, move virt_call from ipcp_lattice here.
    (ipcp_agg_lattice_pool): New variable.
    (ipa_get_parm_lattices): New function.
    (ipa_get_lattice): Turned into ipa_get_scalar_lat, use the above.
    Adjusted all callers.
    (print_lattice): New function.
    (print_all_lattices): Use the above, also print aggregate lattices.
    (set_agg_lats_to_bottom): New function.
    (set_agg_lats_contain_variable): Likewise.
    (set_all_contains_variable): Likewise.
    (initialize_node_lattices): Also handle aggregate lattices, set
    virt_call in ipcp_param_lattices.
    (add_value_source): Handle offsets.
    (add_value_to_lattice): Likewise.
    (add_scalar_value_to_lattice): New function.
    (propagate_vals_accross_pass_through): Use add_scalar_value_to_lattice.
    (propagate_vals_accross_ancestor): Likewise.
    (propagate_accross_jump_function): Renamed to
    propagate_scalar_accross_jump_function, use
    add_scalar_value_to_lattice.
    (set_check_aggs_by_ref): New function.
    (merge_agg_lats_step): Likewise.
    (set_chain_of_aglats_contains_variable): Likewise.
    (merge_aggregate_lattices): Likewise.
    (propagate_constants_accross_call): Also handle aggregate lattices.
    (hint_time_bonus): New function.
    (context_independent_aggregate_values): Likewise.
    (gather_context_independent_values): Also handle agggregate values.
    (agg_jmp_p_vec_for_t_vec): New function.
    (estimate_local_effects): Also handle agggregate values.
    (add_all_node_vals_to_toposort): Likewise.
    (ipcp_propagate_stage): Use struct ipcp_param_lattices.
    (get_clone_agg_value): New function.
    (cgraph_edge_brings_value_p): Also handle agggregate values.
    (create_specialized_node): Likewise.
    (find_more_values_for_callers_subset): Rename to
    find_more_scalar_values_for_callers_subset.  Modify dump.
    (copy_plats_to_inter): New function.
    (intersect_with_plats): Likewise.
    (agg_replacements_to_vector): Likewise.
    (intersect_with_agg_replacements): Likewise.
    (find_aggregate_values_for_callers_subset): Likewise.
    (known_aggs_to_agg_replacement_list): Likewise.
    (cgraph_edge_brings_all_scalars_for_node): Likewise.
    (cgraph_edge_brings_all_agg_vals_for_node): Likewise.
    (perhaps_add_new_callers): Old functionality moved to
    cgraph_edge_brings_all_scalars_for_node, call it and
    cgraph_edge_brings_all_agg_vals_for_node.
    (ipcp_val_in_agg_replacements_p): New function.
    (decide_about_value): New function.
    (decide_whether_version_node): A lot of functionality moved to
    decide_about_value.  Also handle agggregate values.
    (ipcp_driver): Also allocate ipcp_agg_lattice_pool.
    (pass_ipa_cp): Fill in new entries.
    * ipa-prop.c (ipa_node_agg_replacements): New variable.
    (free_parms_ainfo): New function.
    (ipa_analyze_node): Use free_parms_ainfo to free stuff.
    (ipa_find_agg_cst_for_param): Do not rely on offset ordering.
    (ipa_set_node_agg_value_chain): New function.
    (ipa_node_removal_hook): Also handle ipa_node_agg_replacements.
    (ipa_node_duplication_hook): Likewise.
    (ipa_free_all_structures_after_ipa_cp): Also free ipcp_agg_lattice_pool.
    (ipa_free_all_structures_after_iinln): Likewise.
    (ipa_dump_agg_replacement_values): New function.
    (write_agg_replacement_chain): Likewise.
    (read_agg_replacement_chain): Likewise.
    (ipa_prop_write_all_agg_replacement): Likewise.
    (read_replacements_section): Likewise.
    (ipa_prop_read_all_agg_replacement): Likewise.
    (adjust_agg_replacement_values): Likewise.
    (ipcp_transform_function): Likewise.
    * ipa-prop.h: Also define heap vector of ipa_agg_jf_item_t and of
    ipa_agg_jump_function_t.
    (ipa_node_params): Make lattices an array of ipcp_param_lattices.
    (ipa_agg_replacement_value): New type and its vector.
    (ipa_set_node_agg_value_chain) Declare.
    (ipa_node_agg_replacements): Likewise.
    (ipa_get_agg_replacements_for_node): New function.
    (ipcp_agg_lattice_pool): Declare.
    (ipa_dump_agg_replacement_values): Likewise.
    (ipa_prop_write_all_agg_replacement): Likewise.
    (ipa_prop_read_all_agg_replacement): Likewise.
    (ipcp_transform_function): Likewise.
    * ipa-inline-analysis.c (estimate_ipcp_clone_size_and_time): Pass around
    known aggregates and hints.
    * ipa-inline.h: include ipa-prop.h.
    (estimate_ipcp_clone_size_and_time): Adjust declaration.
    * lto-streamer.h (lto_section_type): New item
    LTO_section_ipcp_transform.
    * lto-section-in.c (lto_section_name): New element ipcp_trans.
    * params.def (PARAM_IPA_CP_LOOP_HINT_BONUS): New parameter.
    * Makefile.in (IPA_INLINE_H): New.  Use everywhee instead of
    ipa-inline.h.

    * testsuite/gcc.dg/ipa/ipa-5.c: Adjust.
    * testsuite/gcc.dg/ipa/ipcp-agg-1.c: New test.
    * testsuite/gcc.dg/ipa/ipcp-agg-2.c: Likewise.
    * testsuite/gcc.dg/ipa/ipcp-agg-3.c: Likewise.
    * testsuite/gcc.dg/ipa/ipcp-agg-4.c: Likewise.
    * testsuite/gcc.dg/ipa/ipcp-agg-5.c: Likewise.
    * testsuite/gcc.dg/ipa/ipcp-agg-6.c: Likewise.
    * testsuite/gfortran.dg/pr48636.f90: Add -fno-ipa-cp.
    * testsuite/gfortran.dg/pr48636-2.f90: New test.
    * testsuite/gfortran.dg/pr53787.f90: Likewise.


Added:
    trunk/gcc/testsuite/gcc.dg/ipa/ipcp-agg-1.c
    trunk/gcc/testsuite/gcc.dg/ipa/ipcp-agg-2.c
    trunk/gcc/testsuite/gcc.dg/ipa/ipcp-agg-3.c
    trunk/gcc/testsuite/gcc.dg/ipa/ipcp-agg-4.c
    trunk/gcc/testsuite/gcc.dg/ipa/ipcp-agg-5.c
    trunk/gcc/testsuite/gcc.dg/ipa/ipcp-agg-6.c
    trunk/gcc/testsuite/gfortran.dg/pr48636-2.f90
    trunk/gcc/testsuite/gfortran.dg/pr53787.f90
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/Makefile.in
    trunk/gcc/ipa-cp.c
    trunk/gcc/ipa-inline-analysis.c
    trunk/gcc/ipa-inline.h
    trunk/gcc/ipa-prop.c
    trunk/gcc/ipa-prop.h
    trunk/gcc/lto-section-in.c
    trunk/gcc/lto-streamer.h
    trunk/gcc/params.def
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/ipa/ipa-5.c
    trunk/gcc/testsuite/gfortran.dg/pr48636.f90


  parent reply	other threads:[~2012-11-07 15:56 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-27 17:26 [Bug lto/53787] New: Possible lto improvement izamyatin at gmail dot com
2012-06-27 17:39 ` [Bug lto/53787] " dominiq at lps dot ens.fr
2012-06-27 17:57 ` izamyatin at gmail dot com
2012-06-27 20:03 ` hjl.tools at gmail dot com
2012-06-28  8:17 ` izamyatin at gmail dot com
2012-06-28  8:22 ` izamyatin at gmail dot com
2012-06-28 10:08 ` [Bug tree-optimization/53787] Possible IPA-SRA / IPA-CP improvement rguenth at gcc dot gnu.org
2012-07-19 19:10 ` izamyatin at gmail dot com
2012-07-20 19:59 ` jamborm at gcc dot gnu.org
2012-07-26 22:49 ` steven at gcc dot gnu.org
2012-07-27  9:35 ` jamborm at gcc dot gnu.org
2012-08-30 15:59 ` jamborm at gcc dot gnu.org
2012-11-07 15:56 ` jamborm at gcc dot gnu.org [this message]
2012-11-08 14:43 ` jamborm at gcc dot gnu.org
2013-01-22 15:32 ` ysrumyan at gmail dot com
2013-01-22 15:33 ` ysrumyan at gmail dot com
2013-01-25 18:33 ` jamborm at gcc dot gnu.org
2014-02-14 17:16 ` jamborm at gcc dot gnu.org
2014-02-28 14:26 ` izamyatin at gmail dot com
2014-05-23 15:52 ` jamborm at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-53787-4-9s0YZh39we@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).