From patchwork Sat Jan 10 17:06:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prathamesh Kulkarni X-Patchwork-Id: 42938 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f72.google.com (mail-ee0-f72.google.com [74.125.83.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DF1AD2055F for ; Sat, 10 Jan 2015 17:06:52 +0000 (UTC) Received: by mail-ee0-f72.google.com with SMTP id e53sf10589271eek.3 for ; Sat, 10 Jan 2015 09:06:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:mailing-list:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:sender :delivered-to:mime-version:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:x-original-sender :x-original-authentication-results; bh=uu9fr+7aFtoG0p0vNne757uQhYRPzf48TfXByYsAulQ=; b=R3/+cyMm2dZFvwQNwLRDXRl5jtxiToqXjvZhvRsOTVJBXIOtmgkTI0FL4Q7bznnlGb ENb7ZM/Xw2Ks+nJALw4Z0K6384l5xqBaI/admYqUIth5gRsFsBTVrqqgPgjj0oh9trxF bjv1RAguhffh3eZLR6wLyfLJ2LzYoOFvCCEDPTNyIIfc9vmi8Tr4ZkQ7stmQJEsYNYQV 9Fz7wHvfoKu2y46SMvxeUACn3lxA8P0jT2G7NTPNQ0CJD63odb9WOPflbAHOCyjIBicW umEqrqtpNGs+WrUOhHKfaUNzI91j1259X7qEBM83nJVK2xTqpe5dnSctkvhcSU4K2aMY JVDA== X-Gm-Message-State: ALoCoQndirgVi+FCdMnriZPdwdU/Gf2D+eSv3sj6NeifZCbtT5icP1BZUsyJQOHO1uRoxEZ75OoQ X-Received: by 10.180.7.226 with SMTP id m2mr1121779wia.5.1420909612064; Sat, 10 Jan 2015 09:06:52 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.97 with SMTP id r1ls534753lar.81.gmail; Sat, 10 Jan 2015 09:06:51 -0800 (PST) X-Received: by 10.112.164.102 with SMTP id yp6mr27416056lbb.15.1420909611904; Sat, 10 Jan 2015 09:06:51 -0800 (PST) Received: from mail-lb0-x22c.google.com (mail-lb0-x22c.google.com. [2a00:1450:4010:c04::22c]) by mx.google.com with ESMTPS id jd8si16643179lbc.99.2015.01.10.09.06.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 10 Jan 2015 09:06:51 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::22c as permitted sender) client-ip=2a00:1450:4010:c04::22c; Received: by mail-lb0-f172.google.com with SMTP id z12so12444432lbi.3 for ; Sat, 10 Jan 2015 09:06:51 -0800 (PST) X-Received: by 10.152.5.226 with SMTP id v2mr28098229lav.34.1420909611318; Sat, 10 Jan 2015 09:06:51 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.9.200 with SMTP id c8csp654371lbb; Sat, 10 Jan 2015 09:06:49 -0800 (PST) X-Received: by 10.70.133.35 with SMTP id oz3mr32654847pdb.69.1420909608456; Sat, 10 Jan 2015 09:06:48 -0800 (PST) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id o3si17656607pdi.249.2015.01.10.09.06.47 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 10 Jan 2015 09:06:48 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-388767-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 12723 invoked by alias); 10 Jan 2015 17:06:34 -0000 Mailing-List: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org Precedence: list 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 12712 invoked by uid 89); 10 Jan 2015 17:06:33 -0000 X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-la0-f49.google.com Received: from mail-la0-f49.google.com (HELO mail-la0-f49.google.com) (209.85.215.49) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sat, 10 Jan 2015 17:06:31 +0000 Received: by mail-la0-f49.google.com with SMTP id hs14so18865188lab.8 for ; Sat, 10 Jan 2015 09:06:27 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.112.14.134 with SMTP id p6mr28534681lbc.36.1420909587820; Sat, 10 Jan 2015 09:06:27 -0800 (PST) Received: by 10.25.211.16 with HTTP; Sat, 10 Jan 2015 09:06:27 -0800 (PST) In-Reply-To: References: Date: Sat, 10 Jan 2015 17:06:27 +0000 Message-ID: Subject: Re: [match-and-simplify] Remove printing "for expression" From: Prathamesh Kulkarni To: Richard Biener Cc: gcc Patches X-IsSubscribed: yes X-Original-Sender: prathamesh.kulkarni@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::22c as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=pass header.i=@gcc.gnu.org X-Google-Group-Id: 836684582541 On 8 January 2015 at 17:52, Richard Biener wrote: > On Sun, 21 Dec 2014, Prathamesh Kulkarni wrote: > >> Hi, >> I removed printing "for expression:" from print_matches. I think it >> is out of place tvim here and we call print_matches after lowering. >> OK to commit ? > > Hum, it's now a very simple wrapper around print_operand - why > not replace the two callers with its content? Indeed. Done the changes in the attached patch. OK to commit to match-and-simplify branch ? Thanks, Prathamesh > > Thanks, > Richard. > >> Thanks, >> Prathamesh >> > > -- > Richard Biener > SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Jennifer Guild, > Dilip Upmanyu, Graham Norton HRB 21284 (AG Nuernberg) 2015-01-10 Prathamesh Kulkarni * genmatch.c (print_matches): Remove. (main): Replace calls to print_matches by print_operand. Index: gcc/genmatch.c =================================================================== --- gcc/genmatch.c (revision 219424) +++ gcc/genmatch.c (working copy) @@ -644,15 +644,6 @@ gcc_unreachable (); } -DEBUG_FUNCTION void -print_matches (struct simplify *s, FILE *f = stderr) -{ - fprintf (f, "for expression: "); - print_operand (s->match, f); - putc ('\n', f); -} - - /* AST lowering. */ /* Lowering of commutative operators. */ @@ -3672,7 +3663,7 @@ if (verbose) for (unsigned i = 0; i < pred->matchers.length (); ++i) - print_matches (pred->matchers[i]); + print_operand (pred->matchers[i]->match); decision_tree dt; for (unsigned i = 0; i < pred->matchers.length (); ++i) @@ -3689,7 +3680,7 @@ if (verbose) for (unsigned i = 0; i < p.simplifiers.length (); ++i) - print_matches (p.simplifiers[i]); + print_operand (p.simplifiers[i]->match); decision_tree dt; for (unsigned i = 0; i < p.simplifiers.length (); ++i)