Re: [PATCH] fold: Optimise fold_view_convert_expr

2021-12-05 Thread Richard Biener via Gcc-patches
On Sun, Dec 5, 2021 at 11:00 PM Richard Sandiford via Gcc-patches wrote: > > When compiling an optabs.ii at -O2 with a release-checking build, > there were 210,172 calls to fold_view_convert_expr. 99.8% of them > were conversions of an INTEGER_CST to an ENUMERAL_TYPE, so this patch > adds a

Re: [PATCH] alias: Optimise call_may_clobber_ref_p

2021-12-05 Thread Richard Biener via Gcc-patches
On Sun, Dec 5, 2021 at 10:59 PM Richard Sandiford via Gcc-patches wrote: > > When compiling an optabs.ii at -O2 with a release-checking build, > we spent a lot of time in call_may_clobber_ref_p. One of the > first things the function tries is the get_modref_function_summary > approach, but that

Re: [PATCH] ranger: Add shortcuts for single-successor blocks

2021-12-05 Thread Richard Biener via Gcc-patches
On Sun, Dec 5, 2021 at 10:58 PM Richard Sandiford via Gcc-patches wrote: > > When compiling an optabs.ii at -O2 with a release-checking build, > there were 6,643,575 calls to gimple_outgoing_range_stmt_p. 96.8% of > them were for blocks with a single successor, which never have a control >

Re: [PATCH] ranger: Optimise irange_union

2021-12-05 Thread Richard Biener via Gcc-patches
On Sun, Dec 5, 2021 at 10:55 PM Richard Sandiford via Gcc-patches wrote: > > When compiling an optabs.ii at -O2 with a release-checking build, > the hottest function in the profile was irange_union. This patch > tries to optimise it a bit. The specific changes are: > > - Use quick_push rather

Re: [PATCH 2/2] Use dominators to reduce ranger cache-flling.

2021-12-05 Thread Richard Biener via Gcc-patches
On Fri, Dec 3, 2021 at 9:42 PM Andrew MacLeod via Gcc-patches wrote: > > When a request is made for the range of an ssa_name at some location, > the first thing we do is invoke range_of_stmt() to ensure we have looked > at the definition and have an evaluation for the name at a global > level. I

Re: [PATCH 1/2] - Add BB option for outgoing_edge_range_p.

2021-12-05 Thread Richard Biener via Gcc-patches
On Fri, Dec 3, 2021 at 9:41 PM Andrew MacLeod via Gcc-patches wrote: > > has_edge_range_p() and may_recompute_p() currently only take an optional > edge as a parameter. They only indicate if a range *might* be > calculated for a name, but they do not do any calculations. > > To determine the

Re: [PATCH 3/5] gcc: Add --nostdlib++ option

2021-12-05 Thread Fāng-ruì Sòng via Gcc-patches
On Sun, Dec 5, 2021 at 6:43 AM Richard Purdie via Gcc-patches wrote: > > On Thu, 2021-12-02 at 20:04 -0700, Jeff Law wrote: > > > > On 10/28/2021 10:39 AM, Richard Purdie wrote: > > > On Thu, 2021-10-28 at 08:51 -0600, Jeff Law wrote: > > > > On 10/27/2021 2:05 PM, Richard Purdie via Gcc-patches

Re: [PATCH v8 2/2] Don't move cold code out of loop by checking bb count

2021-12-05 Thread Xionghu Luo via Gcc-patches
On 2021/12/6 13:09, Xionghu Luo via Gcc-patches wrote: > > > On 2021/12/1 18:09, Richard Biener wrote: >> On Wed, Nov 10, 2021 at 4:08 AM Xionghu Luo wrote: >>> >>> >>> >>> On 2021/11/4 21:00, Richard Biener wrote: On Wed, Nov 3, 2021 at 2:29 PM Xionghu Luo wrote: > > >> +

Ping: [PATCH v2] Fix incorrect loop exit edge probability [PR103270]

2021-12-05 Thread Xionghu Luo via Gcc-patches
Hi Honza, Gentle ping for this :), thanks. https://gcc.gnu.org/pipermail/gcc-patches/2021-November/585289.html On 2021/11/24 13:03, Xionghu Luo via Gcc-patches wrote: > On 2021/11/23 17:50, Jan Hubicka wrote: >>> On Tue, Nov 23, 2021 at 6:52 AM Xionghu Luo wrote: r12-4526 cancelled

Re: [PATCH v8 2/2] Don't move cold code out of loop by checking bb count

