From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20320 invoked by alias); 25 Jul 2016 06:59:54 -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 20276 invoked by uid 89); 25 Jul 2016 06:59:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=*stmt X-HELO: mail-pf0-f182.google.com Received: from mail-pf0-f182.google.com (HELO mail-pf0-f182.google.com) (209.85.192.182) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 25 Jul 2016 06:59:42 +0000 Received: by mail-pf0-f182.google.com with SMTP id x72so61097491pfd.2 for ; Sun, 24 Jul 2016 23:59:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to; bh=3ffaP4TvdwDuIM0MDM4zUJL9g0v9hTqgwZUbTgycUg4=; b=iro0Lf+smkOSbHOKeME/PltBE1VHxSJp79V1H8yIWfZACxr9WYPxp13RV25aUnPvpS q7IzVEa8rihSo7NGN7y8p3S2IKtDDDvV0c/lZayhQ1I8oFa/VUSUNYO3BW9kCd6NgHAO CUyQUFCVh/oTGiJgFxHyZPlLV+KE3MopZZ2ATgGEUKDJ8epRFZF+8vGaOe3ANOh71bYo 2oYFqYVGYLGy7Mm41qxuUkCPMvvDKt5eUruH1JCZwv+VMDHP9BQT5JZqE/1inwWbIWAV zJe2ao0ZJOslDIqnyBBqMsrPllb80kNbE3lAlW2NrbQtqT5endnMVyPid7qd+MjQQEjz sgLw== X-Gm-Message-State: AEkooutjhpjZwVwLwMdLTp7gCmNloeGTAeuWnItDJNgOwl2m9ZiTOfk6TBi04wXVxusWW539 X-Received: by 10.98.87.90 with SMTP id l87mr26895409pfb.133.1469429980184; Sun, 24 Jul 2016 23:59:40 -0700 (PDT) Received: from [10.1.1.4] (58-6-183-210.dyn.iinet.net.au. [58.6.183.210]) by smtp.gmail.com with ESMTPSA id a20sm37121143pfa.27.2016.07.24.23.59.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 24 Jul 2016 23:59:39 -0700 (PDT) Subject: Re: [RFC][IPA-VRP] Disable setting param of __builtin_constant_p to null To: Jan Hubicka References: <57886949.8010300@linaro.org> <57886993.3010901@linaro.org> <20160715084245.GA4195@kam.mff.cuni.cz> Cc: "gcc-patches@gcc.gnu.org" , Richard Biener , Martin Jambor From: kugan Message-ID: Date: Mon, 25 Jul 2016 06:59:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20160715084245.GA4195@kam.mff.cuni.cz> Content-Type: multipart/mixed; boundary="------------FBB93D00F1CF69134AD5952F" X-IsSubscribed: yes X-SW-Source: 2016-07/txt/msg01568.txt.bz2 This is a multi-part message in MIME format. --------------FBB93D00F1CF69134AD5952F Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Content-length: 854 Hi, >> diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c >> index ecfab1f..23c12b5 100644 >> --- a/gcc/tree-vrp.c >> +++ b/gcc/tree-vrp.c >> @@ -3759,8 +3759,10 @@ extract_range_basic (value_range *vr, gimple *stmt) >> && SSA_NAME_IS_DEFAULT_DEF (arg) >> && TREE_CODE (SSA_NAME_VAR (arg)) == PARM_DECL) >> { >> +#if 0 >> set_value_range_to_null (vr, type); >> return; >> +#endif > > It is not cleanest either, but better to test cfun->after_inlining Thanks. Here is the patch which does this. Bootstrapped and regression tested with the rest of the patches in the series. Is this OK for trunk? Thanks, Kugan gcc/ChangeLog: 2016-07-25 Kugan Vivekanandarajah * tree-vrp.c (extract_range_basic): Check cfun->after_inlining before folding call to __builtin_constant_p with parameters to false. --------------FBB93D00F1CF69134AD5952F Content-Type: text/x-patch; name="0002-Prevent-setting-__builtin_constant_p-of-param-to-nul.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0002-Prevent-setting-__builtin_constant_p-of-param-to-nul.pa"; filename*1="tch" Content-length: 886 >From 4805ea975de0fd3b183b27324df1caa7ff29f887 Mon Sep 17 00:00:00 2001 From: Kugan Vivekanandarajah Date: Sat, 25 Jun 2016 11:52:57 +1000 Subject: [PATCH 2/7] Prevent setting __builtin_constant_p of param to null before inlining in Early VRP --- gcc/tree-vrp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index bdfc1b6..edaacf2 100644 --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -3763,7 +3763,8 @@ extract_range_basic (value_range *vr, gimple *stmt) arg = gimple_call_arg (stmt, 0); if (TREE_CODE (arg) == SSA_NAME && SSA_NAME_IS_DEFAULT_DEF (arg) - && TREE_CODE (SSA_NAME_VAR (arg)) == PARM_DECL) + && TREE_CODE (SSA_NAME_VAR (arg)) == PARM_DECL + && cfun->after_inlining) { set_value_range_to_null (vr, type); return; -- 1.9.1 --------------FBB93D00F1CF69134AD5952F--