From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9278 invoked by alias); 13 Jun 2011 19:44:54 -0000 Received: (qmail 9270 invoked by uid 22791); 13 Jun 2011 19:44:54 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (74.125.121.67) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 13 Jun 2011 19:44:38 +0000 Received: from hpaq13.eem.corp.google.com (hpaq13.eem.corp.google.com [172.25.149.13]) by smtp-out.google.com with ESMTP id p5DJibPb002931 for ; Mon, 13 Jun 2011 12:44:37 -0700 Received: from yxf34 (yxf34.prod.google.com [10.190.2.98]) by hpaq13.eem.corp.google.com with ESMTP id p5DJeN1Z020703 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Mon, 13 Jun 2011 12:44:36 -0700 Received: by yxf34 with SMTP id 34so2551935yxf.0 for ; Mon, 13 Jun 2011 12:44:35 -0700 (PDT) MIME-Version: 1.0 Received: by 10.236.175.134 with SMTP id z6mr3258971yhl.57.1307994275393; Mon, 13 Jun 2011 12:44:35 -0700 (PDT) Reply-To: lcwu@google.com, dnovillo@google.com, jyasskin@google.com, aaw@google.com, delesley@google.com, gcc-patches@gcc.gnu.org, reply@codereview.appspotmail.com X-Google-Appengine-App-Id: codereview Message-ID: <20cf303b397b27332004a59d261b@google.com> Date: Mon, 13 Jun 2011 20:12:00 -0000 Subject: Re: [google] Enhance Annotalysis to support cloned functions/methods (issue4591066) From: lcwu@google.com To: dnovillo@google.com, jyasskin@google.com Cc: aaw@google.com, delesley@google.com, gcc-patches@gcc.gnu.org, reply@codereview.appspotmail.com Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes X-System-Of-Record: true 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: 2011-06/txt/msg00995.txt.bz2 http://codereview.appspot.com/4591066/diff/3001/gcc/tree-threadsafe-analyze.c File gcc/tree-threadsafe-analyze.c (right): http://codereview.appspot.com/4591066/diff/3001/gcc/tree-threadsafe-analyze.c#newcode1159 gcc/tree-threadsafe-analyze.c:1159: gcc_assert (false); On 2011/06/11 17:52:51, Diego Novillo wrote: > >+ else > >+ gcc_assert (false); > >+ > Change to gcc_unreachable (); Done. http://codereview.appspot.com/4591066/diff/3001/gcc/tree-threadsafe-analyze.c#newcode2151 gcc/tree-threadsafe-analyze.c:2151: && gimple_call_num_args(call) > 0) On 2011/06/11 17:52:51, Diego Novillo wrote: > 2147 starting from GCC-4.5.). The clones could be created as early as when > 2148 constructing SSA. Also note that the parameters of a cloned method > could > 2149 be optimized away. */ > 2150 if (TREE_CODE (TREE_TYPE (DECL_ORIGIN (fdecl))) == METHOD_TYPE > 2151 && gimple_call_num_args(call) > 0) > Wouldn't it be easier to make fdecl == DECL_ORIGIN (fdecl) earlier in the > function? > It's OK either way, though. Yes, my original fix was to make fdecl = DECL_ORIGINAL (fdecl). But I later changed it to this way because I wanted to tolerate the case where the base object (i.e. "this" pointer) is an object instead of a pointer only when fdecl is a clone. (i.e. I don't want to arbitrarily relax it.) That's why I kept fdecl intact. http://codereview.appspot.com/4591066/