From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 116565 invoked by alias); 18 Jun 2019 10:20:27 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 116483 invoked by uid 89); 18 Jun 2019 10:20:27 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-4.1 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.1 spammy=HContent-Transfer-Encoding:8bit X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 18 Jun 2019 10:20:25 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 659E8AF4E; Tue, 18 Jun 2019 10:20:23 +0000 (UTC) Subject: Re: [PATCH] [RFC, PGO+LTO] Missed function specialization + partial devirtualization To: Segher Boessenkool Cc: luoxhu , gcc-patches@gcc.gnu.org, hubicka@ucw.cz, wschmidt@linux.ibm.com, luoxhu@cn.ibm.com References: <20190618014521.67198-1-luoxhu@linux.ibm.com> <124124c4-cf59-fbdd-198b-af85a1e64593@linux.ibm.com> <0367e49b-1c51-c2ee-aa0a-6ff4cc5d1dba@suse.cz> <20190618100741.GF7313@gate.crashing.org> From: =?UTF-8?Q?Martin_Li=c5=a1ka?= Message-ID: Date: Tue, 18 Jun 2019 10:20:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20190618100741.GF7313@gate.crashing.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2019-06/txt/msg01024.txt.bz2 On 6/18/19 12:07 PM, Segher Boessenkool wrote: > On Tue, Jun 18, 2019 at 11:34:03AM +0200, Martin Liška wrote: >> I've got it. So it's situation where you have distribution equal to 50% and 50%. Note that it's >> the only valid situation where both edges with be >= 50%. That's the threshold for which >> we speculatively devirtualize edges. > > But that 50% is a magic number, isn't it? Yes :) Apparently LLVM does that for probability >= 30%: https://code.woboq.org/llvm/llvm/lib/Analysis/IndirectCallPromotionAnalysis.cpp.html#36 > Maybe 20% works better, and > then you need a top5 (in the worst case). I would then generalize to N, for now I'm waiting for Honza. Martin > > > Segher >