Re: [PATCH] tree-optimization/99912 - delete trivially dead stmts during DSE

2021-04-27 Thread Richard Biener
On Tue, 27 Apr 2021, Prathamesh Kulkarni wrote: > On Tue, 27 Apr 2021 at 19:19, Richard Biener wrote: > > > > DSE performs a backwards walk over stmts removing stores but it > > leaves removing resulting dead SSA defs to later passes. This > > eats into its own alias walking budget if the

[PATCH 1/1] PR100281 Fix SImode pointer handling

2021-04-27 Thread Andreas Krebbel via Gcc-patches
The problem appears to be triggered by two locations in the front-end where non-POINTER_SIZE pointers aren't handled right now. 1. An assertion in strip_typedefs is triggered because the alignment of the types don't match. This in turn is caused by creating the new type with build_pointer_type

[PATCH v2] IBM Z: Handle hard registers in s390_md_asm_adjust()

2021-04-27 Thread Ilya Leoshkevich via Gcc-patches
Bootstrapped and regtested on s390x-redhat-linux. Tested with valgrind too (PR 100278 is now fixed). Ok for master? v1: https://gcc.gnu.org/pipermail/gcc-patches/2021-April/568771.html v1 -> v2: Use the UNSPEC pattern, which is less efficient, but is more on the "obviously correct"

Re: [PATCH] Synchronize Rocket Lake's processor_names and processor_cost_table with processor_type

2021-04-27 Thread Hongtao Liu via Gcc-patches
On Tue, Apr 27, 2021 at 9:28 AM Hongtao Liu wrote: > > On Mon, Apr 26, 2021 at 8:35 PM Uros Bizjak via Gcc-patches > wrote: > > > > On Sat, Apr 24, 2021 at 3:43 PM Cui, Lili wrote: > > > > > > Hi Uros, > > > > > > This patch is to synchronize Rocket Lake's processor_names and > > >

[PATCH v2 14/21] libcc1: share basic context code

2021-04-27 Thread Tom Tromey
Both plugins in libcc1 share a fair amount of boilerplate. They both share error-emission code, context management code, and tree GC code. This patch unifies these two bodies of code, avoiding needless duplication. libcc1/ChangeLog 2021-04-27 Tom Tromey * libcc1plugin.cc: Move code

[PATCH v2 11/21] libcc1: unify compiler handling

2021-04-27 Thread Tom Tromey
Both libcc1 plugins have nearly identical copies of code to find the underlying compiler. This seemed wasteful to me, so this patch unifies the copies. Two minor API changes were needed. First, the old code used a back-link from the compiler object to the plugin object to check the 'verbose'

[PATCH v2 19/21] libcc1: use variadic templates for callbacks

2021-04-27 Thread Tom Tromey
This patch completes the transition of libcc1 from the use of separate template functions for different arities to the use of variadic functions. This is how I had wanted it to work from the very beginning, and is possible now with C++11. I had thought that variadic callbacks required C++17, but

[PATCH v2 21/21] libcc1: avoid a call to c_str

2021-04-27 Thread Tom Tromey
This is a trivial change to libcc1 to avoid an explicit call to c_str. Passing by const reference is slightly less wordy. libcc1/ChangeLog 2021-04-27 Tom Tromey * compiler.cc (make_regexp): Take const std::string. (cc1_plugin::compiler_triplet_regexp::find): Update. ---

[PATCH v2 13/21] libcc1: use static_assert

2021-04-27 Thread Tom Tromey
This changes one spot in libcc1 to use static_assert rather than the old-style array declaration. libcc1/ChangeLog 2021-04-27 Tom Tromey * libcp1plugin.cc: Use static assert. --- libcc1/ChangeLog | 4 libcc1/libcp1plugin.cc | 4 ++-- 2 files changed, 6 insertions(+), 2

[PATCH v2 15/21] libcc1: share GDB plugin code

2021-04-27 Thread Tom Tromey
The two GDB plugins in libcc1 share a fair amount of code. This was done by copy-and-paste, though in reality the underlying code is nearly identical. libcc1/ChangeLog 2021-04-27 Tom Tromey * libcp1.cc (struct libcp1): Derive from base_gdb_plugin. Remove shared code.

[PATCH v2 17/21] libcc1: share the GCC interface code

2021-04-27 Thread Tom Tromey
Both the C and C++ side of the GDB plugin in libcc1 share a lot of code relating to the base GCC interface. It was all copy-and-pasted, but is essentially identical between the two. This is by design, as the base GCC API is intended to be shared. This patch merges the implementations into

[PATCH v2 16/21] libcc1: use GCC_FE_VERSION_1 in C++ plugin

2021-04-27 Thread Tom Tromey
The C++ plugin defaults to version 0 of the base compiler API. However, this is a mistake -- version 1 was introduced before the C++ API was even implemented. This switches the default to version 1. Note that the compiler-side plugin will accept this version, so it should remain compatible.

[PATCH v2 18/21] libcc1: fix a memory leak

2021-04-27 Thread Tom Tromey
libcc1 has a memory leak when calling fork_exec -- it allocates a new vector of arguments, but then does not free it anywhere. This patch changes this code to use std::vector instead. Note that the previous code tried to avoid bad_alloc. I don't believe this is very important. For one thing,

