public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Aditya K <hiraditya@msn.com>
To: "gcc@gcc.gnu.org" <gcc@gcc.gnu.org>
Subject: GSoC topic: Implement hot cold splitting at GIMPLE IR level
Date: Tue, 03 Mar 2020 05:51:00 -0000	[thread overview]
Message-ID: <BYAPR08MB4232069B0A9D5D1E0E4B2A69B6E40@BYAPR08MB4232.namprd08.prod.outlook.com> (raw)

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

             reply	other threads:[~2020-03-03  5:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-03  5:51 Aditya K [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BYAPR08MB4232069B0A9D5D1E0E4B2A69B6E40@BYAPR08MB4232.namprd08.prod.outlook.com \
    --to=hiraditya@msn.com \
    --cc=gcc@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).