Re: [PATCH] [i386] Optimize movzwl + vmovd/vmovq to vmovw.

2022-05-11 Thread Uros Bizjak via Gcc-patches
On Wed, May 11, 2022 at 5:39 AM Hongtao Liu wrote: > > On Mon, May 9, 2022 at 4:28 PM Uros Bizjak wrote: > > > > On Mon, May 9, 2022 at 4:03 AM liuhongt wrote: > > > > > > Similarly optimize movl + vmovq to vmovd. > > > > > > Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. > > > Ok for

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

2022-05-11 Thread Richard Biener via Gcc-patches
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 necessary. -mmanual-endbr > provides a way to insert ENDBR instructio

Re: [1/2] PR96463 - aarch64 specific changes

2022-05-11 Thread Richard Sandiford via Gcc-patches
Prathamesh Kulkarni writes: > On Fri, 6 May 2022 at 16:00, Richard Sandiford > wrote: >> >> Prathamesh Kulkarni writes: >> > diff --git a/gcc/config/aarch64/aarch64-sve-builtins-base.cc >> > b/gcc/config/aarch64/aarch64-sve-builtins-base.cc >> > index c24c0548724..1ef4ea2087b 100644 >> > --- a/

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

2022-05-11 Thread Uros Bizjak via Gcc-patches
On Tue, May 10, 2022 at 6:20 PM H.J. Lu wrote: > > 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 prefixes to work, the > NOTRACK specific enable bit

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

2022-05-11 Thread Florian Weimer via Gcc-patches
* 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 prefixes to work, the > NOTRACK specific enable bit must be set, what ren

Re: [PATCH] Use more ARRAY_SIZE.

2022-05-11 Thread Martin Liška
On 5/9/22 14:03, Richard Biener wrote: > On Thu, May 5, 2022 at 4:30 PM Martin Liška wrote: >> >> On 5/5/22 14:58, Iain Buclaw wrote: >>> This D front-end change doesn't look right to me, besides the slight >> >> Hello. >> >> Sorry, I've re-read the patch and fixed some places where the macro usag

Re: [PATCH] i386: simplify cpu_feature handling

2022-05-11 Thread Martin Liška
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? > > May I please ping this? > > Thanks, > Martin > >> >> Cheers, >> Martin >> >> On 1/3/22 12:43, Martin Liška wrote: >>> PING: Jakub? >>> >>> On 12/15/21 10:57, Martin Liš

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

2022-05-11 Thread Martin Liška
On 1/13/22 12:00, Tomas Kalibera wrote: > On 1/13/22 10:40 AM, Martin Liška wrote: > > [...] >> Apart from that, I support the patch (I cannot approve it). Note we're now >> approaching >> stage4 and this is definitelly a stage1 material (opens after GCC 12.1.0 >> gets released). > > Thanks, Ma

Re: [PATCH] i386: simplify cpu_feature handling

2022-05-11 Thread Uros Bizjak via Gcc-patches
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? > > > > May I please ping this? > > > > Thanks, > > Martin > > > >> > >> Cheers, > >> Martin > >> > >> On 1/3/22

Re: [PATCH] [Middle-end] Enhance final_value_replacement_loop to handle bitwise induction.

2022-05-11 Thread Richard Biener via Gcc-patches
On Mon, May 9, 2022 at 7:19 AM liuhongt wrote: > > This patch will enable below optimization: > > { > - int bit; > - long long unsigned int _1; > - long long unsigned int _2; > - > [local count: 46707768]: > - > - [local count: 1027034057]: > - # tmp_11 = PHI > - # bit_13 = PHI > -

[PATCH] bootstrap/105551 - restore nvptx build

2022-05-11 Thread Richard Biener via Gcc-patches
The following makes sure to disable var-tracking if only dwarf2-line debuginfo is present. Bootstrapped on x86_64-unknown-linux-gnu, and nvptx by Tobias, pushed. 2022-05-11 Richard Biener PR bootstrap/105551 * opts.cc (finish_options): Also disable var-tracking if !DWA

Re: [PATCH] i386: simplify cpu_feature handling

2022-05-11 Thread Martin Liška
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? >>> >>> May I please ping this? >>> >>> Thanks, >>> Martin >>>

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

2022-05-11 Thread Kewen.Lin via Gcc-patches
Hi Segher, on 2022/5/10 20:27, Segher Boessenkool wrote: > Hi guys, > > On Mon, May 09, 2022 at 12:05:51PM +0800, Kewen.Lin wrote: >> on 2022/5/9 09:54, HAO CHEN GUI wrote: >>> This patch implements optab f[min/max]_optab by xs[min/max]dp on rs6000. >>> Tests show that outputs of xs[min/max]dp

[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

[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] 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] 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] 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] 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] 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] 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 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 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] 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 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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

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 >>

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? > >>

[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] 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

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] 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 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. >>

[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_

[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

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] 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] 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

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] 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] 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] 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] 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] 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] 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

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. >

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

[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

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

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

[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

[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

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"

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] 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, 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] 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

[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] 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

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

[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

[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 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 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] 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.

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

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

[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

[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

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

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 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: [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 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: [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 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] 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] 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 >

[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] 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

[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] 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

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. >

[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-

[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

  1   2   >