Re: Why vectorization didn't turn on by -O2

2021-08-05 Thread Hongtao Liu via Gcc
On Thu, Aug 5, 2021 at 5:20 AM Segher Boessenkool wrote: > > On Wed, Aug 04, 2021 at 11:22:53AM +0100, Richard Sandiford wrote: > > Segher Boessenkool writes: > > > On Wed, Aug 04, 2021 at 10:10:36AM +0100, Richard Sandiford wrote: > > >> Richard Biener writes: > > >> > Alternatively only enable

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

2021-08-05 Thread John Ericson
On Thu, Aug 5, 2021, at 8:30 AM, Michael Matz wrote: > Hello, > > On Wed, 4 Aug 2021, John Ericson wrote: > > > 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,

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

2021-08-05 Thread Martin Sebor via Gcc
On 8/4/21 3:46 AM, Richard Earnshaw wrote: 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,

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

2021-08-05 Thread David Malcolm via Gcc
On Thu, 2021-08-05 at 20:27 +0530, Ankur Saini wrote: > > > > On 05-Aug-2021, at 4:56 AM, David Malcolm > > wrote: > > > > On Wed, 2021-08-04 at 21:32 +0530, Ankur Saini wrote: > > > > [...snip...] > > > > > > - From observation, a typical vfunc call that isn't devirtualised > > > by > > > th

gcc-9-20210805 is now available

2021-08-05 Thread GCC Administrator via Gcc
Snapshot gcc-9-20210805 is now available on https://gcc.gnu.org/pub/gcc/snapshots/9-20210805/ and on various mirrors, see http://gcc.gnu.org/mirrors.html for details. This snapshot has been generated from the GCC 9 git branch with the following options: git://gcc.gnu.org/git/gcc.git branch

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

2021-08-05 Thread Segher Boessenkool
On Thu, Aug 05, 2021 at 02:31:02PM +0530, Prathamesh Kulkarni wrote: > On Wed, 4 Aug 2021 at 18:30, 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 remo

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

2021-08-05 Thread Ankur Saini via Gcc
> On 05-Aug-2021, at 4:56 AM, David Malcolm wrote: > > 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_

Re: Noob question about simple customization of GCC.

2021-08-05 Thread David Malcolm via Gcc
On Wed, 2021-08-04 at 00:17 -0700, Alacaster Soi via Gcc wrote: > 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

Re: Suboptimal code generated for __buitlin_trunc on AMD64 without SS4_4.1

2021-08-05 Thread Gabriel Paubert
Hi, On Thu, Aug 05, 2021 at 01:58:12PM +0200, Stefan Kanthak wrote: > Gabriel Paubert wrote: > > > > On Thu, Aug 05, 2021 at 09:25:02AM +0200, Stefan Kanthak wrote: > >> Hi, > >> > >> targeting AMD64 alias x86_64 with -O3, GCC 10.2.0 generates the > >> following code (13 instructions u

Question about finding parameters in function bodies from SSA variables

2021-08-05 Thread Erick Ochoa via Gcc
Hello Richard, I'm still working on the points-to analysis and I am happy to say that after reviewing the ipa-cp code I was able to generate summaries for local variables, ssa variables, heap variables, global variables and functions. I am also using the callback hooks to find out if cgraph_nodes

Re: Suboptimal code generated for __buitlin_trunc on AMD64 without SS4_4.1

2021-08-05 Thread Gabriel Ravier via Gcc
On 8/5/21 11:42 AM, Gabriel Paubert wrote: On Thu, Aug 05, 2021 at 09:25:02AM +0200, Stefan Kanthak wrote: Hi, targeting AMD64 alias x86_64 with -O3, GCC 10.2.0 generates the following code (13 instructions using 57 bytes, plus 4 quadwords using 32 bytes) for __builtin_trunc() when -msse4.1 i

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

2021-08-05 Thread Michael Matz via Gcc
Hello, On Wed, 4 Aug 2021, John Ericson wrote: > 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

Re: Suboptimal code generated for __buitlin_trunc on AMD64 without SS4_4.1

2021-08-05 Thread Stefan Kanthak
Gabriel Paubert wrote: > On Thu, Aug 05, 2021 at 09:25:02AM +0200, Stefan Kanthak wrote: >> Hi, >> >> targeting AMD64 alias x86_64 with -O3, GCC 10.2.0 generates the >> following code (13 instructions using 57 bytes, plus 4 quadwords >> using 32 bytes) for __builtin_trunc() when -msse4.1 is NOT

Re: Function attribute to indicate a likely (or unlikely) return value

2021-08-05 Thread Martin Liška
On 7/25/21 7:33 PM, Dominique Pellé via Gcc wrote: Hi Hello. I read https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html but was left wondering: is there a way to annotate a function to indicate that a return value is likely (or unlikely)? Interesting idea :) No,

