public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* GSoC topic: Implement hot cold splitting at GIMPLE IR level
@ 2020-03-03  5:51 Aditya K
  2020-03-03  8:47 ` Martin Liška
  0 siblings, 1 reply; 9+ messages in thread
From: Aditya K @ 2020-03-03  5:51 UTC (permalink / raw)
  To: gcc

Hi Everyone,
I was one of the original authors of hot cold splitting optimization in LLVM. I was wondering if implementing
a region based hot cold splitting optimization would be useful in GCC? We already have optimal implementation of SESE region detection in GCC (https://github.com/gcc-mirror/gcc/blob/master/gcc/sese.h) so implementation of hot cold splitting at IR level could leverage some of that.

Motivation:
With the increasing popularity of RISC-V architecture, where most applications are constrained for code-size. I assume those applications would (soon) be suffering from app launch time and page faults. I don't have numbers for this sorry, just a guess. Having an IR level hot cold splitting pass would benefit applications deployed on such devices by reducing their startup working set. I'd be happy to mentor a GSoC candidate if we chose to list this as one of the projects.

Description of the project: Region based Hot Cold Splitting is an IR level function splitting transformation. The goal of hot/cold splitting is to improve the memory locality of code and helps reduce startup working set. The splitting pass does this by identifying cold blocks and moving them into separate functions. Because it is implemented at the IR level all the back end target benefit from it. It is a relatively new optimization and it was recently presented at the LLVM Dev Meeting in 2019 and the slides are here: https://llvm.org/devmtg/2019-10/talk-abstracts.html#tech8. There are fast algorithms to detect SESE regions as illustrated in (http://impact.gforge.inria.fr/impact2016/papers/impact2016-kumar.pdf), we can leverage that to detect regions. 

Deliverables:
- Implement hot cold splitting pass at GIMPLE level
- Detect maximal cold region in a function and outline it as a separate function
- Use static as well as dynamic profile information to mark cold edges
- Write unit tests to show variety of regions outlined


Thanks,
-Aditya

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-03-17 14:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-03  5:51 GSoC topic: Implement hot cold splitting at GIMPLE IR level Aditya K
2020-03-03  8:47 ` Martin Liška
     [not found]   ` <BYAPR08MB42320E829A37607C0AC4F967B6E40@BYAPR08MB4232.namprd08.prod.outlook.com>
2020-03-03 20:42     ` Fw: " Aditya K
2020-03-03 21:25       ` Jan Hubicka
2020-03-05 15:50         ` Segher Boessenkool
2020-03-16 23:11         ` Aditya K
2020-03-16 23:19           ` Jakub Jelinek
2020-03-17 14:31             ` Aditya K
2020-03-17 14:47               ` Richard Biener

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).