[to-be-committed][RISC-V] Improve usage of slli.uw in constant synthesis

2024-05-11 Thread Jeff Law
And an improvement to using slli.uw... I recently added the ability to use slli.uw in the synthesis path. That code was conditional on the right justified constant being a LUI_OPERAND after sign extending from bit 31 to bit 63. That code is working fine, but could be improved. Specifically

[to-be-committed] RISC-V Fix minor regression in synthesis WRT bseti usage

2024-05-11 Thread Jeff Law
Overnight testing showed a small number of cases where constant synthesis was doing something dumb. Specifically generating more instructions than the number of bits set in the constant. It was a minor goof in the recent bseti code. In the code to first figure out what bits LUI could set, I

Re: [PATCH] c++: lvalueness of non-dependent assignment [PR114994]

2024-05-11 Thread Patrick Palka
On Fri, 10 May 2024, Jason Merrill wrote: > On 5/9/24 16:23, Patrick Palka wrote: > > Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look > > OK for trunk/14? For trunk as a follow-up I can implement the > > mentionted representation change to use CALL_EXPR instead of > >

Re: [PATCH v2 1/3] diagnostics: Enable escape sequence processing on windows consoles

2024-05-11 Thread Peter0x44
9 May 2024 6:02:34 pm Peter Damianov : Since windows 10 release v1511, the windows console has had support for VT100 escape sequences. We should try to enable this, and utilize it where possible. gcc/ChangeLog:     * diagnostic-color.cc (should_colorize): Enable processing of VT100    

[PATCH v2] driver: Output to a temp file; rename upon success [PR80182]

2024-05-11 Thread Peter Damianov
Currently, commands like: gcc -o file.c -lm will delete the user's code. This patch makes the linker write executables to a temp file, and then renames the temp file if successful. This fixes the case above, but has limitations. The source file will still get overwritten if the link "succeeds",

Re: [Patch, fortran] PR84006 [11/12/13/14/15 Regression] ICE in storage_size() with CLASS entity

2024-05-11 Thread Harald Anlauf
Hi Paul, Am 11.05.24 um 08:20 schrieb Paul Richard Thomas: Hi Harald, Thanks for the review. The attached resubmission fixes all the invalid accesses, memory leaks and puts right the incorrect result. In the course of fixing the fix, I found that deferred character length MOLDs gave an ICE

Re: [COMMITTED] Remove obsolete Solaris 11.3 support

2024-05-11 Thread John Paul Adrian Glaubitz
Hi Peter, On Fri, 2024-05-10 at 12:07 +0100, Peter Tribble wrote: > Tribblix is built from the last commit that worked (November 2021), with any > relevant changes > since cherry-picked on top. So in terms of timeline Tribblix is contemporary > with 11.4, with > hardware support matching the

Re: [PATCH 03/21] testsuite: Add more allocation size tests for conjured svalues [PR110014]

2024-05-11 Thread NightStrike
On Thu, May 9, 2024 at 1:47 PM David Malcolm wrote: > > From: Tim Lange > > This patch adds the reproducers reported in PR 110014 as test cases. The > false positives in those cases are already fixed with PR 109577. > > 2023-06-09 Tim Lange > > PR analyzer/110014 > >

Re: [PATCH 02/21] analyzer: Fix allocation size false positive on conjured svalue [PR109577]

2024-05-11 Thread NightStrike
On Thu, May 9, 2024 at 1:45 PM David Malcolm wrote: > > From: Tim Lange > > Currently, the analyzer tries to prove that the allocation size is a > multiple of the pointee's type size. This patch reverses the behavior > to try to prove that the expression is not a multiple of the pointee's >

[PATCH] jit: Ensure ssize_t is defined.

2024-05-11 Thread FX Coudert
Hi, On some targets it seems that ssize_t is not defined by any of the headers transitively included by . This leads to a bootstrap fail when jit is enabled. The attached patch fixes it by include . Other headers in GCC treat as available on all targets, so we include it unconditionally.

