From patchwork Thu May 26 22:12:50 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janis Johnson X-Patchwork-Id: 97630 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 31AF2B6F85 for ; Fri, 27 May 2011 08:11:41 +1000 (EST) Received: (qmail 7000 invoked by alias); 26 May 2011 22:11:40 -0000 Received: (qmail 6985 invoked by uid 22791); 26 May 2011 22:11:39 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 26 May 2011 22:11:25 +0000 Received: (qmail 3216 invoked from network); 26 May 2011 22:11:24 -0000 Received: from unknown (HELO ?192.168.1.4?) (janisjo@127.0.0.2) by mail.codesourcery.com with ESMTPA; 26 May 2011 22:11:24 -0000 Message-ID: <4DDED062.6070802@codesourcery.com> Date: Thu, 26 May 2011 15:12:50 -0700 From: Janis Johnson User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110424 Thunderbird/3.1.10 MIME-Version: 1.0 To: Jan Hubicka CC: Richard Guenther , Rainer Orth , gcc-patches@gcc.gnu.org, Jan Hubicka Subject: Re: [testsuite] remove XFAIL for all but ia64 for g++.dg/tree-ssa/pr43411.C References: <4DDC05B3.2070007@codesourcery.com> <20110525141511.xasy3kaxww8g8g00@imap.suse.de> In-Reply-To: <20110525141511.xasy3kaxww8g8g00@imap.suse.de> X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org On 05/25/2011 05:15 AM, Jan Hubicka wrote: > Am Wed 25 May 2011 11:04:06 AM CEST schrieb Richard Guenther > : > >> On Wed, May 25, 2011 at 10:38 AM, Rainer Orth >> wrote: >>> Janis Johnson writes: >>> >>>> Archived test results for 4.7.0 for most processors with C++ results have: >>>> >>>> XPASS: g++.dg/tree-ssa/pr43411.C scan-tree-dump-not optimized >>>> "OBJ_TYPE_REF" >>>> >>>> The only failures I could find were for ia64-linux and ia64-hpux. This >>>> patch changes the xfail so it only applies to ia64-*-*. OK for trunk? >>> >>> Richard rejected a similar patch: >>> >>> http://gcc.gnu.org/ml/gcc-patches/2011-05/msg00054.html >>> >>> Perhaps Jan can suggest the correct approach? >> >> We should verify that the call to val is inlined in all functions. >> Maybe rename it to something larger and scan the optimized >> dump so that name doesn't appear. > Indeed, this seems to be safest approach I can think of. > If function is supposed to be optimized out completely by early > passes, we should just search release_ssa. It is not the case here > and dumping IPA info for inlining all instance would be bit tricky. This patch renames val to function_to_inline and searches for its name in the release-ssa dump. That scan-dump has an xfail. The original scan-dump of 'optimized' is removed. Richard and Jan, is this OK? 2011-05-26 Janis Johnson * g++.dg/tree-ssa-pr43411.C: Rename function to be inlined and replace dump search. Index: g++.dg/tree-ssa/pr43411.C =================================================================== --- g++.dg/tree-ssa/pr43411.C (revision 174217) +++ g++.dg/tree-ssa/pr43411.C (working copy) @@ -1,6 +1,6 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-tree-optimized" } */ -class P { public: virtual int val() { return 123; } }; +/* { dg-options "-O2 -fdump-tree-release_ssa" } */ +class P { public: virtual int function_to_inline() { return 123; } }; class Psub : public P { }; extern int sink1, sink2; @@ -8,12 +8,12 @@ void test() { Psub p; P &pRef = p; - sink1 = p.val(); - sink2 = pRef.val(); + sink1 = p.function_to_inline(); + sink2 = pRef.function_to_inline(); } -inline int v(P &p) { return p.val(); } +inline int v(P &p) { return p.function_to_inline(); } void testInlineP() { P p; @@ -25,5 +25,5 @@ sink1 = v(p); } -// { dg-final { scan-tree-dump-not "OBJ_TYPE_REF" "optimized" { xfail *-*-* } } } -// { dg-final { cleanup-tree-dump "optimized" } } +// { dg-final { scan-tree-dump-not "function_to_inline" "release_ssa" { xfail *-*-* } } } +// { dg-final { cleanup-tree-dump "release_ssa" } }