Re: Extend builtin fnspecs

2020-10-26 Thread Richard Biener
On Mon, 19 Oct 2020, Jan Hubicka wrote: > > > + /* True if memory reached by the argument is read. > > > + Valid only if all loads are known. */ > > > + bool > > > + arg_read_p (unsigned int i) > > > + { > > > +unsigned int idx = arg_idx (i); > > > +gcc_checking_assert (arg_specif

Re: Extend builtin fnspecs

2020-10-19 Thread Jan Hubicka
> > + /* True if memory reached by the argument is read. > > + Valid only if all loads are known. */ > > + bool > > + arg_read_p (unsigned int i) > > + { > > +unsigned int idx = arg_idx (i); > > +gcc_checking_assert (arg_specified_p (i)); > > +gcc_checking_assert (loads_known_p

Re: Extend builtin fnspecs

2020-10-16 Thread Jan Hubicka
> > @@ -122,7 +201,8 @@ public: > > unsigned int idx = arg_idx (i); > > gcc_checking_assert (arg_specified_p (i)); > > return str[idx] == 'w' || str[idx] == 'W' > > - || str[idx] == 'R' || str[idx] == 'r'; > > + || str[idx] == 'r' || str[idx] == 'R' > > + || str[idx] =

Re: Extend builtin fnspecs

2020-10-15 Thread Marek Polacek via Gcc-patches
On Thu, Oct 15, 2020 at 11:50:28PM +0200, Jan Hubicka wrote: > Hi, > this patch implements the discussed change to fnspecs to make it > possible to specify parameters that are read and written. In addition > to original plan I ended up adding 'b' for functions that are barriers > (since those alia

Extend builtin fnspecs

2020-10-15 Thread Jan Hubicka
Hi, this patch implements the discussed change to fnspecs to make it possible to specify parameters that are read and written. In addition to original plan I ended up adding 'b' for functions that are barriers (since those alias even with local refs) and 'o','O' for parameters that are written onl