How to migrate POINTER_TYPE_OVERFLOW_UNDEFINED for GCC v8.x?

2017-08-04 Thread Leslie Zhai
Hi GCC developers, As ChangeLog mentioned: 2017-08-01 Bin Cheng * tree.h (POINTER_TYPE_OVERFLOW_UNDEFINED): Delete. Then how to migrate it for GCC v8.x? for example: Constant *Result = POINTER_TYPE_OVERFLOW_UNDEFINED ? A : B; migrated to Constant *Result = A; because there was a pa

Re: RFC: C extension to support variable-length vector types

2017-08-04 Thread Richard Sandiford
Richard Biener writes: > On August 3, 2017 7:05:05 PM GMT+02:00, Richard Sandiford > wrote: >>Torvald Riegel writes: >>> On Wed, 2017-08-02 at 17:59 +0100, Richard Sandiford wrote: Torvald Riegel writes: > On Wed, 2017-08-02 at 14:09 +0100, Richard Sandiford wrote: >> (1) Does

Re: How to migrate POINTER_TYPE_OVERFLOW_UNDEFINED for GCC v8.x?

2017-08-04 Thread Bin.Cheng
On Fri, Aug 4, 2017 at 8:00 AM, Leslie Zhai wrote: > Hi GCC developers, > > As ChangeLog mentioned: > > 2017-08-01 Bin Cheng > > * tree.h (POINTER_TYPE_OVERFLOW_UNDEFINED): Delete. > > > Then how to migrate it for GCC v8.x? for example: > > Constant *Result = POINTER_TYPE_OVERFLOW_UNDEFINED

Re: How to migrate POINTER_TYPE_OVERFLOW_UNDEFINED for GCC v8.x?

2017-08-04 Thread Leslie Zhai
Hi Bin, Thanks for your kind response! 在 2017年08月04日 15:45, Bin.Cheng 写道: On Fri, Aug 4, 2017 at 8:00 AM, Leslie Zhai wrote: Hi GCC developers, As ChangeLog mentioned: 2017-08-01 Bin Cheng * tree.h (POINTER_TYPE_OVERFLOW_UNDEFINED): Delete. Then how to migrate it for GCC v8.x? fo

Re: RFC: C extension to support variable-length vector types

2017-08-04 Thread Richard Biener
On Fri, Aug 4, 2017 at 9:42 AM, Richard Sandiford wrote: > Richard Biener writes: >> On August 3, 2017 7:05:05 PM GMT+02:00, Richard Sandiford >> wrote: >>>Torvald Riegel writes: On Wed, 2017-08-02 at 17:59 +0100, Richard Sandiford wrote: > Torvald Riegel writes: > > On Wed, 2017-

Re: Overwhelmed by GCC frustration

