doc: Document order of define_peephole2 scanning
commit07527e3eabb00ada0e7c9e083084e4e56d97f34f
authorHans-Peter Nilsson <hp@axis.com>
Tue, 18 Apr 2023 17:37:21 +0000 (18 19:37 +0200)
committerHans-Peter Nilsson <hp@bitrange.com>
Fri, 5 May 2023 23:10:37 +0000 (6 01:10 +0200)
tree12b8a30b840cb9ff276061fdd3b11dafc6c47403
parent185da7c2014ba41f38dd62cc719873ebf020b076
doc: Document order of define_peephole2 scanning

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