From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 71874 invoked by alias); 24 Jul 2019 13:36:25 -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 71866 invoked by uid 89); 24 Jul 2019 13:36:25 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1560, quality X-HELO: mail-lj1-f177.google.com Received: from mail-lj1-f177.google.com (HELO mail-lj1-f177.google.com) (209.85.208.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 24 Jul 2019 13:36:24 +0000 Received: by mail-lj1-f177.google.com with SMTP id m8so10932093lji.7 for ; Wed, 24 Jul 2019 06:36:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=rgNChLxcvhLEWUmQzTrDmt8w5UE5T8hrNgQyTtz5TQM=; b=op+93Iqk38PBagrHP7LSWCIjs9codLTCkAShQSFX2ZesmJ2Gjh3rG/9ref5npUdEiW ktsrI+17Smw8U3PwJNpBC/skdKQj+ksEe1RpyB8ZA+FRE3qdXouUB/AgIbhBlJrY/uJN 5hs3LYcczp5ST0ME0nexwunrQdQCG1gRs6zBm3FjiXljmOCbJVqrqJZERKopqnMywzfd UTg+rUxpirQThK0wYxqq5nklwzJIvPUujzNP3rz5S1yFzVdthRICRPPy0JnaJBMRynSH DN63M4egvWdNx99+eNNzSf3YqueDdTcsYF2BeENRhlmisn+uDY0A00nXt59WZxRZ2ABX ACew== MIME-Version: 1.0 References: <3972590.ZWEW9T1TNL@arcturus.home> In-Reply-To: <3972590.ZWEW9T1TNL@arcturus.home> From: Richard Biener Date: Wed, 24 Jul 2019 13:38:00 -0000 Message-ID: Subject: Re: [patch] More precise message with -Winline To: Eric Botcazou , Jan Hubicka Cc: GCC Patches Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2019-07/txt/msg01573.txt.bz2 On Wed, Jul 24, 2019 at 11:29 AM Eric Botcazou wrote: > > Hi, > > for EH cleanups, the branch probability heuristics can consider that edges are > never taken, i.e. their profile count is set to zero. In this case, no matter > how you tweak the inlining parameters, you cannot get function calls inlined, > but -Winline nevertheless prints the standard message about unlikely calls as > in the cases when tweaking the inlining parameters can work. > > Therefore the attached patch adds a new CIF code with the warning message: > > "call is never executed and code size would grow [-Winline]" > > for this case, thus signaling the user that he'd better not waste time trying > to get the call inlined. > > Tested on x86_64-suse-linux, OK for the mainline? Looks good besides + if (e->count.ipa () == profile_count::zero ()) + e->inline_failed = CIF_NEVER_CALL; does it actually matter what kind of profile quality e->count.ipa has compared to profile_count::zero ()? Also +/* Call is considered never executed. */ +DEFCIFCODE(NEVER_CALL, CIF_FINAL_NORMAL, + N_("call is never executed and code size would grow")) suggests the call is never executed, but we only assume that (or the profile training run never hit it). Richard. > > > 2019-07-24 Eric Botcazou > > * cif-code.def (NEVER_CALL): New code. > * ipa-inline.c (want_inline_small_function_p): Fix formatting issues. > Set the failure to CIF_NEVER_CALL if the IPA count is zero. > > -- > Eric Botcazou