Define 'OMP_REQUIRES_[...]', 'GOMP_REQUIRES_[...]' in a single place (was: [Patch] OpenMP: Move omp requires checks to libgomp)

2022-07-06 Thread Thomas Schwinge
Hi! On 2022-06-08T05:56:02+0200, Tobias Burnus wrote: > This is based on Chung-Lin's patch at > https://gcc.gnu.org/pipermail/gcc-patches/2021-January/563393.html > --- a/include/gomp-constants.h > +++ b/include/gomp-constants.h > +/* Flag values for requires-directive features, must match cor

Restore 'GOMP_offload_unregister_ver' functionality (was: [Patch][v5] OpenMP: Move omp requires checks to libgomp)

2022-07-06 Thread Thomas Schwinge
Hi! On 2022-07-01T15:06:05+0200, Tobias Burnus wrote: > Attached is the updated patch. Main changes: [...] This is now a great implementation of cross-component communication (host/offloading compilers, runtime), thanks! I'm sure this will be usable (or at least instructing) for further purpose

[PATCH] Add a heuristic for eliminate redundant load and store in inline pass.

2022-07-06 Thread Cui,Lili via Gcc-patches
From: Lili Hi Hubicka, This patch is to add a heuristic inline hint to eliminate redundant load and store. Bootstrap and regtest pending on x86_64-unknown-linux-gnu. OK for trunk? Thanks, Lili. Add a INLINE_HINT_eliminate_load_and_store hint in to inline pass. We accumulate the insn number

Fix Intel MIC 'mkoffload' for OpenMP 'requires' (was: [Patch] OpenMP: Move omp requires checks to libgomp)

2022-07-06 Thread Thomas Schwinge
Hi! On 2022-06-08T05:56:02+0200, Tobias Burnus wrote: > This is based on Chung-Lin's patch at > https://gcc.gnu.org/pipermail/gcc-patches/2021-January/563393.html > PS: I have not fully tested the intelmic version. As part of my standard testing, I'm reporting that it got completely broken. ;

Re: Fix Intel MIC 'mkoffload' for OpenMP 'requires' (was: [Patch] OpenMP: Move omp requires checks to libgomp)

2022-07-06 Thread Tobias Burnus
Hi Thomas, On 06.07.22 13:04, Thomas Schwinge wrote: On 2022-06-08T05:56:02+0200, Tobias Burnus wrote: PS: I have not fully tested the intelmic version. As part of my standard testing, I'm reporting that it got completely broken. ;'-) Interesting. Because intelmic-mkoffload.cc calls GOMP_o

Re: Mips: Fix kernel_stat structure size

2022-07-06 Thread Dimitrije Milosevic
Ping. :) I think this is good to go. Unfortunately, I do not have commit access, so if anyone can commit it, that would be great! From: Dimitrije Milosevic Sent: Friday, July 1, 2022 4:25 PM To: Xi Ruoyao ; gcc-patches@gcc.gnu.org Cc: Djordje Todorovic ; Richard Sandiford Subject: Re: Mips:

Re: [PATCH] Mips: Resolve build issues for the n32 ABI

