Re: [Patch Arm] Fix PR 92999

2022-11-11 Thread Ramana Radhakrishnan via Gcc-patches
On Thu, Nov 10, 2022 at 7:46 PM Ramana Radhakrishnan wrote: > > On Thu, Nov 10, 2022 at 6:03 PM Richard Earnshaw > wrote: > > > > > > > > On 10/11/2022 17:21, Richard Earnshaw via Gcc-patches wrote: > > > > > > > > > On 08/11/2022 18:20, Ramana Radhakrishnan via Gcc-patches wrote: > > >> PR92999

[committed] analyzer: more state machine documentation

2022-11-11 Thread David Malcolm via Gcc-patches
gcc/analyzer/ChangeLog: * sm-fd.dot: Fix typo in comment. * sm-file.dot: New file. * varargs.cc: Fix typo in comment. * varargs.dot: New file. Signed-off-by: David Malcolm --- gcc/analyzer/sm-fd.dot | 2 +- gcc/analyzer/sm-file.dot | 67

Re: [COMMITTED] process transitive inferred ranges in pre_fold_stmt.

2022-11-11 Thread Bernhard Reutner-Fischer via Gcc-patches
On Fri, 11 Nov 2022 11:17:17 -0500 Andrew MacLeod via Gcc-patches wrote: > diff --git a/gcc/tree-vrp.cc b/gcc/tree-vrp.cc > index 3393c73a7db..a474d9d11e5 100644 > --- a/gcc/tree-vrp.cc > +++ b/gcc/tree-vrp.cc > @@ -4485,6 +4486,7 @@ public: > for (gphi_iterator gsi = gsi_start_phis (bb); !

Re: [committed] libstdc++: Fix wstring conversions in filesystem::path [PR95048]

2022-11-11 Thread Jonathan Wakely via Gcc-patches
On Fri, 11 Nov 2022 at 17:44, Jonathan Wakely via Libstdc++ wrote: > > Tested x86_64-linux and x86_64-w64-ming32 (via Wine). Sigh, I did test on Wine, but then what I pushed didn't include the fix that was found thanks to that testing. This is needed to prevent runtime errors on Windows when con

Re: [PATCH] 2/19 modula2 front end: Make-lang.in

2022-11-11 Thread Gaius Mulley via Gcc-patches
Richard Biener writes: >> +M2_MAINTAINER = no >> + >> +CPP_GM2=-fpermissive -DIN_GCC -g > > Do we really need -fpermissive here? no not needed (and now removed) - thanks for spotting it. >> +GM2_1 = ./gm2 -B./stage1/m2 -g -fm2-g >> + >> +GM2_FOR_TARGET = $(STAGE_CC_WRAPPER) ./gm2 -B./ -B$(build

Re: Announcement: Porting the Docs to Sphinx - 9. November 2022

2022-11-11 Thread David Malcolm via Gcc-patches
On Mon, 2022-10-17 at 15:28 +0200, Martin Liška wrote: > Hello. > > Based on the very positive feedback I was given at the Cauldron > Sphinx Documentation BoF, > I'm planning migrating the documentation on 9th November. There are > still some minor comments > from Sandra when it comes to the PDF o

Re: [COMMITTED] process transitive inferred ranges in pre_fold_stmt.

2022-11-11 Thread Andrew MacLeod via Gcc-patches
On 11/11/22 16:56, Bernhard Reutner-Fischer wrote: On Fri, 11 Nov 2022 11:17:17 -0500 Andrew MacLeod via Gcc-patches wrote: diff --git a/gcc/tree-vrp.cc b/gcc/tree-vrp.cc index 3393c73a7db..a474d9d11e5 100644 --- a/gcc/tree-vrp.cc +++ b/gcc/tree-vrp.cc @@ -4485,6 +4486,7 @@ public: for

[r13-3905 Regression] FAIL: gcc.dg/pr107554.c (test for excess errors) on Linux/x86_64

2022-11-11 Thread haochen.jiang via Gcc-patches
On Linux/x86_64, 81de4037454275f8ed6d858fbc129e832c6147ef is the first bad commit commit 81de4037454275f8ed6d858fbc129e832c6147ef Author: Richard Biener Date: Fri Nov 11 14:28:52 2022 +0100 tree-optimization/107554 - fix ICE in stlen optimization caused FAIL: gcc.dg/pr107554.c (test for

Re: old install to a different folder

2022-11-11 Thread Joseph Myers
On Fri, 11 Nov 2022, Tobias Burnus wrote: > For /onlinedocs/, I concur that we want to have the old doc there as there are > many > deep links. Still, we should consider adding a disclaimer box to all former > mainline > documentation stating that this data is no longer updated + point to the new

Re: [PATCH] libstdc++: Set active union member in constexpr std::string [PR103295]

2022-11-11 Thread Nathaniel Shead via Gcc-patches
Thanks for that. I'll keep your comments in mind for the future. On Fri, Nov 11, 2022 at 05:59:33PM +, Jonathan Wakely wrote: > On Fri, 11 Nov 2022 at 17:55, Patrick Palka wrote: > > > > On Fri, 11 Nov 2022, Jonathan Wakely via Libstdc++ wrote: > > > > > On Fri, 11 Nov 2022 at 11:23, Nathanie

[committed] libstdc++: Define INSTANTIATE_FACET_ACCESSORS macro in compat source [PR103755]

2022-11-11 Thread Jonathan Wakely via Gcc-patches
This fixes a build failure on powerpc64le when using ieeelongdouble as the default. Tested x86_64-linux. Pushed to trunk. -- >8 -- compatibility-ldbl-alt128.cc re-includes locale-inst-numeric.h and locale-inst-monetary.h but wasn't defining the macros added in r13-3888-gb3ac43a3c05744. Put thos

[committed] libstdc++: Simplify build targets for debug library

2022-11-11 Thread Jonathan Wakely via Gcc-patches
I posted this at the start of the year while we were in stage 3. Tested x86_64-linux. Pushed to trunk. -- >8 -- This rewrites the stamp-debug and build-debug targets in src/Makefile so that each generated Makefile in the debug/$(SUBDIRS) directories is a make target, instead of being created by

[PATCH 01/12] ipa: IPA-SRA split detection simplification

2022-11-11 Thread Martin Jambor
Hi, I have noticed that the flag m_split_modifications_p of ipa_param_body_adjustments is not really necessary as it has to correspond to whether m_replacements is non-empty so this patch removes it. This also simplifies a bit some patches I work on. Bootstrapped and tested on x86_64-linux. OK

[PATCH 02/12] ipa-cp: Do not consider useless aggregate constants

2022-11-11 Thread Martin Jambor
Hi, When building vectors of known aggregate values, there is no point in including those for parameters which are not used in any way whatsoever. Bootstrapped and tested on x86_64-linux. OK for master? Thanks, Martin gcc/ChangeLog: 2022-11-11 Martin Jambor * ipa-cp.cc (push_agg

[PATCH 03/12] ipa-cp: Write transformation summaries of all functions

2022-11-11 Thread Martin Jambor
Hi, IPA-CP transformation summary streaming code currently won't stream out transformations necessary for clones which are only necessary for materialization of other clones (such as an IPA-CP clone which is then cloned again by IPA-SRA). However, a follow-up patch for bettor reconciling IPA-SRA

[PATCH 04/12] ipa: Better way of applying both IPA-CP and IPA-SRA (PR 103227)

2022-11-11 Thread Martin Jambor
Hi, this is basically a better fix for PR 103227. The one currently in use, rushed in late at stage3, which means that IPA-CP transformation simply does a replacement of default-definition of IPA-SRA-created scalar parameters with a constant, meant that IPA-SRA actually often led to creation of a

[PATCH 06/12] ipa-cp: Leave removal of unused parameters to IPA-SRA

2022-11-11 Thread Martin Jambor
Hi, looking at some benchmarks I have noticed many cases when IPA-CP cloned a function for all contexts just because it knew that some parameters were not used at all. Then IPA-SRA looked at the function and cloned it again to split another parameter or two. The latter pass is better equipped to

[PATCH 05/12] ipa-sra: Dump edge summaries also for non-candidates

2022-11-11 Thread Martin Jambor
Hi, this should have been part of r12-578-g717d278af93a4a. Call edge summaries provide information required for IPA-SRA transformations in the callees but are generated when analyzing callers and thus also callers which are not IPA-SRA candidates themselves. Therefore we analyze them but don't d

[PATCH 09/12] ipa-sra: Be optimistic about Fortran descriptors

2022-11-11 Thread Martin Jambor
Hi, Fortran descriptors are structures which are often constructed just for a particular argument of a particular call where it is passed by reference. When the called function is under compiler's control, it can be beneficial to split up the descriptor and pass it in individual parameters. Unfo

[PATCH 07/12] ipa-sra: Treat REFERENCE_TYPES as always dereferencable

2022-11-11 Thread Martin Jambor
Hi, C++ and especially Fortran pass data by references which are not pointers potentially pointing anywhere and so can be assumed to be safely dereferencable. This patch teaches IPA-SRA to treat them as such and avoid the dance we do to prove that we can move loads from them to the caller. When

[PATCH 08/12] ipa-sra: Move caller->callee propagation before callee->caller one

2022-11-11 Thread Martin Jambor
Hi, this patch does not do any functional changes, it merely moves top-down propagation in the IPA-SRA WPA phase before bottom-up one. This also meant moving some preliminary checks from the latter to the former - where they need to be in their own loop over each SCC because the subsequent one loo

[PATCH 11/12] ipa-sra: Make scan_expr_access bail out on uninteresting expressions

2022-11-11 Thread Martin Jambor
Hi, I have noticed that scan_expr_access passes all the expressions it gets to get_ref_base_and_extent even when we are really only interested in memory accesses. So bail out when the expression is something clearly uninteresting. Bootstrapped and tested on x86_64-linux. OK for master? Thanks,

[PATCH 12/12] ipa: Avoid looking for IPA-SRA replacements where there are none

2022-11-11 Thread Martin Jambor
Hi, while modifying the code, I realized that we do look into statements even when there are no replacements. This patch adds the necessary early bail-outs to avoid that. ipa_param_body_adjustments::modify_call_stmt cannot have the same at the very beginning because calls can still contain other

[PATCH 10/12] ipa-sra: Forward propagation of sizes which are safe to dereference

2022-11-11 Thread Martin Jambor
Hi, the previous patch established a way to propagate information about parameters from callers to callees (even though then the actual splitting is done in the opposite direction), this patch adds to that information about size of the parameters that is known to be safe to dereference in the call

Re: [PATCH v2 2/4] LoongArch: Add ftint{,rm,rp}.{w,l}.{s,d} instructions

2022-11-11 Thread Lulu Cheng
I have no more questions. Thanks. 在 2022/11/11 下午1:29, Xi Ruoyao 写道: Lulu: So I think the code is correct: + ( +|| flag_fp_int_builtin_inexact +|| !flag_trapping_math)" is 1 for lrint, 0 for lceil and lfloor. As N3054 says: The lrint and llrint functions provide floating-to-

Re: [committed] libstdc++: Avoid redundant checks in std::use_facet [PR103755]

2022-11-11 Thread Jonathan Wakely via Gcc-patches
On Fri, 11 Nov 2022 at 21:00, Stephan Bergmann wrote: > > On 11/11/22 06:30, Jonathan Wakely via Gcc-patches wrote: > > As discussed in the PR, this makes it three times faster to construct > > iostreams objects. > > > > Tested x86_64-linux. Pushed to trunk. > > I haven't yet tried to track down w

[PATCH v2] c, analyzer: support named constants in analyzer [PR106302]

2022-11-11 Thread David Malcolm via Gcc-patches
Changes since v1: ported the doc changes from texinfo to sphinx Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Are the C frontend parts OK for trunk? (I can self-approve the analyzer parts) Thanks Dave The analyzer's file-descriptor state machine tracks the access mode of open

[PATCH v2] analyzer: add warnings relating to sockets [PR106140]

2022-11-11 Thread David Malcolm via Gcc-patches
Changed in v2: ported doc changes from texinfo to sphinx Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. I can self-approve this patch, but it depends on the named constants patch here: * [PATCH v2] c, analyzer: support named constants in analyzer [PR106302] * https://gcc.gnu

Re: [PATCH v2] c, analyzer: support named constants in analyzer [PR106302]

2022-11-11 Thread David Malcolm via Gcc-patches
On Fri, 2022-11-11 at 22:23 -0500, David Malcolm wrote: > Changes since v1: ported the doc changes from texinfo to sphinx > > Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. > > Are the C frontend parts OK for trunk?  (I can self-approve the > analyzer parts) ...and FWIW, the foll

Re: [PATCH v2 3/4] LoongArch: Add fscaleb.{s,d} instructions as ldexp{sf,df}3

2022-11-11 Thread Lulu Cheng
在 2022/11/9 下午9:53, Xi Ruoyao 写道: This allows optimizing __builtin_ldexp{,f} and __builtin_scalbn{,f} with -fno-math-errno. IMODE is added because we can't hard code SI for operand 2: fscaleb.d instruction always take the high half of both source registers into account. See my_ldexp_long in t

Re: [PATCH v2 3/4] LoongArch: Add fscaleb.{s,d} instructions as ldexp{sf,df}3

2022-11-11 Thread Xi Ruoyao via Gcc-patches
On Sat, 2022-11-12 at 11:54 +0800, Lulu Cheng wrote: > > 在 2022/11/9 下午9:53, Xi Ruoyao 写道: > > This allows optimizing __builtin_ldexp{,f} and __builtin_scalbn{,f} > > with > > -fno-math-errno. > > > > IMODE is added because we can't hard code SI for operand 2: > > fscaleb.d > > instruction always

c: C2x constexpr

2022-11-11 Thread Joseph Myers
[Global / middle-end reviewers, note there is a dfp.cc change here that needs review.] Implement C2x constexpr (a feature based on the C++ one but much more minimal, with only constexpr variables, not functions). I believe this implementation is fully functional for use of this feature. However,

[PATCH 7] PowerPC: Add -mcpu=future saturating subtract built-ins.

2022-11-11 Thread Michael Meissner via Gcc-patches
This patch adds support for a saturating subtract built-in function that may be added to a future PowerPC processor. Note, if it is added, the name of the built-in function may change before GCC 13 is released. If the name changes, we will submit a patch changing the name. I also added support f

[PATCH 8] PowerPC: Support load/store vector with right length.

2022-11-11 Thread Michael Meissner via Gcc-patches
This patch adds support for new instructions that may be added to the PowerPC architecture in the future to enhance the load and store vector with length instructions. The current instructions (lxvl, lxvll, stxvl, and stxvll) are inconvient to use since the count for the number of bytes must be in

Re: [PATCH v2 4/4] LoongArch: Add flogb.{s, d} instructions and expand logb{sf,df}2

2022-11-11 Thread Lulu Cheng
LGTM! Thanks. 在 2022/11/9 下午9:53, Xi Ruoyao 写道: On LoongArch, flogb instructions extract the exponent of a non-negative floating point value, but produces NaN for negative values. So we need to add a fabs instruction when we expand logb. gcc/ChangeLog: * config/loongarch/loongarch.md

Re: [PATCH v2 3/4] LoongArch: Add fscaleb.{s,d} instructions as ldexp{sf,df}3

2022-11-11 Thread Lulu Cheng
在 2022/11/12 下午12:40, Xi Ruoyao 写道: On Sat, 2022-11-12 at 11:54 +0800, Lulu Cheng wrote: 在 2022/11/9 下午9:53, Xi Ruoyao 写道: This allows optimizing __builtin_ldexp{,f} and __builtin_scalbn{,f} with -fno-math-errno. IMODE is added because we can't hard code SI for operand 2: fscaleb.d instructi

Re: [PATCH v2 0/4] LoongArch: Add some floating-point operations

2022-11-11 Thread Xi Ruoyao via Gcc-patches
On Wed, 2022-11-09 at 21:53 +0800, Xi Ruoyao wrote: > These patches allow to expand the following builtins to floating point > instructions for LoongArch: > > - __builtin_rint{,f} > - __builtin_{l,ll}rint{,f} > - __builtin_{l,ll}floor{,f} > - __builtin_{l,ll}ceil{,f} > - __builtin_scalb{n,ln}{,f}

Re: [COMMITTED] process transitive inferred ranges in pre_fold_stmt.

2022-11-11 Thread Bernhard Reutner-Fischer via Gcc-patches
On Fri, 11 Nov 2022 18:17:46 -0500 Andrew MacLeod wrote: > On 11/11/22 16:56, Bernhard Reutner-Fischer wrote: > > So of course it doesn't really matter what that stmt was, a non_debug > > is as good as a debug one AFAIU, it's just a marker, as good as any SSA > > version or id, i suppose. So gsi_

Re: [PATCH v2 0/4] LoongArch: Add some floating-point operations

2022-11-11 Thread Lulu Cheng
在 2022/11/12 下午3:08, Xi Ruoyao 写道: On Wed, 2022-11-09 at 21:53 +0800, Xi Ruoyao wrote: These patches allow to expand the following builtins to floating point instructions for LoongArch: - __builtin_rint{,f} - __builtin_{l,ll}rint{,f} - __builtin_{l,ll}floor{,f} - __builtin_{l,ll}ceil{,f} - __

[PATCH v2] LoongArch: Add prefetch instructions.

2022-11-11 Thread Lulu Cheng
Co-Authored-By: xujiahao gcc/ChangeLog: * config/loongarch/loongarch-def.c: Initial number of parallel prefetch. * config/loongarch/loongarch-tune.h (struct loongarch_cache): Define number of parallel prefetch. * config/loongarch/loongarch.cc (loongarch_option_ove

<    1   2