From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27529 invoked by alias); 7 Sep 2004 13:02:49 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 27054 invoked from network); 7 Sep 2004 13:02:33 -0000 Received: from unknown (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org with SMTP; 7 Sep 2004 13:02:33 -0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.12.10/8.12.10) with ESMTP id i87D21l3018690; Tue, 7 Sep 2004 09:02:01 -0400 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i87D2T722187; Tue, 7 Sep 2004 09:02:29 -0400 Received: from pain (vpn50-38.rdu.redhat.com [172.16.50.38]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id i87D2SV06158; Tue, 7 Sep 2004 06:02:28 -0700 Subject: Re: Problem with operand handling From: Andrew MacLeod To: Richard Kenner Cc: gcc mailing list In-Reply-To: <10409071241.AA24626@vlsi1.ultra.nyu.edu> References: <10409071241.AA24626@vlsi1.ultra.nyu.edu> Content-Type: text/plain Message-Id: <1094562147.31335.19.camel@pain> Mime-Version: 1.0 Date: Tue, 07 Sep 2004 13:02:00 -0000 Content-Transfer-Encoding: 7bit X-SW-Source: 2004-09/txt/msg00286.txt.bz2 On Tue, 2004-09-07 at 08:41, Richard Kenner wrote: > The only time &var is used as a pointer is if the variable passes the > test 'is_gimple_reg()'. Only real operands store this pointer value. > If var is a virtual SSA_NAME operand, then we store *var into a tree and > keep that value around. > > I think this is pre-ssa-conversion, so it's still a VAR_DECL. I didn't > see any code to do that copying. > The is_gimple-ness isnt related to SSA. I should have phrased better. We cannot mix virtual and real operands. That is simply not allowed. The only time the address of the thing being pointed to used is if the variable passes the is_gimple_reg() test. The rest of the time *var is used: The first stmt in add_stmt_operands is var = *var_p; and the is_real_op is set based on the return value of is_gimple_reg\(). The only place we actually store these values is through the append_*() routines. append_def and append_use iare called with var_p,. and all the others (append_vuse, append_v_may_def, append_v_must_def) are called either with the derefeernced value 'var', or with a varray_tree item from the alias list. > So this should only be causing you a problem if you have an > is_gimple_reg() which is being passed to add_stmt_operand in this > manner. The thats a bug. > > It was happening via a TMT "variable". These are alias variables and should never pass the is_gimple_test, so we ought not be doing anything with the address being passed into add_stmt_operand, the entire function should be dealing with just the 'var' aspect of whats being passed in. is_gimple_reg checks: return (is_gimple_variable (t) && is_gimple_reg_type (TREE_TYPE (t)) /* A volatile decl is not acceptable because we can't reuse it as needed. We need to copy it into a temp first. */ && ! TREE_THIS_VOLATILE (t) && ! needs_to_live_in_memory (t)); Does your variable pass this causing it to be a gimple_reg? Perhaps a flag is set incorrectly or something?