[PATCH] driver: Output to a temp file; rename upon success [PR80182]

2024-05-11 Thread Peter Damianov
Currently, commands like: gcc -o file.c -lm will delete the user's code. This patch makes the linker write executables to a temp file, and then renames the temp file if successful. This fixes the case above, but has limitations. The source file will still get overwritten if the link "succeeds",

Re: [PATCH v2 1/4] Support for CodeView debugging format

2024-05-11 Thread Jeff Law
On 10/30/23 6:28 PM, Mark Harmstone wrote: This patch and the following add initial support for Microsoft's CodeView debugging format, as used by MSVC, to mingw targets. Note that you will need a recent version of binutils for this to be useful. The best way to view the output is to run

[SUBREG V3 2/4] DF: Add DF_LIVE_SUBREG problem

2024-05-11 Thread Juzhe-Zhong
This patch add a new DF problem, named DF_LIVE_SUBREG. This problem is extended from the DF_LR problem and support track the subreg liveness of multireg pseudo if these pseudo satisfy the following conditions: 1. the mode size greater than it's REGMODE_NATURAL_SIZE. 2. the reg is used in

[SUBREG V3 0/4] Add DF_LIVE_SUBREG data and apply to IRA and LRA

2024-05-11 Thread Juzhe-Zhong
V3: Address comments from Dimitar Dimitrov These patches are used to add a new data flow DF_LIVE_SUBREG, which will track subreg liveness and then apply it to IRA and LRA passes (enabled via -O3 or -ftrack-subreg-liveness). These patches are for GCC 15. And these codes are pushed to the

[SUBREG V3 4/4] LRA: Apply DF_LIVE_SUBREG data

2024-05-11 Thread Juzhe-Zhong
This patch apply the DF_LIVE_SUBREG to LRA pass. More changes were made to the LRA than the IRA since the LRA will modify the DF data directly. The main big changes are centered on the lra-lives.cc file. Co-authored-by: Lehua Ding gcc/ChangeLog: * lra-coalesce.cc (update_live_info):

[SUBREG V3 3/4] IRA: Add DF_LIVE_SUBREG problem

2024-05-11 Thread Juzhe-Zhong
This patch simple replace df_get_live_in to df_get_subreg_live_in and replace df_get_live_out to df_get_subreg_live_out. Co-authored-by: Lehua Ding gcc/ChangeLog: * ira-build.cc (create_bb_allocnos): Apply DF_LIVE_SUBREG data. (create_loop_allocnos): Diito. *

[SUBREG V3 1/4] DF: Add -ftrack-subreg-liveness option

2024-05-11 Thread Juzhe-Zhong
Add new flag -ftrack-subreg-liveness to enable track-subreg-liveness. This flag is enabled at -O3/fast. Co-authored-by: Lehua Ding gcc/ChangeLog: * common.opt: Add -ftrack-subreg-liveness option. * common.opt.urls: Ditto. * doc/invoke.texi: Ditto. * opts.cc:

[PATCH] c++: Strengthen checks on 'main'

2024-05-11 Thread Nathaniel Shead
I wasn't entirely sure what to do with the 'abi/main.C' testcase here; is this OK, or should I e.g. lower the linkage error to a pedwarn for the purposes of this test? Bootstrapped and regtested on x86_64-pc-linux-gnu, and lightly checked with a MinGW32 cross. OK for trunk? -- >8 -- This patch

[PING} Re: [PATCH 0/13] rs6000, built-in cleanup patch series

2024-05-11 Thread Carl Love
Ping, just wondering if anyone has had a chance to look at the patch series. Thanks. Carl On 4/19/24 14:04, Carl Love wrote: > GCC maintainers: > > The following patch series removes duplicate built-ins. There are patches to > extend an existing overloaded