2022-07-06 Thread Dimitrije Milosevic
Ping. :) This change just landed on LLVM (see https://reviews.llvm.org/rG5d8077565e4196efdd4ed525a64c11a96d5aa5dd). Unfortunately, I do not have commit access, so if anyone can commit it, that would be great! Here is the patch with the updated commit message. libsanitizer: Cherry-pick 5d8077565e

[committed] analyzer: fix uninit false positive with -ftrivial-auto-var-init= [PR106204]

2022-07-06 Thread David Malcolm via Gcc-patches
-fanalyzer handles -ftrivial-auto-var-init= by special-casing IFN_DEFERRED_INIT to be a no-op, so that e.g.: len_2 = .DEFERRED_INIT (4, 2, &"len"[0]); is treated as a no-op, so that len_2 is still uninitialized after the stmt. PR analyzer/106204 reports that -fanalyzer gives false positives fr

Re: Fix Intel MIC 'mkoffload' for OpenMP 'requires' (was: [Patch] OpenMP: Move omp requires checks to libgomp)

2022-07-06 Thread Thomas Schwinge
Hi Tobias! On 2022-07-06T13:29:14+0200, Tobias Burnus wrote: > On 06.07.22 13:04, Thomas Schwinge wrote: >> On 2022-06-08T05:56:02+0200, Tobias Burnus wrote: >>> PS: I have not fully tested the intelmic version. >> As part of my standard testing, I'm reporting that it got completely >> broken.

Re: [PATCH]middle-end: don't lower past veclower [PR106063]

2022-07-06 Thread Jeff Law via Gcc-patches
On 7/5/2022 9:00 AM, Tamar Christina via Gcc-patches wrote: Hi All, My previous patch can cause a problem if the pattern matches after veclower as it may replace the construct with a vector sequence which the target may not directly support. As such don't perform the rewriting if after veclo

Re: Fix Intel MIC 'mkoffload' for OpenMP 'requires' (was: [Patch] OpenMP: Move omp requires checks to libgomp)

2022-07-06 Thread Tobias Burnus
Hi Thomas, On 06.07.22 14:38, Thomas Schwinge wrote: :-) Haha, that's actually *exactly* what I had implemented first! But then I realized that 'target offloading_enabled' is doing exactly that: check that offloading compilation is configured -- not that "there is an offloading device available

[Ada] Incorrect emptying of CUDA global subprograms

2022-07-06 Thread Pierre-Marie de Rodat via Gcc-patches
This patch corrects an error in the compiler whereby no Corresponding_Spec was set for emptied CUDA global subprograms - leading to a malformed tree. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * gnat_cuda.adb (Empty_CUDA_Global_Subprogram): Set Specification and C

[Ada] Remove explicit call to Make_Unchecked_Type_Conversion

2022-07-06 Thread Pierre-Marie de Rodat via Gcc-patches
Respect a comment in sinfo.ads, which says: "Unchecked type conversion nodes should be created by calling Tbuild.Unchecked_Convert_To, rather than by directly calling Nmake.Make_Unchecked_Type_Conversion." No test appears to be affected by this change, so this is just a cleanup. Tested on x86_64-

[Ada] Fix incorrect itype sharing for case expression in limited type return

2022-07-06 Thread Pierre-Marie de Rodat via Gcc-patches
The compiler aborts with an internal error in gigi, but the problem is an itype incorrectly shared between several branches of an if_statement that has been created for a Build-In-Place return. Three branches of this if_statement contain an allocator statement and the latter two have been obtained

[Ada] Restore accidentally removed part of a comment about unset references

2022-07-06 Thread Pierre-Marie de Rodat via Gcc-patches
Fix an unintentionally removed comment. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_res.adb (Resolve_Actuals): Restore first sentence of a comment.diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -4

[Ada] Vxworks7* - Makefile.rtl rtp vs rtp-smp cleanup

2022-07-06 Thread Pierre-Marie de Rodat via Gcc-patches
Only smp runtimes are built for vxworks7*, even though the -smp suffix is removed during install. Therefore, in general, the build macros for the non-smp runtimes are superfluous except on the legacy ppc-vxworks6 target where both the smp and non-smp runtime are built. Lastly, an error message is

[Ada] Cleanup use of local scalars in GNAT.Socket.Get_Address_Info

2022-07-06 Thread Pierre-Marie de Rodat via Gcc-patches
A cleanup opportunity spotted while working on improved detection of uninitialised local scalar objects. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/g-socket.adb (Get_Address_Info): Reduce scope of the Found variable; avoid repeated assignment inside the

[Ada] Remove old vxworks from Makefile.rtl - e500 port.

2022-07-06 Thread Pierre-Marie de Rodat via Gcc-patches
The powerpc e500 port has been LTS'd Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/system-vxworks7-e500-kernel.ads: Remove. * libgnat/system-vxworks7-e500-rtp-smp.ads: Likewise. * libgnat/system-vxworks7-e500-rtp.ads: Likewise.diff --git a/gcc/ada/l

[Ada] Fix spurious error for aggregate with box component choice

