Jan Hubicka 85ebbabd85 IPA tracking of EAF flags in ipa-modref.
this patch implements the IPA propagation part of EAF flags handling in
ipa-modref.  It extends the local analysis to collect lattice consisting of
flags and escape points.  SSA name escapes if it is passed directly or
indirectly to a function call.

If useful flags are found for parameter its escape list is stored into escape
summaries.  This time each call site is annotated with info on which function
parameters escape to what argument of function call.

At IPA time we then perform iterative dataflow and produce final flags.
ipa-modref is still cheaper than pure-const when running on cc1plus (about 2-3%
that is what accounts every non-trivial passs) and the dataflow converges in 1
or 2 iterations.

Local analysis does some work to avoid streaming escape points when they are
not useful to determine final flags (that is, local escape analysis determined
good enough flags). For cc1plus there are 225k calls with useful escape
summary.

	* ipa-modref.c (escape_point): New type.
	(modref_lattice): New type.
	(escape_entry): New type.
	(escape_summary): New type.
	(escape_summaries_t): New type.
	(escape_summaries): New static variable.
	(eaf_flags_useful_p): New function.
	(modref_summary::useful_p): Add new check_flags
	attribute; check eaf_flags for usefulness.
	(modref_summary_lto): Add arg_flags.
	(modref_summary_lto::useful_p): Add new check_flags
	attribute; check eaf_flags for usefulness.
	(dump_modref_edge_summaries): New function.
	(remove_modref_edge_summaries): New function.
	(ignore_retval_p): New predicate.
	(ignore_stores_p): Also ignore for const.
	(remove_summary): Call remove_modref_edge_summaries.
	(modref_lattice::init): New member function.
	(modref_lattice::release): New member unction.
	(modref_lattice::dump): New member function.
	(modref_lattice::add_escape_point): New member function.
	(modref_lattice::merge): Two new member functions.
	(modref_lattice::merge_deref): New member functions.
	(modref_lattice::merge_direct_load): New member function.
	(modref_lattice::merge_direct_store): New member function.
	(call_lhs_flags): Rename to ...
	(merge_call_lhs_flags): ... this one; reimplement using
	modreflattice.
	(analyze_ssa_name_flags): Replace KNOWN_FLAGS param by LATTICE;
	add IPA parametr; use modref_lattice.
	(analyze_parms): New parameter IPA and SUMMARY_LTO; update for
	modref_lattice; initialize escape_summary.
	(analyze_function): Allocate escape_summaries; update uses of useful_p.
	(modref_write_escape_summary): New function.
	(modref_read_escape_summary): New function.
	(modref_write): Write escape summary.
	(read_section): Read escape summary.
	(modref_read): Initialie escape_summaries.
	(remap_arg_flags): New function.
	(update_signature): Use it.
	(escape_map): New structure.
	(update_escape_summary_1, update_escape_summary): New functions.
	(ipa_merge_modref_summary_after_inlining): Merge escape summaries.
	(propagate_unknown_call): Do not remove useless summaries.
	(remove_useless_summaries): Remove them here.
	(modref_propagate_in_scc): Update; do not dump scc.
	(modref_propagate_dump_scc): New function.
	(modref_merge_call_site_flags): New function.
	(modref_propagate_flags_in_scc): New function.
	(pass_ipa_modref::execute): Use modref_propagate_flags_in_scc
	and modref_propagate_dump_scc; delete escape_summaries.
	(ipa_modref_c_finalize):  Remove escape_summaries.
	* ipa-modref.h (modref_summary): Update prototype of useful_p.
	* params.opt (param=modref-max-escape-points): New param.
	* doc/invoke.texi (modref-max-escape-points): Document.
2020-11-16 19:30:45 +01:00
2020-11-08 00:16:31 +00:00
2020-10-30 00:16:29 +00:00
2020-10-21 00:16:36 +00:00
2020-11-12 00:16:39 +00:00
2020-11-14 00:16:38 +00:00
2020-11-16 00:16:31 +00:00
2020-11-02 20:53:00 +00:00
2020-11-10 07:25:32 -08:00
2020-11-15 00:16:26 +00:00
2020-11-14 00:16:38 +00:00
2020-11-14 00:16:38 +00:00
2020-11-14 00:16:38 +00:00
2020-11-16 12:52:43 +01:00
2020-11-14 00:16:38 +00:00

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.
Description
No description provided
Readme 2.1 GiB
Languages
C++ 31.9%
C 31.3%
Ada 12%
D 6.5%
Go 6.4%
Other 11.5%