]> gcc.gnu.org Git - gcc.git/commit
ipa-cp: Write transformation summaries of all functions
authorMartin Jambor <mjambor@suse.cz>
Tue, 13 Dec 2022 23:33:05 +0000 (00:33 +0100)
committerMartin Jambor <mjambor@suse.cz>
Tue, 13 Dec 2022 23:57:32 +0000 (00:57 +0100)
commit7450b25566b7a738edff6f554d97ba6e3dd95ac9
tree8140aea2b342acd0897579bdb46c263679bd1ad0
parent37c2d99f3f569350ebc0de43c10374b90086b832
ipa-cp: Write transformation summaries of all functions

IPA-CP transformation summary streaming code currently won't stream
out transformations necessary for clones which are only necessary for
materialization of other clones (such as an IPA-CP clone which is then
cloned again by IPA-SRA).  However, a follow-up patch for bettor
reconciling IPA-SRA and IPA-CP modifications requires to have that
information at its disposal and so this one reworks the streaming to
write out all non-empty transformation summaries.

In order not to stream transformation summaies into partitions where
the node itself nor any of its clones are materialized, I had to make
sure that clones also get encode_body flag in the encoder (so that it
could be tested) and therefore in turn lto_output understands it needs
to skip clones.

This should actually mean less streaming in typical case because
previously we streamed three zeros for all nodes in a partition with
no useful information associated with them.  Currently we don't stream
anything for those.

When reworking the streaming, I also simplified it a little a
converted it writing to nicer C++ vector iterations.

gcc/ChangeLog:

2022-11-25  Martin Jambor  <mjambor@suse.cz>

* ipa-prop.cc (useful_ipcp_transformation_info_p): New function.
(write_ipcp_transformation_info): Added a parameter, simplified
given that is known not to be NULL.
(ipcp_write_transformation_summaries): Write out all useful
transformation summaries.
(read_ipcp_transformation_info): Simplify given that some info
will be read.
(read_replacements_section): Remove assert.
* lto-cgraph.cc (add_node_to): Also set encode_body for clones.
* lto-streamer-out.cc (lto_output): Do not output virtual clones.
gcc/ipa-prop.cc
gcc/lto-cgraph.cc
gcc/lto-streamer-out.cc
This page took 0.0656870000000001 seconds and 6 git commands to generate.