Re: daily report on extending static analyzer project [GSoC]

2021-08-04 Thread David Malcolm via Gcc
On Wed, 2021-08-04 at 21:32 +0530, Ankur Saini wrote: [...snip...] > > - From observation, a typical vfunc call that isn't devirtualised by > the compiler's front end looks something like this > "OBJ_TYPE_REF(_2;(struct A)a_ptr_5(D)->0) (a_ptr_5(D))" > where "a_ptr_5(D)" is pointer that is being

Re: Optional machine prefix for programs in for -B dirs, match ing Clang

2021-08-04 Thread John Ericson
On Wed, Aug 4, 2021, at 10:48 AM, Michael Matz wrote: > ... the 'as' and 'ld' executables should be simply found within the > version and target specific GCC libexecsubdir, possibly by being symlinks > to whatever you want. That's at least how my crosss are configured and > installed, without a

Re: [RFC] Adding a new attribute to function param to mark it as constant

2021-08-04 Thread Segher Boessenkool
On Wed, Aug 04, 2021 at 07:08:08PM +0200, Florian Weimer wrote: > * Segher Boessenkool: > > > On Wed, Aug 04, 2021 at 03:27:00PM +0100, Richard Earnshaw wrote: > >> On 04/08/2021 14:40, Segher Boessenkool wrote: > >> >On Wed, Aug 04, 2021 at 02:00:42PM +0100, Richard Earnshaw wrote: > >> >>We don'

Re: [RFC] Adding a new attribute to function param to mark it as constant

2021-08-04 Thread Florian Weimer via Gcc
* Segher Boessenkool: > On Wed, Aug 04, 2021 at 03:27:00PM +0100, Richard Earnshaw wrote: >> On 04/08/2021 14:40, Segher Boessenkool wrote: >> >On Wed, Aug 04, 2021 at 02:00:42PM +0100, Richard Earnshaw wrote: >> >>We don't want to have to resort to macros. Not least because at some >> >>point we

Re: [RFC] Adding a new attribute to function param to mark it as constant

2021-08-04 Thread Segher Boessenkool
On Wed, Aug 04, 2021 at 03:27:00PM +0100, Richard Earnshaw wrote: > On 04/08/2021 14:40, Segher Boessenkool wrote: > >On Wed, Aug 04, 2021 at 02:00:42PM +0100, Richard Earnshaw wrote: > >>We don't want to have to resort to macros. Not least because at some > >>point we want to replace the content

Re: daily report on extending static analyzer project [GSoC]

2021-08-04 Thread Ankur Saini via Gcc
AIM for today: - Extract out the pointer that is being used to call the vfunc from the current region. - Search it's regions to find out which subclass the pointer is actually pointing to. - Make use of this information to filter out one most probable call to function out of all of the possibl

Re: Re: Optional machine prefix for programs in for -B dirs, match ing Clang

2021-08-04 Thread Michael Matz
Hello, On Wed, 4 Aug 2021, John Ericson wrote: > > Doesn't GCC automatically look for those commands in the --prefix > > directory that you configure GCC with? Or is that only for native > > compilers? > > It will search only if --with-*=... was not passed, and it will never > prefix the quer

Re: [RFC] Adding a new attribute to function param to mark it as constant

2021-08-04 Thread Richard Earnshaw via Gcc
On 04/08/2021 14:40, Segher Boessenkool wrote: On Wed, Aug 04, 2021 at 02:00:42PM +0100, Richard Earnshaw wrote: We don't want to have to resort to macros. Not least because at some point we want to replace the content of arm_neon.h with a single #pragma directive to remove all the parsing o

Re: [RFC] Adding a new attribute to function param to mark it as constant

2021-08-04 Thread Segher Boessenkool
On Wed, Aug 04, 2021 at 02:00:42PM +0100, Richard Earnshaw wrote: > We don't want to have to resort to macros. Not least because at some > point we want to replace the content of arm_neon.h with a single #pragma > directive to remove all the parsing of the header that's needed. What's > more, if

Re: Optional machine prefix for programs in for -B dirs, matching Clang

2021-08-04 Thread Paul Koning via Gcc
> On Aug 4, 2021, at 3:32 AM, Jonathan Wakely via Gcc wrote: > > On Wed, 4 Aug 2021, 08:26 John Ericson wrote: > >> Problem: >> >> It's somewhat annoying to have to tell GCC --with-as=... --with-ld=... >> just to prefix those commands the same way GCC is prefixed. >> > > Doesn't GCC automa

Re: [RFC] Adding a new attribute to function param to mark it as constant

