[PATCH][pushed] contrib: add 'contrib' to default dirs in update-copyright.py

2023-01-05 Thread Martin Liška
Hi. I forgot to include contrib folder in default dir, thus the copyright in the folder haven't been updated by Jakub. However, I noticed when I run ./contrib/update-copyright.py --this-year I get much more modifications out of contrib folder: $ git diff --stat ... 951 files changed, 976

Re: [PATCH] xtensa: Optimize stack frame adjustment more

2023-01-05 Thread Takayuki 'January June' Suwa via Gcc-patches
On 2023/01/06 15:26, Max Filippov wrote: > On Thu, Jan 5, 2023 at 7:35 PM Takayuki 'January June' Suwa > wrote: >> On second thought, it cannot be a good idea to split addition/subtraction to >> the stack pointer. >> >>> -4aaf: b0a192 movia9, 0x1b0 >>> -4ab2: 1f9a

[PATCH] [RISCV] Change the generation mode of `adjust_sp_rtx` from gen_insn to gen_SET.

2023-01-05 Thread jinma via Gcc-patches
From 35c1f22d3c9a6910103cf9688c5c2bc3d5b75c68 Mon Sep 17 00:00:00 2001 From: Jin Ma Date: Fri, 6 Jan 2023 14:47:37 +0800 Subject: [PATCH] [RISCV] Change the generation mode of `adjust_sp_rtx` from gen_insn to gen_SET. The gen_insn method is used to generate `adjust_sp_rtx` here, which has

Re: [PATCH] xtensa: Optimize stack frame adjustment more

2023-01-05 Thread Max Filippov via Gcc-patches
On Thu, Jan 5, 2023 at 7:35 PM Takayuki 'January June' Suwa wrote: > On second thought, it cannot be a good idea to split addition/subtraction to > the stack pointer. > > > -4aaf: b0a192 movia9, 0x1b0 > > -4ab2: 1f9aadd.n a1, a15, a9 > > > +4aaf:

Re: [PATCH] xtensa: Optimize stack frame adjustment more

2023-01-05 Thread Takayuki 'January June' Suwa via Gcc-patches
On 2023/01/06 6:32, Max Filippov wrote: > Hi Suwa-san, Hi! > > On Thu, Jan 5, 2023 at 3:57 AM Takayuki 'January June' Suwa > wrote: >> >> This patch introduces a convenient helper function for integer immediate >> addition with scratch register as needed, that splits and emits either >> up to

Re: [RFA] choosing __platform_wait_t on targets without lock-free 64 atomics

2023-01-05 Thread Jonathan Wakely via Gcc-patches
How about this? I don't think we should worry about targets without atomic int, so don't bother using types smaller than int. -- >8 -- For non-futex targets the __platform_wait_t type is currently uint64_t, but that requires a lock in libatomic for some 32-bit targets. We don't really need a

Re: [PATCH] libgccjit: Fix a failing test

2023-01-05 Thread Guillaume Gomez via Gcc-patches
Ping David. Le sam. 24 déc. 2022 à 21:01, Guillaume Gomez a écrit : > Ping David > > Le jeu. 15 déc. 2022 à 11:34, Guillaume Gomez > a écrit : > >> Forgot it indeed, thanks for notifying me! >> >> I modified the commit message to add it and added it into this email. >> >> Le mer. 14 déc. 2022

[PATCH v2 3/4] diagnostics: libcpp: Assign real locations to the tokens inside _Pragma strings