[PATCH v2 20/21] libcc1: avoid extra string copies

2021-04-27 Thread Tom Tromey
PR c/94669 points out that a couple of spots in libcc1 take a std::string where a reference would do. This changes these spots to take a const char *, to reduce the number of copies. libcc1/ChangeLog 2021-04-27 Tom Tromey PR c/94669: * compiler.hh (compiler_driver_filename):

[PATCH v2 12/21] libcc1: use foreach

2021-04-27 Thread Tom Tromey
This changes libcc1 to ues foreach in a couple of spots. libcc1/ChangeLog 2021-04-27 Tom Tromey * libcp1plugin.cc (plugin_context::mark): Use foreach. * libcc1plugin.cc (plugin_context::mark): Use foreach. --- libcc1/ChangeLog | 5 + libcc1/libcc1plugin.cc | 13

[PATCH v2 09/21] libcc1: add more uses of 'deleter'

2021-04-27 Thread Tom Tromey
This changes libcc1 to use the 'deleter' template in a few more places. The template and basic specializations are moved to a new header, then some unmarshall functions are changed to use this code. This change avoids the need to repeat cleanup code in the unmarshallers. libcc1/ChangeLog

[PATCH v2 10/21] libcc1: use unique_ptr more

2021-04-27 Thread Tom Tromey
This changes libcc1 to use unique_ptr in a few more places, removing some manual memory management. libcc1/ChangeLog 2021-04-27 Tom Tromey * libcp1.cc (struct libcp1) : Use unique_ptr. (~libcp1): Remove. (libcp1_compile, libcp1_set_triplet_regexp)

[PATCH v2 08/21] libcc1: add deleter objects

2021-04-27 Thread Tom Tromey
This adds deleter objects for various kinds of protocol pointers to libcc1. Existing specializations of argument_wrapper are then replaced with a single specialization that handles all pointer types via the appropriate deleter. The result here is a bit nicer because the argument_wrapper

[PATCH v2 07/21] libcc1: use std::vector when building function types

2021-04-27 Thread Tom Tromey
This changes libcc1 to use std::vector in the code that builds function types. This avoids some explicit memory management. libcc1/ChangeLog 2021-04-27 Tom Tromey * libcp1plugin.cc (plugin_build_function_type): Use std::vector. * libcc1plugin.cc (plugin_build_function_type):

[PATCH v2 05/21] libcc1: use variadic templates for "call"

2021-04-27 Thread Tom Tromey
This changes libcc1 to use variadic templates for the "call" functions. The primary benefit is that this simplifies the code. libcc1/ChangeLog 2021-04-27 Tom Tromey * rpc.hh (call): Use variadic template. Remove overloads. * marshall.hh (marshall): Add base overload. Use

[PATCH v2 06/21] libcc1: use variadic templates for "rpc"

2021-04-27 Thread Tom Tromey
This changes libcc1 to use variadic templates for the "rpc" functions. This simplifies the code and removes some possibility for mistakes. libcc1/ChangeLog 2021-04-27 Tom Tromey * libcp1.cc (rpc): Use variadic template. Remove overloads. * libcc1.cc (rpc): Use variadic

[PATCH v2 04/21] libcc1: delete copy constructor and assignment operators

2021-04-27 Thread Tom Tromey
Change libcc1 to use "= delete" for the copy constructor and assignment operator, rather than the old approach of private methods that are nowhere defined. libcc1/ChangeLog 2021-04-27 Tom Tromey * rpc.hh (argument_wrapper): Use delete for copy constructor. * connection.hh

[PATCH v2 02/21] libcc1: use "override"

2021-04-27 Thread Tom Tromey
This changes libcc1 to use "override" where appropriate. libcc1/ChangeLog 2021-04-27 Tom Tromey * libcp1.cc (class compiler_triplet_regexp) (class compiler_driver_filename, class libcp1_connection): Use "override". * libcc1.cc (class compiler_triplet_regexp)

[PATCH v2 03/21] libcc1: inline some simple methods

2021-04-27 Thread Tom Tromey
This changes libcc1 to inline a trivial method and to use the default constructor. libcc1/ChangeLog 2021-04-27 Tom Tromey * connection.hh (~connection): Use default. (print): Inline. * connection.cc (cc1_plugin::connection::~connection)

[PATCH v2 01/21] libcc1: use templates to unmarshall enums

2021-04-27 Thread Tom Tromey
Now that C++11 can be used in GCC, libcc1 can be changed to use templates and type traits to handle unmarshalling all kinds of enums. libcc1/ChangeLog 2021-04-27 Tom Tromey * marshall.hh (cc1_plugin::unmarshall): Use type traits. * marshall-cp.hh (cc1_plugin::unmarshall):

[PATCH v2 00/21] C++11-based improvements for libcc1

2021-04-27 Thread Tom Tromey
Here is v2 of my series to simplify libcc1 through the use of C++11 constructs. v1 is here: https://gcc.gnu.org/pipermail/gcc-patches/2021-January/562668.html I never pinged it because I'd sent it in the wrong stage. As with v1, this brings libcc1 much closer to how I originally wanted it