2017-08-04 Thread Richard Earnshaw
On 03/08/17 13:11, Steven Bosscher wrote: > On Mon, Jul 31, 2017 at 6:49 PM, Joel Sherrill wrote: > >> >> Long ago, there was a code size regression tester for at least >> ARM. Is that still around? > > There used to be autotesters from CSiBE. Something still appears to > exist (http://www.csibe.

Re: Overwhelmed by GCC frustration

2017-08-04 Thread Claudiu Zissulescu
Maybe better is to use the updated CsIbe repo from github https://github.com/szeged/csibe. I use it for ARC to track the code size. Cheers, Claudiu On Fri, Aug 4, 2017 at 11:12 AM, Richard Earnshaw wrote: > On 03/08/17 13:11, Steven Bosscher wrote: >> On Mon, Jul 31, 2017 at 6:49 PM, Joel Sherri

Re: Overwhelmed by GCC frustration

2017-08-04 Thread Richard Earnshaw
On 04/08/17 10:38, Claudiu Zissulescu wrote: > Maybe better is to use the updated CsIbe repo from github > https://github.com/szeged/csibe. I use it for ARC to track the code > size. > Thanks for the link Claudiu. Personally I'll probably stick with the existing code as I now have size data for

Re: RFC: C extension to support variable-length vector types

2017-08-04 Thread Alexander Monakov
On Thu, 3 Aug 2017, Richard Biener wrote: > Btw., I did this once to represent constrained expressions on > multi-dimensional arrays in SSA form. There control (aka loop) structure was > also implicit. Google for 'middle-end array expressions'. The C interface > was builtins and VLAs. The descr

Re: broken link on this page https://gcc.gnu.org/gcc-7/changes.html for link to "Profile Mode" page:

2017-08-04 Thread Jonathan Wakely
On 2 August 2017 at 13:55, Sergei Kurenkov wrote: > Link on this page https://gcc.gnu.org/gcc-7/changes.html for "Profile Mode": > > * The libstdc++ Profile Mode has been deprecated and will be removed > in a future version. > > gives: > > Not Found > > The requested URL > /onlinedocs/gcc-7.1.0/lib

Re: RFC: C extension to support variable-length vector types

2017-08-04 Thread Richard Biener
On Fri, Aug 4, 2017 at 12:46 PM, Alexander Monakov wrote: > On Thu, 3 Aug 2017, Richard Biener wrote: >> Btw., I did this once to represent constrained expressions on >> multi-dimensional arrays in SSA form. There control (aka loop) structure was >> also implicit. Google for 'middle-end array ex

help with PR78809 - inline strcmp for small constant strings

2017-08-04 Thread Prathamesh Kulkarni
Hi, I was having a look at PR78809. For the test-case: int t1(const char *s) { return __builtin_strcmp (s, "a"); } for aarch64, trunk with -O2 generates: t1: adrpx1, .LANCHOR0 add x1, x1, :lo12:.LANCHOR0 b strcmp For i386, it seems strcmp is expanded inline v

Re: void function declared attribute const

2017-08-04 Thread Jonathan Wakely
On 02/08/17 15:41 -0600, Martin Sebor wrote: Hi Honza, While testing improvements to GCC attribute handling I came across the warning below: In file included from /ssd/src/gcc/81544/libstdc++-v3/src/c++98/mt_allocator.cc:31:0: /ssd/build/gcc-81544/x86_64-pc-linux-gnu/libstdc++-v3/include/ext/m

Upstreaming very old changes

2017-08-04 Thread coypu
Hi, GCC! I believe netbsd is the primary user of the vax target. its status is: good: netbsd uses gcc 5.4.0, and cross compiles its userland+kernel with this. it runs and is also able to natively build useful programs like perl. bad: -O0 in places, text relocations. obvious signs of more bugs no

Re: layout of __attribute__((packed)) vs. #pragma pack

2017-08-04 Thread Jim Wilson
On 07/28/2017 04:51 AM, Geza Herman wrote: There's an option in GCC "-mms-bitfields". The doc about it begins with: "If packed is used on a structure, or if bit-fields are used, it may be that the Microsoft ABI lays out the structure differently than the way GCC normally does. Particularly whe

Re: Upstreaming very old changes

2017-08-04 Thread Jeff Law
On 08/04/2017 11:20 AM, co...@sdf.org wrote: > Hi, GCC! > > I believe netbsd is the primary user of the vax target. its status is: > > good: netbsd uses gcc 5.4.0, and cross compiles its userland+kernel with > this. it runs and is also able to natively build useful programs like perl. > > bad: -

Re: help with PR78809 - inline strcmp for small constant strings

2017-08-04 Thread Richard Henderson
On 08/04/2017 05:59 AM, Prathamesh Kulkarni wrote: > Hi, > I was having a look at PR78809. > For the test-case: > int t1(const char *s) { return __builtin_strcmp (s, "a"); } > > for aarch64, trunk with -O2 generates: > t1: > adrpx1, .LANCHOR0 > add x1, x1, :lo12:.LANCHOR0 >

Re: x86 branches vs conditional moves

2017-08-04 Thread Steven Bosscher
On Sat, Jul 8, 2017 at 1:30 AM, Michael Clark wrote: > Why does gcc branch on _Bool, but emits a conditional move for an integer? > can it emit cmovne instead of branching? also curious where one would change > this to learn about GCC internals. The RTL generated for the int and _Bool case is di

Re: help with PR78809 - inline strcmp for small constant strings

2017-08-04 Thread Wilco Dijkstra
Richard Henderson wrote:  > On 08/04/2017 05:59 AM, Prathamesh Kulkarni wrote: > > For i386, it seems strcmp is expanded inline via cmpstr optab by > > expand_builtin_strcmp if one of the strings is constant. Could we similarly > > define cmpstr pattern for AArch64? > > Certainly that's possi

Re: help with PR78809 - inline strcmp for small constant strings

2017-08-04 Thread Richard Henderson
On 08/04/2017 01:38 PM, Wilco Dijkstra wrote: >> For constant strings of small length (upto 3?), I was wondering if it'd be a >> good idea to manually unroll strcmp loop, similar to __strcmp_* macros in >> bits/string.h?> >> For eg in gimple-fold, transform >> x = __builtin_strcmp(s, "ab") >> to >>

Re: help with PR78809 - inline strcmp for small constant strings

2017-08-04 Thread Segher Boessenkool
On Fri, Aug 04, 2017 at 08:38:11PM +, Wilco Dijkstra wrote: > Richard Henderson wrote:  > > On 08/04/2017 05:59 AM, Prathamesh Kulkarni wrote: > > > > For i386, it seems strcmp is expanded inline via cmpstr optab by > > > expand_builtin_strcmp if one of the strings is constant. Could we >