From patchwork Fri Jul 15 04:43:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kugan Vivekanandarajah X-Patchwork-Id: 72061 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp417334qga; Thu, 14 Jul 2016 21:44:12 -0700 (PDT) X-Received: by 10.66.7.199 with SMTP id l7mr28319251paa.136.1468557852168; Thu, 14 Jul 2016 21:44:12 -0700 (PDT) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id x187si3365067pfb.89.2016.07.14.21.44.11 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Jul 2016 21:44:12 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-431718-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-431718-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-431718-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:references:cc:from:message-id:date:mime-version :in-reply-to:content-type; q=dns; s=default; b=c0sjZq8UbihVTtLbh DW8Cl5ssC10etYbjdM9k//L+9b37eVx4rdoNvgJuc6BbJfkldyfls7/qo25YTIup PCh75QszNlr5Xa5CfEhAYelPNvfAHOXSkhwQWel+StvMYScj3rnz7ixIaRijuqUE hE+Hf0FOg4wDmAJgwUGXp0rIL0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:references:cc:from:message-id:date:mime-version :in-reply-to:content-type; s=default; bh=qh+F0cLXTz/OZUVMH3pr0iG /Yy4=; b=AZiyBW3ZrXVwvAf1V7uRA+jcUmGwdbislQOSXZEyX36FVh4jlQwzgAg nMcKuFWyuh/gPQvUT3xhbHZdTMJdDCpFDDqKylMWs90cBJ4UFc8Cqo5WkgFDu4U/ JKAMFfMn2axIHqlwCxol9j3JD94AUD5wIRbL7ZfjyBPa8YGpOWyI= Received: (qmail 102071 invoked by alias); 15 Jul 2016 04:43:54 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 102062 invoked by uid 89); 15 Jul 2016 04:43:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy=pi, transferred X-HELO: mail-wm0-f47.google.com Received: from mail-wm0-f47.google.com (HELO mail-wm0-f47.google.com) (74.125.82.47) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 15 Jul 2016 04:43:43 +0000 Received: by mail-wm0-f47.google.com with SMTP id i5so12883745wmg.0 for ; Thu, 14 Jul 2016 21:43:43 -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=QbcMSZmEeNG8Mwk/cqDbOpLGXnDu/nF7uVNk6bQ9PvM=; b=LSMcBR732XN7gOzTvzJzpw6QQE9lGIgrVepWJ2Sp5Yb1Tokv36MNL6QD3/1l1kDbIs Ng0kJyl/viBEfQn/Xph2z2sx37AS/v8Q2PIxMOEPJ4SaxOv3CXXrg0zwRcCqghraR31a DdidtbgJDOkK/kYm4AzN45/ecRGhlvtquRpVeSXHVPMZxIV5/GmLtAppj6A7zXc87y1C rJ53IcV6XDknHxoXc8dr8VeAfrcfMs+HkeI7F4hxnCS2PY9YqqIoAUOx0QPxoAbdEGOJ +XwUq9eE9uvHLL+tqs5pRgNnCu+Hd2K+S/H5zjiQqv5hBHdjxw90ho447Al6jHgzUMgO VwjA== X-Gm-Message-State: ALyK8tIy71LSy503w1pH8fNkzkTrMDQYh4CquML4K9tBLvRRRFh06nWpLVLbG5NEbOB0Z4K7 X-Received: by 10.28.139.144 with SMTP id n138mr6869264wmd.71.1468557820060; Thu, 14 Jul 2016 21:43:40 -0700 (PDT) Received: from [192.168.207.67] ([62.28.188.194]) by smtp.gmail.com with ESMTPSA id i195sm2405344wmg.1.2016.07.14.21.43.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Jul 2016 21:43:39 -0700 (PDT) Subject: [RFC][IPA-VRP] Check for POINTER_TYPE_P before accessing SSA_NAME_PTR_INFO in tree-inline To: "gcc-patches@gcc.gnu.org" References: <57886949.8010300@linaro.org> Cc: Richard Biener , Jan Hubicka , Martin Jambor From: kugan Message-ID: <578869F9.5040606@linaro.org> Date: Fri, 15 Jul 2016 14:43:37 +1000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <57886949.8010300@linaro.org> X-IsSubscribed: yes Hi, This patch adds check for POINTER_TYPE_P before accessing SSA_NAME_PTR_INFO in remap_ssa_name in gcc/tree-inline.c. This is not related to IPA_VRP but was exposed by that. Thanks, Kugan gcc/ChangeLog: 2016-07-14 Kugan Vivekanandarajah * tree-inline.c (remap_ssa_name): Check for POINTER_TYPE_P before accessing SSA_NAME_PTR_INFO. >From 7c1e5f3058a55d635e57bb4e9f2fd4ff14cd2b94 Mon Sep 17 00:00:00 2001 From: Kugan Vivekanandarajah Date: Tue, 5 Jul 2016 17:14:52 +1000 Subject: [PATCH 2/6] Inliner Check for POINTER_TYPE --- gcc/tree-inline.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index 07f6a83..f926304 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -244,6 +244,7 @@ remap_ssa_name (tree name, copy_body_data *id) /* At least IPA points-to info can be directly transferred. */ if (id->src_cfun->gimple_df && id->src_cfun->gimple_df->ipa_pta + && POINTER_TYPE_P (TREE_TYPE (name)) && (pi = SSA_NAME_PTR_INFO (name)) && !pi->pt.anything) { @@ -276,6 +277,7 @@ remap_ssa_name (tree name, copy_body_data *id) /* At least IPA points-to info can be directly transferred. */ if (id->src_cfun->gimple_df && id->src_cfun->gimple_df->ipa_pta + && POINTER_TYPE_P (TREE_TYPE (name)) && (pi = SSA_NAME_PTR_INFO (name)) && !pi->pt.anything) { -- 1.9.1