2021-08-04 Thread Richard Earnshaw via Gcc
On 04/08/2021 13:46, Segher Boessenkool wrote: > On Wed, Aug 04, 2021 at 05:20:58PM +0530, Prathamesh Kulkarni wrote: >> On Wed, 4 Aug 2021 at 15:49, Segher Boessenkool >> wrote: >>> Both __builtin_constant_p and __is_constexpr will not work in your use >>> case (since a function argument is not a

Re: [RFC] Adding a new attribute to function param to mark it as constant

2021-08-04 Thread Segher Boessenkool
On Wed, Aug 04, 2021 at 05:20:58PM +0530, Prathamesh Kulkarni wrote: > On Wed, 4 Aug 2021 at 15:49, Segher Boessenkool > wrote: > > Both __builtin_constant_p and __is_constexpr will not work in your use > > case (since a function argument is not a constant, let alone an ICE). > > It only becomes a

Re: [RFC] Adding a new attribute to function param to mark it as constant

2021-08-04 Thread Prathamesh Kulkarni via Gcc
On Wed, 4 Aug 2021 at 15:49, Segher Boessenkool wrote: > > On Wed, Aug 04, 2021 at 03:20:45PM +0530, Prathamesh Kulkarni wrote: > > On Wed, 4 Aug 2021 at 03:27, Segher Boessenkool > > wrote: > > > The Linux kernel has a macro __is_constexpr to test if something is an > > > integer constant expres

Re: [RFC] Adding a new attribute to function param to mark it as constant

2021-08-04 Thread Segher Boessenkool
On Wed, Aug 04, 2021 at 03:20:45PM +0530, Prathamesh Kulkarni wrote: > On Wed, 4 Aug 2021 at 03:27, Segher Boessenkool > wrote: > > The Linux kernel has a macro __is_constexpr to test if something is an > > integer constant expression, see . That is a much > > better idea imo. There could be a

Re: Add ops_num to targetm.sched.reassociation_width hook

2021-08-04 Thread Richard Biener via Gcc
On Wed, Aug 4, 2021 at 2:07 AM Aaron Sawdey wrote: > > Richard, > > So, I’m noticing that in get_reassociation_width() we know how many ops > (ops_num) are in the expression being considered for parallel reassociation, > but this is not passed to the target hook. In my testing this seems like it

Re: [RFC] Adding a new attribute to function param to mark it as constant

2021-08-04 Thread Prathamesh Kulkarni via Gcc
On Wed, 4 Aug 2021 at 03:27, Segher Boessenkool wrote: > > Hi! > > On Fri, Jul 23, 2021 at 04:23:42PM +0530, Prathamesh Kulkarni via Gcc wrote: > > The constraint here is that, vshl_n intrinsics require that the > > second arg (__b), > > should be an immediate value. > > Something that matches the

Re: [RFC] Adding a new attribute to function param to mark it as constant

2021-08-04 Thread Richard Earnshaw via Gcc
On 03/08/2021 18:44, Martin Sebor wrote: On 8/3/21 4:11 AM, Prathamesh Kulkarni via Gcc wrote: On Tue, 27 Jul 2021 at 13:49, Richard Biener wrote: On Mon, Jul 26, 2021 at 11:06 AM Prathamesh Kulkarni via Gcc wrote: On Fri, 23 Jul 2021 at 23:29, Andrew Pinski wrote: On Fri, Jul 23, 20

Re: Optional machine prefix for programs in for -B dirs, matching Clang

2021-08-04 Thread Jonathan Wakely via Gcc
On Wed, 4 Aug 2021 at 08:41, John Ericson wrote: > > On Wed, Aug 4, 2021, at 3:32 AM, Jonathan Wakely via Gcc wrote: > > > > Doesn't GCC automatically look for those commands in the --prefix directory > > that you configure GCC with? Or is that only for native compilers? > > > > It will search only

Re: Optional machine prefix for programs in for -B dirs, matching Clang

2021-08-04 Thread John Ericson
On Wed, Aug 4, 2021, at 3:32 AM, Jonathan Wakely via Gcc wrote: > > Doesn't GCC automatically look for those commands in the --prefix directory > that you configure GCC with? Or is that only for native compilers? > It will search only if --with-*=... was not passed, and it will never prefix the

Re: Optional machine prefix for programs in for -B dirs, matching Clang

2021-08-04 Thread Jonathan Wakely via Gcc
On Wed, 4 Aug 2021, 08:26 John Ericson wrote: > Problem: > > It's somewhat annoying to have to tell GCC --with-as=... --with-ld=... > just to prefix those commands the same way GCC is prefixed. > Doesn't GCC automatically look for those commands in the --prefix directory that you configure GCC wi

Optional machine prefix for programs in for -B dirs, matching Clang

2021-08-04 Thread John Ericson
Problem: It's somewhat annoying to have to tell GCC --with-as=... --with-ld=... just to prefix those commands the same way GCC is prefixed. In particular, when doing host-only build (skipping all target libraries), one otherwise doesn't need the target-specific binutils to be yet built, but --

Noob question about simple customization of GCC.

2021-08-04 Thread Alacaster Soi via Gcc
How hard would it be to add a tree-like structure and headers/sections to the -v gcc option so you can see the call structure. Would this be a reasonable first contribution/customization for a noob? It'll be a while before I can reasonably work on this. GCC version config | cc1 main.c | c