From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29413 invoked by alias); 8 Jan 2007 11:52:24 -0000 Received: (qmail 29404 invoked by uid 22791); 8 Jan 2007 11:52:24 -0000 X-Spam-Check-By: sourceware.org Received: from nf-out-0910.google.com (HELO nf-out-0910.google.com) (64.233.182.190) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 08 Jan 2007 11:52:20 +0000 Received: by nf-out-0910.google.com with SMTP id a25so1131081nfc for ; Mon, 08 Jan 2007 03:52:18 -0800 (PST) Received: by 10.82.111.8 with SMTP id j8mr2606307buc.1168257137921; Mon, 08 Jan 2007 03:52:17 -0800 (PST) Received: by 10.82.150.13 with HTTP; Mon, 8 Jan 2007 03:52:17 -0800 (PST) Message-ID: <84fc9c000701080352x517b891cva220bc67f75a2a06@mail.gmail.com> Date: Mon, 08 Jan 2007 11:52:00 -0000 From: "Richard Guenther" To: "Eric Botcazou" Subject: Re: [PATCH] Tree SRA and atomicity/volatility Cc: gcc-patches@gcc.gnu.org In-Reply-To: <200701081233.10301.ebotcazou@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200701061422.39157.ebotcazou@adacore.com> <200701061452.15744.ebotcazou@adacore.com> <84fc9c000701070323s4f0907d8lebdf0de005da2ca@mail.gmail.com> <200701081233.10301.ebotcazou@adacore.com> 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: 2007-01/txt/msg00566.txt.bz2 On 1/8/07, Eric Botcazou wrote: > > > Exactly. Gigi makes sure that a full-word load is always possible, but > > > it relies on the side-effectness for keeping it together. > > > > I don't see where the tree-ssa part of the middle-end guarantees this and > > also expand does not seem to honor this as then we'd get a full load > > for every component load. It looks to me that for a component write > > you then need a read-modify-write cycle as we get for targets that > > don't support sub-word loads/stores and/or strict-alignment targets. > > I'm not sure I understand, maybe my wording was ambiguous. Gigi has all the > magic to support atomicity (type wrapping, alignment tweaking, countermeasure > for problematic targets, e.g. Alpha, and so on) and generates the full-word > access on its own. The only requirement is for the middle-end to fully honor > the TREE_THIS_VOLATILE and TREE_SIDE_EFFECTS flags. Oh, so the only problem you see are for structure copies that are decomposed by SRA? Still, middle-end support for this kind of stuff could be useful - maybe using volatile bitfields instead of a volatile structure type. struct val { volatile unsigned val1 : 8; volatile unsigned val2 : 8; }; (at the moment accesses to the above are also decomposed by expand). Richard.