Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755147AbaBUUWk (ORCPT ); Fri, 21 Feb 2014 15:22:40 -0500 Received: from mail-vc0-f179.google.com ([209.85.220.179]:45895 "EHLO mail-vc0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753937AbaBUUWT (ORCPT ); Fri, 21 Feb 2014 15:22:19 -0500 MIME-Version: 1.0 In-Reply-To: References: <20140218030002.GA15857@linux.vnet.ibm.com> <1392740258.18779.7732.camel@triegel.csb> <1392752867.18779.8120.camel@triegel.csb> <20140220040102.GM4250@linux.vnet.ibm.com> <20140220083032.GN4250@linux.vnet.ibm.com> Date: Fri, 21 Feb 2014 12:22:16 -0800 X-Google-Sender-Auth: LgAIKHCe9vYj7xfFhRv6UHF3gm8 Message-ID: Subject: Re: [RFC][PATCH 0/5] arch: atomic rework From: Linus Torvalds To: "p796231 ." Cc: Paul McKenney , Torvald Riegel , Will Deacon , Peter Zijlstra , Ramana Radhakrishnan , David Howells , "linux-arch@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "akpm@linux-foundation.org" , "mingo@kernel.org" , "gcc@gcc.gnu.org" , Mark Batty Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 21, 2014 at 11:43 AM, Peter Sewell wrote: > > You have to track dependencies through other assignments, e.g. simple x=y That is all visible in the SSA form. Variable assignment has been converted to some use of the SSA node that generated the value. The use might be a phi node or a cast op, or maybe it's just a memory store op, but the whole point of SSA is that there is one single node that creates the data (in this case that would be the "load" op with the associated consume barrier - that barrier might be part of the load op itself, or it might be implemented as a separate SSA node that consumes the result of the load that generates a new pseudo), and the uses of the result are all visible from that. And yes, there might be a lot of users. But any complex case you just punt on - and the difference here is that since "punt" means "leave the barrier in place", it's never a correctness issue. So yeah, it could be somewhat expensive, although you can always bound that expense by just punting. But the dependencies in SSA form are no more complex than the dependencies the C standard talks about now, and in SSA form they are at least really easy to follow. So if they are complex and expensive in SSA form, I'd expect them to be *worse* in the current "depends-on" syntax form. Linus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/