From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11896 invoked by alias); 13 Jun 2011 19:54:18 -0000 Received: (qmail 11886 invoked by uid 22791); 13 Jun 2011 19:54:17 -0000 X-SWARE-Spam-Status: No, hits=-2.2 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:54:03 +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 p5DJs2En008811 for ; Mon, 13 Jun 2011 12:54:02 -0700 Received: from yxk30 (yxk30.prod.google.com [10.190.3.158]) by hpaq13.eem.corp.google.com with ESMTP id p5DJnNTA029653 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Mon, 13 Jun 2011 12:54:01 -0700 Received: by yxk30 with SMTP id 30so941358yxk.39 for ; Mon, 13 Jun 2011 12:54:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.150.141.10 with SMTP id o10mr6629555ybd.70.1307994840637; Mon, 13 Jun 2011 12:54:00 -0700 (PDT) Received: by 10.151.142.15 with HTTP; Mon, 13 Jun 2011 12:54:00 -0700 (PDT) In-Reply-To: <20cf303b397b27332004a59d261b@google.com> References: <20cf303b397b27332004a59d261b@google.com> Date: Mon, 13 Jun 2011 20:39:00 -0000 Message-ID: Subject: Re: [google] Enhance Annotalysis to support cloned functions/methods (issue4591066) From: Diego Novillo To: Le-Chun Wu , Diego Novillo , Jeffrey Yasskin , Ollie Wild , delesley@google.com, gcc-patches@gcc.gnu.org, reply@codereview.appspotmail.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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/msg00996.txt.bz2 On Mon, Jun 13, 2011 at 12:44, wrote: >> could >> =C2=A02149 =C2=A0 =C2=A0 =C2=A0be optimized away. =C2=A0*/ >> =C2=A02150 =C2=A0 if (TREE_CODE (TREE_TYPE (DECL_ORIGIN (fdecl))) =3D=3D= METHOD_TYPE >> =C2=A02151 =C2=A0 =C2=A0 =C2=A0 && gimple_call_num_args(call) > 0) > >> Wouldn't it be easier to make fdecl =3D=3D DECL_ORIGIN (fdecl) earlier in > > the >> >> function? > >> It's OK either way, though. > > Yes, my original fix was to make fdecl =3D 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. Ah, makes sense. Thanks. Diego.