From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27081 invoked by alias); 16 Oct 2012 17:28:37 -0000 Received: (qmail 27040 invoked by uid 22791); 16 Oct 2012 17:28:36 -0000 X-SWARE-Spam-Status: No, hits=-6.5 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 16 Oct 2012 17:28:26 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q9GHSOh0004207 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 16 Oct 2012 13:28:24 -0400 Received: from zalov.redhat.com (vpn1-7-73.ams2.redhat.com [10.36.7.73]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q9GHSMOs004460 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 16 Oct 2012 13:28:23 -0400 Received: from zalov.cz (localhost [127.0.0.1]) by zalov.redhat.com (8.14.5/8.14.5) with ESMTP id q9GHSLau006337; Tue, 16 Oct 2012 19:28:21 +0200 Received: (from jakub@localhost) by zalov.cz (8.14.5/8.14.5/Submit) id q9GHSKrK006336; Tue, 16 Oct 2012 19:28:20 +0200 Date: Tue, 16 Oct 2012 17:33:00 -0000 From: Jakub Jelinek To: Ian Lance Taylor Cc: Aldy Hernandez , gcc-patches , Richard Guenther , Ian Lance Taylor , Andrew MacLeod Subject: Re: [path] PR 54900: store data race in if-conversion pass Message-ID: <20121016172820.GK584@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <507C015F.2090508@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes 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 X-SW-Source: 2012-10/txt/msg01568.txt.bz2 On Tue, Oct 16, 2012 at 10:19:54AM -0700, Ian Lance Taylor wrote: > On Mon, Oct 15, 2012 at 5:28 AM, Aldy Hernandez wrote: > I don't see a reason to add this new function. I would just inline it > into noce_can_store_speculate_p, replacing the call to > memory_modified_in_p. And I'm not sure I see a reason to change the > comment for memory_modified_in_p, it seems to already be accurate. > > Clearly we could consider the possibility of a PARALLEL of SET insns, > but of course most the compiler won't handle that anyhow. I suppose > that would be a reason to use memory_surely_modified_in_insn_p, but in > that case you might as well handle the PARALLEL case now. I see another problem with noce_can_store_speculate_p, the return false; checks. The search for a store to exactly that location can be done just on post dominator bbs, but I wonder how you can avoid looking for volatile insns or non-const/pure calls (or insns that may modify the address) also in other bbs. What if there is: location of considered if-conversion on mem if (some_condition) call (); mem = something; ? We only walk immediate post-dominators, so look at the bb containing mem = something;, but I think a call/volatile insn/modification of mem's address is problematic in any bb on any path in between test_bb and the post-dominator on which the write has been found. Jakub