From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11925 invoked by alias); 6 Jan 2007 13:49:50 -0000 Received: (qmail 11880 invoked by uid 22791); 6 Jan 2007 13:49:49 -0000 X-Spam-Check-By: sourceware.org Received: from province.act-europe.fr (HELO province.act-europe.fr) (212.157.227.214) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 06 Jan 2007 13:49:43 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-province.act-europe.fr (Postfix) with ESMTP id 92DA14AD4F; Sat, 6 Jan 2007 14:49:40 +0100 (CET) Received: from province.act-europe.fr ([127.0.0.1]) by localhost (province.act-europe.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 59028-10; Sat, 6 Jan 2007 14:49:40 +0100 (CET) Received: from [192.168.1.3] (unknown [91.164.38.58]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by province.act-europe.fr (Postfix) with ESMTP id 4C88E4AD49; Sat, 6 Jan 2007 14:49:40 +0100 (CET) From: Eric Botcazou To: "Richard Guenther" Subject: Re: [PATCH] Tree SRA and atomicity/volatility Date: Sat, 06 Jan 2007 13:49:00 -0000 User-Agent: KMail/1.7.1 Cc: gcc-patches@gcc.gnu.org References: <200701061422.39157.ebotcazou@adacore.com> <84fc9c000701060531g4b2da007mf5434b3fce63ec24@mail.gmail.com> In-Reply-To: <84fc9c000701060531g4b2da007mf5434b3fce63ec24@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200701061452.15744.ebotcazou@adacore.com> 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: 2007-01/txt/msg00463.txt.bz2 > It doesn't scalarize dev - it scalarizes tmp, which is not volatile. Right, this is why I took care of not saying "it scalarizes dev", but "it decomposes accesses to dev", which is precisely what happens. > Then it uses by-element copy, which is maybe not a good idea here > (but not necessarily wrong). I agree that it's not necessarily wrong for the C testcase, but I think it's nevertheless a bug in the Tree SRA pass, which happens to generate wrong code for the equivalent Ada testcase. It should check whether the [LR]HS has side-effects before turning a single access into multiple ones. > What is the required semantics if I only access dev.a? Do you > require a full-word load of the data and an extraction of a there? Exactly. Gigi makes sure that a full-word load is always possible, but it relies on the side-effectness for keeping it together. -- Eric Botcazou