Re: Suboptimal code generated for __buitlin_trunc on AMD64 without SS4_4.1

2021-08-05 Thread Richard Biener via Gcc
On Thu, Aug 5, 2021 at 11:44 AM Gabriel Paubert wrote: > > On Thu, Aug 05, 2021 at 09:25:02AM +0200, Stefan Kanthak wrote: > > Hi, > > > > targeting AMD64 alias x86_64 with -O3, GCC 10.2.0 generates the > > following code (13 instructions using 57 bytes, plus 4 quadwords > > using 32 bytes) for __

Re: Suboptimal code generated for __buitlin_trunc on AMD64 without SS4_4.1

2021-08-05 Thread Gabriel Paubert
On Thu, Aug 05, 2021 at 09:25:02AM +0200, Stefan Kanthak wrote: > Hi, > > targeting AMD64 alias x86_64 with -O3, GCC 10.2.0 generates the > following code (13 instructions using 57 bytes, plus 4 quadwords > using 32 bytes) for __builtin_trunc() when -msse4.1 is NOT given: > >

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

2021-08-05 Thread Richard Earnshaw via Gcc
On 04/08/2021 18:59, Segher Boessenkool wrote: > 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:

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

2021-08-05 Thread Prathamesh Kulkarni via Gcc
On Wed, 4 Aug 2021 at 18:30, Richard Earnshaw wrote: > > 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

Suboptimal code generated for __buitlin_floor on AMD64 without SS4_4.1

2021-08-05 Thread Stefan Kanthak
Hi, targeting AMD64 alias x86_64 with -O3, GCC 10.2.0 generates the following code (19 instructions using 86 bytes, plus 6 quadwords using 48 bytes) for __builtin_floor() when -msse4.1 is NOT given: .text 0: f2 0f 10 15 10 00 00 00 movsd .LC1(%rip), %xmm2

Re: Suboptimal code generated for __buitlin_ceil on AMD64 without SS4_4.1

2021-08-05 Thread Hongtao Liu via Gcc
Could you file a bugzilla for that? https://gcc.gnu.org/bugzilla/enter_bug.cgi?product=gcc On Thu, Aug 5, 2021 at 3:34 PM Stefan Kanthak wrote: > > Hi, > > targeting AMD64 alias x86_64 with -O3, GCC 10.2.0 generates the > following code (17 instructions using 78 bytes, plus 6 quadwords > using 48

Suboptimal code generated for __buitlin_trunc on AMD64 without SS4_4.1

2021-08-05 Thread Stefan Kanthak
Hi, targeting AMD64 alias x86_64 with -O3, GCC 10.2.0 generates the following code (13 instructions using 57 bytes, plus 4 quadwords using 32 bytes) for __builtin_trunc() when -msse4.1 is NOT given: .text 0: f2 0f 10 15 10 00 00 00 movsd .LC1(%rip), %xmm2

Suboptimal code generated for __buitlin_ceil on AMD64 without SS4_4.1

2021-08-05 Thread Stefan Kanthak
Hi, targeting AMD64 alias x86_64 with -O3, GCC 10.2.0 generates the following code (17 instructions using 78 bytes, plus 6 quadwords using 48 bytes) for __builtin_ceil() when -msse4.1 is NOT given: .text 0: f2 0f 10 15 10 00 00 00 movsd .LC1(%rip), %xmm2

Suboptimal code generated for __buitlin_rint on AMD64 without SS4_4.1

2021-08-05 Thread Stefan Kanthak
Hi, targeting AMD64 alias x86_64 with -O3, GCC 10.2.0 generates the following code (12 instructions using 51 bytes, plus 4 quadwords using 32 bytes) for __builtin_rint() when -msse4.1 is NOT given: .text 0: f2 0f 10 15 10 00 00 00 movsd .LC1(%rip), %xmm2