From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 85022 invoked by alias); 14 Jan 2019 13:10:34 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 84929 invoked by uid 89); 14 Jan 2019 13:10:34 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.2 spammy=FILE, simplify, indent X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 14 Jan 2019 13:10:31 +0000 Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 99A53AD38 for ; Mon, 14 Jan 2019 13:10:29 +0000 (UTC) Date: Mon, 14 Jan 2019 13:10:00 -0000 From: Richard Biener To: gcc-patches@gcc.gnu.org Subject: [PATCH] Improve match.pd dumping Message-ID: User-Agent: Alpine 2.20 (LSU 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-SW-Source: 2019-01/txt/msg00770.txt.bz2 This distinguishes (match ...) from (simplify ...) where the former doesn't really mean we apply some pattern but rather we have matched some expression. Committed as obvious. Richard. 2019-01-14 Richard Biener * genmatch.c (dt_simplify::gen_1): Change dumping dependent on whether we are in (simplify ...) or (match ...) context. diff --git a/gcc/genmatch.c b/gcc/genmatch.c index 5edd39af4cc..7b9b09c7d8b 100644 --- a/gcc/genmatch.c +++ b/gcc/genmatch.c @@ -3311,7 +3311,9 @@ dt_simplify::gen_1 (FILE *f, int indent, bool gimple, operand *result) } fprintf_indent (f, indent, "if (__builtin_expect (dump_file && (dump_flags & TDF_FOLDING), 0)) " - "fprintf (dump_file, \"Applying pattern "); + "fprintf (dump_file, \"%s ", + s->kind == simplify::SIMPLIFY + ? "Applying pattern" : "Matching expression"); fprintf (f, "%%s:%%d, %%s:%%d\\n\", "); output_line_directive (f, result ? result->location : s->match->location, true,