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: 648662 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rrKj15YWmz9sBf for ; Fri, 15 Jul 2016 14:44:03 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=D7iCmMaX; dkim-atps=neutral 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=bpBTZ4OTSnmVtrNcR E24pLKsGjXyOsv6FLuj8BTQrnckLfn/mYLpkEinGMTjzkaZsdBUcJjhmAsYYV+/W lX3m/kYLL/Mp42wKTvn5Efy65vN7ReouI7zQQAaFBkBppX6OB1gmIVv72jHjGtSy Kc+hTWhzYcZhszfA/ZDTLEfx5U= 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=D7iCmMaXPdxP7Kyg0Bc2KeHUR4jg/sfdNBtIUzd22ODMvXW9+poiXBi iZPEnkPqJL1B7YXVlhtWeiLUydCiikMHMyGBJ5GsK6+ER1h3/kK0yOKpyfhmxHQ6 vqiT43dhGnsVlU/oheWmhgME+kkTY/azJcDp3N5DyOUJnI24U2YQ= 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