Hi Martin,
Thank you for explaining the status quo. After reading the code of bb-reorder.c,
 it looks pretty good and seems it doesn't need any significant improvements.
In that case, the only value GIMPLE level hot/cold splitting could bring is to 
enable aggressive code-size optimization
by merging of similar/identical functions: after outlining cold regions, they 
may be suitable candidates for function merging.
ipa-split might be enabling some of that, having a region based function 
splitting could improve ipa-split.

-Aditya


--
From: Martin Liška <mli...@suse.cz>
Sent: Tuesday, March 3, 2020 2:47 AM
To: Aditya K <hiradi...@msn.com>; gcc@gcc.gnu.org <gcc@gcc.gnu.org>
Cc: Jan Hubicka <hubi...@ucw.cz>
Subject: Re: GSoC topic: Implement hot cold splitting at GIMPLE IR level

Hello.
Thank you for idea. I would like to provide some comments about what GCC can 
currently
do and I'm curious we need something extra on top of what we do.
Right now, GCC can do hot/cold partitioning based on functions and basic 
blocks. With
a PGO profile, the optimization is quite aggressive and can save quite some code
being placed into a cold partitioning and being optimized for size. Without a 
profile,
we do a static profile guess (predict.c), where we also propagate information 
about cold
blocks (determine_unlikely_bbs). Later in RTL, we utilize the information and 
make
the real reordering (bb-reorder.c).

Martin



Reply via email to