RE: [PATCH] tree-optimization/114760 - check variants of >> and << in loop-niter

2024-05-11 Thread Di Zhao OS
Fixed the problems and committed to trunk. Thanks, Di Zhao > -Original Message- > From: Richard Biener > Sent: Friday, May 10, 2024 8:56 PM > To: Di Zhao OS > Cc: gcc-patches@gcc.gnu.org > Subject: Re: [PATCH] tree-optimization/114760 - check variants of >> and << in > loop-niter > >

Re: [PATCH] Adjust range type of calls into fold_range for IPA passes [PR114985]

2024-05-11 Thread Aldy Hernandez
I have pushed a few cleanups to make it easier to move forward without disturbing passes which are affected by IPA's mixing up the range types. As I explained in my previous patch, this restores the default behavior of silently returning VARYING when a range operator is unsupported in either a

Re: [COMMITTED] [prange] Do not trap by default on range dispatch mismatches.

2024-05-11 Thread Aldy Hernandez
For the record, we have always returned false (VARYING) for unsupported range operators. This patch just restores the behavior we've always had, while adding a knob for further analysis (for example. IPA which is getting its range types mixed up). Aldy On Sat, May 11, 2024 at 11:28 AM Aldy

[COMMITTED] [prange] Default unimplemented prange operators to false.

2024-05-11 Thread Aldy Hernandez
The canonical way to indicate that a range operator is unsupported is to return false, which has the sematic meaning of VARYING. This patch cleans up a few default virtuals that were trying harder to set VARYING manually. gcc/ChangeLog: * range-op-ptr.cc (range_operator::fold_range):

[COMMITTED] [prange] Do not trap by default on range dispatch mismatches.

2024-05-11 Thread Aldy Hernandez
The trap in the range-op dispatch code is really an internal debugging aid, and only a temporary one for a few weeks while the dust settles. This patch turns it off by default, allowing problematic passes to turn it on for analysis. gcc/ChangeLog: * range-op.cc

[PATCH v26 10/13] libstdc++: Optimize std::decay compilation performance

2024-05-11 Thread Ken Matsui
This patch optimizes the compilation performance of std::decay by dispatching to the new __decay built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (decay): Use __decay built-in trait. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 6 ++ 1 file

[PATCH v26 09/13] libstdc++: Optimize std::add_rvalue_reference compilation performance

2024-05-11 Thread Ken Matsui
This patch optimizes the compilation performance of std::add_rvalue_reference by dispatching to the new __add_rvalue_reference built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (add_rvalue_reference): Use __add_rvalue_reference built-in trait.

[PATCH v26 06/13] libstdc++: Optimize std::remove_extent compilation performance

2024-05-11 Thread Ken Matsui
This patch optimizes the compilation performance of std::remove_extent by dispatching to the new __remove_extent built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (remove_extent): Use __remove_extent built-in trait. Signed-off-by: Ken Matsui ---

[PATCH v26 07/13] libstdc++: Optimize std::remove_all_extents compilation performance

2024-05-11 Thread Ken Matsui
This patch optimizes the compilation performance of std::remove_all_extents by dispatching to the new __remove_all_extents built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (remove_all_extents): Use __remove_all_extents built-in trait. Signed-off-by: Ken Matsui

[PATCH v26 05/13] libstdc++: Optimize std::add_pointer compilation performance

2024-05-11 Thread Ken Matsui
This patch optimizes the compilation performance of std::add_pointer by dispatching to the new __add_pointer built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (add_pointer): Use __add_pointer built-in trait. Signed-off-by: Ken Matsui ---

[PATCH v26 04/13] libstdc++: Optimize std::is_unbounded_array compilation performance

2024-05-11 Thread Ken Matsui
This patch optimizes the compilation performance of std::is_unbounded_array by dispatching to the new __is_unbounded_array built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_unbounded_array_v): Use __is_unbounded_array built-in trait. Signed-off-by: Ken Matsui

