From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 106787 invoked by alias); 26 Jan 2016 16:59:39 -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 106756 invoked by uid 89); 26 Jan 2016 16:59:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-spam-relays-external:233, H*RU:233, sk:object X-HELO: fencepost.gnu.org Received: from fencepost.gnu.org (HELO fencepost.gnu.org) (208.118.235.10) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 26 Jan 2016 16:59:36 +0000 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42079) by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1aO6xq-0003yx-D2 for gcc-patches@gnu.org; Tue, 26 Jan 2016 11:59:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aO6xm-000071-RZ for gcc-patches@gnu.org; Tue, 26 Jan 2016 11:59:33 -0500 Received: from mail-io0-x233.google.com ([2607:f8b0:4001:c06::233]:34784) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aO6xm-00006w-MT for gcc-patches@gnu.org; Tue, 26 Jan 2016 11:59:30 -0500 Received: by mail-io0-x233.google.com with SMTP id 1so192067444ion.1 for ; Tue, 26 Jan 2016 08:59:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=9XfOOrvWGIZ0XC0fHC3aEJ/iKZlbdVuPQt99aWvZGPk=; b=jDFUp/n7FnLOI3o3hcu5+XbvCzYj8HwUNAZwbMLEnJPpkBYeE3O5IWAVYluUcfFzp3 OyMCR7fz+e4kNJ3Co4RMIvIzzhHLBKvvbQZmXdlCeVElMWKTVnswD4vOLL9zBrj7nWOE PghaDUSh05nuabt+jOnHoxUWzGSZqeL9jc26Yln/n0JK0aYFNQzeNB11QnElrXHcctXF BrqRmC2jdnt1gFplCtqNbqZ6poSBn91roIiPKtyoC2SdIgeUPHHSnFlSA+s2Vy/y6yiH dPtfxnI4Bne4ggBjPbIh15wTv9vlTL1i01AyvDYbTQCvoF0HccxsW0cqAqe4t2ZTD4NA jnmA== X-Gm-Message-State: AG10YOT98JWdHoUlwmfHhJICPoV97GkOjpSUHNHWVMG268x6cJK4Q0R+sq4mcmyEIOoZCA== X-Received: by 10.107.11.162 with SMTP id 34mr22605310iol.165.1453827569738; Tue, 26 Jan 2016 08:59:29 -0800 (PST) Received: from f1.c.bardezibar.internal (81.37.148.146.bc.googleusercontent.com. [146.148.37.81]) by smtp.gmail.com with ESMTPSA id 63sm1392961ion.4.2016.01.26.08.59.28 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 26 Jan 2016 08:59:29 -0800 (PST) Date: Tue, 26 Jan 2016 16:59:00 -0000 From: Sebastian Pop To: Tom de Vries Cc: Richard Biener , "gcc-patches@gnu.org" Subject: Re: [PATCH, PR69110] Don't return NULL access_fns in dr_analyze_indices Message-ID: <20160126165927.GA29169@f1.c.bardezibar.internal> References: <5694F5BA.7030207@mentor.com> <5695436D.4000003@mentor.com> <56A16E1E.30304@mentor.com> <56A3C647.2040906@mentor.com> <56A762CA.6020005@mentor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56A762CA.6020005@mentor.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4001:c06::233 X-IsSubscribed: yes X-SW-Source: 2016-01/txt/msg02008.txt.bz2 Tom de Vries wrote: > diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c > index a40f40d..4c29fc2 100644 > --- a/gcc/tree-data-ref.c > +++ b/gcc/tree-data-ref.c > @@ -1510,8 +1510,9 @@ initialize_data_dependence_relation (struct data_reference *a, > if (operand_equal_p (DR_REF (a), DR_REF (b), 0)) > { > if (loop_nest.exists () > - && !object_address_invariant_in_loop_p (loop_nest[0], > - DR_BASE_OBJECT (a))) > + && (!object_address_invariant_in_loop_p (loop_nest[0], > + DR_BASE_OBJECT (a)) > + || DR_NUM_DIMENSIONS (a) == 0)) Also please fix the indentation of all this if stmt. > { > DDR_ARE_DEPENDENT (res) = chrec_dont_know; > return res; > @@ -1548,8 +1549,9 @@ initialize_data_dependence_relation (struct data_reference *a, > analyze it. TODO -- in fact, it would suffice to record that there may > be arbitrary dependences in the loops where the base object varies. */ > if (loop_nest.exists () > - && !object_address_invariant_in_loop_p (loop_nest[0], > - DR_BASE_OBJECT (a))) > + && (!object_address_invariant_in_loop_p (loop_nest[0], > + DR_BASE_OBJECT (a)) > + || DR_NUM_DIMENSIONS (a) == 0)) > { > DDR_ARE_DEPENDENT (res) = chrec_dont_know; > return res; Let's check for DR_NUM_DIMENSIONS (a) == 0 independently of loop_nest.exists (). We check for the loop_nest because we need to access the outer loop loop_nest[0] to analyze the base object of a. Otherwise the change looks good to me. Thanks, Sebastian