Re: [PATCH v2] machine descriptor: New compact syntax for insn and insn_split in Machine Descriptions.

2023-06-15 Thread Richard Sandiford via Gcc-patches
Richard Sandiford writes: >> + >> + /* Skip any newlines or whitespaces needed. */ >> + while (ISSPACE(*templ)) >> + templ++; >> + continue; >> + } >> + else if (templ[0] == '/' && templ[1] == '*') >> + { >> + templ += 2; >> + /*

Re: [PATCH v2] machine descriptor: New compact syntax for insn and insn_split in Machine Descriptions.

2023-06-14 Thread Richard Sandiford via Gcc-patches
Tamar Christina writes: > +The syntax rules are as follows: > +@itemize @bullet > +@item > +Templates must start with @samp{@{@@} to use the new syntax. > + > +@item > +@samp{@{@@} is followed by a layout in parentheses which is @samp{cons:} s/parentheses/square brackets/ > +followed by a

RE: [PATCH v2] machine descriptor: New compact syntax for insn and insn_split in Machine Descriptions.

2023-06-13 Thread Tamar Christina via Gcc-patches
Hi All, Updated patch with feedback addressed. Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. Any feedback? Thanks, Tamar gcc/ChangeLog: * gensupport.cc (class conlist, add_constraints, add_attributes, skip_spaces, expect_char, preprocess_compact_syntax,

Re: [PATCH v2] machine descriptor: New compact syntax for insn and insn_split in Machine Descriptions.

2023-06-08 Thread Mikael Morin
Le 08/06/2023 à 11:58, Tamar Christina via Gcc-patches a écrit : Hi, New version of the patch, I've omitted the explanation again  Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. Any feedback? Hello, this is not my area of expertise, but I saw the following: + /*

Re: [PATCH v2] machine descriptor: New compact syntax for insn and insn_split in Machine Descriptions.

2023-06-08 Thread Richard Sandiford via Gcc-patches
In addition to Andreas's and Richard's comments: Tamar Christina writes: > +@item > +@samp{@{@@} is followed by a layout in parentheses which is @samp{cons:} > followed by > +a list of @code{match_operand}/@code{match_scratch} comma operand numbers, > then a How about: a comma-separated

Re: [PATCH v2] machine descriptor: New compact syntax for insn and insn_split in Machine Descriptions.

2023-06-08 Thread Richard Earnshaw (lists) via Gcc-patches
On 08/06/2023 11:29, Richard Earnshaw (lists) via Gcc-patches wrote: On 08/06/2023 11:12, Andreas Schwab wrote: On Jun 08 2023, Tamar Christina via Gcc-patches wrote: @@ -713,6 +714,183 @@ you can use @samp{*} inside of a @samp{@@} multi-alternative template:   @end group   @end smallexample

Re: [PATCH v2] machine descriptor: New compact syntax for insn and insn_split in Machine Descriptions.

2023-06-08 Thread Richard Earnshaw (lists) via Gcc-patches
On 08/06/2023 11:12, Andreas Schwab wrote: On Jun 08 2023, Tamar Christina via Gcc-patches wrote: @@ -713,6 +714,183 @@ you can use @samp{*} inside of a @samp{@@} multi-alternative template: @end group @end smallexample +@node Compact Syntax +@section Compact Syntax +@cindex compact

Re: [PATCH v2] machine descriptor: New compact syntax for insn and insn_split in Machine Descriptions.

2023-06-08 Thread Andreas Schwab
On Jun 08 2023, Tamar Christina via Gcc-patches wrote: > @@ -713,6 +714,183 @@ you can use @samp{*} inside of a @samp{@@} > multi-alternative template: > @end group > @end smallexample > > +@node Compact Syntax > +@section Compact Syntax > +@cindex compact syntax > + > +In cases where the

RE: [PATCH v2] machine descriptor: New compact syntax for insn and insn_split in Machine Descriptions.

2023-06-08 Thread Tamar Christina via Gcc-patches
Hi, New version of the patch, I've omitted the explanation again  Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. Any feedback? Thanks, Tamar gcc/ChangeLog: * gensupport.cc (class conlist, add_constraints, add_attributes, create_missing_attributes,

Re: [PATCH v2] machine descriptor: New compact syntax for insn and insn_split in Machine Descriptions.

2023-06-06 Thread Richard Earnshaw (lists) via Gcc-patches
On 06/06/2023 13:49, Richard Sandiford via Gcc-patches wrote: Tamar Christina writes: int operand_number; /* Operand index in the big array. */ int output_format; /* INSN_OUTPUT_FORMAT_*. */ + bool compact_syntax_p; struct operand_data operand[MAX_MAX_OPERANDS];

Re: [PATCH v2] machine descriptor: New compact syntax for insn and insn_split in Machine Descriptions.

2023-06-06 Thread Richard Sandiford via Gcc-patches
Tamar Christina writes: >> >int operand_number; /* Operand index in the big array. */ >> >int output_format; /* INSN_OUTPUT_FORMAT_*. */ >> > + bool compact_syntax_p; >> >struct operand_data operand[MAX_MAX_OPERANDS]; }; >> > >> > @@ -700,12 +702,57 @@

RE: [PATCH v2] machine descriptor: New compact syntax for insn and insn_split in Machine Descriptions.

2023-06-06 Thread Tamar Christina via Gcc-patches
Hi, Thanks for the review, just some quick responses before I make the changes: > >int operand_number; /* Operand index in the big array. */ > >int output_format; /* INSN_OUTPUT_FORMAT_*. */ > > + bool compact_syntax_p; > >struct operand_data

Re: [PATCH v2] machine descriptor: New compact syntax for insn and insn_split in Machine Descriptions.

2023-06-06 Thread Richard Sandiford via Gcc-patches
Richard Sandiford writes: >> diff --git a/gcc/gensupport.h b/gcc/gensupport.h >> index >> a1edfbd71908b6244b40f801c6c01074de56777e..7925e22ed418767576567cad583bddf83c0846b1 >> 100644 >> --- a/gcc/gensupport.h >> +++ b/gcc/gensupport.h >> @@ -20,6 +20,7 @@ along with GCC; see the file COPYING3.

Re: [PATCH v2] machine descriptor: New compact syntax for insn and insn_split in Machine Descriptions.

2023-06-05 Thread Richard Sandiford via Gcc-patches
Looks good! Just some minor comments: Tamar Christina writes: > diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi > index > 6a435eb44610960513e9739ac9ac1e8a27182c10..1437ab55b260ab5c876e92d59ba39d24bffc6276 > 100644 > --- a/gcc/doc/md.texi > +++ b/gcc/doc/md.texi > @@ -27,6 +27,7 @@ See the next

[PATCH v2] machine descriptor: New compact syntax for insn and insn_split in Machine Descriptions.

2023-06-05 Thread Tamar Christina via Gcc-patches
Hi All, This patch adds support for a compact syntax for specifying constraints in instruction patterns. Credit for the idea goes to Richard Earnshaw. With this new syntax we want a clean break from the current limitations to make something that is hopefully easier to use and maintain. The idea