Re: [PATCH] Add -fcf-check-attribute=[yes|no|none] for Linux kernel

2022-05-11 Thread Richard Biener via Gcc-patches
On Wed, 11 May 2022, H.J. Lu wrote: > On Tue, May 10, 2022 at 11:39 PM Richard Biener wrote: > > > > On Tue, 10 May 2022, H.J. Lu wrote: > > > > > When compiling Linux kernel with -fcf-protection=branch to enable x86 > > > Indiret Branch Tracking (IBT), ENDBR is added to all global functions. > >

[committed] openmp: Add omp_all_memory support (C/C++ only so far)

2022-05-11 Thread Jakub Jelinek via Gcc-patches
Hi! The ugly part is that OpenMP 5.1 made omp_all_memory a reserved identifier which isn't allowed to be used anywhere but in the depend clause, this is against how everything else has been handled in OpenMP so far (where some identifiers could have special meaning in some OpenMP clauses or pragma

Re: [PATCH] testsuite: Update Wconversion testcase check type.

2022-05-11 Thread Palmer Dabbelt
On Wed, 11 May 2022 19:37:21 PDT (-0700), jia...@iscas.ac.cn wrote: Thank you, it hasn't commited into the trunk yet. Should be now. ISCAS å¨ Palmer Dabbelt ï¼2022å¹´5æ11æ¥ ä¸å5:59åéï¼ On Thu, 05 May 2022 11:45:50 PDT (-0700), [1]gcc-patches@gcc.gnu.org wrote: > On T

[PATCH] Remove -mpower8-fusion options

2022-05-11 Thread Michael Meissner via Gcc-patches
Eliminate power8-fusion and power8-fusion-sign options. As part of PR target/102059, one of the things came up is that we should eliminate the power8 fusion options altogether. This patch eliminates the -mpower8-fusion option. It does enable power8 fusion if the code is being tuned for power8.

RE: [PATCH] [i386]Add combine splitter to transform pxor/pcmpeqb/pmovmskb/cmp 0xffff to ptest.

2022-05-11 Thread Jiang, Haochen via Gcc-patches
Hi all, I just refined this patch with more explanation in commit message. No code change compare to last change, which removed ix86_match_ccmode. Ok for trunk? BRs, Haochen > -Original Message- > From: Jiang, Haochen > Sent: Saturday, May 7, 2022 9:55 AM > To: Uros Bizjak > Cc: gcc-p

[PATCH] [PR105455] predict: Check for no REG_BR_PROB in uninitialized case

2022-05-11 Thread Alexandre Oliva via Gcc-patches
There is an assumption in force_edge_cold that, if any edge out of the same src block has uninitialized probability, then a conditional branch out of src won't have REG_BR_PROB set. This assumption is supposed to hold, but buggy gimple passes may turn unconditional edges into conditional ones, a

Re: [PATCH v2] Strip of a vector load which is only used partially.

2022-05-11 Thread Hongtao Liu via Gcc-patches
On Tue, May 10, 2022 at 2:54 PM Richard Biener via Gcc-patches wrote: > > On Mon, May 9, 2022 at 7:11 AM liuhongt via Gcc-patches > wrote: > > > > Here's adjused patch. > > Ok for trunk? > > > > Optimize > > > > _4 = VEC_PERM_EXPR <_1, _1, { 4, 5, 6, 7, 4, 5, 6, 7 }>; > > _5 = BIT_FIELD_REF <

[PATCH] [PR105455] Set edge probabilities when hardening conditionals

2022-05-11 Thread Alexandre Oliva via Gcc-patches
When turning unconditional edges into conditional, as in gimple-harden-conditionals.cc:insert_check_and_trap, the newly-created edge's probability comes out uninitialized, while the previously unconditional edge's probability is presumably profile_probability::always. Mixing initialized and unin

[PATCH] Avoid visiting newly-created blocks in harden-conditionals

2022-05-11 Thread Alexandre Oliva via Gcc-patches
Reverse iteration over blocks, in gimple-harden-conditionals.cc, was supposed to avoid visiting blocks introduced by hardening and introducing further reversed conditionals and traps for them, but newly-created blocks may be inserted before the current block, as shown by the PR105455 testcase. N

Re: [PATCH] Fold GCC_VERSION >= $old_version to TRUE, otherwise to FALSE.

2022-05-11 Thread Eric Gallager via Gcc-patches
On Thu, May 5, 2022 at 2:26 PM Martin Liška wrote: > > On 5/5/22 14:24, Richard Biener wrote: > > Hmm, but we support C++11 host compilers that are not GCC but > > may claim to be, with GCC_VERSION 4.2.x for example. Are we sure > > all those liars implement what we guard with the version checks?

RE: [EXTERNAL] Re: [PATCH] Guard against applying scale with 0 denominator

2022-05-11 Thread Eugene Rozenfeld via Gcc-patches
In my case this is not exactly what the FIXME in the comment above says. The count is 0 even before the initial scaling happens. I hit this case with some changes I'm working on to enable per-instruction discriminators for AutoFDO. I looked into saving/restoring the old counts but it would be aw

[committed] analyzer: fix memory leaks

