public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Hans-Peter Nilsson <hp@axis.com>
To: Hans-Peter Nilsson <hp@axis.com>
Cc: <gcc-patches@gcc.gnu.org>
Subject: 2nd Ping: Re: [PATCH v3] doc: Document order of define_peephole2 scanning
Date: Thu, 4 May 2023 02:09:25 +0200	[thread overview]
Message-ID: <20230504000925.DD5C320437@pchp3.se.axis.com> (raw)
In-Reply-To: <20230426235524.7A13C20405@pchp3.se.axis.com> (message from Hans-Peter Nilsson on Thu, 27 Apr 2023 01:55:24 +0200)

Ping again.

> From: Hans-Peter Nilsson <hp@axis.com>
> Date: Thu, 27 Apr 2023 01:55:24 +0200
> 
> > From: Hans-Peter Nilsson <hp@axis.com>
> > Date: Wed, 19 Apr 2023 18:59:14 +0200
> [...]
> 
> > So again: Approvers: pdf output reviewed.  Ok to commit?
> > -- >8 --
> > I was a bit surprised when my newly-added define_peephole2 didn't
> > match, but it was because it was expected to partially match the
> > generated output of a previous define_peephole2, which matched and
> > modified the last insn of a sequence to be matched.  I had assumed
> > that the algorithm backed-up the size of the match-buffer, thereby
> > exposing newly created opportunities *with sufficient context* to all
> > define_peephole2's.  While things can change in that direction, let's
> > start with documenting the current state.
> > 
> > 	* doc/md.texi (define_peephole2): Document order of scanning.
> > ---
> >  gcc/doc/md.texi | 9 +++++++++
> >  1 file changed, 9 insertions(+)
> > 
> > diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi
> > index 07bf8bdebffb..300d104d58ab 100644
> > --- a/gcc/doc/md.texi
> > +++ b/gcc/doc/md.texi
> > @@ -9362,6 +9362,15 @@ If the preparation falls through (invokes neither @code{DONE} nor
> >  @code{FAIL}), then the @code{define_peephole2} uses the replacement
> >  template.
> >  
> > +Insns are scanned in forward order from beginning to end for each basic
> > +block.  Matches are attempted in order of @code{define_peephole2}
> > +appearance in the @file{md} file.  After a successful replacement,
> > +scanning for further opportunities for @code{define_peephole2}, resumes
> > +with the first generated replacement insn as the first insn to be
> > +matched against all @code{define_peephole2}.  For the example above,
> > +after its successful replacement, the first insn that can be matched by
> > +a @code{define_peephole2} is @code{(set (match_dup 4) (match_dup 1))}.
> > +
> >  @end ifset
> >  @ifset INTERNALS
> >  @node Insn Attributes
> > -- 
> > 2.30.2
> > 
> 

  reply	other threads:[~2023-05-04  0:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-18 17:55 [PATCH] " Hans-Peter Nilsson
2023-04-18 18:32 ` Paul Koning
2023-04-18 18:44   ` Hans-Peter Nilsson
2023-04-19  3:15     ` [PATCH v2] " Hans-Peter Nilsson
2023-04-19  4:06       ` Hans-Peter Nilsson
2023-04-19 16:59         ` [PATCH v3] " Hans-Peter Nilsson
     [not found]           ` <4E63CF4D-C355-4053-8EA4-5700C1B938E3@gmail.com>
2023-04-19 20:16             ` Bernhard Reutner-Fischer
2023-04-20  2:57               ` Hans-Peter Nilsson
2023-04-26 23:55           ` Ping: " Hans-Peter Nilsson
2023-05-04  0:09             ` Hans-Peter Nilsson [this message]
2023-05-04  9:45               ` 2nd " Richard Biener

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230504000925.DD5C320437@pchp3.se.axis.com \
    --to=hp@axis.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).