* [match-and-simplify] Remove printing "for expression"
@ 2014-12-21 21:53 Prathamesh Kulkarni
2014-12-21 22:03 ` Prathamesh Kulkarni
2015-01-08 12:29 ` Richard Biener
0 siblings, 2 replies; 7+ messages in thread
From: Prathamesh Kulkarni @ 2014-12-21 21:53 UTC (permalink / raw)
To: Richard Biener, gcc Patches
[-- Attachment #1: Type: text/plain, Size: 175 bytes --]
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 ?
Thanks,
Prathamesh
[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 975 bytes --]
Index: gcc/genmatch.c
===================================================================
--- gcc/genmatch.c (revision 218996)
+++ gcc/genmatch.c (working copy)
@@ -645,10 +645,9 @@
}
DEBUG_FUNCTION void
-print_matches (struct simplify *s, FILE *f = stderr)
+print_matches (operand *o, FILE *f = stderr)
{
- fprintf (f, "for expression: ");
- print_operand (s->match, f);
+ print_operand (o, f);
putc ('\n', f);
}
@@ -3672,7 +3671,7 @@
if (verbose)
for (unsigned i = 0; i < pred->matchers.length (); ++i)
- print_matches (pred->matchers[i]);
+ print_matches (pred->matchers[i]->match);
decision_tree dt;
for (unsigned i = 0; i < pred->matchers.length (); ++i)
@@ -3689,7 +3688,7 @@
if (verbose)
for (unsigned i = 0; i < p.simplifiers.length (); ++i)
- print_matches (p.simplifiers[i]);
+ print_matches (p.simplifiers[i]->match);
decision_tree dt;
for (unsigned i = 0; i < p.simplifiers.length (); ++i)
[-- Attachment #3: ChangeLog.txt --]
[-- Type: text/plain, Size: 235 bytes --]
2014-12-12 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
* genmatch.c (print_matches): Change type of first parameter to operand *.
Remove call to fprintf to print "for expression: ".
(main): Adjust call to print_matches.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [match-and-simplify] Remove printing "for expression"
2014-12-21 21:53 [match-and-simplify] Remove printing "for expression" Prathamesh Kulkarni
@ 2014-12-21 22:03 ` Prathamesh Kulkarni
2015-01-08 12:29 ` Richard Biener
1 sibling, 0 replies; 7+ messages in thread
From: Prathamesh Kulkarni @ 2014-12-21 22:03 UTC (permalink / raw)
To: Richard Biener, gcc Patches
On 22 December 2014 at 03:21, Prathamesh Kulkarni
<prathamesh.kulkarni@linaro.org> 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 ?
s/"tvim here"/there.
>
> Thanks,
> Prathamesh
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [match-and-simplify] Remove printing "for expression"
2014-12-21 21:53 [match-and-simplify] Remove printing "for expression" Prathamesh Kulkarni
2014-12-21 22:03 ` Prathamesh Kulkarni
@ 2015-01-08 12:29 ` Richard Biener
2015-01-10 22:09 ` Prathamesh Kulkarni
1 sibling, 1 reply; 7+ messages in thread
From: Richard Biener @ 2015-01-08 12:29 UTC (permalink / raw)
To: Prathamesh Kulkarni; +Cc: gcc Patches
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?
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)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [match-and-simplify] Remove printing "for expression"
2015-01-08 12:29 ` Richard Biener
@ 2015-01-10 22:09 ` Prathamesh Kulkarni
2015-01-12 8:56 ` Richard Biener
0 siblings, 1 reply; 7+ messages in thread
From: Prathamesh Kulkarni @ 2015-01-10 22:09 UTC (permalink / raw)
To: Richard Biener; +Cc: gcc Patches
[-- Attachment #1: Type: text/plain, Size: 743 bytes --]
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.
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)
[-- Attachment #2: changelog.txt --]
[-- Type: text/plain, Size: 162 bytes --]
2015-01-10 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
* genmatch.c (print_matches): Remove.
(main): Replace calls to print_matches by print_operand.
[-- Attachment #3: foo.patch --]
[-- Type: text/x-patch, Size: 999 bytes --]
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)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [match-and-simplify] Remove printing "for expression"
2015-01-10 22:09 ` Prathamesh Kulkarni
@ 2015-01-12 8:56 ` Richard Biener
2015-01-16 12:17 ` Prathamesh Kulkarni
0 siblings, 1 reply; 7+ messages in thread
From: Richard Biener @ 2015-01-12 8:56 UTC (permalink / raw)
To: Prathamesh Kulkarni; +Cc: gcc Patches
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?
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)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [match-and-simplify] Remove printing "for expression"
2015-01-12 8:56 ` Richard Biener
@ 2015-01-16 12:17 ` Prathamesh Kulkarni
2015-01-16 12:21 ` Richard Biener
0 siblings, 1 reply; 7+ messages in thread
From: Prathamesh Kulkarni @ 2015-01-16 12:17 UTC (permalink / raw)
To: Richard Biener; +Cc: gcc Patches
[-- Attachment #1: Type: text/plain, Size: 1241 bytes --]
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)
[-- Attachment #2: changelog.txt --]
[-- Type: text/plain, Size: 147 bytes --]
2015-01-16 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
* genmatch.c (print_matches): Remove.
(main): Inline calls to print_matches.
[-- Attachment #3: foo.patch --]
[-- Type: text/x-patch, Size: 1113 bytes --]
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)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [match-and-simplify] Remove printing "for expression"
2015-01-16 12:17 ` Prathamesh Kulkarni
@ 2015-01-16 12:21 ` Richard Biener
0 siblings, 0 replies; 7+ messages in thread
From: Richard Biener @ 2015-01-16 12:21 UTC (permalink / raw)
To: Prathamesh Kulkarni; +Cc: gcc Patches
On Fri, 16 Jan 2015, Prathamesh Kulkarni wrote:
> 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 ?
Ok.
Thanks,
Richard.
> 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)
>
--
Richard Biener <rguenther@suse.de>
SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Jennifer Guild,
Dilip Upmanyu, Graham Norton HRB 21284 (AG Nuernberg)
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-01-16 12:15 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-21 21:53 [match-and-simplify] Remove printing "for expression" Prathamesh Kulkarni
2014-12-21 22:03 ` Prathamesh Kulkarni
2015-01-08 12:29 ` Richard Biener
2015-01-10 22:09 ` Prathamesh Kulkarni
2015-01-12 8:56 ` Richard Biener
2015-01-16 12:17 ` Prathamesh Kulkarni
2015-01-16 12:21 ` 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).