2022-05-11 Thread David Malcolm via Gcc-patches
These leaks all relate to logging within -fdump-analyzer[-stderr] or are one-time leaks; seen with valgrind. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Tested with valgrind. Pushed to trunk as r13-334-g99988b0e8b57b3. gcc/analyzer/ChangeLog: * checker-path.cc (state_ch

Re: [PATCH] options: Make -Ofast switch off -fsemantic-interposition

2022-05-11 Thread Fāng-ruì Sòng via Gcc-patches
On Fri, Nov 19, 2021 at 9:55 AM Martin Jambor wrote: > > Hi, > > On Fri, Nov 19 2021, Jan Hubicka wrote: > >> > Hi, > >> > > >> > On Fri, Nov 12 2021, Martin Jambor wrote: > >> > > Hi, > >> > > > >> > > using -fno-semantic-interposition has been reported by various people > >> > > to bring about c

[committed] wwwdocs: branching: Editorial changes re branch_changer.py

2022-05-11 Thread Gerald Pfeifer
This is a minor follow-up to Martin's patch commit 6b788fa278b4f863a17ab80e0bf4991c3d8de167 Author: Martin Liska Date: Mon Apr 19 14:55:54 2021 +0200 Move branch_changer.py usage to branching.html. though the markup predates his change (which merely made me notice it). Pushed. Ger

[PATCH v2] x86: Document -mcet-switch

2022-05-11 Thread H.J. Lu via Gcc-patches
When -fcf-protection=branch is used, the compiler will generate jump tables for switch statements where the indirect jump is prefixed with the NOTRACK prefix, so it can jump to non-ENDBR targets. Since the indirect jump targets are generated by the compiler, they are always valid. Document -mcet-

Re: [PATCH] x86: Document -mno-cet-switch

2022-05-11 Thread H.J. Lu via Gcc-patches
On Wed, May 11, 2022 at 12:02 PM Florian Weimer wrote: > > * H. J. Lu: > > > On Wed, May 11, 2022 at 11:45 AM Florian Weimer wrote: > >> > >> * H. J. Lu: > >> > >> >> NOTRACK avoids the need for ENDBR instructions, right? That's a > >> >> hardening improvement, so it should be used by default. >

Re: [PATCH] Use more ARRAY_SIZE.

2022-05-11 Thread David Malcolm via Gcc-patches
On Wed, 2022-05-11 at 15:04 -0400, Eric Gallager wrote: > On Wed, May 11, 2022 at 9:53 AM David Malcolm via Gcc-patches > wrote: > > > > On Thu, 2022-05-05 at 14:16 +0200, Martin Liška wrote: > > > Patch can bootstrap on x86_64-linux-gnu and survives regression > > > tests. > > > > > > Ready to

[pushed] c++: lambda template in requires [PR105541]

2022-05-11 Thread Jason Merrill via Gcc-patches
Since the patch for PR103408, the template parameters for the lambda in this test have level 1 instead of 2, and we were treating null template args as 1 level of arguments, so tsubst_template_parms decided it had nothing to do. Fixed by distinguishing between <> and no args at all, which is what w

Re: [PATCH] tree: introduce range adaptor for TREE_VEC

2022-05-11 Thread Jason Merrill via Gcc-patches
On 5/11/22 15:20, Patrick Palka wrote: This patch implements a simple tree wrapper, named tree_vec_range, which lets us idiomatically iterate over all the elements of a TREE_VEC using a C++11 range-based for loop: // v is a TREE_VEC for (tree e : tree_vec_range (v)) ... This is simil

[PATCH] tree: introduce range adaptor for TREE_VEC

2022-05-11 Thread Patrick Palka via Gcc-patches
This patch implements a simple tree wrapper, named tree_vec_range, which lets us idiomatically iterate over all the elements of a TREE_VEC using a C++11 range-based for loop: // v is a TREE_VEC for (tree e : tree_vec_range (v)) ... This is similar to the existing tree-based range adaptors

Re: [PATCH] Use more ARRAY_SIZE.

2022-05-11 Thread Eric Gallager via Gcc-patches
On Wed, May 11, 2022 at 9:53 AM David Malcolm via Gcc-patches wrote: > > On Thu, 2022-05-05 at 14:16 +0200, Martin Liška wrote: > > Patch can bootstrap on x86_64-linux-gnu and survives regression > > tests. > > > > Ready to be installed? > > I looked over the changes to: > > gcc/analyzer/*.cc >

Re: [PATCH] x86: Document -mno-cet-switch

2022-05-11 Thread Florian Weimer via Gcc-patches
* H. J. Lu: > On Wed, May 11, 2022 at 11:45 AM Florian Weimer wrote: >> >> * H. J. Lu: >> >> >> NOTRACK avoids the need for ENDBR instructions, right? That's a >> >> hardening improvement, so it should be used by default. >> > >> > NOTRACK weakens IBT since it disables IBT on the indirect jump i

Re: [PATCH] x86: Document -mno-cet-switch

2022-05-11 Thread H.J. Lu via Gcc-patches
On Wed, May 11, 2022 at 11:45 AM Florian Weimer wrote: > > * H. J. Lu: > > >> NOTRACK avoids the need for ENDBR instructions, right? That's a > >> hardening improvement, so it should be used by default. > > > > NOTRACK weakens IBT since it disables IBT on the indirect jump instruction. > > GCC us

Re: [PATCH] opts: improve option suggestion

2022-05-11 Thread David Malcolm via Gcc-patches
On Wed, 2022-05-11 at 16:49 +0200, Martin Liška wrote: > In case where we have 2 equally good candidates like > -ftrivial-auto-var-init= > -Wtrivial-auto-var-init > > for -ftrivial-auto-var-init, we should take the candidate that > has a difference in trailing sign symbol. > > Patch can bootstrap

Re: [PATCH] x86: Document -mno-cet-switch

2022-05-11 Thread Florian Weimer via Gcc-patches
* H. J. Lu: >> NOTRACK avoids the need for ENDBR instructions, right? That's a >> hardening improvement, so it should be used by default. > > NOTRACK weakens IBT since it disables IBT on the indirect jump instruction. > GCC uses it in the jump table to avoid ENDBR. Typical jump table code looks

Re: [ping2][PATCH 0/8][RFC] Support BTF decl_tag and type_tag annotations

2022-05-11 Thread David Faust via Gcc-patches
On 5/10/22 22:05, Yonghong Song wrote: On 5/10/22 8:43 PM, Yonghong Song wrote: On 5/6/22 2:18 PM, David Faust wrote: On 5/5/22 16:00, Yonghong Song wrote: On 5/4/22 10:03 AM, David Faust wrote: On 5/3/22 15:32, Joseph Myers wrote: On Mon, 2 May 2022, David Faust via Gcc-patches

Re: [PATCH] x86: Document -mno-cet-switch

2022-05-11 Thread H.J. Lu via Gcc-patches
On Wed, May 11, 2022 at 11:22 AM Florian Weimer wrote: > > * H. J. Lu: > > >> >> > Generate jump tables with ENDBR and skip the NOTRACK prefix for > >> >> > indirect > >> >> > jump. Document -mno-cet-switch to turn off CET instrumentation on > >> >> > jump > >> >> > tables for switch statements

Re: [PATCH] x86: Document -mno-cet-switch

2022-05-11 Thread Florian Weimer via Gcc-patches
* H. J. Lu: >> >> > Generate jump tables with ENDBR and skip the NOTRACK prefix for indirect >> >> > jump. Document -mno-cet-switch to turn off CET instrumentation on jump >> >> > tables for switch statements. >> >> >> >> Of course, that is a slight regression in security hardening. >> >> >> >> Q

Re: [PATCH] x86: Document -mno-cet-switch

2022-05-11 Thread H.J. Lu via Gcc-patches
On Wed, May 11, 2022 at 8:58 AM Florian Weimer wrote: > > * H. J. Lu: > > > On Wed, May 11, 2022 at 1:12 AM Florian Weimer wrote: > >> > >> * H. J. Lu via Gcc-patches: > >> > >> > When -fcf-protection=branch is used, the compiler will generate jump > >> > tables where the indirect jump is prefixe

[pushed] c++: fix arm-eabi bootstrap [PR105567]

2022-05-11 Thread Jason Merrill via Gcc-patches
Since my r13-112, in the template we were changing 'return' to 'return this' on cdtor_returns_this targets, and then getting confused by that when instantiating. So only make that change at instantiation time. Tested x86_64-pc-linux-gnu and arm-eabi sim, applying to trunk. PR bootstrap/1

[Patch] OpenMP: Handle descriptors in target's firstprivate [PR104949]

2022-05-11 Thread Tobias Burnus
Dear all, dear Jakub, this patch handles (for target regions) firstprivate(array_descriptor) by not only firstprivatizing the descriptor but also the data it points to. This is done by turning it in omp-low.cc the clause into firstprivate(descr) firstprivate(descr.data) and then attaching the

Re: [PATCH] [12/11/10] Fix invalid format warnings on Windows

2022-05-11 Thread Joseph Myers
On Wed, 11 May 2022, Martin Liška wrote: > May I please ping review for this? There are various coding style issues in the patch; at least missing space before '(' and '&&' at end of line (should be at start of line). It will also need to be updated for .c files having been renamed to .cc in t

Re: [PATCH] x86: Document -mno-cet-switch

2022-05-11 Thread Florian Weimer via Gcc-patches
* H. J. Lu: > On Wed, May 11, 2022 at 1:12 AM Florian Weimer wrote: >> >> * H. J. Lu via Gcc-patches: >> >> > When -fcf-protection=branch is used, the compiler will generate jump >> > tables where the indirect jump is prefixed with the NOTRACK prefix, so >> > it can jump to non-ENDBR targets. Yet

[PATCH] Extend --with-zstd documentation

2022-05-11 Thread Bruno Haible
The patch that was so far added for documenting --with-zstd is pretty minimal: - it refers to undocumented options --with-zstd-include and --with-zstd-lib; - it suggests that --with-zstd can be used without an argument; - it does not clarify how this option applies to cross-compilation.

[PATCH 3/3] rs6000: Remove

2022-05-11 Thread Segher Boessenkool
The mode iterator always expands to "wa". 2022-05-11 Segher Boessenkool * config/rs6000/rs6000.md: Use wa instead of . --- gcc/config/rs6000/rs6000.md | 98 + 1 file changed, 46 insertions(+), 52 deletions(-) diff --git a/gcc/config/rs600

[PATCH 2/3] rs6000: Remove

2022-05-11 Thread Segher Boessenkool
The mode iterator can just use "d" always. 2022-05-11 Segher Boessenkool * config/rs6000/rs6000.md: Use d instead of . --- gcc/config/rs6000/rs6000.md | 117 +--- 1 file changed, 57 insertions(+), 60 deletions(-) diff --git a/gcc/config/rs600

[PATCH 1/3] rs6000: Delete RS6000_CONSTRAINT_f

2022-05-11 Thread Segher Boessenkool
Constraint "f" is always exactly the same as constraint "d", so we do not need RS6000_CONSTRAINT_f. 2022-05-11 Segher Boessenkool * config/rs6000/constraints.md (register_constraint "f"): Use RS6000_CONSTRAINT_d. * config/rs6000/rs6000.cc (rs6000_debug_reg_global): Do n

[PATCH 0/3] rs6000: Delete and

2022-05-11 Thread Segher Boessenkool
Since 2c2aa74d1dft ("rs6000: Remove Xilinx FP") constraints d and f mean exactly the same thing, so we can use "d" always. This series cleans up the constraint initialisation a bit, and removes the mode attribute, since it can now always be "d". It also removes since it always is "wa", and it s

Re: [PATCH] Add -fcf-check-attribute=[yes|no|none] for Linux kernel

2022-05-11 Thread H.J. Lu via Gcc-patches
On Tue, May 10, 2022 at 11:39 PM Richard Biener wrote: > > On Tue, 10 May 2022, H.J. Lu wrote: > > > When compiling Linux kernel with -fcf-protection=branch to enable x86 > > Indiret Branch Tracking (IBT), ENDBR is added to all global functions. > > This creates more "legal" forward edges than nec

Re: [PATCH] configure: add --disable-fix-includes

2022-05-11 Thread Martin Liška
On 5/11/22 14:48, Andreas Schwab wrote: > On Mai 11 2022, Martin Liška wrote: > >> @Joseph: Can you please help me why --disable-$foo disables building $foo >> folder during the build? > > # Handle --disable- generically. > for dir in $configdirs $build_configdirs $target_configdirs ; do > dirn

[PATCH] opts: improve option suggestion

2022-05-11 Thread Martin Liška
In case where we have 2 equally good candidates like -ftrivial-auto-var-init= -Wtrivial-auto-var-init for -ftrivial-auto-var-init, we should take the candidate that has a difference in trailing sign symbol. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be instal

Re: [PATCH] AArch64: Cleanup CPU option processing code

2022-05-11 Thread Wilco Dijkstra via Gcc-patches
Hi Richard, > Although invoking ./cc1 directly only half-works with --with-arch, > it half-works well-enough that I'd still like to keep it working. > But I agree we should apply your change first, then I can follow up > with a patch to make --with-* work with ./cc1 later.  (I have a version > loc

Re: [PATCH, rs6000] Implemented f[min/max]_optab by xs[min/max]dp [PR103605]

2022-05-11 Thread Segher Boessenkool
Hi~ On Wed, May 11, 2022 at 04:53:08PM +0800, Kewen.Lin wrote: > on 2022/5/10 20:27, Segher Boessenkool wrote: > > Yes. RTL iterators and attributes are textual replacement and expansion > > only: there is no deeper semantic meaning to it. In fact, we should > > have only a "minmax" iterator and

Re: [PATCH] Remove size limit of PCH

2022-05-11 Thread LIU Hao via Gcc-patches
在 2022-05-10 22:28, Jakub Jelinek 写道: This looks reasonable, but doesn't contain the most important part. As mentioned in https://gcc.gnu.org/r12-5855 the generic part can now support relocation of PCH, so it is fine if it is mapped at some other address, it is preferrable if it is mapped at the

Re: [PATCH] x86: Document -mno-cet-switch

2022-05-11 Thread H.J. Lu via Gcc-patches
On Wed, May 11, 2022 at 1:12 AM Florian Weimer wrote: > > * H. J. Lu via Gcc-patches: > > > When -fcf-protection=branch is used, the compiler will generate jump > > tables where the indirect jump is prefixed with the NOTRACK prefix, so > > it can jump to non-ENDBR targets. Yet, for NOTRACK prefixe

Re: [PATCH] Use more ARRAY_SIZE.

2022-05-11 Thread David Malcolm via Gcc-patches
On Thu, 2022-05-05 at 14:16 +0200, Martin Liška wrote: > Patch can bootstrap on x86_64-linux-gnu and survives regression > tests. > > Ready to be installed? I looked over the changes to: gcc/analyzer/*.cc gcc/input.cc gcc/jit/*.cc and they look good to me. I assume that you enabled "jit"

[c++] Add module attachment

2022-05-11 Thread Nathan Sidwell
This adds module attachment as a distinct flag to 'in module purview'. A declaration may have neither or both (as before), but can also have just the 'in [named-module] purview', which was previously not representable. This new state allows some cleanup of redeclarations (particularly the builtin

[PATCH] Use variadic template functions for the gimple_build forwarders

2022-05-11 Thread Richard Biener via Gcc-patches
The following consolidates the forwarders to gimple_build with UNKNOWN_LOCATION by using two variadic template functions. This makes the code visually less disturbing and is in preparation of adding more forwarders with different stmt insertion schemes. Bootstrapped on x86_64-unknown-linux-gnu, t

Re: [PATCH] AArch64: Improve address rematerialization costs

2022-05-11 Thread Richard Biener via Gcc-patches
On Wed, May 11, 2022 at 2:23 PM Richard Sandiford via Gcc-patches wrote: > > Wilco Dijkstra writes: > > Hi Richard, > > > >> Yeah, I'm not disagreeing with any of that. It's just a question of > >> whether the problem should be fixed by artificially lowering the general > >> rtx costs with one p

Re: [PATCH] configure: add --disable-fix-includes

2022-05-11 Thread Andreas Schwab
On Mai 11 2022, Martin Liška wrote: > @Joseph: Can you please help me why --disable-$foo disables building $foo > folder during the build? # Handle --disable- generically. for dir in $configdirs $build_configdirs $target_configdirs ; do dirname=`echo $dir | sed -e s/target-//g -e s/build-//g -e

[PATCH, 10 backport] libstdc++: Implement P2325 changes to default-constructibility of views

2022-05-11 Thread Patrick Palka via Gcc-patches
Tested on x86_64-pc-linux-gnu, does this look OK for the 10 branch? NB: This backport of r12-1606 to the 10 branch deliberately omits parts of P2325R3 so as to maximize backward compatibility with pre-P2325R3 code. In particular, we don't remove the default ctors for back_insert_iterator, front_in

libgomp: Remove unused '--with-hsa-runtime', '--with-hsa-runtime-include', '--with-hsa-runtime-lib' (was: libgomp GCN plugin: Clean up unused references to system-provided HSA Runtime library)

2022-05-11 Thread Thomas Schwinge
Hi! On 2022-04-06T12:02:08+0200, Thomas Schwinge wrote: > On 2021-01-14T15:50:23+0100, I wrote: >> I'm raising here an issue with HSA libgomp plugin code changes from a >> while ago. While HSA is now no longer relevant for GCC master branch, >> the same code has also been copied into the GCN lib

libgomp GCN plugin: Clean up always-empty 'PLUGIN_GCN_CPPFLAGS', 'PLUGIN_GCN_LDFLAGS' (was: libgomp GCN plugin: Clean up unused references to system-provided HSA Runtime library)

2022-05-11 Thread Thomas Schwinge
Hi! On 2022-04-06T12:02:08+0200, I wrote: > On 2021-01-14T15:50:23+0100, I wrote: >> I'm raising here an issue with HSA libgomp plugin code changes from a >> while ago. While HSA is now no longer relevant for GCC master branch, >> the same code has also been copied into the GCN libgomp plugin. >

Re: [PATCH] AArch64: Improve address rematerialization costs

2022-05-11 Thread Richard Sandiford via Gcc-patches
Wilco Dijkstra writes: > Hi Richard, > >> Yeah, I'm not disagreeing with any of that. It's just a question of >> whether the problem should be fixed by artificially lowering the general >> rtx costs with one particular user (RA spill costs) in mind, or whether >> it should be fixed by making the

Re: [PATCH] docs: document --with-zstd

2022-05-11 Thread Martin Liška
On 5/11/22 13:50, Richard Biener wrote: > Should that use @option{}? --with-gmp etc. just refer to > @option{--with-gmp-include} without PATH/*, so please drop that here, too. Sure, adjusted and pushed. Martin

Re: [PATCH] configure: add --disable-fix-includes

2022-05-11 Thread Martin Liška
On 5/11/22 13:31, Rainer Orth wrote: > Hi Martin, > Subject: [PATCH] configure: add --disable-fix-includes >>> >>> As I've mentioned before, I believe, the command is called fixincludes >>> in current gcc docs, and the option should reflect that, not introduce a >>> name used nowhere else. >>

Re: [PATCH] Remove size limit of PCH

2022-05-11 Thread Jakub Jelinek via Gcc-patches
On Tue, May 10, 2022 at 09:30:03PM +0800, LIU Hao via Gcc-patches wrote: > From 2e314baed84fd80b3b3c4c67787a032b86dd54dc Mon Sep 17 00:00:00 2001 > From: LIU Hao > Date: Tue, 10 May 2022 13:19:07 +0800 > Subject: [PATCH] [PR14940] Remove size limit of PCH > > There shouldn't be such a limit in pr

Re: [PATCH] docs: document --with-zstd

2022-05-11 Thread Richard Biener via Gcc-patches
On Wed, May 11, 2022 at 1:22 PM Martin Liška wrote: > > Ready to be installed? > Thanks, > Martin > > PR other/105527 > > gcc/ChangeLog: > > * doc/install.texi: Document the configure option --with-zstd. > --- > gcc/doc/install.texi | 5 + > 1 file changed, 5 insertions(+) > >

Re: [PATCH] rtl-optimization/105559 - avoid quadratic behavior in delete_insn_and_edges

2022-05-11 Thread Jakub Jelinek via Gcc-patches
On Wed, May 11, 2022 at 01:45:13PM +0200, Richard Biener via Gcc-patches wrote: > On Wed, 11 May 2022, Richard Biener wrote: > > > When the insn to delete is a debug insn there's no point in figuring > > out whether it might be the last real insn and thus we have to purge > > dead edges. > > > >

Re: [PATCH] rtl-optimization/105559 - avoid quadratic behavior in delete_insn_and_edges

2022-05-11 Thread Richard Biener via Gcc-patches
On Wed, 11 May 2022, Richard Biener wrote: > When the insn to delete is a debug insn there's no point in figuring > out whether it might be the last real insn and thus we have to purge > dead edges. > > Bootstrap and regtest running on x86_64-unknown-linux-gnu. Actually revisiting PR94618 which

Re: [PATCH] Remove size limit of PCH

2022-05-11 Thread Jonathan Yong via Gcc-patches
On 5/10/22 13:30, LIU Hao wrote: 在 2022-05-10 20:00, Xi Ruoyao 写道: On Tue, 2022-05-10 at 19:35 +0800, LIU Hao via Gcc-patches wrote: Subject: [PATCH] Remove size limit of PCH Make it "Remove size limit of PCH [PR14940]", so once it's committed a message will show up in bugzilla. Here is t

[PATCH] rtl-optimization/105559 - avoid quadratic behavior in delete_insn_and_edges

2022-05-11 Thread Richard Biener via Gcc-patches
When the insn to delete is a debug insn there's no point in figuring out whether it might be the last real insn and thus we have to purge dead edges. Bootstrap and regtest running on x86_64-unknown-linux-gnu. 2022-05-11 Richard Biener PR rtl-optimization/105559 * cfgrtl.cc (de

Re: [PATCH] configure: add --disable-fix-includes

2022-05-11 Thread Rainer Orth
Hi Martin, >>> Subject: [PATCH] configure: add --disable-fix-includes >> >> As I've mentioned before, I believe, the command is called fixincludes >> in current gcc docs, and the option should reflect that, not introduce a >> name used nowhere else. > > No, I can't use it, because even with curre

[PATCH] docs: document --with-zstd

2022-05-11 Thread Martin Liška
Ready to be installed? Thanks, Martin PR other/105527 gcc/ChangeLog: * doc/install.texi: Document the configure option --with-zstd. --- gcc/doc/install.texi | 5 + 1 file changed, 5 insertions(+) diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi index 10bfceffceb..1d

[PATCH] Implement some of fold_binary_op_with_conditional_arg in match.pd

2022-05-11 Thread Richard Biener via Gcc-patches
The following allows (c != 0 ? 0 : 100) != 0 to be simplified as c != 0 as fold_binary_op_with_conditional_arg would have done via forwprop and GENERIC folding. Likewise it allows to combine (a != 0) != 0 directly via match.pd instead of only via forwprop and again fold_binary_op_with_conditional_

Re: [PATCH] configure: add --disable-fix-includes

2022-05-11 Thread Martin Liška
On 5/11/22 13:00, Rainer Orth wrote: > Hi Martin, > >> On 5/9/22 23:14, Joseph Myers wrote: >>> If you add a new configure option, it should be documented in >>> install.texi. >>> >> >> Both comments fixed in the v2. >> >> Patch can bootstrap on x86_64-linux-gnu and survives regression tests. >>

Re: [PATCH] AArch64: Improve address rematerialization costs

2022-05-11 Thread Wilco Dijkstra via Gcc-patches
Hi Richard, > Yeah, I'm not disagreeing with any of that.  It's just a question of > whether the problem should be fixed by artificially lowering the general > rtx costs with one particular user (RA spill costs) in mind, or whether > it should be fixed by making the RA spill code take the factors

Re: [PATCH] configure: add --disable-fix-includes

2022-05-11 Thread Rainer Orth
Hi Martin, > On 5/9/22 23:14, Joseph Myers wrote: >> If you add a new configure option, it should be documented in >> install.texi. >> > > Both comments fixed in the v2. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > From 58d431568d6b6163dd9cdc920239f173689a769c Mon

Re: [PATCH] configure: add --disable-fix-includes

2022-05-11 Thread Martin Liška
On 5/9/22 23:14, Joseph Myers wrote: > If you add a new configure option, it should be documented in > install.texi. > Both comments fixed in the v2. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, MartinFrom 58d431568d6b6163dd9cdc920239f17

[PATCH v2, rs6000] Implemented f[min/max]_optab by xs[min/max]dp [PR103605]

2022-05-11 Thread HAO CHEN GUI via Gcc-patches
Hi, This patch implements optab f[min/max]_optab by xs[min/max]dp on rs6000. Tests show that outputs of xs[min/max]dp are consistent with the standard of C99 fmin/max. This patch also binds __builtin_vsx_xs[min/max]dp to fmin/max instead of smin/max. So the builtins always generate xs[min/max]

Re: [PATCH] i386: simplify cpu_feature handling

2022-05-11 Thread Uros Bizjak via Gcc-patches
On Wed, May 11, 2022 at 10:50 AM Martin Liška wrote: > > On 5/11/22 10:27, Uros Bizjak wrote: > > On Wed, May 11, 2022 at 10:19 AM Martin Liška wrote: > >> > >> On 5/2/22 09:57, Martin Liška wrote: > >>> On 3/31/22 09:01, Martin Liška wrote: > @Jakub: May I install it once stage1 opens? > >>

Re: [PATCH] rs6000: Fix constraint v with rs6000_constraints[RS6000_CONSTRAINT_v]

2022-05-11 Thread Kewen.Lin via Gcc-patches
on 2022/1/27 20:51, Segher Boessenkool wrote: > On Thu, Jan 27, 2022 at 07:24:53PM +0800, Kewen.Lin wrote: >> on 2022/1/27 上午1:57, Segher Boessenkool wrote: >>> I like your original patch better. But for stage 1, sorry. >> >> Thanks Segher! Is it ok to commit it then? Or I'll repost this once >>

[Ada] Proof of 'Image support for unsigned integers

2022-05-11 Thread Pierre-Marie de Rodat via Gcc-patches
Prove System.Image_U, making the connection with the space available in the string as computed with System.Width_U and the functions that support the other direction of 'Value in System.Value_U. The units that support 'Image cannot be marked Pure anymore, as they now depend on non-pure units. Tes

[Ada] Sort Detect_Blocking alphabetically among names and pragmas

2022-05-11 Thread Pierre-Marie de Rodat via Gcc-patches
In GNAT User's Guide section about configuration pragmas the Detect_Blocking has been recently moved to an alphabetic order. This patch moves the its Name_Id and Pragma_Is in the source code to match this order. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * snames.ads-tmp

[Ada] Fix unbalanced paren in documentation marker for GNAT Studio

2022-05-11 Thread Pierre-Marie de Rodat via Gcc-patches
Unbalanced parens can be found when editing in emacs using the "check-parens" command. Offending occurrences must be examined manually, because few of them are intentional. Minor cleanup of typos in documentation. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * doc/gnat_rm/

[Ada] Fix Compile_Time_(Error|Warning) as non-configuration pragmas

2022-05-11 Thread Pierre-Marie de Rodat via Gcc-patches
Uses of Compile_Time_Error and Compile_Time_Warning as configuration pragmas were detected with a custom check in semantic analysis. Now they are detected with an existing general check in parser. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_prag.adb (Analyze_Pragma):

[Ada] Correctly reject record aggregate using brackets

2022-05-11 Thread Pierre-Marie de Rodat via Gcc-patches
Ada 2022 bracket syntax is only allowed for arrays and containers, not records. This change correctly rejects record aggregates using brackets along with few cases of brackets being used instead of parentheses. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/a-direct

[Ada] New No_Local_Tagged_Types restriction

2022-05-11 Thread Pierre-Marie de Rodat via Gcc-patches
Add new configuration restriction No_Local_Tagged_Types. This new restriction ensures at compile time that all tagged types are only declared at the library level. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/s-rident.ads (Restriction_Id): Add No_Local_Tag

[Ada] Fix spurious ambiguity for if_expression containing operator

2022-05-11 Thread Pierre-Marie de Rodat via Gcc-patches
It comes from a discrepancy in the analysis of binary operators, between the predefined ones for which we register an interpretation with the base type and the user-defined ones for which we register an interpretation with the subtype directly. This is harmless in almost all cases because the two

[Ada] Do not create useless itype in Constrain_Access

2022-05-11 Thread Pierre-Marie de Rodat via Gcc-patches
In the case of a constrained access definition for a record component we are calling create_itype twice the former not being updated. This leads to a malformed node that crashes -gnatG when predicates are activated. Instead of creating a default Itype for Desig_Subtype, create it with the correct

[Ada] Detect infinite loops with operators in exit conditions

2022-05-11 Thread Pierre-Marie de Rodat via Gcc-patches
To warn about infinite loops we detect variables referenced in loop exit conditions. We handle references within boolean operators, i.e. comparison and negation, which are likely to appear at the top level of the condition (e.g. "X > 0"). However, we can easily handle all operators, because they ar

[Ada] Adapt proof of System.Arith_Double after update of Z3

2022-05-11 Thread Pierre-Marie de Rodat via Gcc-patches
Update to version 4.8.14 of prover Z3 requires minor adjustments of the ghost code to add necessary intermediate assertions that drive the automatic proof. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/s-aridou.adb (Double_Divide, Scaled_Divide): Add interm

[Ada] Update categorization of implementation restrictions

2022-05-11 Thread Pierre-Marie de Rodat via Gcc-patches
Some of the restrictions were initially implemented as specific to GNAT, but now they are part of Ada; likewise, some of recently added restrictions were considered to be part of Ada, but are not yet in the standard. This patch updates their categorization based on Ada 202x Draft 32. Only a No_Imp

[Ada] Add SUSE 32bit dependency

2022-05-11 Thread Pierre-Marie de Rodat via Gcc-patches
On SUSE 15, glibc-locale-base-32bit is needed to run 32bit versions of Libadalang tools. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * doc/gnat_ugn/platform_specific_information.rst: Add glibc-locale-base-32bit as a dependency in SUSE distributions. * gnat_

[Ada] Fix "S p e c" and "B o d y" file headers

2022-05-11 Thread Pierre-Marie de Rodat via Gcc-patches
Fix Spec/Body headers in .adb/.ads files, respectively; all violations detected with grep and manually filtered because of .tmpl files. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_atag.adb, lib-util.ads, libgnat/g-decstr.adb, libgnat/g-exptty.adb, libgnat/g-s

[Ada] Fix formatting glitches in GNAT User's Guide

2022-05-11 Thread Pierre-Marie de Rodat via Gcc-patches
Only enhancement of formatting. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * doc/gnat_ugn/gnat_and_program_execution.rst, doc/gnat_ugn/gnat_utility_programs.rst, doc/gnat_ugn/inline_assembler.rst: Fix typos and formatting glitches. * gnat_u

[Ada] Use pygments for Ada code examples of elaboration control

2022-05-11 Thread Pierre-Marie de Rodat via Gcc-patches
Only enhancement of formatting. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Change blocks from plain code to Ada.diff --git a/gcc/ada/doc/gnat_ugn/elaboration_order_handling_in_gnat.rst b/gcc/ada/doc/gnat_ugn/e

[Ada] Excess finalization on assignment with target name symbol

2022-05-11 Thread Pierre-Marie de Rodat via Gcc-patches
In cases where the Ada 2022 feature of target name symbols (@) is used and the evaluation of the name is side-effect free, the compiler creates a temporary object to hold the value of the target object for use as the value of "@" symbols in the right-hand side expression. In the case where the targ

[Ada] fix crash on Secondary_Stack_Size with discriminant

2022-05-11 Thread Pierre-Marie de Rodat via Gcc-patches
This patch fixes a crash caused by specifying the Secondary_Stack_Size aspect of a task type as the value of a discriminant of the task type, and then declaring a record component whose type is the task type, constrained to a discriminant of the record. Tested on x86_64-pc-linux-gnu, committed on

[Ada] Reset Reachable field when mutating label into loop entity

2022-05-11 Thread Pierre-Marie de Rodat via Gcc-patches
An entity flag Reachable now only applies to E_Label entities and needs to be explicitly reset when mutating labels into loop entities. Only needed to prevent cascaded errors when compiling a malicious ACATS test with -gnatq (try semantics, even if parse errors). Cleanup related to detection of un

[Ada] Fix layout of tables in PDF version of GNAT RM

2022-05-11 Thread Pierre-Marie de Rodat via Gcc-patches
Tables with small left columns and large right columns had colliding text in the PDF version of GNAT RM. Spotted while adding description of pragma Ada_2022. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * doc/gnat_rm/implementation_defined_characteristics.rst: Add

[Ada] Fix layout in description of aspects and pragmas

2022-05-11 Thread Pierre-Marie de Rodat via Gcc-patches
Remove extra whitespace in examples of pragmas and aspects. Spotted while adding description of pragma Ada_2022. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * doc/gnat_rm/implementation_defined_aspects.rst, doc/gnat_rm/implementation_defined_pragmas.rst: Remove ex

[Ada] Fix markup in description of implementation-defined characteristics

2022-05-11 Thread Pierre-Marie de Rodat via Gcc-patches
Fix formatting of description lists, i.e. continuation lines are now indented like their preceding lines. Spotted while adding description of pragma Ada_2022. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * doc/gnat_rm/implementation_defined_characteristics.rst: Remove

[Ada] Fix markup in description of pragma Eliminate

2022-05-11 Thread Pierre-Marie de Rodat via Gcc-patches
Fix formatting of a nested bullet lists. Spotted while adding description of pragma Ada_2022. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * doc/gnat_rm/implementation_defined_pragmas.rst (Pragma Eliminate): Fix markup. * gnat_rm.texi: Regenerate.diff --git

[Ada] Document pragma Ada_2022

2022-05-11 Thread Pierre-Marie de Rodat via Gcc-patches
Pragma Ada_2022 is similar to existing pragma Ada_2012 and similarly deserves to be documented. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * doc/gnat_rm/implementation_defined_pragmas.rst (Pragma Ada_2022): Copy description from pragma Ada 2012 and adapt.

[Ada] Add guard for making only legal labels unreachable

2022-05-11 Thread Pierre-Marie de Rodat via Gcc-patches
An entity flag Reachable now only applies to E_Label entities. We had an appropriate guard for setting this flag, but not for clearing. Cleanup related to detection of uninitialized scalars with GOTO statements. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch5.adb (A

[Ada] Properly reject unsupported address specifications

2022-05-11 Thread Pierre-Marie de Rodat via Gcc-patches
In the case of an object declaration with an indefinite nominal subtype (roughly speaking, that's an object that takes its bounds, discriminants, and/or tag from its explicit initial value), GNAT does not support address specifications unless the size of the object is known at compile time. In som

[Ada] Move Reachable flag to E_Label entities

2022-05-11 Thread Pierre-Marie de Rodat via Gcc-patches
An entity flag Reachable is described as "defined in labels". It is only read and written for entities of kind E_Label (the code has necessary guards for that). There no need for this flag to be specified for all entities in the generated AST. Cleanup related to detection of uninitialized scalars

[Ada] Set_Is_Known_Valid only if Safe_To_Capture_Value

2022-05-11 Thread Pierre-Marie de Rodat via Gcc-patches
Library-level variables with initializers could have Is_Known_Valid set when analyzing their definition, and the flag would only be cleared when analyzing a statement that assigned to them. Procedures and functions analyzed before the flag got cleared could skip validity checking for the correspond

[Ada] Avoid crash for -gnatR -gnatc

2022-05-11 Thread Pierre-Marie de Rodat via Gcc-patches
If the -gnatR -gnatc are both given, then the compiler crashes. This patch fixes that, and avoids printing the uncomputed sizes and alignments that were causing the crash. (Previous versions of the compiler printed incorrect values in such cases.) Tested on x86_64-pc-linux-gnu, committed on trunk

  1   2   >