From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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-Archive: List-Post: List-Help: Sender: gcc-patches-owner@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 17:14:00 -0000 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 Content-Type: text/plain X-SW-Source: 2017-10/txt/msg01535.txt.bz2 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. */