read_only access attribute as optimizer hint

2022-09-06 Thread Henrik Holst
Hi all, is there any reason why the access attribute is not used as hints to the optimizer? If we take this ancient example: void foo(const int *); int bar(void) { int x = 0; int y = 0; for (int i = 0; i < 10; i++) { foo(&x); y += x; // this load not optimized ou

Re: read_only access attribute as optimizer hint

2022-09-06 Thread Richard Biener via Gcc
> Am 06.09.2022 um 16:23 schrieb Henrik Holst : > > Hi all, > > is there any reason why the access attribute is not used as hints to the > optimizer? > > If we take this ancient example: > > void foo(const int *); > > int bar(void) > { >int x = 0; >int y = 0; > >for (int i =

Re: read_only access attribute as optimizer hint

2022-09-06 Thread Henrik Holst
Den tis 6 sep. 2022 kl 16:47 skrev Richard Biener < richard.guent...@gmail.com>: > > > > Am 06.09.2022 um 16:23 schrieb Henrik Holst < > henrik.ho...@millistream.com>: > > > > Hi all, > > > > is there any reason why the access attribute is not used as hints to the > > optimizer? > > > > If we ta

[RFC] database with API information

2022-09-06 Thread Ulrich Drepper via Gcc
I talked to Jonathan the other day about adding all the C++ library APIs to the name hint file now that the size of the table is not really a concern anymore. Jonathan mentioned that he has to create and maintain a similar file for the module support. It needs to list all the exported interfaces