From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6516 invoked by alias); 16 May 2019 02:41:38 -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 6504 invoked by uid 89); 16 May 2019 02:41:38 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM,HTML_MESSAGE,KAM_NUMSUBJECT,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.1 spammy=subjected, HX-Languages-Length:1454, H*c:alternative X-HELO: mail-it1-f181.google.com Received: from mail-it1-f181.google.com (HELO mail-it1-f181.google.com) (209.85.166.181) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 16 May 2019 02:41:37 +0000 Received: by mail-it1-f181.google.com with SMTP id a190so3622984ite.4 for ; Wed, 15 May 2019 19:41:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=PcP8IRv6mAgObwDy1baLEvcqpuPH+c2fb07W5tFrecI=; b=vVBkrPRZYg7GE57KqTBDgIDhDYW1+UX9I9dMtvKArMXQ/uY9rkc1msndYclLDq43Im dnAUQHC16lQRgaG/wK2kZE3sShOFIxHktfmfVHTjs8dIGTaj7Um1nNkvQ/ow/jkkZy4/ 7VnPOLLDAjQlKZ95o94+qQYTKVT56a02LadRM2JZwx3zz++76MntS7TZ/kzjt+l4mURo TOZNN+89APQFxYwWgQaql1WELlIYnS2EXr2o7hWy85EkhjI1v9YxvnBW8/vObTjEpfw2 NNWrRgUB2170N6CFaquMnPzu/xqRSyOdMH5voj5FNjKcI5/Aa8rFx45CwaOuEKh6VS81 bC5g== MIME-Version: 1.0 From: kamlesh kumar Date: Thu, 16 May 2019 02:41:00 -0000 Message-ID: Subject: regarding https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89924 To: gcc@gcc.gnu.org, Jan Hubicka Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2019-05/txt/msg00127.txt.bz2 Hi devs, I am looking into subjected issue. consider below testcase. $test.cpp class A { public: virtual int value() { return 1; } }; class B final : public A { public: int value(){ return 2; } }; int test(A* b) { return b->value() + 11; } void foo_test(B*b) { test(b); } Here gcc is unable to devirtualize the call to value into the test, because type information is not being propogated from foo_test to test. So this is what i am trying to do to make devirtualization happen: First we can inline the function test into foo_test. And then update the type in the OBJ_TYPE_REF. so that devirtualization can be applied. Like to know your thought before going ahead. ./Kamlesh