Re: [PATCH 1/5 ver4] RS6000: Add 128-bit Integer Operations

2021-04-27 Thread will schmidt via Gcc-patches
On Mon, 2021-04-26 at 09:35 -0700, Carl Love wrote: > Will, Segher: > > This patch fixes the order of the argument in the vec_rlmi and > vec_rlnm builtins. The patch also adds a new test cases to verify > the fix. > > The patch has been tested on > powerpc64-linux instead (Power 8 BE) >

Re: [PATCH 3/5 ver4] RS6000: Add TI to TD (128-bit DFP) and TD to TI support

2021-04-27 Thread will schmidt via Gcc-patches
On Mon, 2021-04-26 at 09:36 -0700, Carl Love wrote: > Will, Segher: > Hi, > This patch adds support for converting to/from 128-bit integers and > 128-bit decimal floating point formats. You reference TI,TD in the subject, would be helpful to elaborate a bit in your description. > > The

Re: [PATCH 4/5 ver4] RS6000, Add test 128-bit shifts for just the int128 type.

2021-04-27 Thread will schmidt via Gcc-patches
On Mon, 2021-04-26 at 09:36 -0700, Carl Love wrote: > Will, Segher: > > The previous patch added the vector 128-bit integer shift instruction > support for the V1TI type. This patch renames and moves the VSX_TI > iterator from vsx.md to VEC_TI in vector.md. The uses of VEC_TI are > also

Re: [PATCH 2/5 ver4] RS6000: Add 128-bit Integer Operations

2021-04-27 Thread will schmidt via Gcc-patches
On Mon, 2021-04-26 at 09:36 -0700, Carl Love wrote: > Will, Segher: > > This patch adds the 128-bit integer support for divide, modulo, shift, > compare of 128-bit integers instructions and builtin support. Hi, > > The patch has been tested on > powerpc64-linux instead (Power 8 BE) >

Re: [PATCH 5/5 ver4] RS6000: Conversions between 128-bit integer and floating point values.

2021-04-27 Thread will schmidt via Gcc-patches
On Mon, 2021-04-26 at 09:36 -0700, Carl Love wrote: > Will, Segher: > > This patch adds support for converting to/from 128-bit integers and > 128-bit decimal floating point formats using the new P10 instructions > dcffixqq and dctfixqq. The new instructions are only used on P10 HW, > otherwise

Re: [PATCH v11] Practical improvement to libgcc complex divide

2021-04-27 Thread Joseph Myers
This patch version is OK. -- Joseph S. Myers jos...@codesourcery.com

[PATCH,AIX] Alias -m64 to -maix64 and -m32 to -maix32

2021-04-27 Thread David Edelsohn via Gcc-patches
GCC on AIX historically has used -maix64 and -maix32 to switch to 64 bit mode or 32 bit mode, unlike other ports that use -m64 and -m32. The Alias() directive for options cannot be used because aix64 is expected in multiple parts of the compiler infrastructure and one cannot

Re: [PATCH] libstdc++: Fix various bugs in ranges_algo.h [PR100187, ...]

2021-04-27 Thread Jonathan Wakely via Gcc-patches
On Tue, 27 Apr 2021, 21:37 Patrick Palka via Libstdc++, < libstd...@gcc.gnu.org> wrote: > This fixes some bugs with our ranges algorithms in uncommon situations, > such as when the return type of a predicate is a non-copyable class type > that's implicitly convertible to bool (PR100187), when a

Re: [PATCH] avoid dereferencing a null pointer (PR 100250)

2021-04-27 Thread Jeff Law via Gcc-patches
On 4/26/2021 5:30 PM, Martin Sebor via Gcc-patches wrote: The VLA bounds that are included by the C front end to attribute access added to functions with VLA parameters to help detect redeclaratations of function with "mismatched" VLA bounds are cleared by the free_lang_data pass before the IL

Re: fix asm-not pattern in dwarf2/inline5.c

2021-04-27 Thread Jeff Law via Gcc-patches
On 4/27/2021 9:32 AM, Alexandre Oliva wrote: The test is supposed to check that the abstract lexical block of a function that was inlined doesn't have attributes, and that the concrete inlined lexical block does. There are two patterns to verify the absence of attributes in the abstract

[PATCH] PR fortran/100274 - [9/10/11/12 Regression] ICE in gfc_conv_procedure_call, at fortran/trans-expr.c:6131

2021-04-27 Thread Harald Anlauf via Gcc-patches
Dear Fortranners, Gerhard found a case where the mismatch of actual and formal argument lead to an ICE instead of the relevant warning. Furthermore, the special case of character argument avoided the check that the actual argument must be definable if the formal one is INTENT-OUT or -INOUT. The

[PATCH] move pass free_lang_data to its own file

2021-04-27 Thread Martin Sebor via Gcc-patches
The free_lang_data pass is defined entirely in tree.c. Its code changes only rarely (only 13% commits to tree.c), and unlike the rest of tree.c, is even more rarely read. The pass is also right in the middle of tree.c, surrounded by various utility functions many of which do tend to be

Re: [gcc r11-8294] c++: Remove #error for release builds