2023-01-05 Thread Lewis Hyatt via Gcc-patches
Currently, the tokens obtained from a destringified _Pragma string do not get assigned proper locations while they are being lexed. After the tokens have been obtained, they are reassigned the same location as the _Pragma token, which is sufficient to make things like _Pragma("GCC diagnostic

[PATCH v2 1/4] diagnostics: libcpp: Add LC_GEN linemaps to support in-memory buffers

2023-01-05 Thread Lewis Hyatt via Gcc-patches
Add a new linemap reason LC_GEN which enables encoding the location of data that was generated during compilation and does not appear in any source file. There could be many use cases, such as, for instance, referring to the content of builtin macros (not yet implemented, but an easy lift after

[PATCH v2 4/4] diagnostics: Support generated data locations in SARIF output

2023-01-05 Thread Lewis Hyatt via Gcc-patches
The diagnostics routines for SARIF output need to read the source code back in, so that they can generate "snippet" and "content" records, so they need to be able to cope with generated data locations. Add support for that in diagnostic-format-sarif.cc. gcc/ChangeLog: *

[PATCH v2 2/4] diagnostics: Handle generated data locations in edit_context

2023-01-05 Thread Lewis Hyatt via Gcc-patches
Class edit_context handles outputting fixit hints in diff form that could be manually or automatically applied by the user. This will not make sense for generated data locations, such as the contents of a _Pragma string, because the text to be modified does not appear in the user's input files. We

[PATCH v2 0/4] diagnostics: libcpp: Overhaul locations for _Pragma tokens

2023-01-05 Thread Lewis Hyatt via Gcc-patches
Hello- This series contains the four remaining patches in the series originally sent here: https://gcc.gnu.org/pipermail/gcc-patches/2022-November/605029.html which implements improved locations for tokens lexed from a string inside a _Pragma directive. v2 1/4: diagnostics: libcpp: Add LC_GEN

Re: [PATCH 4/6] diagnostics: libcpp: Add LC_GEN linemaps to support in-memory buffers

2023-01-05 Thread Lewis Hyatt via Gcc-patches
On Thu, Nov 17, 2022 at 4:21 PM Lewis Hyatt wrote: > > On Sat, Nov 05, 2022 at 12:23:28PM -0400, David Malcolm wrote: > > On Fri, 2022-11-04 at 09:44 -0400, Lewis Hyatt via Gcc-patches wrote: > > [...snip...] > > > > > > diff --git a/gcc/c-family/c-common.cc b/gcc/c-family/c-common.cc > > > index

Re: [PATCH] xtensa: Optimize stack frame adjustment more

2023-01-05 Thread Max Filippov via Gcc-patches
Hi Suwa-san, On Thu, Jan 5, 2023 at 3:57 AM Takayuki 'January June' Suwa wrote: > > This patch introduces a convenient helper function for integer immediate > addition with scratch register as needed, that splits and emits either > up to two ADDI/ADDMI machine instructions or an addition by

Re: [x86_64 PATCH] Introduce insvti_highpart define_insn_and_split.

2023-01-05 Thread Uros Bizjak via Gcc-patches
On Thu, Jan 5, 2023 at 3:10 PM Roger Sayle wrote: > > > This patch adds a convenient post-reload splitter for setting/updating > the highpart of a TImode variable, using the recently added > split_double_concat infrastructure. > > For the new test case below: > > __int128 foo(__int128 x, unsigned

Re: [PATCH] wwwdocs: Note that old reload is deprecated

2023-01-05 Thread Segher Boessenkool
On Thu, Jan 05, 2023 at 02:54:04PM -0500, Paul Koning wrote: > > On Jan 5, 2023, at 2:27 PM, Segher Boessenkool > > wrote: > > +Support for old reload is deprecated. It will be removed in a > > future > > + release. Every target will always use LRA from then on. > Does this mean that

[Committed] PR rtl-optimization/108292: Revert "Improve ix86_expand_int_movcc to allow condition (mask) sharing"

2023-01-05 Thread Roger Sayle
I agree with Uros that it's best to revert my recent patch that caused PR rtl-optimization/108292. Sorry for the inconvenience. This reverts commit d0558f420b2a5692fd38ac76ffa97ae6c1726ed9. 2023-01-05 Roger Sayle gcc/ChangeLog PR rtl-optimization/108292 *

Re: [PATCH] wwwdocs: Note that old reload is deprecated

2023-01-05 Thread Paul Koning via Gcc-patches
Does this mean that targets that have an option to use LRA or not should now default to LRA? Some currently default to old reload. paul > On Jan 5, 2023, at 2:27 PM, Segher Boessenkool > wrote: > > Hi! > > Happy new year everyone. > > Is this patch okay to commit? > > > Segher

Re: [PATCH] rs6000: Make P10_FUSION honour tuning setting

2023-01-05 Thread Pat Haugen via Gcc-patches
On 1/4/23 3:20 AM, Kewen.Lin via Gcc-patches wrote: diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc index 88c865b6b4b..6fa084c0807 100644 --- a/gcc/config/rs6000/rs6000.cc +++ b/gcc/config/rs6000/rs6000.cc @@ -4378,9 +4378,15 @@ rs6000_option_override_internal (bool

[PATCH] wwwdocs: Note that old reload is deprecated

2023-01-05 Thread Segher Boessenkool
Hi! Happy new year everyone. Is this patch okay to commit? Segher --- htdocs/gcc-13/changes.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/gcc-13/changes.html b/htdocs/gcc-13/changes.html index 3876ad77543a..954469cdcfa4 100644 --- a/htdocs/gcc-13/changes.html +++

[committed] hppa: Fix atomic operations on PA-RISC 2.0 processors

2023-01-05 Thread John David Anglin
This changes fixes the atomic operations defined for hppa processors in libstdc++-v3. It appears they were originally written with only PA 1.x processors in mind. Tested on hppa64-hp-hpux11.11. Committed to trunk. Dave --- Fix atomic operations on PA-RISC 2.0 processors. PA-RISC 2.0 supports

Re: [PATCH] c++: class-head parsing and CPP_TEMPLATE_ID access [PR108275]

2023-01-05 Thread Jason Merrill via Gcc-patches
On 1/5/23 12:20, Patrick Palka wrote: When tentatively parsing what is really an elaborated-type-specifier first as a class-specifier, we may form a CPP_TEMPLATE_ID token that later gets reused in the fallback parse if the tentative parse fails. These special tokens also capture the access

Re: [PATCH] c++: class-head parsing and CPP_TEMPLATE_ID access [PR108275]

2023-01-05 Thread Patrick Palka via Gcc-patches
On Thu, 5 Jan 2023, Patrick Palka wrote: > When tentatively parsing what is really an elaborated-type-specifier > first as a class-specifier, we may form a CPP_TEMPLATE_ID token that > later gets reused in the fallback parse if the tentative parse fails. > These special tokens also capture the

Re: [PATCH V2] Disable sched1 in functions that call setjmp

2023-01-05 Thread Qing Zhao via Gcc-patches
Alexander, (Sorry for the late reply due to holiday vacation). > On Dec 24, 2022, at 3:10 AM, Alexander Monakov wrote: > > > On Fri, 23 Dec 2022, Qing Zhao wrote: > >> BTW, Why sched1 is not enabled on x86 by default? > > Register allocation is tricky on x86 due to small number of

[PATCH] c++: class-head parsing and CPP_TEMPLATE_ID access [PR108275]

2023-01-05 Thread Patrick Palka via Gcc-patches
When tentatively parsing what is really an elaborated-type-specifier first as a class-specifier, we may form a CPP_TEMPLATE_ID token that later gets reused in the fallback parse if the tentative parse fails. These special tokens also capture the access checks that have been deferred while parsing

[PATCH] ipa: Sort ipa_param_body_adjustments::m_replacements (PR 108110)

2023-01-05 Thread Martin Jambor
Hi, the problem in PR 108110 is that elements describing the same base parameter in ipa_param_body_adjustments::m_replacements are not adjacent to each other, which is something that ipa_param_body_adjustments::modify_call_stmt when it gathers all replacements for a parameter. One option would

Re: [PATCH] gccrs: avoid printing to stderr in selftest::rust_flatten_list

2023-01-05 Thread Arthur Cohen
On 1/5/23 16:36, David Malcolm wrote: On Thu, 2023-01-05 at 15:44 +0100, Arthur Cohen wrote: Hi David, On 1/4/23 20:28, David Malcolm wrote: On Mon, 2023-01-02 at 13:47 +0100, Arthur Cohen wrote: Hi David, Sorry for the delayed reply! On 12/16/22 18:01, David Malcolm wrote: Successfully

[committed] libstdc++: Fix printers for Python 2 [PR108212]

2023-01-05 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux (python 2.7) and x86_64-linux (Python 3.10). Pushed to trunk. -- >8 -- The datetime.timezone.utc singleton doesn't exist in Python 2, but we can create it ourselves by deriving from datetime.tzinfo. libstdc++-v3/ChangeLog: PR libstdc++/108212 *

[committed] libstdc++: Reduce size of std::bind_front(empty_type) result [PR108290]

2023-01-05 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux. Pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: PR libstdc++/108290 * include/std/functional (_Bind_front): Add no_unique_address attribute to data members. * testsuite/20_util/function_objects/bind_front/107784.cc: Check size

Re: [PATCH v4 02/34] RISC-V: Add vlex_2.c

2023-01-05 Thread Joern Rennecke
On Wed, Jun 1, 2022 at 02:28:45 GMT 2022, zhongjuzhe wrote: > gcc/testsuite/ChangeLog: > >* gcc.target/riscv/rvv/intrinsic/vlex_2.c: New test. These intrinsic test cases look like they have been machine generated. And if they aren't, they probably should (have) be(en). I've been

Re: [PATCH] gccrs: avoid printing to stderr in selftest::rust_flatten_list

2023-01-05 Thread David Malcolm via Gcc-patches
On Thu, 2023-01-05 at 15:44 +0100, Arthur Cohen wrote: > Hi David, > > On 1/4/23 20:28, David Malcolm wrote: > > On Mon, 2023-01-02 at 13:47 +0100, Arthur Cohen wrote: > > > Hi David, > > > > > > Sorry for the delayed reply! > > > > > > On 12/16/22 18:01, David Malcolm wrote: > > > >

Re: [PATCH] libgcc: Fix uninitialized RA signing on AArch64 [PR107678]

2023-01-05 Thread Szabolcs Nagy via Gcc-patches
The 01/03/2023 17:27, Wilco Dijkstra wrote: > > > Also, if I understood correctly, the reason we use REG_UNSAVED is to > > ensure that state from one frame isn't carried across to a parent frame, > > in cases where the parent frame lacks any signing. That is, each frame > > should start out with

[COMMITTED] ada: Minor tweak to test added in previous change

2023-01-05 Thread Marc Poulhiès via Gcc-patches
From: Eric Botcazou This changes the test to use the common idion of the codebase. gcc/ada/ * exp_util.adb (Make_CW_Equivalent_Type) : Tweak. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_util.adb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[COMMITTED] ada: Remove unhelpful special case for renamed bodies in GNATprove mode

2023-01-05 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek This patch reverts a special-case related to inlining of renamed bodies in GNATprove mode. Its idea was that inlining is decided in routine Cannot_Inline, which is called much later. This didn't quite work, because in the meantime the renamed body was prepared to inlining in

[COMMITTED] ada: Clean up interface handling in Expand_N_Object_Declaration

2023-01-05 Thread Marc Poulhiès via Gcc-patches
From: Eric Botcazou The code performing the expansion of objects with (class-wide) interface type in Expand_N_Object_Declaration is fairly low-level, fiddling with the homonym and entity chains, which is unnecessary. gcc/ada/ * exp_ch3.adb (Expand_N_Object_Declaration): Rewrite the end

[COMMITTED] ada: Fix nested generic instantiation

2023-01-05 Thread Marc Poulhiès via Gcc-patches
Previous fix for generic instantiation was not precise enough and could wrongly assume the instantiation node to be an N_Expanded_Name. gcc/ada/ * sem_ch12.adb (Instantiate_Package_Body): Better filtering when installing parent on the scope stack. Tested on x86_64-pc-linux-gnu,

[COMMITTED] ada: INOX: prototype RFC on String Interpolation

2023-01-05 Thread Marc Poulhiès via Gcc-patches
From: Javier Miranda This patch incorporates a prototype for a new string literal syntax which supports the use of "string interpolation," where the names of variables or expressions can be used directly within the string literal, such that the value of the variable or the expression is

[COMMITTED] ada: Optimize class-wide objects initialized with function calls

2023-01-05 Thread Marc Poulhiès via Gcc-patches
From: Eric Botcazou This optimizes the implementation of class-wide objects initialized with function calls in the non-interface case, by avoiding an unnecessary copy operation and/or a dispatching call to the _Size primitive when possible. gcc/ada/ * exp_ch3.adb

[COMMITTED] ada: Flag renaming-as-spec as a body to inline

2023-01-05 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek For GNAT the frontend is only inlining subprograms with explicit specs, including specs completed with renaming-as-body. For GNATprove the frontend must also inline renamings acting as specs. Otherwise, we will try to build a body-to-inline with code that is can't handle

[COMMITTED] ada: Update gnatpp documentation with --layout switch

2023-01-05 Thread Marc Poulhiès via Gcc-patches
From: Joao Azevedo Update legacy switches. gcc/ada/ * doc/gnat_ugn/gnat_utility_programs.rst: add gnatpp --layout switch and update legacy switches. Tested on x86_64-pc-linux-gnu, committed on master. --- .../doc/gnat_ugn/gnat_utility_programs.rst| 831 +++---

[COMMITTED] ada: Fix spurious emissions of -gnatwj warning

2023-01-05 Thread Marc Poulhiès via Gcc-patches
From: Ronan Desplanques Before this patch, the compiler would erroneously emit a warning about the use of parentheses for array aggregates being discouraged in some situations. Those situations were the ones where array aggregates were used as generic actuals when instantiating generic packages

[COMMITTED] ada: Do not use decimal approximation in -gnatRj output

2023-01-05 Thread Marc Poulhiès via Gcc-patches
From: Eric Botcazou This avoids an unnecessary loss of precision for real values. gcc/ada/ * repinfo.ads (The JSON output format): Document change. * urealp.adb (UR_Write_To_JSON): Output a fraction instead of a decimal approximation. Tested on x86_64-pc-linux-gnu,

[COMMITTED] ada: Further adjust freezing for expansion of contracts

2023-01-05 Thread Marc Poulhiès via Gcc-patches
From: Eric Botcazou This further adjusts a test deciding whether to freeze an entity coming from an outer scope in an inner scope based on language rules, to the presence of the new internal subprogram generated because of post-conditions. gcc/ada/ * freeze.adb (Freeze_Entity): For the

[COMMITTED] ada: Fix pasto in comment

2023-01-05 Thread Marc Poulhiès via Gcc-patches
From: Eric Botcazou gcc/ada/ * exp_ch3.adb (Expand_N_Object_Declaration): Fix pasto in comment. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_ch3.adb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/ada/exp_ch3.adb

[COMMITTED] ada: Simplify new expansion of contracts

2023-01-05 Thread Marc Poulhiès via Gcc-patches
From: Eric Botcazou We can now use an extended return statement in all cases since it no longer generates an extra copy for nonlimited by-reference types. gcc/ada/ * contracts.adb (Build_Subprogram_Contract_Wrapper): Generate an extended return statement in all cases.

Re: [PATCH] gccrs: avoid printing to stderr in selftest::rust_flatten_list

2023-01-05 Thread Arthur Cohen
Hi David, On 1/4/23 20:28, David Malcolm wrote: On Mon, 2023-01-02 at 13:47 +0100, Arthur Cohen wrote: Hi David, Sorry for the delayed reply! On 12/16/22 18:01, David Malcolm wrote: Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. OK for trunk? gcc/rust/ChangeLog: *

[COMMITTED] ada: Revert to constrained allocation for string concatenation

2023-01-05 Thread Marc Poulhiès via Gcc-patches
From: Eric Botcazou Using an unconstrained allocation is less efficient in the general case. gcc/ada/ * exp_ch3.adb (Expand_N_Object_Declaration): New local variable used throughout instead of testing Is_Special_Return_Object every time. Do not rename an OK_To_Rename

[COMMITTED] ada: Fix generic instantiation of sibling package

2023-01-05 Thread Marc Poulhiès via Gcc-patches
The compiler would crash because it is failing at setting up the scope stack correctly for a generic instantiation of a sibling package within a child package instance. In this case, the parent instance isn't explicitly referenced and it must be found differently. gcc/ada/ * sem_ch12.adb

[COMMITTED] ada: Better error message for bad Discard_Names configuration pragma

2023-01-05 Thread Marc Poulhiès via Gcc-patches
From: Steve Baird When a pragma Discard_Names is used as a configuration pragma, it does not take an argument. If an argument is given, the resulting error message was incorrect and confusing. gcc/ada/ * sem_prag.adb (Analyze_Pragma): Fix Is_Configuration_Pragma function to

[COMMITTED] ada: Update doc for -gnatw_q

2023-01-05 Thread Marc Poulhiès via Gcc-patches
From: Bob Duff The -gnatw_q switch turns on warnings for noncomposing "=" operators. This patch updates the doc to refer to relevant RM paragraphs. gcc/ada/ * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Add RM references. * gnat_ugn.texi: Regenerate.

[COMMITTED] ada: Adjust handling of "%g" in GNAT.Formatted_String

2023-01-05 Thread Marc Poulhiès via Gcc-patches
From: Ronan Desplanques The way the "%g" specifier was handled by GNAT.Formatted_String before this patch was very different from the behavior of C's printf. This patch makes the handling of "%g" in GNAT.Formatted_String closer to the behavior described in the specification of the C language.

[COMMITTED] ada: Spurious error on Lock_Free protected type with discriminants

2023-01-05 Thread Marc Poulhiès via Gcc-patches
From: Justin Squirek This patch corrects an issue in the compiler whereby unprefixed discriminants appearing in protected subprograms were unable to be properly resolved - leading to spurious resolution errors. gcc/ada/ * sem_ch8.adb (Set_Entity_Or_Discriminal): Verify we are actually

[COMMITTED] ada: Fix finalization issues in extended return statements

2023-01-05 Thread Marc Poulhiès via Gcc-patches
From: Eric Botcazou The first issue pertains to return objects of (class-wide) interface types, which need to be adjusted if the type is not inherently limited. The second issue is for return objects of non-class-wide types that are initialized by a function call, which can use a direct

[COMMITTED] ada: Fix incorrect warning about unreferenced packed arrays

2023-01-05 Thread Marc Poulhiès via Gcc-patches
From: Bob Duff This patch fixes a bug in which a reference to a renaming of a component of a packed array was not counted as a reference, and thus caused incorrect warnings about unreferenced objects. gcc/ada/ * sem_ch5.adb (Analyze_Assignment): Fix the bug by checking

[x86_64 PATCH] Introduce insvti_highpart define_insn_and_split.

2023-01-05 Thread Roger Sayle
This patch adds a convenient post-reload splitter for setting/updating the highpart of a TImode variable, using the recently added split_double_concat infrastructure. For the new test case below: __int128 foo(__int128 x, unsigned long long y) { __int128 t = (__int128)y << 64; __int128 r =

Re: [PATCH] modula-2: Remove uses of scalb*() and significand*() [PR107631]

2023-01-05 Thread Gaius Mulley via Gcc-patches
Iain Sandoe writes: > Tested on x86_64-darwin21 and x86_64-linux-gnu without any m2 regressions. > OK for trunk? > thanks > Iain yes sure LGTM thank you! Gaius

[PATCH] modula-2: Remove uses of scalb*() and significand*() [PR107631]

2023-01-05 Thread Iain Sandoe via Gcc-patches
Tested on x86_64-darwin21 and x86_64-linux-gnu without any m2 regressions. OK for trunk? thanks Iain --- 8< --- The scalb*() functions are obsolete in Posix from 2004 and removed in 2008. The significand*() functions are glibc-only and considered there to be obsolescent (not supported for types

[PATCH] PR target/89828 Inernal compiler error on -fno-omit-frame-pointer

2023-01-05 Thread Yoshinori Sato
The problem was caused by an erroneous note about creating a stack frame, which caused the cur_cfa reg to fail to assert with a value other than the frame pointer. This fix will generate notes that correctly update cur_cfa. gcc/config/rx/ * rx.cc (add_pop_cfi_notes): Release the frame

[PATCH] xtensa: Optimize stack frame adjustment more

2023-01-05 Thread Takayuki 'January June' Suwa via Gcc-patches
This patch introduces a convenient helper function for integer immediate addition with scratch register as needed, that splits and emits either up to two ADDI/ADDMI machine instructions or an addition by register following an immediate integer load (which may later be transformed by

[committed] openmp: Fix up finish_omp_target_clauses [PR108286]

2023-01-05 Thread Jakub Jelinek via Gcc-patches
Hi! The comment in the loop says that we shouldn't add a map clause if such a clause exists already, but the loop was actually using OMP_CLAUSE_DECL on any clause. Target construct can have various clauses which don't have OMP_CLAUSE_DECL at all (e.g. nowait, device or if) or clause where it

RE: [PATCH v2] libgfortran: Replace mutex with rwlock

2023-01-05 Thread Zhu, Lipeng via Gcc-patches
> > Hi Lipeng, > > > > > This patch try to introduce the rwlock and split the read/write to > > > unit_root tree and unit_cache with rwlock instead of the mutex to > > > increase CPU efficiency. In the get_gfc_unit function, the > > > percentage to step into the insert_unit function is around