Re: [PATCH] -finline-stringops: allow expansion into edges [PR113002]

2023-12-19 Thread Richard Biener
On Wed, Dec 20, 2023 at 3:54 AM Alexandre Oliva wrote: > > > Builtin expanders for memset and memcpy may involve conditionals and > loops, but their sequences may be end up emitted in edges. Alas, > commit_one_edge_insertion rejects sequences that end with a jump, a > requirement that makes

Re: [PATCH #2v2/2] strub: sparc64: unbias the stack address [PR112917]

2023-12-19 Thread Richard Biener
On Wed, Dec 20, 2023 at 12:51 AM Alexandre Oliva wrote: > > On Dec 15, 2023, Richard Biener wrote: > > > It might be worth amending the documentation in case this > > is unexpected to users? > > Oh, yes indeed, thanks! > > Here's a patch that brings relevant parts of the implementation comment >

Re: [PATCH] gprofng: a new GNU profiler

2023-12-19 Thread Richard Biener
On Thu, Dec 14, 2023 at 2:23 AM wrote: > > From: Vladimir Mezentsev > > This is fixes for releases/gcc-13 for 31109 gprofng not built and installed > in a combined binutils+gcc build > I only cherry-picked 24552056fd5fc677c0d032f54a5cad1c4303d312 and tested my > build. I don't think a

Re: Ping Re: [PATCH] contrib: add git gcc-style alias

2023-12-19 Thread Richard Biener
On Tue, Dec 19, 2023 at 6:41 PM Jason Merrill wrote: > > On 12/11/23 22:00, Jason Merrill wrote: > > OK for trunk? > > Ping. CCing Alex because this could plausibly be considered build > machinery, and he's had useful feedback on my sh code before. OK in case Alex doesn't have any comments.

Re: [PATCH] fold-const: Handle AND, IOR, XOR with stepped vectors [PR112971].

2023-12-19 Thread Richard Biener
On Tue, 19 Dec 2023, Andrew Pinski wrote: > On Tue, Dec 19, 2023 at 2:40?AM Richard Sandiford > wrote: > > > > Richard Biener writes: > > > On Tue, 19 Dec 2023, juzhe.zh...@rivai.ai wrote: > > > > > >> Hi, Richard. > > >> > > >> After investigating the codes: > > >> /* Return true if EXPR is

Re: [PATCH v4 2/3] RISC-V: Add crypto machine descriptions

2023-12-19 Thread juzhe.zh...@rivai.ai
+ (and:VI + (match_operand:VI 3 "register_operand" "vr, vr, vr, vr") + (not:VI (match_operand:VI 4 "register_operand" "vr, vr, vr, vr"))) Swap the order: (not:VI (match_operand:VI 4 "register_operand" "vr, vr, vr, vr") (and:VI (match_operand:VI 3

[PATCH v4 3/3] RISC-V: Add crypto vector api-testing cases.

2023-12-19 Thread Feng Wang
Patch v4: Add some RV32 vx constraint testcase. Patch v3: Refine crypto vector api-testing cases. Patch v2: Update march info according to the change of riscv-common.c This patch add crypto vector api-testing cases based on

[PATCH v4 2/3] RISC-V: Add crypto machine descriptions

2023-12-19 Thread Feng Wang
Patch v4: Add process of SEW=64 in RV32 system. Patch v3: Moidfy constrains for crypto vector. Patch v2: Add crypto vector ins into RATIO attr and use vr as destination register. This patch add the crypto machine descriptions(vector-crypto.md) and some new iterators which are used by crypto

[PATCH v4 1/3] RISC-V: Add crypto vector builtin function.

2023-12-19 Thread Feng Wang
Patch v4:Merge crypto vector function.def into vector. Patch v3:Define a shape for vaesz and merge vector-crypto-types.def into riscv-vector-builtins-types.def. Patch v2:Optimize function_shape class for crypto_vector. This patch add the intrinsic funtions of crypto vector based on the

Re: [aarch64] PR111702 - ICE in insert_regs after interleave+zip1 vector initialization patch

2023-12-19 Thread Prathamesh Kulkarni
On Mon, 4 Dec 2023 at 14:44, Prathamesh Kulkarni wrote: > > On Thu, 23 Nov 2023 at 17:06, Prathamesh Kulkarni > wrote: > > > > Hi Richard, > > For the test-case mentioned in PR111702, compiling with -O2 > > -frounding-math -fstack-protector-all results in following ICE during > > cse2 pass: > >

Re: [PATCH v2] RISC-V: Bugfix for the const vector in single steps

2023-12-19 Thread juzhe.zh...@rivai.ai
+ bool diff_seq_repeated_p = true; + + for (unsigned i = 0; i < v.npatterns (); i++) + { + poly_int64 diff_0 = rtx_to_poly_int64 (builder.elt (i)) - i; + poly_int64 diff_1 = rtx_to_poly_int64 ( + builder.elt

[PATCH v2] RISC-V: Bugfix for the const vector in single steps

2023-12-19 Thread pan2 . li
From: Pan Li This patch would like to fix the below execution failure. FAIL: gcc.dg/vect/pr92420.c -flto -ffat-lto-objects execution test The will be one single step const vector like { -4, 4, -3, 5, -2, 6, -1, 7, ...}. For such const vector generation with single step, we will generate vid +

[PATCH] RISC-V: Optimize SELECT_VL codegen when length is known as smaller than VF

2023-12-19 Thread Juzhe-Zhong
While trying to fix bugs of PR113097, notice this following situation we generate redundant vsetvli _255 = SELECT_VL (3, POLY_INT_CST [4, 4]); COND_LEN (..., _255) Before this patch: vsetivli a5, 3... ... vadd.vv (use a5) After this patch: ... vadd.vv (use AVL = 3) The reason we can do this

[PATCH] RISC-V: Fix bug of VSETVL fusion

2023-12-19 Thread Juzhe-Zhong
This patch fixes bugs in the fusion of this following case: li a5,-1 vmv.s.x v0,a5 -> demand any non-zero AVL vsetvli a5, ... Incorrect fusion after VSETVL PASS: li a5,-1 vsetvli a5... vmv.s.x v0, a5 --> a5 is modified as incorrect value. We disallow this incorrect fusion above. Full coverage

[PATCH] compare_tests: distinguish c-c++-common results by tool

2023-12-19 Thread Alexandre Oliva
On Dec 20, 2023, Jeff Law wrote: > So the strub tests in c-c++-common are problematical. They get run > twice, once for C, once for C++. Yet the name of the test is the same > in both runs. (by the name, I mean the name emitted into the dejagnu > summary and log files). > Thus if you have a

Re: [PATCH 5/5][_Hashtable] Prefer to insert after last node

2023-12-19 Thread François Dumont
Here is a new version of this patch. The previous one had some flaws that were unnoticed by testsuite tests, only the performance tests were spotting it. So I'm adding checks on the consistency of the unordered containers in this patch. I also forget to signal that after this patch gnu

Re: [PATCH v2 2/3] RISC-V: setmem for RISCV with V extension

2023-12-19 Thread Jeff Law
On 12/19/23 02:53, Sergei Lewis wrote: gcc/ChangeLog * config/riscv/riscv-protos.h (riscv_vector::expand_vec_setmem): New function declaration. * config/riscv/riscv-string.cc (riscv_vector::expand_vec_setmem): New function: this generates an inline vectorised memory

Re: [PATCH v2 1/3] RISC-V: movmem for RISCV with V extension

2023-12-19 Thread Jeff Law
On 12/19/23 02:53, Sergei Lewis wrote: gcc/ChangeLog * config/riscv/riscv.md (movmem): Use riscv_vector::expand_block_move, if and only if we know the entire operation can be performed using one vector load followed by one vector store gcc/testsuite/ChangeLog PR

Re: [PATCH] tree-object-size: Clean up unknown propagation

2023-12-19 Thread Jeff Law
On 12/19/23 10:21, Siddhesh Poyarekar wrote: Narrow down scope of the unknowns bitmap so that it is only accessible within the reexamination process. This also removes any role of unknown propagation from object_sizes_set, thus simplifying that code path a bit. gcc/ChangeLog: *

Re: [PATCH] contrib: add git gcc-style alias

2023-12-19 Thread Jeff Law
On 12/11/23 20:00, Jason Merrill wrote: OK for trunk? -- 8< -- I thought it could be easier to use check_GNU_style.py. With this alias, 'git gcc-style' will take a git revision as argument instead of a file, or check HEAD if no argument is given. contrib/ChangeLog: *

Re: [PATCH] untyped calls: enable target switching [PR112334]

2023-12-19 Thread Jeff Law
On 12/11/23 21:44, Alexandre Oliva wrote: untyped calls: use wrapper class type for implicit plus_one Instead of get and set macros to apply a delta, use a single macro that resorts to a temporary wrapper class to apply it. To be combined (or not) with the previous patch. I'd be OK with

Problems with strub tests

2023-12-19 Thread Jeff Law
So the strub tests in c-c++-common are problematical. They get run twice, once for C, once for C++. Yet the name of the test is the same in both runs. (by the name, I mean the name emitted into the dejagnu summary and log files). Thus if you have a test in there which passes in one

Fortran: Use non conflicting file extensions for intermediates [PR81615]

2023-12-19 Thread Rimvydas Jasinskas
Dear all, In the spirit of c/c++ using the .i/.ii extensions for intermediates, use the .fi/.fii intermediate extensions for gfortran fixed/free form sources when -save-temps is invoked to avoid various issues. The documentation part will be submitted separately, because it involves adding a

RE: [PATCH v1] RISC-V: Bugfix for the const vector in single steps

2023-12-19 Thread Li, Pan2
Oh, I see. Thanks Jeff for suggestion, will refine the commit log in V2. Pan -Original Message- From: Jeff Law Sent: Wednesday, December 20, 2023 12:03 PM To: juzhe.zh...@rivai.ai; Li, Pan2 ; gcc-patches Cc: Wang, Yanzhang ; kito.cheng Subject: Re: [PATCH v1] RISC-V: Bugfix for the

[committed][gcc-wwwdocs] Add blurb about bitfield signedness on mcore

2023-12-19 Thread Jeff Law
Pushed to the trunk. jeffcommit e56dc0003729ea6f7d26594dae34d218543edb49 Author: Jeff Law Date: Tue Dec 19 21:28:03 2023 -0700 Document that bitfields are signed on mcore now. diff --git a/htdocs/gcc-14/changes.html b/htdocs/gcc-14/changes.html index eb14e09d..11c7ca7e 100644 ---

[committed] Stop forcing unsigned bitfields on mcore

2023-12-19 Thread Jeff Law
The GCC manual has a whole section on signedness of bitfields with the ultimate conclusion that the property really isn't an ABI issue, but instead a C dialect issue (agreed). Furthermore it concludes that all targets should behave the same by default. So it was a mistake for the mcore

Re: [PATCH v1] RISC-V: Bugfix for the const vector in single steps

2023-12-19 Thread Jeff Law
On 12/19/23 19:50, juzhe.zh...@rivai.ai wrote: +   if (known_eq (ele_0 - 0, ele_n - v.npatterns ())) -> for (i = 0; i < v.npatterns (); )   check each nelt of npatterns is equal to vid. Pan -- please indicate what testing was performed. The standard is to test with and without the

Re: [PATCH 0/2] LoongArch: Fix PR113033 and clean up code

2023-12-19 Thread Chenghui Pan
The patches are look ok and no problem in spec2017 correctness check. On 2023/12/19 15:26, chenglulu wrote: We will read and test these patches as soon as possible. Thanks! 在 2023/12/19 下午2:59, Xi Ruoyao 写道: Superseds https://gcc.gnu.org/pipermail/gcc-patches/2023-December/640871.html. Per

Re: [PATCH FYI] -finline-stringops: copy timeout factor from memcmp-1.c test

2023-12-19 Thread Jeff Law
On 12/19/23 19:32, Alexandre Oliva wrote: Hi, Jeff, On Dec 18, 2023, Jeff Law wrote: These are timing sporadically on the embedded platforms. Given they include a test that has a timeout factor, it seems to me you should duplicate the timeout factor in the new tests. Remember when you

Re: [PATCH v26 00/23] Optimize type traits compilation performance

2023-12-19 Thread Sandra Loosemore
On 12/6/23 22:11, Ken Matsui wrote: This patch series optimizes type traits compilation performance by implementing built-in type traits and using them in libstdc++. I'm finding that all the new g++.dg/ext/is_*.C testcases added by this patch series are failing due to the "#include ". If

[PATCH] -finline-stringops: allow expansion into edges [PR113002]

2023-12-19 Thread Alexandre Oliva
Builtin expanders for memset and memcpy may involve conditionals and loops, but their sequences may be end up emitted in edges. Alas, commit_one_edge_insertion rejects sequences that end with a jump, a requirement that makes sense for insertions after expand, but not so much during expand.

Re: [PATCH v1] RISC-V: Bugfix for the const vector in single steps

2023-12-19 Thread juzhe.zh...@rivai.ai
+ if (known_eq (ele_0 - 0, ele_n - v.npatterns ())) -> for (i = 0; i < v.npatterns (); ) check each nelt of npatterns is equal to vid. juzhe.zh...@rivai.ai From: pan2.li Date: 2023-12-20 10:39 To: gcc-patches CC: juzhe.zhong; pan2.li; yanzhang.wang; kito.cheng Subject: [PATCH v1]

[PATCH v1] RISC-V: Bugfix for the const vector in single steps

2023-12-19 Thread pan2 . li
From: Pan Li For generating the const vector with single step, we have code gen similar as below. We have npatterns = 4. v1= {3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8... } v2 (diff) = {3 - 0, 2 - 1, 1 - 2, 0 - 3, 7 - 4, 6 - 5, 5 - 6, 4 - 7...} = {3, 1, -1, 3, 3, 1, -1, 3 ...} v1 = vd +

[PATCH FYI] -finline-stringops: copy timeout factor from memcmp-1.c test

2023-12-19 Thread Alexandre Oliva
Hi, Jeff, On Dec 18, 2023, Jeff Law wrote: > These are timing sporadically on the embedded platforms. Given they > include a test that has a timeout factor, it seems to me you should > duplicate the timeout factor in the new tests. > Remember when you include another file, the dg- directives

Re: Re: [PATCH] fold-const: Handle AND, IOR, XOR with stepped vectors [PR112971].

2023-12-19 Thread juzhe.zh...@rivai.ai
Thanks Andrew. Ok. I think I can apply suggestions from both you and Richards. That is, fix it in const_binop but with creating new helper function simplify_const_binop (suggestion from Richard). But I don't know how to write codes in simplify_const_ binop... Could you give me some hints ?

Re: [PATCH] i386: Allow 64 bit mask register for -mno-evex512

2023-12-19 Thread Hongtao Liu
On Fri, Dec 15, 2023 at 10:34 AM Haochen Jiang wrote: > > Hi all, > > There is a recent change in AVX10 documentation which allows 64 bit mask > register instructions in AVX10-256, the documentation comes following: > > Intel Advanced Vector Extensions 10 (Intel AVX10) Architecture Specification

Re: [PATCH] fold-const: Handle AND, IOR, XOR with stepped vectors [PR112971].

2023-12-19 Thread Andrew Pinski
On Tue, Dec 19, 2023 at 2:40 AM Richard Sandiford wrote: > > Richard Biener writes: > > On Tue, 19 Dec 2023, juzhe.zh...@rivai.ai wrote: > > > >> Hi, Richard. > >> > >> After investigating the codes: > >> /* Return true if EXPR is the integer constant zero or a complex constant > >>of zero,

Re: [PATCH 0/4] v3 of: Option handling: add documentation URLs

2023-12-19 Thread Joseph Myers
On Thu, 14 Dec 2023, David Malcolm wrote: > Are these OK for trunk, assuming I followup with adding CI for this? > (that said, I disappear for the rest of 2023 at the end of this week, so > I'd work on the CI in early January) Patches 2 (updated at the time of commit to reflect the latest

Re: [PATCH 1/4; v3] options: add gcc/regenerate-opt-urls.py

2023-12-19 Thread Joseph Myers
On Thu, 14 Dec 2023, David Malcolm wrote: > diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi > index 26a7e9c35070..9a394b3e2c77 100644 > --- a/gcc/doc/sourcebuild.texi > +++ b/gcc/doc/sourcebuild.texi > @@ -813,6 +813,10 @@ options supported by this target (@pxref{Run-time >

Re: [PATCH] strub: avoid lto inlining

2023-12-19 Thread Alexandre Oliva
On Dec 15, 2023, Richard Biener wrote: > I think __noipa__ is more complete and will make the libgcc functions appear > as black boxes to callers. I was hesitant to use __noipa__ because I thought it might disable relevant optimizations even when not using LTO, but it is likely safer in the

[PATCH #2v2/2] strub: sparc64: unbias the stack address [PR112917]

2023-12-19 Thread Alexandre Oliva
On Dec 15, 2023, Richard Biener wrote: > It might be worth amending the documentation in case this > is unexpected to users? Oh, yes indeed, thanks! Here's a patch that brings relevant parts of the implementation comment to the user-facing documentation, so that it reflects the change in

Re: [PATCH] tree-object-size: Always set computed bit for bdos [PR113012]

2023-12-19 Thread Siddhesh Poyarekar
On 2023-12-19 17:57, Jakub Jelinek wrote: On Mon, Dec 18, 2023 at 11:42:52AM -0500, Siddhesh Poyarekar wrote: It is always safe to set the computed bit for dynamic object sizes at the end of collect_object_sizes_for because even in case of a dependency loop encountered in nested calls, we have

ping^2: [PATCH] diagnostics: Fix behavior of permerror options after diagnostic pop [PR111918]

2023-12-19 Thread Lewis Hyatt
Hello- May I please ping this one? Thanks... https://gcc.gnu.org/pipermail/gcc-patches/2023-November/638692.html -Lewis On Wed, Nov 29, 2023 at 7:05 PM Lewis Hyatt wrote: > > On Thu, Nov 09, 2023 at 04:16:10PM -0500, Lewis Hyatt wrote: > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111918 >

Re: [PATCH] tree-object-size: Always set computed bit for bdos [PR113012]

2023-12-19 Thread Jakub Jelinek
On Mon, Dec 18, 2023 at 11:42:52AM -0500, Siddhesh Poyarekar wrote: > It is always safe to set the computed bit for dynamic object sizes at > the end of collect_object_sizes_for because even in case of a dependency > loop encountered in nested calls, we have an SSA temporary to actually > finish

Re: [PATCH] sccopy: remove unused data member [PR113069]

2023-12-19 Thread Jakub Jelinek
On Tue, Dec 19, 2023 at 05:19:35PM -0500, Marek Polacek wrote: > Should be obvious, but... tested on x86_64, ok for trunk? > > -- >8 -- > > PR tree-optimization/113069 > > gcc/ChangeLog: > > * gimple-ssa-sccopy.cc (scc_discovery): Remove unused member. Ok, thanks. > diff --git

Re: [V5] [C PATCH 4/4] c23: construct composite type for tagged types

2023-12-19 Thread Joseph Myers
On Sun, 17 Dec 2023, Martin Uecker wrote: > + tree f = build_decl (input_location, FIELD_DECL, DECL_NAME (a), > +composite_type_internal (ta, tb, cache)); > + > + DECL_PACKED (f) = DECL_PACKED (a); > + SET_DECL_ALIGN (f, DECL_ALIGN

[PATCH] sccopy: remove unused data member [PR113069]

2023-12-19 Thread Marek Polacek
Should be obvious, but... tested on x86_64, ok for trunk? -- >8 -- PR tree-optimization/113069 gcc/ChangeLog: * gimple-ssa-sccopy.cc (scc_discovery): Remove unused member. --- gcc/gimple-ssa-sccopy.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/gcc/gimple-ssa-sccopy.cc

[PATCH RFA] opts: -Werror=foo always implies -Wfoo [PR106213]

2023-12-19 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, OK for trunk? -- 8< -- -Werror=foo implying -Wfoo wasn't working for -Wdeprecated-copy-dtor, because it is specified as the value 2 of warn_deprecated_copy, which shows up as CLVC_EQUAL, which is not one of the three var_types handled by control_warning_option. It

Re: [V5] [C PATCH 3/4] c23: aliasing of compatible tagged types

2023-12-19 Thread Joseph Myers
On Sun, 17 Dec 2023, Martin Uecker wrote: > +/* While tese tests check that incompatible definitions > + * of enums can alias. */ s/tese/these/ Patch 3 is OK with that fix. -- Joseph S. Myers jos...@codesourcery.com

Re: [V5] [C PATCH 2/4] c23: tag compatibility rules for enums

2023-12-19 Thread Joseph Myers
On Sun, 17 Dec 2023, Martin Uecker wrote: > diff --git a/gcc/testsuite/gcc.dg/c23-tag-enum-1.c > b/gcc/testsuite/gcc.dg/c23-tag-enum-1.c > new file mode 100644 > index 000..a81a5afc456 > --- /dev/null > +++ b/gcc/testsuite/gcc.dg/c23-tag-enum-1.c > +void test2(void) > +{ > + enum ee

Re: [V5] [C PATCH 1/4] c23: tag compatibility rules for struct and unions

2023-12-19 Thread Joseph Myers
On Sun, 17 Dec 2023, Martin Uecker wrote: > Here is the revised series. The first three patches only > have changes in the tests as well as the return value > changes.   The fourth patch was now also revised, > with changes and tests to make sure that the composite > type works correctly for

Fwd: [PATCH] gprofng: a new GNU profiler

2023-12-19 Thread Vladimir Mezentsev
PING. If the patch is approved, can anyone apply this patch. I don't have permissions for `git push`. Thank you, -Vladimir Forwarded Message Subject:[PATCH] gprofng: a new GNU profiler Date: Wed, 13 Dec 2023 17:23:01 -0800 From: vladimir.mezent...@oracle.com To:

Re: [PATCH 1/5] OpenMP, NVPTX: memcpy[23]D bias correction

2023-12-19 Thread Tobias Burnus
Hi Julian & Thomas, the patch LGTM - and seemingly also Thomas is somewhat fine with it - and it includes the stand-alone testcase. * * * I guess, you don't know the answer to Thomas question, i.e. whether that's a bug in CUDA or in our use of the CUDA API? CUDA's spec itself,

Re: [pushed] c++: array DMI and member fn [PR109666]

2023-12-19 Thread Jason Merrill
On 12/19/23 14:08, Patrick Palka wrote: On Mon, 1 May 2023, Jason Merrill wrote: Tested x86_64-pc-linux-gnu, applying to trunk. Patrick, can you verify that this resolves 109506 and add whatever testcase(s) seem appropriate from that PR? -- 8< -- Here it turns out I also needed to adjust

Re: [PATCH] c: Split -Wcalloc-transposed-args warning from -Walloc-size, -Walloc-size fixes

2023-12-19 Thread Joseph Myers
On Mon, 18 Dec 2023, Jakub Jelinek wrote: > Hi! > > The following patch changes -Walloc-size warning to no longer warn > about int *p = calloc (1, sizeof (int));, because as discussed earlier, > the size is IMNSHO sufficient in that case, for alloc_size with 2 > arguments warns if the product of

Re: [pushed] c++: array DMI and member fn [PR109666]

2023-12-19 Thread Patrick Palka
On Mon, 1 May 2023, Jason Merrill wrote: > Tested x86_64-pc-linux-gnu, applying to trunk. > > Patrick, can you verify that this resolves 109506 and add whatever testcase(s) > seem appropriate from that PR? > > -- 8< -- > > Here it turns out I also needed to adjust cfun when stepping out of the

Re: [PATCH] c: Split -Wcalloc-transposed-args warning from -Walloc-size, -Walloc-size fixes

2023-12-19 Thread Martin Uecker
Am Dienstag, dem 19.12.2023 um 12:20 -0500 schrieb Jason Merrill: > On 12/19/23 03:47, Jakub Jelinek wrote: > > On Tue, Dec 19, 2023 at 08:11:11AM +0100, Martin Uecker wrote: > > > Am Montag, dem 18.12.2023 um 20:14 +0100 schrieb Jakub Jelinek: > > > > Hi! > > > > > > > > The following patch

Ping Re: [PATCH] contrib: add git gcc-style alias

2023-12-19 Thread Jason Merrill
On 12/11/23 22:00, Jason Merrill wrote: OK for trunk? Ping. CCing Alex because this could plausibly be considered build machinery, and he's had useful feedback on my sh code before. -- 8< -- I thought it could be easier to use check_GNU_style.py. With this alias, 'git gcc-style' will

Re: [PATCH] btf: change encoding of forward-declared enums [PR111735]

2023-12-19 Thread Indu Bhagat
On 12/12/23 14:35, David Faust wrote: The BTF specification does not formally define a representation for forward-declared enum types such as: enum Foo; Forward-declarations for struct and union types are represented by BTF_KIND_FWD, which has a 1-bit flag distinguishing the two. The

[PATCH] tree-object-size: Clean up unknown propagation

2023-12-19 Thread Siddhesh Poyarekar
Narrow down scope of the unknowns bitmap so that it is only accessible within the reexamination process. This also removes any role of unknown propagation from object_sizes_set, thus simplifying that code path a bit. gcc/ChangeLog: * tree-object-size.cc (object_size_info): Remove

Re: [PATCH] c: Split -Wcalloc-transposed-args warning from -Walloc-size, -Walloc-size fixes

2023-12-19 Thread Jason Merrill
On 12/19/23 03:47, Jakub Jelinek wrote: On Tue, Dec 19, 2023 at 08:11:11AM +0100, Martin Uecker wrote: Am Montag, dem 18.12.2023 um 20:14 +0100 schrieb Jakub Jelinek: Hi! The following patch changes -Walloc-size warning to no longer warn about int *p = calloc (1, sizeof (int));, because as

Re: [PATCH v2] RISC-V: Supports RISC-V Profiles in '-march' option.

2023-12-19 Thread Palmer Dabbelt
On Tue, 12 Dec 2023 04:08:09 PST (-0800), jia...@iscas.ac.cn wrote: Supports RISC-V profiles[1] in -march option. Default input set the profile is before other formal extensions. V2: Fixes some format errors and adds code comments for parse function Thanks for Jeff Law's review and comments.

Re: [PATCH v7 5/5] OpenMP/OpenACC: Reorganise OMP map clause handling in gimplify.cc

2023-12-19 Thread Tobias Burnus
Hi Julian, On 16.12.23 14:25, Julian Brown wrote: OpenMP/OpenACC: Reorganise OMP map clause handling in gimplify.cc This patch has been separated out from the C++ "declare mapper" support patch. It contains just the gimplify.cc rearrangement work, mostly moving

Re: [PATCH 2/3] Add generated .opt.urls files

2023-12-19 Thread Marc Poulhiès
Marc Poulhiès writes: >> Perhaps this script could also deal directly with Sphinx-generated >> HTML? > > I investigated a bit... The Ada part doesn't handle the html target, so > it's expected you don't have anything to parse. The online docs are > generated using a different script, not using

[COMMITTED] ada: Fix internal error on call with parameter of predicated subtype

2023-12-19 Thread Marc Poulhiès
From: Eric Botcazou The problem is that the predicated subtype does not inherit all the required attributes of a string subtype with a static predicate. gcc/ada/ * sem_ch3.adb (Analyze_Subtype_Declaration): Remove a short-circuit for subtypes without aspects when it comes to

[COMMITTED] ada: Missing error on positional container aggregates for types with Add_Named

2023-12-19 Thread Marc Poulhiès
From: Gary Dismukes The compiler fails to reject a container aggregate written using positional notation when the container type specifies an Add_Named operation in its Aggregate aspect. Container aggregates for such types must be written using named associations. The compiler ignores the

[COMMITTED] ada: Remove GNATcheck violations

2023-12-19 Thread Marc Poulhiès
From: Sheri Bernstein Remove GNATcheck violations by refactoring code and also using pragma Annotate to exempt them. gcc/ada/ * libgnat/a-comlin.adb (Argument_Count): Rewrite code so there is only one return, to remove Improper_Returns violation. (Command_Name): Add

[COMMITTED] ada: gnatbind: Do not generate Ada.Command_Line references when not used

2023-12-19 Thread Marc Poulhiès
From: Patrick Bernardi It was previously assumed that configurable runtimes could not return exit statuses, however this assumption no longer holds. Instead, only import the required symbols from Ada.Command_Line's support packages if Ada.Command_Line is in the closure of the partition when a

[COMMITTED] ada: Rename Is_Constr_Subt_For_UN_Aliased flag

2023-12-19 Thread Marc Poulhiès
From: Eric Botcazou The flag is set on the constructed subtype of an object with unconstrained nominal subtype that is aliased and is used by the code generator to adjust the layout of the object. But it is actually only used for array subtypes, where it determines whether the object is

[COMMITTED] ada: Add missing guard to previous change

2023-12-19 Thread Marc Poulhiès
From: Eric Botcazou Ancestor_Type is overloaded with Aggregate_Bounds on N_Aggregate nodes so its access needs to be guarded in Copy_Generic_Node. gcc/ada/ * sem_ch12.adb (Copy_Generic_Node): Add guard for Ancestor_Type. Tested on x86_64-pc-linux-gnu, committed on master. ---

[COMMITTED] ada: Rework comment in Expand_Ctrl_Function_Call

2023-12-19 Thread Marc Poulhiès
From: Eric Botcazou This expands on the reason for properly guarding the transformation. gcc/ada/ * exp_ch6.adb (Expand_Ctrl_Function_Call): Rework last comment. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_ch6.adb | 7 ++- 1 file changed, 6 insertions(+),

[COMMITTED] ada: Check all interfaces for valid iterator type

2023-12-19 Thread Marc Poulhiès
From: Viljar Indus gcc/ada/ * sem_ch13.adb (Valid_Default_Iterator): Check all interfaces for valid iterator type. Also improve error reporting. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_ch13.adb | 103 +-- 1

[COMMITTED] ada: Optimize performance and remove dynamic frame requirement.

2023-12-19 Thread Marc Poulhiès
From: Vasiliy Fofanov gcc/ada/ * libgnat/i-cstrin.adb (Value): Optimize. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/libgnat/i-cstrin.adb | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/gcc/ada/libgnat/i-cstrin.adb

[COMMITTED] ada: Compiler hangs on container aggregate with function call as key expression

2023-12-19 Thread Marc Poulhiès
From: Gary Dismukes The compiler hangs (or may crash, if assertions are enabled) when compiling an iterated association of a container aggregate that has a key expression given by a function call. The resolution of the call leads to a blowup in Build_Call_Marker, because the temporary copy of

[COMMITTED] ada: Further cleanup in finalization machinery

2023-12-19 Thread Marc Poulhiès
From: Eric Botcazou This removes the setting of the Is_Ignored_Transient flag on the temporaries needing finalization created by Expand_Ctrl_Function_Call when invoked from within the dependent expressions of conditional expressions. This flag tells the general finalization machinery to

[COMMITTED] ada: Fix style and typos in comments

2023-12-19 Thread Marc Poulhiès
From: Piotr Trojanek Code cleanup. gcc/ada/ * exp_ch9.adb, sem_ch10.adb, sem_util.adb: Fix comments. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_ch9.adb | 4 ++-- gcc/ada/sem_ch10.adb | 2 +- gcc/ada/sem_util.adb | 2 +- 3 files changed, 4 insertions(+), 4

[COMMITTED] ada: Remove unreferenced utility routine Get_Logical_Line_Number_Img

2023-12-19 Thread Marc Poulhiès
From: Piotr Trojanek Routine Get_Logical_Line_Number_Img was introduced for splitting of Pre/Post contracts, but subsequent patch for that feature removed its only use. It was then used by GNATprove, but that use is now removed as well. gcc/ada/ * sinput.adb, sinput.ads

[COMMITTED] ada: Fix crash on concurrent type aggregate

2023-12-19 Thread Marc Poulhiès
From: Ronan Desplanques Before this patch, the compiler would fail to examine the corresponding record types of concurrent types when building aggregate components. This patch fixes this, and adds a precondition and additional documentation on the subprogram that triggered the crash, as it never

[COMMITTED] ada: Add makefile targets for building/installing html doc

2023-12-19 Thread Marc Poulhiès
Add the ada.html and ada.install-html targets so that we can build the html with `make html`. gcc/ada/ * gcc-interface/Make-lang.in (ada.html, ada.install-html): Add. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/gcc-interface/Make-lang.in | 35

[COMMITTED] ada: Ignore unconstrained components as inputs for Depends

2023-12-19 Thread Marc Poulhiès
From: Piotr Trojanek The current wording of SPARK RM 6.1.5(5) about the inputs for the Depends contract doesn't mention "a record with at least one unconstrained component". gcc/ada/ * sem_prag.adb (Is_Unconstrained_Or_Tagged_Item): Update comment and body. Tested on

[COMMITTED] ada: Remove No_Dynamic_Priorities from Restricted_Tasking

2023-12-19 Thread Marc Poulhiès
From: Johannes Kliemann Some of our restricted runtimes support dynamic priorities. The binder needs to generate code for a restricted runtime even if the restriction No_Dynamic_Priorities is not in place. gcc/ada/ * libgnat/s-rident.ads: Remove No_Dynamic_Priorities from

[COMMITTED] ada: Fix spurious visibility error on parent's component in instance

2023-12-19 Thread Marc Poulhiès
From: Eric Botcazou This occurs for an aggregate of a derived tagged type in the body of the instance, because the full view of the parent type, which was visible in the generic construct (otherwise the aggregate would have been illegal), is not restored in the body of the instance.

[COMMITTED] ada: Fix SPARK expansion of container aggregates

2023-12-19 Thread Marc Poulhiès
From: Yannick Moy GNATprove supports container aggregates, except for indexed aggregates. It needs all expressions to have suitable target types and Do_Range_Check flags, which are added by the special expansion for GNATprove. There is no impact on code generation. gcc/ada/ *

[COMMITTED] ada: Cope with Sem_Util.Enclosing_Declaration oddness.

2023-12-19 Thread Marc Poulhiès
From: Steve Baird Sem_Util.Enclosing_Declaration can return a non-empty result which is not a declaration; clients may need to compensate for the case where an N_Subprogram_Specification node is returned. One such client is the function Is_Actual_Subp_Of_Inst. gcc/ada/ * sem_ch8.adb

[COMMITTED] ada: Adapt Ada.Command_Line to work on configurable runtimes

2023-12-19 Thread Marc Poulhiès
From: Patrick Bernardi The behaviour of the binder when handling command line arguments and exit codes is simplified so that references to the corresponding runtime symbols are always generated when the runtime is configured with command line argument and exit code support. This allows

[COMMITTED] ada: Plug small loophole in finalization machinery

2023-12-19 Thread Marc Poulhiès
From: Eric Botcazou The path in Expand_N_If_Expression implementing the special optimization for an unidimensional array type and dependent expressions with static bounds fails to call Process_Transients_In_Expression on their list of actions. gcc/ada/ * exp_ch4.adb

[COMMITTED] ada: Restore object constraint optimization

2023-12-19 Thread Marc Poulhiès
From: Ronan Desplanques This patch relaxes the requirement that discriminants values should be known at compile time for a particular optimization to be applied. That optimization is the one that treats an unconstrained object as constrained when the object is of a limited type, in order to

[COMMITTED] ada: Cleanup SPARK legality checking

2023-12-19 Thread Marc Poulhiès
From: Yannick Moy Move one SPARK legality check from GNAT to GNATprove, and cleanup other uses of SPARK_Mode for legality checking. gcc/ada/ * sem_ch4.adb (Analyze_Selected_Component): Check correct mode variable for GNATprove. * sem_prag.adb (Refined_State): Call

[COMMITTED] ada: Illegal instance of Generic_1.Generic_2 incorrectly accepted

2023-12-19 Thread Marc Poulhiès
From: Steve Baird If G1 is a generic package and G1.G2 is a child unit (also a generic package) then it would be illegal if some third generic unit (declared outside of G1) takes a formal instance of G1.G2, as in "with package I2 is new G1.G2;". This construct was incorrectly accepted in some

[COMMITTED] ada: Further cleanup in finalization machinery

2023-12-19 Thread Marc Poulhiès
From: Eric Botcazou This streamlines the submachinery that makes it so that the finalization of temporaries created for EWAs and conditional expressions is deferred to the enclosing context. The original implementation was using a deep tree traversal for EWAs, which was later restricted to

RE: RE: [PATCH] Regression FIX: Remove vect_variable_length XFAIL from some tests

2023-12-19 Thread Richard Biener
On Tue, 19 Dec 2023, Tamar Christina wrote: > > Do you mean for ARM SVE, these tests need to be specified as only ARM SVE ? > > I think that would be the right thing to do. I think these tests are > checking if we support VLA SLP. > changing it to a PASS unconditionally means that if someone

RE: [PATCH 3/21]middle-end: Implement code motion and dependency analysis for early breaks

2023-12-19 Thread Richard Biener
On Tue, 19 Dec 2023, Tamar Christina wrote: > > > > > + /* Save destination as we go, BB are visited in order and the > > > > > last one > > > > > + is where statements should be moved to. */ > > > > > + if (!dest_bb) > > > > > + dest_bb = gimple_bb (c); > > > > > + else

Re: [PATCH] aarch64: Validate register operands early in ldp fusion pass [PR113062]

2023-12-19 Thread Alex Coplan
On 19/12/2023 13:38, Richard Sandiford wrote: > Alex Coplan writes: > > On 19/12/2023 10:15, Richard Sandiford wrote: > >> Alex Coplan writes: > >> > We were missing validation of the candidate register operands in the > >> > ldp/stp pass. I was relying on recog rejecting such cases when we >

Re: [PATCH] aarch64: Validate register operands early in ldp fusion pass [PR113062]

2023-12-19 Thread Richard Sandiford
Alex Coplan writes: > On 19/12/2023 10:15, Richard Sandiford wrote: >> Alex Coplan writes: >> > We were missing validation of the candidate register operands in the >> > ldp/stp pass. I was relying on recog rejecting such cases when we >> > formed the final pair insn, but the testcase shows

RE: RE: [PATCH] Regression FIX: Remove vect_variable_length XFAIL from some tests

2023-12-19 Thread Tamar Christina
> Do you mean for ARM SVE, these tests need to be specified as only ARM SVE ? I think that would be the right thing to do. I think these tests are checking if we support VLA SLP. changing it to a PASS unconditionally means that if someone runs the testsuite in SVE only mode they’ll fail. >

Re: RE: [PATCH] Regression FIX: Remove vect_variable_length XFAIL from some tests

2023-12-19 Thread 钟居哲
Do you mean for ARM SVE, these tests need to be specified as only ARM SVE ? Actually, for RVV, is same situation as ARM. We are using VLS modes (fixed-length vectors) to vectorize these cases so that they are XPASS. The difference between RVV and ARM is that: variable-length and fixed-length

Re: [PATCH] LoongArch: Added TLS Le Relax support.

2023-12-19 Thread chenglulu
在 2023/12/19 下午8:37, Xi Ruoyao 写道: On Tue, 2023-12-19 at 19:04 +0800, Lulu Cheng wrote: +(define_insn "@add_tls_le_relax" +  [(set (match_operand:P 0 "register_operand" "=r") +   (unspec:P [(match_operand:P 1 "register_operand" "r") +  (match_operand:P 2 "register_operand"

Re: [PATCH] Optimize A < B ? A : B to MIN_EXPR.

2023-12-19 Thread Richard Biener
On Tue, Dec 19, 2023 at 6:39 AM liuhongt wrote: > > Similar for A < B ? B : A to MAX_EXPR. > There're codes in the frontend to optimize such pattern but failed to > handle testcase in the PR since it's exposed at gimple level when > folding backend builtins. > > pr95906 now can be optimized to

Re: [PATCH]middle-end: Handle hybrid SLP induction vectorization with early breaks.

2023-12-19 Thread Richard Biener
On Tue, 19 Dec 2023, Tamar Christina wrote: > Hi All, > > While we don't support SLP for early break vectorization, we > can land in the situation where the induction was vectorized > through hybrid SLP. This means when vectorizing the early > break live operation we need to get the results of

Re: [PATCH] LoongArch: Added TLS Le Relax support.

2023-12-19 Thread Xi Ruoyao
On Tue, 2023-12-19 at 19:04 +0800, Lulu Cheng wrote: > +(define_insn "@add_tls_le_relax" > +  [(set (match_operand:P 0 "register_operand" "=r") > +   (unspec:P [(match_operand:P 1 "register_operand" "r") > +  (match_operand:P 2 "register_operand" "r") > +  

  1   2   >