This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Fw: GSoC topic: Implement hot cold splitting at GIMPLE IR level
- From: Aditya K <hiraditya at msn dot com>
- To: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Tue, 3 Mar 2020 20:42:25 +0000
- Subject: Fw: GSoC topic: Implement hot cold splitting at GIMPLE IR level
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DXLSj/sKwOHEohW2ciPq4SlazEKZNrmP28Bt0KEwGkk=; b=S9mxMNbSQq1kv/lQbvxOVcYkTud/b8XmgQ5pBTJezE++I2Qyiw9C29cuutxyzgbK8bJZvXKqdUrUI6Hbv2lJGehe+EQM1+PCyrct9RJP7CyrjCUeyS7TgglucyQEo/3RrzyrPNiWEmLrLomTKxgOYzyLEuy0BGSVjiqwJCaTq9Ep1PKsMctKZvIZiWYucujDah8MYl37U/9niqNn0l/Is0sKV+s2UTYS03Z68qZ+ZF01tkcvE0CfTc+1Tye/g8g3KLIhmq8NVmFwLTxQqbfxT8LHlWg8LB1DZP5NnpIWiNZokzazHTWyFqtgz1BDYvflpcY46lIgrSnFIRAr0yJwWw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F+d2tapBVlMZX0j1wk0fQfH5JpJu2iZgXE5aIyFE58MugEILxBnUK1pK0qkeuTVtMy139FDKfziHlECgaYZDW5UvgaE0vZ8QA4PpqLc6Ty9J84094oYGbFVo3wq03hP1Y5xNnFwn93wAiCZXeX4Y9jpeYK0QzxT4n+TTRxI3gQisFJU1mwdoYk8WJV2sHqF59WKu+rWdvTmRs8nko+hR7ZyhX9eVTpAEIIuhtbqrNiYrdQ5G7VPEUkInuv/vSctBEO5dFsMbKUOj4xMEE6pX6D0gCgPP160q7QXaw7Qp6YLH+XAV3kJ1CI706iEAN64/4QOeMHUtPcitSWFYW9f0oA==
- References: <BYAPR08MB4232069B0A9D5D1E0E4B2A69B6E40@BYAPR08MB4232.namprd08.prod.outlook.com>,<453b83f8-4422-7727-ddd9-5f9e0d23d873@suse.cz>,<BYAPR08MB42320E829A37607C0AC4F967B6E40@BYAPR08MB4232.namprd08.prod.outlook.com>
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 <mliska@suse.cz>
Sent: Tuesday, March 3, 2020 2:47 AM
To: Aditya K <hiraditya@msn.com>; gcc@gcc.gnu.org <gcc@gcc.gnu.org>
Cc: Jan Hubicka <hubicka@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