On 12/01/2015 04:23 PM, Jakub Jelinek wrote:
On Tue, Dec 01, 2015 at 04:14:21PM +0100, Bernd Schmidt wrote:
One problem I have whenever I try to edit i386.md is that I can't find the
patterns I'm looking for. Let's say I'm looking for lshrsi3, but there's no
pattern by this name, what I'm looking for is "<shift_insn><mode>3". Even
worse are things like "*xordi_2", which has just "*<code><mode>_2" and can't
reasonably be searched for.

For this purpose there is
make mddump
goal which generates tmp-mddump.md in the object directory with expanded
iterators, where you can search for whatever you want.
With the comments in the *.md file I'd worry about them getting out of date,
or people feeling they have to edit them manually (rather than being
regenerated or whatever).

I suppose we could have a Makefile rule that checks for out-of-date comments (by redoing the annotation and running diff). That would also alleviate the second worry.

I'd much prefer the original source files to be searchable, because if I want to make modifications, I can't make them in tmp-mddump.md and going back and forth between two files is just inconvenient.


Bernd

Reply via email to