[PATCH 2/2] IPA ICF: use fibonacci heap instead of list as a worklist.

Martin Liška mliska@suse.cz
Mon Jun 3 13:39:00 GMT 2019


This is second part which has not a significant speed up but
it's mentioned in the Value Numbering algorithm as a useful heuristics.

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

Ready to be installed?
Thanks,
Martin

gcc/ChangeLog:

2019-06-03  Martin Liska  <mliska@suse.cz>

	* ipa-icf.c (sem_item_optimizer::add_item_to_class): Count
	number of references.
	(sem_item_optimizer::do_congruence_step):
	(sem_item_optimizer::worklist_push): Dump how references
	a class has.
	(sem_item_optimizer::worklist_pop): Use heap.
	(sem_item_optimizer::process_cong_reduction): Likewise.
	* ipa-icf.h: Use fibonacci_heap insteam of std::list.
---
 gcc/ipa-icf.c | 12 +++++++-----
 gcc/ipa-icf.h |  8 ++++++--
 2 files changed, 13 insertions(+), 7 deletions(-)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-IPA-ICF-use-fibonacci-heap-instead-of-list-as-a-work.patch
Type: text/x-patch
Size: 2944 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20190603/6dd502c5/attachment.bin>


More information about the Gcc-patches mailing list