[PATCH] Stream memory access types in IPA ICF.

Martin Liška mliska@suse.cz
Fri Nov 29 12:03:00 GMT 2019


Hello.

The patch is about streaming of at maximum 3 tree types that are
used for memory references in IPA ICF. That helps rapidly to reduce
number of function bodies loaded in WPA phase. Based on numbers for
Firefox we get from:

Init called for 87557 items (23.30%).
...
Totally needed symbols: 40580, fraction of loaded symbols: 46.35%

to:

Init called for 55844 items (14.86%).
...
Totally needed symbols: 40580, fraction of loaded symbols: 72.67%

Where memory peak drops from 5.7GB to 4.8GB and WPA is faster by 5 seconds.

Patch can bootstrap on x86_64-linux-gnu and survives regression tests.

Ready to be installed?
Thanks,
Martin

gcc/ChangeLog:

2019-11-27  Martin Liska  <mliska@suse.cz>

	PR ipa/92535
	* ipa-icf.c (sem_function::sem_function): Initialize
	memory_access_types.
	(record_memory_op_type): New function.
	(sem_function::init): Walk memory accesses for GIMPLE
	statements.
	(sem_item_optimizer::write_summary): Stream memory_access_types.
	(sem_item_optimizer::read_section): Read memory_access_types
	and hash pointer to canonical types.
	(sem_item_optimizer::execute): Update hash by memory
	access type.
	(sem_item_optimizer::update_hash_by_memory_access_type):
	New.
	* ipa-icf.h (memory_access_types): New.
	(m_canonical_types_hash): Likewise.
	(update_hash_by_memory_access_type): Likewise.
---
  gcc/ipa-icf.c | 60 +++++++++++++++++++++++++++++++++++++++++++++++++--
  gcc/ipa-icf.h | 10 +++++++++
  2 files changed, 68 insertions(+), 2 deletions(-)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Stream-memory-access-types-in-IPA-ICF.patch
Type: text/x-patch
Size: 5061 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20191129/417a1f65/attachment.bin>


More information about the Gcc-patches mailing list