This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch to xfail g++.dg/tree-prof/indir-call-prof.C on IA64
- From: Steve Ellcey <sje at cup dot hp dot com>
- To: jh at suse dot cz
- Cc: gcc-patches at gcc dot gnu dot org, tbily at suse dot cz
- Date: Wed, 24 Jan 2007 16:53:11 -0800 (PST)
- Subject: Re: Patch to xfail g++.dg/tree-prof/indir-call-prof.C on IA64
> Hi,
> the basic algorithm does not care at all what actually is in the virtual
> tables, because the instrumentation is done at callee site, rather than
> caller. I guess the problem is that the code simply does not recognize
> call via IA64 vtable as candidate for devirtualization that should be
> tirival to fix. How does the GIMPLE representation differ here?
>
> Honza
I am not completely sure what gimple you want to see. It does look like
IA64 is doing the instrumentation at the callee site. So if I look at
the call site without any profiling, it looks like IA64 has a bunch of
casts that the devirtualization code may not be expecting:
On IA64 Linux I see:
int main() ()
{
struct B b;
<bb 2>:
b.D.2297._vptr.A = &_ZTV1B[2];
OBJ_TYPE_REF((int (*__vtbl_ptr_type) (void)) &_ZTV1B[2];&b.D.2297->0) (&b.D.22
97);
return 0;
}
And on x86_64 I see:
int main() ()
{
struct B b;
<bb 2>:
b.D.2465._vptr.A = &_ZTV1B[2];
OBJ_TYPE_REF(_ZTV1B[2];&b.D.2465->0) (&b.D.2465);
return 0;
}