[PATCH v26 03/13] libstdc++: Optimize std::is_pointer compilation performance

2024-05-11 Thread Ken Matsui
This patch optimizes the compilation performance of std::is_pointer by dispatching to the new __is_pointer built-in trait. libstdc++-v3/ChangeLog: * include/bits/cpp_type_traits.h (__is_pointer): Use __is_pointer built-in trait. Optimize its implementation. *

[PATCH v26 01/13] libstdc++: Optimize std::is_const compilation performance

2024-05-11 Thread Ken Matsui
This patch optimizes the compilation performance of std::is_const by dispatching to the new __is_const built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_const): Use __is_const built-in trait. (is_const_v): Likewise. Signed-off-by: Ken Matsui ---

[PATCH v26 13/13] libstdc++: Optimize std::is_nothrow_invocable compilation performance

2024-05-11 Thread Ken Matsui
This patch optimizes the compilation performance of std::is_nothrow_invocable by dispatching to the new __is_nothrow_invocable built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_nothrow_invocable): Use __is_nothrow_invocable built-in trait. *

[PATCH v26 12/13] libstdc++: Optimize std::is_invocable compilation performance

2024-05-11 Thread Ken Matsui
This patch optimizes the compilation performance of std::is_invocable by dispatching to the new __is_invocable built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_invocable): Use __is_invocable built-in trait. *

[PATCH v26 02/13] libstdc++: Optimize std::is_volatile compilation performance

2024-05-11 Thread Ken Matsui
This patch optimizes the compilation performance of std::is_volatile by dispatching to the new __is_volatile built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_volatile): Use __is_volatile built-in trait. (is_volatile_v): Likewise. Signed-off-by: Ken

[PATCH v26 11/13] libstdc++: Optimize std::rank compilation performance

2024-05-11 Thread Ken Matsui
This patch optimizes the compilation performance of std::rank by dispatching to the new __array_rank built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (rank): Use __array_rank built-in trait. (rank_v): Likewise. Signed-off-by: Ken Matsui ---

[PATCH v26 08/13] libstdc++: Optimize std::add_lvalue_reference compilation performance

2024-05-11 Thread Ken Matsui
This patch optimizes the compilation performance of std::add_lvalue_reference by dispatching to the new __add_lvalue_reference built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (add_lvalue_reference): Use __add_lvalue_reference built-in trait.

Re: [PATCH v1] RISC-V: Bugfix ICE for RVV intrinisc vfw on _Float16 scalar

2024-05-11 Thread juzhe.zh...@rivai.ai
LGTM from my side. Wait for kito chime in. juzhe.zh...@rivai.ai From: pan2.li Date: 2024-05-11 15:54 To: gcc-patches CC: juzhe.zhong; kito.cheng; Pan Li Subject: [PATCH v1] RISC-V: Bugfix ICE for RVV intrinisc vfw on _Float16 scalar From: Pan Li For the vfw vx format RVV intrinsic, the

[PATCH v1] RISC-V: Bugfix ICE for RVV intrinisc vfw on _Float16 scalar

2024-05-11 Thread pan2 . li
From: Pan Li For the vfw vx format RVV intrinsic, the scalar type _Float16 also requires the zvfh extension. Unfortunately, we only check the vector tree type and miss the scalar _Float16 type checking. For example: vfloat32mf2_t test_vfwsub_wf_f32mf2(vfloat32mf2_t vs2, _Float16 rs1, size_t

Re: [Patch, fortran] PR84006 [11/12/13/14/15 Regression] ICE in storage_size() with CLASS entity

2024-05-11 Thread Paul Richard Thomas
Hi Harald, Thanks for the review. The attached resubmission fixes all the invalid accesses, memory leaks and puts right the incorrect result. In the course of fixing the fix, I found that deferred character length MOLDs gave an ICE because reallocation on assign was using 'dest_word_len' before