This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch to xfail g++.dg/tree-prof/indir-call-prof.C on IA64


> The test g++.dg/tree-prof/indir-call-prof.C is failing on ia64 platforms
> (Linux and HP-UX) because they use function descriptors instead of
> function pointers in their C++ vtables (TARGET_VTABLE_USES_DESCRIPTORS)
> and this prevents the indirect call from being converted to a direct
> call.
> 
> This patch xfails the test for ia64-*-*.  I also removed a bunch of
> excess blanks from the last 3 dg-* lines at the end of the file.
> 
> OK for checkin?
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
> 
> 
> 2007-01-24  Steve Ellcey  <sje@cup.hp.com>
> 
> 	* g++.dg/tree-prof/indir-call-prof.C: xfail on ia64-*-*.
> 
> Index: g++.dg/tree-prof/indir-call-prof.C
> ===================================================================
> --- g++.dg/tree-prof/indir-call-prof.C	(revision 121098)
> +++ g++.dg/tree-prof/indir-call-prof.C	(working copy)
> @@ -32,8 +32,10 @@ main (void)
>    return 0;
>  }
>  
> -/* { dg-final-use { scan-tree-dump "Indirect call -> direct call.* AA transformation on insn" "tree_profile"} } */
> -/* { dg-final-use { scan-tree-dump-not "Invalid sum" "optimized"} } */                                                                                
> -/* { dg-final-use { cleanup-tree-dump "optimized" } } */                                                                                              
> -/* { dg-final-use { cleanup-tree-dump "tree_profile" } } */                                                                                           
> +/* IA64 uses function descriptors, not function pointers in vtables.
> +   This prevents the transformation of the indirect call to a direct call.  */
>  
> +/* { dg-final-use { scan-tree-dump "Indirect call -> direct call.* AA transformation on insn" "tree_profile" { xfail ia64-*-* } } } */
> +/* { dg-final-use { scan-tree-dump-not "Invalid sum" "optimized"} } */
> +/* { dg-final-use { cleanup-tree-dump "optimized" } } */
> +/* { dg-final-use { cleanup-tree-dump "tree_profile" } } */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]