2021-04-27 Thread Jakub Jelinek via Gcc-patches
On Tue, Apr 27, 2021 at 08:46:21PM +, Joseph Myers wrote: > On Tue, 27 Apr 2021, Jakub Jelinek via Gcc-cvs wrote: > > > https://gcc.gnu.org/g:50bc9185c2821350f0b785d6e23a6e9dcde58466 > > > > commit r11-8294-g50bc9185c2821350f0b785d6e23a6e9dcde58466 > > Author: Jakub Jelinek > > Date: Tue

Re: [gcc r11-8294] c++: Remove #error for release builds

2021-04-27 Thread Joseph Myers
On Tue, 27 Apr 2021, Jakub Jelinek via Gcc-cvs wrote: > https://gcc.gnu.org/g:50bc9185c2821350f0b785d6e23a6e9dcde58466 > > commit r11-8294-g50bc9185c2821350f0b785d6e23a6e9dcde58466 > Author: Jakub Jelinek > Date: Tue Apr 27 11:37:30 2021 +0200 > > c++: Remove #error for release builds >

Re: omit frame pointer in pr89676

2021-04-27 Thread Jeff Law via Gcc-patches
On 4/27/2021 9:35 AM, Alexandre Oliva wrote: This i386 test expects only two movl instructions. In configurations that --enable-frame-pointer, -O2 won't implicitly enable -fomit-frame-pointer, so we end up with a third movl to set up the frame pointer. This patch enables -fomit-frame-pointer

Recent change breaking Wrestrict8 on various targets

2021-04-27 Thread Jeff Law via Gcc-patches
This change: d8e1f1d24179690fd9c0f63c27b12e030010d9ea is the first bad commit commit d8e1f1d24179690fd9c0f63c27b12e030010d9ea Author: Richard Biener Date:   Wed Apr 7 12:09:44 2021 +0200     tree-optimization/99912 - schedule DSE before SRA     For the testcase in the PR the main SRA pass is

[pushed] c++: -Wdeprecated-copy and using operator= [PR92145]

2021-04-27 Thread Jason Merrill via Gcc-patches
For the purpose of [depr.impldec] "if the class has a user-declared copy assignment operator", an operator= brought in from a base class with 'using' may be a copy-assignment operator, but it isn't a copy-assignment operator for the derived class. Tested x86_64-pc-linux-gnu, applying to trunk.

Re: [DWARF] Fix signedness issue in DWARF functions (2)

2021-04-27 Thread Eric Botcazou
> Yes, but even bitsizetype is undistinguishable from other (usually 2 * > pointer size) precision integral types. OK, I can propose the attached patch. The typed_binop_from_tree computation works on my Ada testcase in 32-bit mode from within GDB, but not in 64-bit mode because GDB chokes

Re: [PATCH 0/3] VAX backend preparatory updates for switching to LRA

2021-04-27 Thread Maciej W. Rozycki
On Thu, 22 Apr 2021, Richard Biener wrote: > > I think 3/3 is worth backporting to GCC 11 at one point, perhaps 11.2, so > > that it can be easily picked downstream, as it improves code generation > > with old reload and we may not have another major release still using it. > > > > OTOH

Re: fix asm-not pattern in dwarf2/inline5.c