2022-07-06 Thread Pierre-Marie de Rodat via Gcc-patches
It comes from the Volatile_Full_Access (or Atomic) aspect: the aggregate is effectively analyzed/resolved twice and this does not work. It is fixed by calling Is_Full_Access_Aggregate before resolution. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_aggr.adb (Expand_Re

[Ada] Missing error on tagged type conversion

2022-07-06 Thread Pierre-Marie de Rodat via Gcc-patches
The compiler does not report an error on a type conversion to/from a tagged type whose parent type is an interface type and there is no relationship between the source and target types. This bug has been dormant since January/2016. This patch also improves the text of errors reported on interface

[Ada] Handle secondary stack memory allocations alignment

2022-07-06 Thread Pierre-Marie de Rodat via Gcc-patches
To accomodate cases where objects allocated on the secondary stack needed a more constrained alignement than Standard'Maximum_Alignement, the alignment for all allocations in the full runtime were forced on to be aligned on Standard'Maximum_Alignement*2. This changes removes this workaround and cor

[Ada] Improve code generated for aggregates of VFA type

2022-07-06 Thread Pierre-Marie de Rodat via Gcc-patches
This avoids using a full access for constants internally generated from assignments of aggregates with a Volatile_Full_Access type. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * gcc-interface/gigi.h (simple_constant_p): Declare. * gcc-interface/decl.cc (gnat_to_gnu

[Ada] Small tweak to gnat_to_gnu_subprog_type

2022-07-06 Thread Pierre-Marie de Rodat via Gcc-patches
No functional changes. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * gcc-interface/decl.cc (gnat_to_gnu_subprog_type): Constify a local variable and move a couple of others around.diff --git a/gcc/ada/gcc-interface/decl.cc b/gcc/ada/gcc-interface/decl.cc --- a/gcc/

[Ada] Spurious non-callable warning on prefixed call in class condition

2022-07-06 Thread Pierre-Marie de Rodat via Gcc-patches
This patch corrects an error in the compiler whereby a function call in prefix notation within a class condition causes a spurious error claiming the name in the call is a non-callable entity when there exists a type extension in the same unit extended with a component featuring the same name as th

[Ada] Indexing error when calling GNAT.Regpat.Match

2022-07-06 Thread Pierre-Marie de Rodat via Gcc-patches
This patch corrects an error in the compiler whereby a buffer sizing error fails to get raised when compiling a regex expression with an insufficiently sized Pattern_Matcher as the documentation indicated. This, in turn, could lead to indexing errors when attempting to call Match with the malformed

[Ada] Deferred constant considered as not preelaborable

2022-07-06 Thread Pierre-Marie de Rodat via Gcc-patches
Fix detection of non-preelaborable constructs for checking SPARK elaboration rules, which was tagging deferred constant declarations as not preelaborable. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_util.adb (Is_Non_Preelaborable_Construct): Fix for deferred

[Ada] Simplify regular expression that matches 8 consecutive digits

2022-07-06 Thread Pierre-Marie de Rodat via Gcc-patches
Makefile cleanup; behaviour is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * gcc-interface/Make-lang.in (ada/generated/gnatvsn.ads): Simplify regular expression. The "interval expression", i.e. \{8\} is part of the POSIX regular expressions, so

[Ada] Support ghost generic formal parameters

2022-07-06 Thread Pierre-Marie de Rodat via Gcc-patches
This adds support in GNAT for ghost generic formal parameters, as included in SPARK RM 6.9. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * ghost.adb (Check_Ghost_Context): Delay checking for generic associations. (Check_Ghost_Context_In_Generic_Association):

Re: Define 'OMP_REQUIRES_[...]', 'GOMP_REQUIRES_[...]' in a single place (was: [Patch] OpenMP: Move omp requires checks to libgomp)

2022-07-06 Thread Tobias Burnus
Hi Thomas, On 06.07.22 12:30, Thomas Schwinge wrote: On 2022-06-08T05:56:02+0200, Tobias Burnus wrote: [..] To make things more failure proof, OK to push the attached "Define 'OMP_REQUIRES_[...]', 'GOMP_REQUIRES_[...]' in a single place"? I concur that it makes sense to avoid having multipl

Re: Restore 'GOMP_offload_unregister_ver' functionality (was: [Patch][v5] OpenMP: Move omp requires checks to libgomp)

2022-07-06 Thread Tobias Burnus
Hi Thomas, hello all, On 06.07.22 12:42, Thomas Schwinge wrote: On 2022-07-01T15:06:05+0200, Tobias Burnus wrote: Attached is the updated patch. Main changes: [...] This is now a great implementation of cross-component communication (host/offloading compilers, runtime), thanks! I'm sure this

Re: Fix Intel MIC 'mkoffload' for OpenMP 'requires' (was: [Patch] OpenMP: Move omp requires checks to libgomp)

2022-07-06 Thread Tobias Burnus
Hi Thomas, hello all, On 06.07.22 13:04, Thomas Schwinge wrote: On 2022-06-08T05:56:02+0200, Tobias Burnus wrote: PS: I have not fully tested the intelmic version. ... Subject: [PATCH] Fix Intel MIC 'mkoffload' for OpenMP 'requires' ... This also means finally switching Intel MIC 'mkoffloa

Re: [GCC 13][PATCH] PR101836: Add a new option -fstrict-flex-array[=n] and use it in __builtin_object_size

2022-07-06 Thread Qing Zhao via Gcc-patches
(Sorry for the late reply, just came back from a short vacation.) > On Jul 4, 2022, at 2:49 AM, Richard Biener wrote: > > On Fri, Jul 1, 2022 at 5:32 PM Martin Sebor wrote: >> >> On 7/1/22 08:01, Qing Zhao wrote: >>> >>> On Jul 1, 2022, at 8:59 AM, Jakub Jelinek wrote: On Fr

Re: Ping^2: [PATCH v2] diagnostics: Honor #pragma GCC diagnostic in the preprocessor [PR53431]

2022-07-06 Thread Lewis Hyatt via Gcc-patches
On Fri, Jul 01, 2022 at 08:23:53PM -0400, Jason Merrill wrote: > On 7/1/22 18:05, Lewis Hyatt wrote: > > On Fri, Jul 1, 2022 at 3:59 PM Jason Merrill wrote: > > > > > > On 6/29/22 12:59, Jason Merrill wrote: > > > > On 6/23/22 13:03, Lewis Hyatt via Gcc-patches wrote: > > > > > Hello- > > > > >

[PATCH 1/3] analyzer: show close event for use_after_close diagnostic

2022-07-06 Thread Immad Mir via Gcc-patches
From: Immad Mir This patch saves the "close" event in use_after_close diagnostic and shows it where possible. gcc/analyzer/ChangeLog: * sm-fd.cc (use_after_close): save the "close" event and show it where possible. gcc/testsuite/ChangeLog: * gcc.dg/analyzer/fd-4.c (test_

[PATCH 3/3] analyzer: add a new testcase to demonstrate passsing of a file descriptor to a function that does not emit any warning

2022-07-06 Thread Immad Mir via Gcc-patches
gcc/testsuite/ChangeLog: * gcc.dg/analyzer/fd-4.c: Add a new testcase to demonstrate passsing of a file descriptor to a function that does not emit any warning. Signed-off-by: Immad Mir --- gcc/testsuite/gcc.dg/analyzer/fd-4.c | 10 ++ 1 file changed, 10 insertions(+) di

[PATCH 2/3] analyzer: reorder initialization of state m_invalid in sm-fd.cc [PR106184]

2022-07-06 Thread Immad Mir via Gcc-patches
From: Immad Mir This patch reorders the initialization of state m_invalid in sm-fd.cc to conform with standard practice in C++. gcc/analyzer/ChangeLog: PR analyzer/106184 * sm-fd.cc (fd_state_machine): Change ordering of initialization of state m_invalid. Signed-off-by:

Re: [PATCH 2/3] analyzer: reorder initialization of state m_invalid in sm-fd.cc [PR106184]

2022-07-06 Thread David Malcolm via Gcc-patches
On Wed, 2022-07-06 at 19:55 +0530, Immad Mir wrote: > From: Immad Mir > > This patch reorders the initialization of state m_invalid in sm-fd.cc > to conform with standard practice in C++. Might want to reword to say that the order of the initializers is now the same as the ordering of the fields

Re: [PATCH 1/3] analyzer: show close event for use_after_close diagnostic

2022-07-06 Thread David Malcolm via Gcc-patches
On Wed, 2022-07-06 at 19:55 +0530, Immad Mir wrote: > From: Immad Mir > > This patch saves the "close" event in use_after_close diagnostic > and shows it where possible. This patch is OK to push to trunk (assuming you've done the usual testing). Thanks Dave > > gcc/analyzer/ChangeLog: >  

Re: [PATCH 3/3] analyzer: add a new testcase to demonstrate passsing of a file descriptor to a function that does not emit any warning

2022-07-06 Thread David Malcolm via Gcc-patches
On Wed, 2022-07-06 at 19:55 +0530, Immad Mir wrote: > gcc/testsuite/ChangeLog: > * gcc.dg/analyzer/fd-4.c: Add a new testcase to demonstrate > passsing > of a file descriptor to a function that does not emit any > warning. The patch itself is OK for trunk, but the initial line of t

RE: [PATCH]middle-end simplify complex if expressions where comparisons are inverse of one another.

2022-07-06 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Andrew Pinski > Sent: Wednesday, July 6, 2022 3:10 AM > To: Tamar Christina > Cc: Richard Biener ; nd ; gcc- > patc...@gcc.gnu.org > Subject: Re: [PATCH]middle-end simplify complex if expressions where > comparisons are inverse of one another. > > On Tue, Jul

[PATCH] Implement global ranges for all vrange types (SSA_NAME_RANGE_INFO).

2022-07-06 Thread Aldy Hernandez via Gcc-patches
Currently SSA_NAME_RANGE_INFO only handles integer ranges, and loses half the precision in the process because its use of legacy value_range's. This patch rewrites all the SSA_NAME_RANGE_INFO (nonzero bits included) to use the recently contributed vrange_storage. With it, we'll be able to efficie

Re: [PATCH] Mips: Resolve build issues for the n32 ABI

2022-07-06 Thread Xi Ruoyao via Gcc-patches
On Wed, 2022-07-06 at 11:34 +, Dimitrije Milosevic wrote: > Ping. :) > This change just landed on LLVM (see > https://reviews.llvm.org/rG5d8077565e4196efdd4ed525a64c11a96d5aa5dd). > Unfortunately, I do not have commit access, so if anyone can commit it, that > would be great! > Here is the pa

[PATCH] testsuite: Fix incorrect -mfloat128-type option

2022-07-06 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64-linux, OK for trunk? -- >8 -- This test currently fails with an error about -mfloat128-type being an invalid option, which is not what it's supposed to be testing: XFAIL: gcc.target/powerpc/ppc-fortran/pr80108-1.f90 -O (test for excess errors) Excess errors: xgcc: error: unr

Re: Ping^2: [PATCH v2] diagnostics: Honor #pragma GCC diagnostic in the preprocessor [PR53431]

2022-07-06 Thread Jason Merrill via Gcc-patches
On 7/6/22 10:23, Lewis Hyatt wrote: On Fri, Jul 01, 2022 at 08:23:53PM -0400, Jason Merrill wrote: On 7/1/22 18:05, Lewis Hyatt wrote: On Fri, Jul 1, 2022 at 3:59 PM Jason Merrill wrote: On 6/29/22 12:59, Jason Merrill wrote: On 6/23/22 13:03, Lewis Hyatt via Gcc-patches wrote: Hello- htt

[committed] d: Build the D sources in the front-end with -fno-exceptions

2022-07-06 Thread Iain Buclaw via Gcc-patches
Hi, The D front-end does not use exceptions, but it still requires RTTI for some lowerings of convenience language features. This patch enforces that by now building GDC with `-fno-exceptions'. Bootstrapped with gcc-9, and committed to mainline. Regards, Iain. --- gcc/d/ChangeLog: * M

[committed] d: Merge upstream dmd 56589f0f4, druntime 651389b5, phobos 1516ecad9.

2022-07-06 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end with upstream dmd 56589f0f4, and the standard library with druntime 651389b5 and phobos 1516ecad9. D front-end changes: - Import latest bug fixes to mainline. D runtime changes: - Import latest bug fixes to mainline. Phobos changes: - Import

Re: [PATCH] c++: generic targs and identity substitution [PR105956]

2022-07-06 Thread Patrick Palka via Gcc-patches
On Tue, 5 Jul 2022, Jason Merrill wrote: > On 7/5/22 10:06, Patrick Palka wrote: > > On Fri, 1 Jul 2022, Jason Merrill wrote: > > > > > On 6/29/22 13:42, Patrick Palka wrote: > > > > In r13-1045-gcb7fd1ea85feea I assumed that substitution into generic > > > > DECL_TI_ARGS corresponds to an identi

Re: [PATCH]middle-end simplify complex if expressions where comparisons are inverse of one another.

2022-07-06 Thread Andrew Pinski via Gcc-patches
On Wed, Jul 6, 2022 at 9:06 AM Tamar Christina wrote: > > > -Original Message- > > From: Andrew Pinski > > Sent: Wednesday, July 6, 2022 3:10 AM > > To: Tamar Christina > > Cc: Richard Biener ; nd ; gcc- > > patc...@gcc.gnu.org > > Subject: Re: [PATCH]middle-end simplify complex if expre

Re: Ping^2: [PATCH v2] diagnostics: Honor #pragma GCC diagnostic in the preprocessor [PR53431]

2022-07-06 Thread Lewis Hyatt via Gcc-patches
On Wed, Jul 6, 2022 at 2:17 PM Jason Merrill wrote: >> On 7/6/22 10:23, Lewis Hyatt wrote: > > Here is an updated patch addressing all your comments, thanks again for the > > review. Regarding the idea about rewinding tokens, it seems potentially > > problematic to try to make use of libcpp's back

Re: libstdc++: Minor codegen improvement for atomic wait spinloop

2022-07-06 Thread Jonathan Wakely via Gcc-patches
On Wed, 6 Jul 2022 at 02:05, Thomas Rodgers via Libstdc++ wrote: > > This patch merges the spin loops in the atomic wait implementation which is > a > minor codegen improvement. > > libstdc++-v3/ChangeLog: > * include/bits/atomic_wait.h (__atomic_spin): Merge spin loops. OK, thanks.

Re: Restore 'GOMP_offload_unregister_ver' functionality (was: [Patch][v5] OpenMP: Move omp requires checks to libgomp)

2022-07-06 Thread Thomas Schwinge
Hi Tobias! On 2022-07-06T15:59:59+0200, Tobias Burnus wrote: > On 06.07.22 12:42, Thomas Schwinge wrote: >> --- a/libgomp/target.c >> +++ b/libgomp/target.c >> /* This function should be called from every offload image while unloading. >> GOMP_offload_unregister_ver (unsigned version, const

Re: libstdc++: Minor codegen improvement for atomic wait spinloop

2022-07-06 Thread Thomas Rodgers via Gcc-patches
Ok for trunk? backport? On Wed, Jul 6, 2022 at 1:56 PM Jonathan Wakely wrote: > On Wed, 6 Jul 2022 at 02:05, Thomas Rodgers via Libstdc++ > wrote: > > > > This patch merges the spin loops in the atomic wait implementation which > is > > a > > minor codegen improvement. > > > > libstdc++-v3/Chan

Re: [PATCH] testsuite: Fix incorrect -mfloat128-type option

2022-07-06 Thread Segher Boessenkool
On Wed, Jul 06, 2022 at 07:15:08PM +0100, Jonathan Wakely wrote: > Tested powerpc64-linux, OK for trunk? Okay, thanks! > -! { dg-options "-mdejagnu-cpu=405 -mpower9-minmax -mfloat128-type" } > +! { dg-options "-mdejagnu-cpu=405 -mpower9-minmax -mfloat128" } We really shouldn't have -mpower9-minm

[PATCH] libcpp: Optimize #pragma once with a hash table [PR58770]

2022-07-06 Thread Paul Hollinsky via Gcc-patches
Rather than traversing the all_files linked list for every include, this factors out the quick idempotency checks (modification time and size) to be the keys in a hash table so we can find matching files quickly. The hash table value type is a linked list, in case more than one file matches the qu

Re: [PATCH 3/3] lto-plugin: implement LDPT_GET_API_VERSION

2022-07-06 Thread Rui Ueyama via Gcc-patches
On Mon, Jul 4, 2022 at 10:17 PM Martin Liška wrote: > On 7/1/22 08:36, Richard Biener wrote: > > On Thu, Jun 30, 2022 at 10:42 AM Martin Liška wrote: > >> > >> On 6/30/22 08:43, Rui Ueyama wrote: > >>> Thanks Martin for creating this patch. > >> > >> You're welcome. > >> > >>> > >>> Here is a pr

Re: [PATCH] Mips: Resolve build issues for the n32 ABI

2022-07-06 Thread Xi Ruoyao via Gcc-patches
On Thu, 2022-07-07 at 02:11 +0800, Xi Ruoyao via Gcc-patches wrote: > On Wed, 2022-07-06 at 11:34 +, Dimitrije Milosevic wrote: > > Ping. :) > > This change just landed on LLVM (see > > https://reviews.llvm.org/rG5d8077565e4196efdd4ed525a64c11a96d5aa5dd) > > . > > Unfortunately, I do not have c

[PATCH 0/2] loongarch: improve code generation for integer division

2022-07-06 Thread Xi Ruoyao via Gcc-patches
We were generating some unnecessary instructions for integer division. These two patches improve the code generation to compile template T div(T a, T b) { return a / b; } into a single division instruction (along with a return instruction of course) as we expected for T in {int32_t, uint32_t

[PATCH 1/2] loongarch: add alternatives for idiv insns to improve code generation

2022-07-06 Thread Xi Ruoyao via Gcc-patches
Currently in the description of LoongArch integer division instructions, the output is marked as earlyclobbered ('&'). It's necessary when loongarch_check_zero_div_p() because clobbering operand 2 (divisor) will make the checking for zero divisor impossible. But, for -mno-check-zero-division (the

[PATCH 2/2] loongarch: avoid unnecessary sign-extend after 32-bit division

2022-07-06 Thread Xi Ruoyao via Gcc-patches
Like add.w/sub.w/mul.w, div.w/mod.w/div.wu/mod.wu also sign-extend the output on LA64. But, LoongArch v1.00 mandates that the inputs of 32-bit division to be sign-extended so we have to expand 32-bit division into RTL sequences. We defined div.w/mod.w/div.wu/mod.wu as a (DI, DI) -> SI instruction

Re: [PATCH] c++: generic targs and identity substitution [PR105956]

2022-07-06 Thread Jason Merrill via Gcc-patches
On 7/6/22 15:26, Patrick Palka wrote: On Tue, 5 Jul 2022, Jason Merrill wrote: On 7/5/22 10:06, Patrick Palka wrote: On Fri, 1 Jul 2022, Jason Merrill wrote: On 6/29/22 13:42, Patrick Palka wrote: In r13-1045-gcb7fd1ea85feea I assumed that substitution into generic DECL_TI_ARGS corresponds

[PATCH] i386: Handle memory operand for direct call to cvtps2pd in unpack

2022-07-06 Thread Haochen Jiang via Gcc-patches
Hi all, This patch aim to fix the ICE for vec unpack using for memory after the commit r13-1418 on inproper insn of cvtps2pd. Regtested on x86_64-pc-linux-gnu. Ok for trunk? BRs, Haochen gcc/ChangeLog: PR target/106180 * config/i386/sse.md (sse2_cvtps2pd_1): Rename from

Re: [PATCH] i386: Handle memory operand for direct call to cvtps2pd in unpack

2022-07-06 Thread Uros Bizjak via Gcc-patches
On Thu, Jul 7, 2022 at 7:52 AM Haochen Jiang wrote: > > Hi all, > > This patch aim to fix the ICE for vec unpack using for memory after the commit > r13-1418 on inproper insn of cvtps2pd. > > Regtested on x86_64-pc-linux-gnu. Ok for trunk? > > BRs, > Haochen > > gcc/ChangeLog: > > PR targe