From patchwork Mon Oct 23 17:13:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 116778 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp4879612qgn; Mon, 23 Oct 2017 10:14:00 -0700 (PDT) X-Received: by 10.99.120.138 with SMTP id t132mr12450036pgc.88.1508778840584; Mon, 23 Oct 2017 10:14:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508778840; cv=none; d=google.com; s=arc-20160816; b=yHZWGInUyQp27uH0pvzOyTvWyA/MCiPGys5bG6Prh9igqlougc20G39g3whkDTVX5p 35aBSMsLsl5v8mZZeoxk0KV4gIf76ZeLpdEu9sojxCR4vEszQ/qLBFxKUOnenl7FvWVY rmU0dF/9e/n5TEIz6+LWCNcNbhgD/k0QPz35U5rTBqT4M1x05sxbYQpcQOHLBzreMUby cxO2Fi9cdKKeQwL29nxhAmtvRkowLkyWf/e4AGTc8lVuIxbm3BBkazFcQt+DoZHHaidA VPVV7+SHyCSLhPedSXegueb2zNqDLe0FcOje3C+VbJuqn07YmVznvLzgQKrNGY6yfNTh KyBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:mail-followup-to:to:from:delivered-to:sender:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :mailing-list:dkim-signature:domainkey-signature :arc-authentication-results; bh=iTbUvQn8L8634LDgHP28z65EQGMNjdvk93BPtAa/ITQ=; b=Zjn5lHKAMiKsnTpOufqwm0s/ZrOIA/Uc2QAMV9CR7Pb/FujW4uyzKXBFozrIx/LB8H lR2IXNJ9biLCzj/cVWsQHz/FG88G1F0OxgO8A9yj1aQTg2mJUpLPVeV+4whzLX8u+ttq iRXTRc/HopM0hpmXDVpzn/AE8mkUr26D/I5ZIN9FGjQy6VLma+Z6XNhc823/iLlRaAM8 LhtXdu4ZcAtVfJmP4f/0g1fArLKGnHB5kdL2RvjzSk+TQOI7nDlG712RLnSWOA/suyM+ reb1e0IC4IRbHEmYO0zlGSumfSm6E/CCGoijw3ZA0sn5OewoikHMqYT4PBp44BP1xQXq xe4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=KN9ZdQSa; spf=pass (google.com: domain of gcc-patches-return-464810-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-464810-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id 76si5632499pfi.157.2017.10.23.10.14.00 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Oct 2017 10:14:00 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-464810-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 header.s=default header.b=KN9ZdQSa; spf=pass (google.com: domain of gcc-patches-return-464810-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-464810-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE sp=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:from :to:subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=default; b=C888s4qEWPVhZVy3OPOIp6Ah21cHK +AdcTQfoFUSkX2mKhmLFM5D/kXzdY8yETluJOPvb37tlDRubVsi33RM9PmvVK+zf 454SwoYEUQJyGrNgRZCdZmF3uA88nh86N4lwl7EhBmfHDUyrkjtKZtihItExdpmJ 2p2O2bwQ3vh4V8= 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:from :to:subject:references:date:in-reply-to:message-id:mime-version :content-type; s=default; bh=sXneeX4iVwjAqMUpUc35tnUMQrM=; b=KN9 ZdQSaQHZDru0JhAuTtuyniTwRI2K7s6gbs4Gb/iN17u/Op6QexF/QTALBZkkuPRi Y3GAe3KIqRGum0MsL0UMAs7X47pYSZZ164eF7W0v0ZxGgVvmrhTOBcBNBy2fcY5O t7Oakt6KsY+ww4QGAm9lWO5+ka74k7ectcxX6vsk= Received: (qmail 24844 invoked by alias); 23 Oct 2017 17:13:44 -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 24823 invoked by uid 89); 23 Oct 2017 17:13:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-10.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy=034 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 ESMTP; Mon, 23 Oct 2017 17:13:42 +0000 Received: by mail-wm0-f47.google.com with SMTP id u138so11241615wmu.4 for ; Mon, 23 Oct 2017 10:13:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:mail-followup-to:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=iTbUvQn8L8634LDgHP28z65EQGMNjdvk93BPtAa/ITQ=; b=ozopr7ndfmnJCD100WTW238qqhFaomEVPgp1IoCYtKSkSpcFd3a1byAfeUuloeGW3C C740mXs0uz0glKjUXPoX2NcnYLv/82z00I/s68IYfW97X10r35T2S9EUNVLIeaHc8ySq AHP7mynDizmJzQz8GWnBcAhy0seg7Q3MgNlF8tkb0otIkFi753Xzk53Ru1PAWfcugNqw ZL3pzSuuPwiUTsOCFmK4kKGj+c0pbfjePBlu5s9oiH7cN406iIC5FADY8zbsf29r+79m DDCdstmUQmxLTxTR5qX/59hOwDeKdsX9uHBBEh5wzVNx5rZwKf0Bbd0kdKaWLUb+T624 erqg== X-Gm-Message-State: AMCzsaXrTuJMm3R+URZyy0hV1fBvHRQLWd0eroGSD0xLd4KhzR/qnhhI Q2su/5UGmmLn8ZuzofTGNYdR3hbhnIk= X-Google-Smtp-Source: ABhQp+RHIoVjgAgMXgfr+l/R3rRuGz7RxvP7ahWTbASL47IjmtliAOVO2XcF7zOfa7QjO/MEhQZL3w== X-Received: by 10.28.158.72 with SMTP id h69mr5650087wme.83.1508778820414; Mon, 23 Oct 2017 10:13:40 -0700 (PDT) Received: from localhost ([2.26.27.199]) by smtp.gmail.com with ESMTPSA id q74sm8095259wrb.51.2017.10.23.10.13.39 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Oct 2017 10:13:39 -0700 (PDT) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, richard.sandiford@linaro.org Subject: [034/nnn] poly_int: get_inner_reference_aff References: <871sltvm7r.fsf@linaro.org> Date: Mon, 23 Oct 2017 18:13:38 +0100 In-Reply-To: <871sltvm7r.fsf@linaro.org> (Richard Sandiford's message of "Mon, 23 Oct 2017 17:54:32 +0100") Message-ID: <87she9okhp.fsf@linaro.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 This patch makes get_inner_reference_aff return the size as a poly_widest_int rather than a widest_int. 2017-10-23 Richard Sandiford Alan Hayward David Sherwood gcc/ * tree-affine.h (get_inner_reference_aff): Return the size as a poly_widest_int. * tree-affine.c (get_inner_reference_aff): Likewise. * tree-data-ref.c (dr_may_alias_p): Update accordingly. * tree-ssa-loop-im.c (mem_refs_may_alias_p): Likewise. Index: gcc/tree-affine.h =================================================================== --- gcc/tree-affine.h 2017-10-23 17:17:16.129993616 +0100 +++ gcc/tree-affine.h 2017-10-23 17:18:30.290584430 +0100 @@ -80,7 +80,7 @@ bool aff_combination_constant_multiple_p void aff_combination_expand (aff_tree *, hash_map **); void tree_to_aff_combination_expand (tree, tree, aff_tree *, hash_map **); -tree get_inner_reference_aff (tree, aff_tree *, widest_int *); +tree get_inner_reference_aff (tree, aff_tree *, poly_widest_int *); void free_affine_expand_cache (hash_map **); bool aff_comb_cannot_overlap_p (aff_tree *, const poly_widest_int &, const poly_widest_int &); Index: gcc/tree-affine.c =================================================================== --- gcc/tree-affine.c 2017-10-23 17:17:16.129993616 +0100 +++ gcc/tree-affine.c 2017-10-23 17:18:30.290584430 +0100 @@ -927,7 +927,7 @@ debug_aff (aff_tree *val) which REF refers. */ tree -get_inner_reference_aff (tree ref, aff_tree *addr, widest_int *size) +get_inner_reference_aff (tree ref, aff_tree *addr, poly_widest_int *size) { HOST_WIDE_INT bitsize, bitpos; tree toff; Index: gcc/tree-data-ref.c =================================================================== --- gcc/tree-data-ref.c 2017-10-23 17:17:16.129993616 +0100 +++ gcc/tree-data-ref.c 2017-10-23 17:18:30.290584430 +0100 @@ -2134,7 +2134,7 @@ dr_may_alias_p (const struct data_refere if (!loop_nest) { aff_tree off1, off2; - widest_int size1, size2; + poly_widest_int size1, size2; get_inner_reference_aff (DR_REF (a), &off1, &size1); get_inner_reference_aff (DR_REF (b), &off2, &size2); aff_combination_scale (&off1, -1); Index: gcc/tree-ssa-loop-im.c =================================================================== --- gcc/tree-ssa-loop-im.c 2017-10-23 17:17:16.129993616 +0100 +++ gcc/tree-ssa-loop-im.c 2017-10-23 17:18:30.291584342 +0100 @@ -1581,7 +1581,7 @@ mem_refs_may_alias_p (im_mem_ref *mem1, /* Perform BASE + OFFSET analysis -- if MEM1 and MEM2 are based on the same object and their offset differ in such a way that the locations cannot overlap, then they cannot alias. */ - widest_int size1, size2; + poly_widest_int size1, size2; aff_tree off1, off2; /* Perform basic offset and type-based disambiguation. */