2021-04-27 Thread Mike Stump via Gcc-patches
On Apr 27, 2021, at 8:32 AM, Alexandre Oliva wrote: > > The test is supposed to check that the abstract lexical block of a > function that was inlined doesn't have attributes, and that the > concrete inlined lexical block does. > The problem is that '[.../...]+ +[^(].*' matches '/ (DIE...',

Re: [PATCH 0/6] Add missing calls to `onlyjump_p'

2021-04-27 Thread Maciej W. Rozycki
On Tue, 8 Dec 2020, Maciej W. Rozycki wrote: > On Thu, 3 Dec 2020, Jeff Law wrote: > > > > Note that I have included unrelated though contextually connected 6/6 as > > > an RFC to verify whether this potential anomaly I have spotted has been > > > intentional. I'll be happy to drop it if that

Re: [PATCH 2/2] bpf: allow BSS symbols to be global symbols

2021-04-27 Thread Jose E. Marchesi via Gcc-patches
Hi David. >> Hi YiFei. >> >>> Prior to this, a BSS declaration such as: >>> >>> int foo; >>> static int bar; >>> >>> Generates: >>> >>> .global foo >>> .local foo >>> .comm foo,4,4 >>> .local bar >>> .comm bar,4,4 >>> >>> Creating symbols: >>> >>> b

Re: [PATCH 01/57] Allow targets to specify build dependencies for out_object_file

2021-04-27 Thread Bill Schmidt via Gcc-patches
On 4/27/21 11:47 AM, Jakub Jelinek wrote: On Tue, Apr 27, 2021 at 11:14:00AM -0500, Bill Schmidt wrote: On 4/27/21 10:57 AM, Jakub Jelinek wrote: On Tue, Apr 27, 2021 at 10:32:36AM -0500, Bill Schmidt wrote: 2021-03-03 Bill Schmidt gcc/ * Makefile.in (OUT_FILE_DEPS): New variable.

Re: [PATCH 2/2] bpf: allow BSS symbols to be global symbols

2021-04-27 Thread David Faust via Gcc-patches
On 4/22/21 11:54 PM, Jose E. Marchesi via Gcc-patches wrote: > > Hi YiFei. > >> Prior to this, a BSS declaration such as: >> >> int foo; >> static int bar; >> >> Generates: >> >> .global foo >> .local foo >> .comm foo,4,4 >> .local bar >> .commbar,4,4 >> >> Creating

Re: omit frame pointer in pr89676

2021-04-27 Thread Uros Bizjak via Gcc-patches
On Tue, Apr 27, 2021 at 5:35 PM Alexandre Oliva wrote: > > > This i386 test expects only two movl instructions. > > In configurations that --enable-frame-pointer, -O2 won't implicitly > enable -fomit-frame-pointer, so we end up with a third movl to set up > the frame pointer. > > This patch

Re: RFC: Changing AC_PROG_CC to AC_PROG_CC_C99 in top level configure

2021-04-27 Thread Joseph Myers
On Tue, 27 Apr 2021, Nick Clifton via Binutils wrote: > > and instead AC_PROG_CC enables C11 mode if supported. (So moving to the > > latest Autoconf and Automake releases would supersede this change.) > > Makes sense. Is changing to autoconf 2.70 something that is planned for the > near

[PATCH] libstdc++: Fix various bugs in ranges_algo.h [PR100187, ...]

2021-04-27 Thread Patrick Palka via Gcc-patches
This fixes some bugs with our ranges algorithms in uncommon situations, such as when the return type of a predicate is a non-copyable class type that's implicitly convertible to bool (PR100187), when a comparison predicate isn't invocable as an rvalue (PR100237), and when the return type of a

Re: [PATCH] Fix handling of VEC_COND_EXPR trap tests [PR100284]

2021-04-27 Thread Richard Biener
On April 27, 2021 5:22:56 PM GMT+02:00, Richard Sandiford wrote: >Richard Biener writes: >> On April 27, 2021 5:12:35 PM GMT+02:00, Richard Sandiford > wrote: >>>Now that VEC_COND_EXPR has normal unnested operands, >>>operation_could_trap_p can treat it like any other expression. >>> >>>This

Re: [PATCH 01/57] Allow targets to specify build dependencies for out_object_file

2021-04-27 Thread Jakub Jelinek via Gcc-patches
On Tue, Apr 27, 2021 at 11:14:00AM -0500, Bill Schmidt wrote: > On 4/27/21 10:57 AM, Jakub Jelinek wrote: > > On Tue, Apr 27, 2021 at 10:32:36AM -0500, Bill Schmidt wrote: > > > 2021-03-03 Bill Schmidt > > > > > > gcc/ > > > * Makefile.in (OUT_FILE_DEPS): New variable. > > >

Re: [PATCH 01/57] Allow targets to specify build dependencies for out_object_file

2021-04-27 Thread Bill Schmidt via Gcc-patches
On 4/27/21 10:57 AM, Jakub Jelinek wrote: On Tue, Apr 27, 2021 at 10:32:36AM -0500, Bill Schmidt wrote: 2021-03-03 Bill Schmidt gcc/ * Makefile.in (OUT_FILE_DEPS): New variable. (out_object_file): Depend on OUT_FILE_DEPS. Why? E.g. gcc/config/i386/t-i386 contains: i386.o:

Re: [PATCH] tree-optimization/99912 - delete trivially dead stmts during DSE

2021-04-27 Thread Prathamesh Kulkarni via Gcc-patches
On Tue, 27 Apr 2021 at 19:19, Richard Biener wrote: > > DSE performs a backwards walk over stmts removing stores but it > leaves removing resulting dead SSA defs to later passes. This > eats into its own alias walking budget if the removed stores kept > loads live. The following patch adds

Re: [PATCH 01/57] Allow targets to specify build dependencies for out_object_file

2021-04-27 Thread Jakub Jelinek via Gcc-patches
On Tue, Apr 27, 2021 at 10:32:36AM -0500, Bill Schmidt wrote: > 2021-03-03 Bill Schmidt > > gcc/ > * Makefile.in (OUT_FILE_DEPS): New variable. > (out_object_file): Depend on OUT_FILE_DEPS. Why? E.g. gcc/config/i386/t-i386 contains: i386.o: i386-builtin-types.inc Similarly

Re: [PATCH] define auto_vec copy ctor and assignment (PR 90904)

2021-04-27 Thread Martin Sebor via Gcc-patches
On 4/27/21 8:04 AM, Richard Biener wrote: On Tue, Apr 27, 2021 at 3:59 PM Martin Sebor wrote: On 4/27/21 1:58 AM, Richard Biener wrote: On Tue, Apr 27, 2021 at 2:46 AM Martin Sebor via Gcc-patches wrote: PR 90904 notes that auto_vec is unsafe to copy and assign because the class manages

Re: [PATCH] libstdc++: Fix up lambda in join_view::_Iterator::operator++ [PR100290]

2021-04-27 Thread Jonathan Wakely via Gcc-patches
On 27/04/21 10:55 -0400, Patrick Palka via Libstdc++ wrote: Currently, the return type of this lambda is decltype(auto), so it ends up returning a copy of _M_parent->_M_inner rather than a reference to it when _S_ref_glvalue is false. Hence _M_inner and ranges::end(__inner_range) are

[PATCH 42/57] rs6000: Handle overloads during program parsing

2021-04-27 Thread Bill Schmidt via Gcc-patches
Although this patch looks quite large, the changes are fairly minimal. Most of it is duplicating the large function that does the overload resolution using the automatically generated data structures instead of the old hand-generated ones. This doesn't make the patch terribly easy to review,

[PATCH 21/57] rs6000: Write output to the builtins init file, part 3 of 3

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-03 Bill Schmidt gcc/ * config/rs6000/rs6000-gen-builtins.c (typemap): New struct. (TYPE_MAP_SIZE): New defined constant. (type_map): New initialized filescope variable. (map_token_to_type_node): New function. (write_type_node): Likewise.

[PATCH 05/57] rs6000: Add file support and functions for diagnostic support

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-03 Bill Schmidt gcc/ * config/rs6000/rs6000-gen-builtins.c (bif_file): New filescope variable. (ovld_file): Likewise. (header_file): Likewise. (init_file): Likewise. (defines_file): Likewise. (pgm_path): Likewise.

omit frame pointer in pr89676

2021-04-27 Thread Alexandre Oliva
This i386 test expects only two movl instructions. In configurations that --enable-frame-pointer, -O2 won't implicitly enable -fomit-frame-pointer, so we end up with a third movl to set up the frame pointer. This patch enables -fomit-frame-pointer explicitly, so that the result no longer

[PATCH 55/57] rs6000: Test case adjustments

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-24 Bill Schmidt gcc/testsuite/ * gcc.target/powerpc/bfp/scalar-extract-exp-2.c: Adjust. * gcc.target/powerpc/bfp/scalar-extract-sig-2.c: Adjust. * gcc.target/powerpc/bfp/scalar-insert-exp-2.c: Adjust. * gcc.target/powerpc/bfp/scalar-insert-exp-5.c:

[PATCH 57/57] rs6000: Adjust to late-breaking change

2021-04-27 Thread Bill Schmidt via Gcc-patches
After this patch set was developed, a small change was made to overload handling for VEC_INSERT. Reflecting that into the new support here. 2021-04-27 Bill Schmidt gcc/ * config/rs6000/rs6000-c.c (altivec_resolve_new_overloaded_builtin): Change P8-vector test to

[PATCH 54/57] rs6000: Update altivec.h for automated interfaces

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-04-01 Bill Schmidt gcc/ * config/rs6000/altivec.h: Delete a number of #defines that are now superfluous; include rs6000-vecdefines.h; include some synonyms. --- gcc/config/rs6000/altivec.h | 516 +++- 1 file changed, 41

[PATCH 56/57] rs6000: Enable the new builtin support

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-05 Bill Schmidt gcc/ * config/rs6000/rs6000-gen-builtins.c (write_init_file): Initialize new_builtins_are_live to 1. --- gcc/config/rs6000/rs6000-gen-builtins.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/rs6000/rs6000-gen-builtins.c

[PATCH 53/57] rs6000: Debug support

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-04-01 Bill Schmidt gcc/ * config/rs6000/rs6000-call.c (rs6000_debug_type): New function. (def_builtin): Change debug formatting for easier parsing and include more information. (rs6000_init_builtins): Add dump of autogenerated builtins.

[PATCH 52/57] rs6000: Miscellaneous uses of rs6000_builtin_decls_x

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-05 Bill Schmidt gcc/ * config/rs6000/rs6000.c (rs6000_builtin_reciprocal): Use rs6000_builtin_decls_x when appropriate. (add_condition_to_bb): Likewise. (rs6000_atomic_assign_expand_fenv): Likewise. --- gcc/config/rs6000/rs6000.c | 19

[PATCH 51/57] rs6000: Update rs6000_builtin_decl

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-05 Bill Schmidt gcc/ * config/rs6000/rs6000-call.c (rs6000_new_builtin_decl): New function. (rs6000_builtin_decl): Call it. --- gcc/config/rs6000/rs6000-call.c | 20 1 file changed, 20 insertions(+) diff --git

[PATCH 50/57] rs6000: Builtin expansion, part 6

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-24 Bill Schmidt gcc/ * config/rs6000/rs6000-call.c (new_htm_spr_num): New function. (new_htm_expand_builtin): Implement. (rs6000_expand_new_builtin): Handle 32-bit and endian cases. --- gcc/config/rs6000/rs6000-call.c | 202 1

[PATCH 49/57] rs6000: Builtin expansion, part 5

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-25 Bill Schmidt gcc/ * config/rs6000/rs6000-call.c (new_mma_expand_builtin): Implement. --- gcc/config/rs6000/rs6000-call.c | 92 + 1 file changed, 92 insertions(+) diff --git a/gcc/config/rs6000/rs6000-call.c

[PATCH 48/57] rs6000: Builtin expansion, part 4

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-05 Bill Schmidt gcc/ * config/rs6000/rs6000-call.c (elemrev_icode): Implement. (ldv_expand_builtin): Likewise. (lxvrse_expand_builtin): Likewise. (lxvrze_expand_builtin): Likewise. (stv_expand_builtin): Likewise. ---

[PATCH 47/57] rs6000: Builtin expansion, part 3

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-05 Bill Schmidt gcc/ * config/rs6000/rs6000-call.c (new_cpu_expand_builtin): Implement. --- gcc/config/rs6000/rs6000-call.c | 100 1 file changed, 100 insertions(+) diff --git a/gcc/config/rs6000/rs6000-call.c

[PATCH 45/57] rs6000: Builtin expansion, part 1

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-04-02 Bill Schmidt gcc/ * config/rs6000/rs6000-call.c (rs6000_expand_new_builtin): New forward decl. (rs6000_invalid_new_builtin): New stub function. (rs6000_expand_builtin): Call rs6000_expand_new_builtin. (rs6000_expand_ldst_mask): New stub

[PATCH 46/57] rs6000: Builtin expansion, part 2

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-05 Bill Schmidt gcc/ * config/rs6000/rs6000-call.c (rs6000_invalid_new_builtin): Implement. (rs6000_expand_ldst_mask): Likewise. (rs6000_init_builtins): Initialize altivec_builtin_mask_for_load. --- gcc/config/rs6000/rs6000-call.c | 101

[PATCH 43/57] rs6000: Handle gimple folding of target built-ins

2021-04-27 Thread Bill Schmidt via Gcc-patches
This is another patch that looks bigger than it really is. Because we have a new namespace for the builtins, allowing us to have both the old and new builtin infrastructure supported at once, we need versions of these functions that use the new builtin namespace. Otherwise the code is unchanged.

[PATCH 44/57] rs6000: Support for vectorizing built-in functions

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-05 Bill Schmidt gcc/ * config/rs6000/rs6000.c (rs6000-builtins.h): New include. (rs6000_new_builtin_vectorized_function): New function. (rs6000_new_builtin_md_vectorized_function): Likewise. (rs6000_builtin_vectorized_function): Call

[PATCH 41/57] rs6000: Always initialize vector_pair and vector_quad nodes

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-24 Bill Schmidt gcc/ * config/rs6000/rs6000-call.c (rs6000_init_builtins): Remove TARGET_EXTRA_BUILTINS guard. --- gcc/config/rs6000/rs6000-call.c | 51 - 1 file changed, 24 insertions(+), 27 deletions(-) diff --git

[PATCH 40/57] rs6000: Add sanity to V2DI_type_node definitions

2021-04-27 Thread Bill Schmidt via Gcc-patches
It seems quite strange for these to be "vector long" for 64-bit and "vector long long" for 32-bit, when "vector long long" will do for both. 2021-03-04 Bill Schmidt gcc/ * config/rs6000/rs6000-call.c (rs6000_init_builtins): Change initialization of V2DI_type_node and

[PATCH 39/57] rs6000: Darwin builtin support

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-04 Bill Schmidt gcc/ * config/rs6000/darwin.h (SUBTARGET_INIT_BUILTINS): Use the new decl when new_builtins_are_live. * config/rs6000/rs6000-builtin-new.def (__builtin_cfstring): New built-in. --- gcc/config/rs6000/darwin.h | 8 ++--

[PATCH 36/57] rs6000: Add Cell builtins

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-04-01 Bill Schmidt gcc/ * config/rs6000/rs6000-builtin-new.def: Add cell stanza. --- gcc/config/rs6000/rs6000-builtin-new.def | 27 1 file changed, 27 insertions(+) diff --git a/gcc/config/rs6000/rs6000-builtin-new.def

[PATCH 35/57] rs6000: Add miscellaneous builtins

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-04-01 Bill Schmidt gcc/ * config/rs6000/rs6000-builtin-new.def: Add ieee128-hw, dfp, crypto, and htm stanzas. --- gcc/config/rs6000/rs6000-builtin-new.def | 215 +++ 1 file changed, 215 insertions(+) diff --git

[PATCH 38/57] rs6000: Execute the automatic built-in initialization code

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-04 Bill Schmidt gcc/ * config/rs6000/rs6000-call.c (rs6000-builtins.h): New #include. (rs6000_init_builtins): Call rs6000_autoinit_builtins; skip the old initialization logic when new builtins are enabled. --- gcc/config/rs6000/rs6000-call.c | 12

[PATCH 34/57] rs6000: Add MMA builtins

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-24 Bill Schmidt gcc/ * config/rs6000/rs6000-builtin-new.def: Add mma stanza. --- gcc/config/rs6000/rs6000-builtin-new.def | 404 +++ 1 file changed, 404 insertions(+) diff --git a/gcc/config/rs6000/rs6000-builtin-new.def

[PATCH 33/57] rs6000: Add Power10 builtins

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-04-01 Bill Schmidt gcc/ * config/rs6000/rs6000-builtin-new.def: Add power10 and power10-64 stanzas. --- gcc/config/rs6000/rs6000-builtin-new.def | 427 +++ 1 file changed, 427 insertions(+) diff --git a/gcc/config/rs6000/rs6000-builtin-new.def

[PATCH 31/57] rs6000: Add Power9 builtins

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-04-01 Bill Schmidt gcc/ * config/rs6000/rs6000-builtin-new.def: Add power9-vector, power9, and power9-64 stanzas. --- gcc/config/rs6000/rs6000-builtin-new.def | 360 +++ 1 file changed, 360 insertions(+) diff --git

[PATCH 30/57] rs6000: Add power8-vector builtins

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-04-01 Bill Schmidt gcc/ * config/rs6000/rs6000-builtin-new.def: Add power8-vector stanza. --- gcc/config/rs6000/rs6000-builtin-new.def | 438 +++ 1 file changed, 438 insertions(+) diff --git a/gcc/config/rs6000/rs6000-builtin-new.def

[PATCH 32/57] rs6000: Add more type nodes to support builtin processing

2021-04-27 Thread Bill Schmidt via Gcc-patches
Previously we created pointer types on the fly from their base types whenever we needed one. It's more efficient to create them up front, and the new mechanism requires that. 2021-04-02 Bill Schmidt gcc/ * config/rs6000/rs6000-call.c (rs6000_init_builtins): Initialize various

[PATCH 27/57] rs6000: Add VSX builtins

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-04-02 Bill Schmidt gcc/ * config/rs6000/rs6000-builtin-new.def: Add vsx stanza. --- gcc/config/rs6000/rs6000-builtin-new.def | 860 +++ 1 file changed, 860 insertions(+) diff --git a/gcc/config/rs6000/rs6000-builtin-new.def

[PATCH 26/57] rs6000: Add the rest of the [altivec] stanza to the builtins file

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-04-02 Bill Schmidt gcc/ * config/rs6000/rs6000-builtin-new.def: Finish altivec stanza. * config/rs6000/rs6000-call.c (rs6000_init_builtins): Move initialization of pcvoid_type_node here... (altivec_init_builtins): ...from here. *

[PATCH 29/57] rs6000: Add power7 and power7-64 builtins

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-04-02 Bill Schmidt gcc/ * config/rs6000/rs6000-builtin-new.def: Add power7 and power7-64 stanzas. --- gcc/config/rs6000/rs6000-builtin-new.def | 39 1 file changed, 39 insertions(+) diff --git a/gcc/config/rs6000/rs6000-builtin-new.def

[PATCH 19/57] rs6000: Write output to the builtins init file, part 1 of 3

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-04-01 Bill Schmidt gcc/ * config/rs6000/rs6000-gen-builtins.c (write_fntype): New function. (write_fntype_init): New stub function. (write_init_bif_table): Likewise. (write_init_ovld_table): New function. (write_init_file): Implement. ---

[PATCH 22/57] rs6000: Write static initializations for built-in table

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-24 Bill Schmidt gcc/ * config/rs6000/rs6000-gen-builtins.c (write_bif_static_init): New function. (write_init_file): Call write_bif_static_init. --- gcc/config/rs6000/rs6000-gen-builtins.c | 104 1 file changed, 104 insertions(+) diff

[PATCH 28/57] rs6000: Add available-everywhere and ancient builtins

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-04-02 Bill Schmidt gcc/ * config/rs6000/rs6000-builtin-new.def: Add always, power5, and power6 stanzas. --- gcc/config/rs6000/rs6000-builtin-new.def | 72 1 file changed, 72 insertions(+) diff --git a/gcc/config/rs6000/rs6000-builtin-new.def

[PATCH 23/57] rs6000: Write static initializations for overload tables

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-03 Bill Schmidt gcc/ * config/rs6000/rs6000-gen-builtins.c (write_ovld_static_init): New function. (write_init_file): Call write_ovld_static_init. --- gcc/config/rs6000/rs6000-gen-builtins.c | 53 + 1 file changed, 53 insertions(+) diff

[PATCH 25/57] rs6000: Add gengtype handling to the build machinery

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-04 Bill Schmidt gcc/ * config.gcc (target_gtfiles): Add ./rs6000-builtins.h. * config/rs6000/t-rs6000 (EXTRA_GTYPE_DEPS): Set. --- gcc/config.gcc | 1 + gcc/config/rs6000/t-rs6000 | 1 + 2 files changed, 2 insertions(+) diff --git a/gcc/config.gcc

[PATCH 24/57] rs6000: Incorporate new builtins code into the build machinery

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-04 Bill Schmidt gcc/ * config.gcc (extra_objs): Include rs6000-builtins.o and rs6000-c.o. * config/rs6000/t-rs6000 (OUT_FILE_DEPS): Add rs6000-builtins.h. (rs6000-gen-builtins.o): New target. (rbtree.o): Likewise. (rs6000-gen-builtins):

[PATCH 20/57] rs6000: Write output to the builtins init file, part 2 of 3

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-03 Bill Schmidt gcc/ * config/rs6000/rs6000-gen-builtins.c (write_init_bif_table): Implement. --- gcc/config/rs6000/rs6000-gen-builtins.c | 71 + 1 file changed, 71 insertions(+) diff --git a/gcc/config/rs6000/rs6000-gen-builtins.c

  1   2   >