From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 36268 invoked by alias); 3 Mar 2020 05:51:45 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 36260 invoked by uid 89); 3 Mar 2020 05:51:44 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy=suffering, Hx-incomingtopheadermarker:Count, Hx-incomingtopheadermarker:sk:UpperCa, H*RU:e400 X-HELO: NAM11-CO1-obe.outbound.protection.outlook.com Received: from mail-co1nam11olkn2034.outbound.protection.outlook.com (HELO NAM11-CO1-obe.outbound.protection.outlook.com) (40.92.18.34) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 03 Mar 2020 05:51:43 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ms85PY+sf3//QcZbSrS2G6wrqtBdISMJ3vIXabnatA4DCKph83RsICWb9bKh06i05V9qEkzdeHNsv2lr0lVO/FM49YQqhc3zbu6UzoAta2sHryHeKuz23fcz6IKTx2PtHS61V+qc9Hhzc1PvgwHwcX/bkBQxyxmDrxu3Xa3gCXH9sa+CzgTu4WvWMcZBESg7rfTdZuBOT6EGeqNNg4gTmGKKvGAc9uqS61C3kSnprEwUg6TAF0Y/w70fQzZVidcEPlDidgpisWpAR9tO0WTbHFvpqoUIfGbPqfeyAEnbrWoBkAhK622vleBmhxDJQ2DuqqMLW62iZkoowDzK9Gg5Qg== 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=BoV8KtN/MWCJr2N/pZHxqxt6PVjPNirgGZrL7w6mkUk=; b=hyVZpHuh7zY0RZ38ohNROSdkY8+E8gmuj9pUcxKjbVd/GBpoavQ0xjXG+YClv/FViKwxLiZfEsIOQ+7TfpzEinX+TeM9RbPQCEm28H1cZ5acnswZ5BPzt/tZ+I8VsA+KepptzxpvAXQe1o91VSh8QW84ukmhh5B0sXCpP+s9XoM+HnKB03XgNnKJDz3MGJ9atO9PCqh+igBnjHRJ+Tz/AGuxhYSWnz0KLMyVN85uLGi9ZyZuou0MnwiRnARnZydx07RNo2KT/YX3aU68otFgrzOwn8nddn3pEyuZ/OC30SZFVVhrN5hNehJua3FZOIE/cooJvJ7rwAmBMA30EZXm3g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=msn.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BoV8KtN/MWCJr2N/pZHxqxt6PVjPNirgGZrL7w6mkUk=; b=K0q0aRiIGv64/udyNvrTxRdhslpGnPm27jRQdbtS3ammR/I8BojWv1T8zaGjslElA9d5T82K3YhoMlGNkzSnTDXM7U8STy96XSPys9ILOlvCB9XU5GUT74eEmQW4X7ksRKKkSkSr9APaaJ0PVIRYtlYfJfBjflN2b6SDgRWnPBwY2rHMiD13eDRl9OcMgDNxkL+4Vh5pnesmLPqUvAQCU+oiGx+e2zGLnFxKVXwRTy8bRiRT1Jfyu5WZR0rZLoISgYe/IH+/GVHwt/PhJp8ZaLkwrwpFUkDqlbT9XfyWLaPtqFNmNN90m6ywdTU3653fW4nQXtIC3y4oZmdw5dV7jA== Received: from DM6NAM11FT004.eop-nam11.prod.protection.outlook.com (2a01:111:e400:fc4d::33) by DM6NAM11HT014.eop-nam11.prod.protection.outlook.com (2a01:111:e400:fc4d::443) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2772.15; Tue, 3 Mar 2020 05:51:40 +0000 Received: from BYAPR08MB4232.namprd08.prod.outlook.com (10.13.172.60) by DM6NAM11FT004.mail.protection.outlook.com (10.13.172.217) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2772.14 via Frontend Transport; Tue, 3 Mar 2020 05:51:40 +0000 Received: from BYAPR08MB4232.namprd08.prod.outlook.com ([fe80::2c18:302b:b325:71f]) by BYAPR08MB4232.namprd08.prod.outlook.com ([fe80::2c18:302b:b325:71f%7]) with mapi id 15.20.2772.019; Tue, 3 Mar 2020 05:51:40 +0000 From: Aditya K To: "gcc@gcc.gnu.org" Subject: GSoC topic: Implement hot cold splitting at GIMPLE IR level Date: Tue, 03 Mar 2020 05:51:00 -0000 Message-ID: x-ms-exchange-antispam-messagedata: cieR11+lMWmFy4W5hxhPGE1ktwfShFZAQ20UlaodyIQcnId6PxPFdhd/tOE0x1k6v/seAVnZPlQD+LyYyKqfWYPYnNAxIRA/hncOZKEreKFGf/XaktXWUOOnPpFcwFj/n6JnlX/lHhgN9ZldFnH2T67tL7/R7jGhtKrzvpTdmF1W2YtZCmMNr2o6scwLHd0T x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-IsSubscribed: yes X-SW-Source: 2020-03/txt/msg00034.txt Hi Everyone, I was one of the original authors of hot cold splitting optimization in LLV= M. I was wondering if implementing a region based hot cold splitting optimization would be useful in GCC? We a= lready 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 applicati= ons 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 fo= r this sorry, just a guess. Having an IR level hot cold splitting pass woul= d benefit applications deployed on such devices by reducing their startup w= orking set. I'd be happy to mentor a GSoC candidate if we chose to list thi= s 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 imp= rove the memory locality of code and helps reduce startup working set. The = splitting pass does this by identifying cold blocks and moving them into se= parate functions. Because it is implemented at the IR level all the back en= d target benefit from it. It is a relatively new optimization and it was re= cently presented at the LLVM Dev Meeting in 2019 and the slides are here: h= ttps://llvm.org/devmtg/2019-10/talk-abstracts.html#tech8. There are fast al= gorithms to detect SESE regions as illustrated in (http://impact.gforge.inr= ia.fr/impact2016/papers/impact2016-kumar.pdf), we can leverage that to dete= ct regions.=20 Deliverables: - Implement hot cold splitting pass at GIMPLE level - Detect maximal cold region in a function and outline it as a separate fun= ction - Use static as well as dynamic profile information to mark cold edges - Write unit tests to show variety of regions outlined Thanks, -Aditya