diff mbox

[match-and-simplify] Remove printing "for expression"

Message ID CAAgBjM=haDR7arog7niWh+sk2D-kxshguB-qiRaR7=f1O6zOXA@mail.gmail.com
State New
Headers show

Commit Message

Prathamesh Kulkarni Jan. 16, 2015, 12:14 p.m. UTC
On 12 January 2015 at 08:46, Richard Biener <rguenther@suse.de> wrote:
> On Sat, 10 Jan 2015, Prathamesh Kulkarni wrote:
>
>> On 8 January 2015 at 17:52, Richard Biener <rguenther@suse.de> 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.
>
> Doesn't that miss the '\n' putc?
Added in this patch. OK to commit ?

Thanks,
Prathamesh
>
> Thanks,
> Richard.
>
>> OK to commit to match-and-simplify branch ?
>>
>> Thanks,
>> Prathamesh
>> >
>> > Thanks,
>> > Richard.
>> >
>> >> Thanks,
>> >> Prathamesh
>> >>
>> >
>> > --
>> > Richard Biener <rguenther@suse.de>
>> > SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Jennifer Guild,
>> > Dilip Upmanyu, Graham Norton HRB 21284 (AG Nuernberg)
>>
>
> --
> Richard Biener <rguenther@suse.de>
> SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Jennifer Guild,
> Dilip Upmanyu, Graham Norton HRB 21284 (AG Nuernberg)
2015-01-16  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>

	* genmatch.c (print_matches): Remove.
	(main): Inline calls to print_matches.
diff mbox

Patch

Index: gcc/genmatch.c
===================================================================
--- gcc/genmatch.c	(revision 219718)
+++ 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.  */
@@ -3679,8 +3670,10 @@ 
 
       if (verbose)
 	for (unsigned i = 0; i < pred->matchers.length (); ++i)
-	  print_matches (pred->matchers[i]);
-
+	  {
+	    print_operand (pred->matchers[i]->match);
+	    putc ('\n', stderr);
+	  }
       decision_tree dt;
       for (unsigned i = 0; i < pred->matchers.length (); ++i)
 	dt.insert (pred->matchers[i], i);
@@ -3696,7 +3689,10 @@ 
 
   if (verbose)
     for (unsigned i = 0; i < p.simplifiers.length (); ++i)
-      print_matches (p.simplifiers[i]);
+      {
+	print_operand (p.simplifiers[i]->match);
+	putc ('\n', stderr);
+      }
 
   decision_tree dt;
   for (unsigned i = 0; i < p.simplifiers.length (); ++i)