2021-12-05 Thread Xionghu Luo via Gcc-patches
On 2021/12/1 18:09, Richard Biener wrote: > On Wed, Nov 10, 2021 at 4:08 AM Xionghu Luo wrote: >> >> >> >> On 2021/11/4 21:00, Richard Biener wrote: >>> On Wed, Nov 3, 2021 at 2:29 PM Xionghu Luo wrote: > + while (outmost_loop != loop) > +{ > + if

Re: [PATCH] [i386] Prefer INT_SSE_REGS for SSE_FLOAT_MODE_P in preferred_reload_class.

2021-12-05 Thread Hongtao Liu via Gcc-patches
Forget --in-reply-to when git send-email. > I was thinking about: > > --cut here-- > @@ -19194,9 +19194,17 @@ ix86_preferred_reload_class (rtx x, > reg_class_t regclass) > return NO_REGS; > } > > - /* Prefer SSE regs only, if we can use them for math. */ > + /* Prefer SSE if we can

[PATCH] [i386] Prefer INT_SSE_REGS for SSE_FLOAT_MODE_P in preferred_reload_class.

2021-12-05 Thread liuhongt via Gcc-patches
When moves between integer and sse registers are cheap. 2021-12-06 Hongtao Liu Uroš Bizjak gcc/ChangeLog: PR target/95740 * config/i386/i386.c (ix86_preferred_reload_class): Allow integer regs when moves between register units are cheap. *

Re: [PATCH] [PATCH,v2,1/1,AARCH64][PR102768] aarch64: Add compiler support for Shadow Call Stack

2021-12-05 Thread Dan Li via Gcc-patches
On 12/6/21 10:41 AM, Dan Li wrote: Shadow Call Stack can be used to protect the return address of a function at runtime, and clang already supports this feature[1]. To enable SCS in user mode, in addition to compiler, other support is also required (as discussed in [2]). This patch only adds

Re: [PATCH] gcc: vxworks: fix providing stdint.h header

2021-12-05 Thread Alexandre Oliva via Gcc-patches
On Dec 3, 2021, Olivier Hainque wrote: > Alex, how does that look to you? LGTM, thanks, -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Disinformation flourishes because many people care

[PATCH] [PATCH, v2, 1/1, AARCH64][PR102768] aarch64: Add compiler support for Shadow Call Stack

2021-12-05 Thread Dan Li via Gcc-patches
Shadow Call Stack can be used to protect the return address of a function at runtime, and clang already supports this feature[1]. To enable SCS in user mode, in addition to compiler, other support is also required (as discussed in [2]). This patch only adds basic support for SCS from the compiler

[PATCH] gimple: Optimise inlined gimple_seq_last

2021-12-05 Thread Richard Sandiford via Gcc-patches
In self-compilations, GCC doesn't realise that gimple_seq_last always returns nonnull when the argument is nonnull. Although it's a small thing in itself, the function is used (indirectly) many times and the extra null checks bloat what are otherwise simple loops. This patch adds an optimisation

[PATCH] fold: Optimise fold_view_convert_expr

2021-12-05 Thread Richard Sandiford via Gcc-patches
When compiling an optabs.ii at -O2 with a release-checking build, there were 210,172 calls to fold_view_convert_expr. 99.8% of them were conversions of an INTEGER_CST to an ENUMERAL_TYPE, so this patch adds a fast(er) path for that case. Tested on aarch64-linux-gnu and x86_64-linux-gnu. OK to

[PATCH] alias: Optimise call_may_clobber_ref_p

2021-12-05 Thread Richard Sandiford via Gcc-patches
When compiling an optabs.ii at -O2 with a release-checking build, we spent a lot of time in call_may_clobber_ref_p. One of the first things the function tries is the get_modref_function_summary approach, but that also seems to be the most expensive check. At least for the optabs.ii test, most of

[PATCH] ranger: Add shortcuts for single-successor blocks

2021-12-05 Thread Richard Sandiford via Gcc-patches
When compiling an optabs.ii at -O2 with a release-checking build, there were 6,643,575 calls to gimple_outgoing_range_stmt_p. 96.8% of them were for blocks with a single successor, which never have a control statement that generates new range info. This patch therefore adds a shortcut for that

[PATCH] PR fortran/103418 - random_number() does not accept pointer, intent(in) array argument

2021-12-05 Thread Harald Anlauf via Gcc-patches
Dear all, the check of dummy arguments with pointer attribute and INTENT(IN) was broken in the case the argument was passed to an intrinsic. We therefore rejected valid code as e.g. given in the PR. The patch relaxes the excessive check. This requires the adjustment of one of the tests for

[PATCH] ranger: Optimise irange_union

2021-12-05 Thread Richard Sandiford via Gcc-patches
When compiling an optabs.ii at -O2 with a release-checking build, the hottest function in the profile was irange_union. This patch tries to optimise it a bit. The specific changes are: - Use quick_push rather than safe_push, since the final number of entries is known in advance. - Avoid

[pushed] Objective-C, NeXT: Reorganise meta-data declarations.

2021-12-05 Thread Iain Sandoe via Gcc-patches
This moves the GTY declaration of the meta-data indentifier array into the header that enumerates these and provides shorthand defines for them. This avoids a problem seen with a relocatable PCH implementation. Tested on x86_64, i686 Darwin, pushed to master, thanks Iain Signed-off-by: Iain

Re: [PATCH 3/5] gcc: Add --nostdlib++ option

2021-12-05 Thread Richard Purdie via Gcc-patches
On Thu, 2021-12-02 at 20:04 -0700, Jeff Law wrote: > > On 10/28/2021 10:39 AM, Richard Purdie wrote: > > On Thu, 2021-10-28 at 08:51 -0600, Jeff Law wrote: > > > On 10/27/2021 2:05 PM, Richard Purdie via Gcc-patches wrote: > > > > OpenEmbedded/Yocto Project builds libgcc and the other gcc runtime