From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 87803 invoked by alias); 3 Mar 2020 08:47:47 -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 87795 invoked by uid 89); 3 Mar 2020 08:47:47 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.3 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.1 spammy=H*i:sk:BYAPR08, HTo:D*msn.com, UD:bb-reorder.c, bbreorderc X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 03 Mar 2020 08:47:46 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 3CFB5AAC2; Tue, 3 Mar 2020 08:47:44 +0000 (UTC) Subject: Re: GSoC topic: Implement hot cold splitting at GIMPLE IR level To: Aditya K , "gcc@gcc.gnu.org" References: From: =?UTF-8?Q?Martin_Li=c5=a1ka?= Cc: Jan Hubicka Message-ID: <453b83f8-4422-7727-ddd9-5f9e0d23d873@suse.cz> Date: Tue, 03 Mar 2020 08:47:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2020-03/txt/msg00035.txt 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