From patchwork Mon Jun 20 14:07:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Renlin Li X-Patchwork-Id: 637999 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rYCNv22r8z9t0q for ; Tue, 21 Jun 2016 00:07:42 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=NQ3Jw6my; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type; q=dns; s=default; b=XFkMBGDatCJ4a0wD6 35uAO32PIAPjgNTzdfSrzNh5kLUf6EG1JhDr/CxWDKwZ4Nuf/BroRUzKH/UjNbmh hELXwFE7Eh5ZCgxu7CjX+mO0uW34XP3IVPptBD278R4HSJsyPqc0AacUt11Ncjg9 ywS9d3JekehCW6APBsWhz/fHuM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type; s=default; bh=cvGf5tQAFpRO5RnmwsyAU25 nxMM=; b=NQ3Jw6myeolsEHlquZtbXYadSY/v2SQlOj7JB/bYxgM4YLkyq8Whjyb nrxu+/IXV2G8h4A2artYYpWDK7ijCpqveFFpqJHMuKGWlRUZ1hS63LW1qhM4gujA XUJa+RKd1DygvGS9D3aeVD+d6NXgKeiSyBGtD1XHgHSOZjsoXM+Q= Received: (qmail 16025 invoked by alias); 20 Jun 2016 14:07:35 -0000 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 Received: (qmail 16016 invoked by uid 89); 20 Jun 2016 14:07:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=6000 X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 20 Jun 2016 14:07:24 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 205583B0; Mon, 20 Jun 2016 07:08:08 -0700 (PDT) Received: from [10.2.207.43] (e104453-lin.cambridge.arm.com [10.2.207.43]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 25F953F246; Mon, 20 Jun 2016 07:07:22 -0700 (PDT) Subject: [PATCH]Fix scan-tree-dump-times syntax errors in gcc.dg/tree-ssa/attr-hotcold-2.c To: Kyrill Tkachov , Jan Hubicka , gcc-patches@gcc.gnu.org References: <20160607192704.GB22955@kam.mff.cuni.cz> <575EE0CA.3080109@foss.arm.com> From: Renlin Li Message-ID: <5767F898.2060006@foss.arm.com> Date: Mon, 20 Jun 2016 15:07:20 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <575EE0CA.3080109@foss.arm.com> X-IsSubscribed: yes Hi, This is a simple patch to fix the syntax errors in dg-final directive lines within this test case. According to the documentation, the syntax of this directive should be: '''scan-tree-dump-times regex num suffix [{ target/xfail selector }]''' Now the test case compilers Okay in arm environment. However, the last two checks seem failing. This is another issue. Okay to commit? Regards, Renlin gcc/testsuite/ChangeLog: 2016-06-20 Renlin Li * gcc.dg/tree-ssa/attr-hotcold-2.c: Fix syntax errors. On 13/06/16 17:35, Kyrill Tkachov wrote: > Hi Honza, > > On 07/06/16 20:27, Jan Hubicka wrote: >> Hello, >> Maritn Liska measured branch predictor hitrates on current tree and > > In the testsuite I'm seeing: > ERROR: gcc.dg/tree-ssa/attr-hotcold-2.c: error executing dg-final: > syntax error in target selector "profile_estimate" > > on aarch64-none-elf. > I think the hunk: > -/* { dg-final { scan-ipa-dump-times "block 4, loop depth 0, count 0, > freq 1\[^0-9\]" 1 "profile_estimate" } } */ > +/* { dg-final { scan-tree-dump-times 1 "hot label heuristics" 1 > "profile_estimate" } } */ > +/* { dg-final { scan-tree-dump-times 1 "cold label heuristics" 1 > "profile_estimate" } } */ > +/* { dg-final { scan-tree-dump-times "block 4, loop depth 0, count 0, > freq \[1-4\]\[^0-9\]" 1 "profile_estimate" } } */ > > is buggy, should it be > -/* { dg-final { scan-ipa-dump-times "block 4, loop depth 0, count 0, > freq 1\[^0-9\]" 1 "profile_estimate" } } */ > +/* { dg-final { scan-tree-dump-times "hot label heuristics" 1 > "profile_estimate" } } */ > +/* { dg-final { scan-tree-dump-times "cold label heuristics" 1 > "profile_estimate" } } */ > +/* { dg-final { scan-tree-dump-times "block 4, loop depth 0, count 0, > freq \[1-4\]\[^0-9\]" 1 "profile_estimate" } } */ > ? > > With that change the test runs but still FAILs: > FAIL: gcc.dg/tree-ssa/attr-hotcold-2.c scan-tree-dump-times > profile_estimate "block 4, loop depth 0, count 0, freq [1-4][^0-9]" 1 > FAIL: gcc.dg/tree-ssa/attr-hotcold-2.c scan-tree-dump-times > profile_estimate "block 5, loop depth 0, count 0, freq > [6-9][0-9][0-9][0-9]" 1 > > Thanks, > Kyrill diff --git a/gcc/testsuite/gcc.dg/tree-ssa/attr-hotcold-2.c b/gcc/testsuite/gcc.dg/tree-ssa/attr-hotcold-2.c index 6623d9e..e2e8143 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/attr-hotcold-2.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/attr-hotcold-2.c @@ -18,8 +18,8 @@ void f(int x, int y) return; } -/* { dg-final { scan-tree-dump-times 1 "hot label heuristics" 1 "profile_estimate" } } */ -/* { dg-final { scan-tree-dump-times 1 "cold label heuristics" 1 "profile_estimate" } } */ +/* { dg-final { scan-tree-dump-times "hot label heuristics" 1 "profile_estimate" } } */ +/* { dg-final { scan-tree-dump-times "cold label heuristics" 1 "profile_estimate" } } */ /* { dg-final { scan-tree-dump-times "block 4, loop depth 0, count 0, freq \[1-4\]\[^0-9\]" 1 "profile_estimate" } } */ /* Note: we're attempting to match some number > 6000, i.e. > 60%.