From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15724 invoked by alias); 18 Oct 2004 14:28:16 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 15717 invoked from network); 18 Oct 2004 14:28:15 -0000 Received: from unknown (HELO vlsi1.ultra.nyu.edu) (128.122.140.213) by sourceware.org with SMTP; 18 Oct 2004 14:28:15 -0000 Received: by vlsi1.ultra.nyu.edu (4.1/1.34) id AA03882; Mon, 18 Oct 04 10:32:00 EDT Date: Mon, 18 Oct 2004 14:38:00 -0000 From: kenner@vlsi1.ultra.nyu.edu (Richard Kenner) Message-Id: <10410181432.AA03882@vlsi1.ultra.nyu.edu> To: dberlin@dberlin.org Subject: Re: [patch] for PR 18040 Cc: gcc-patches@gcc.gnu.org X-SW-Source: 2004-10/txt/msg01479.txt.bz2 Inserting STRIP_NOPS into everywhere that breaks apart component_refs and looking for variables and things is not a pleasant idea, unless it was hidden in component_ref iterators of some sort that you could tell to auto-skip them (the way we have ssa operand iterators). Actually, it wouldn't do anything, because it doesn't strip VIEW_CONVERT_EXPR and only strips those NOP_EXPRs that would have already been removed! Thus, if you want ((cast)var).field to be legal, you are going to have to go through every single function in the optimizers that walks component_refs and fix them. A lot of them are simply returning NULL or (whatever they have don't know) in the case where they hit the NOP_EXPR, instead of aborting. Some are probably silently doing bad things :) Well, how many of those are there? Most just treat an "LHS" as a single object. Very few would look inside it. This will miss the indirect_ref (and an optimization opportunity) if you have COMPONENT_REF >>AR_DECL>> But I'm not sure that *is* an optimization opportunity: if that NOP_EXPR is still there, it's there for a reason! The question I'd ask is whether you'd have the optimization opportunity if the NOP_EXPR were in a separate statement. The answer is clearly "no". So how would doing that help?