public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Improve match.pd dumping
@ 2019-01-14 13:10 Richard Biener
  0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2019-01-14 13:10 UTC (permalink / raw)
  To: gcc-patches


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  <rguenther@suse.de>

	* 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,

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-01-14 13:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-14 13:10 [PATCH] Improve match.pd dumping Richard Biener

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).