Re: [PATCH] Reset relations when crossing backedges.

2022-03-19 Thread Jeff Law via Gcc-patches
On 2/2/2022 2:27 AM, Richard Biener wrote: On Tue, Feb 1, 2022 at 7:41 PM Aldy Hernandez wrote: Ping I didn't quite get Jeffs comment, so I waited (sorry). I've meanwhile added Sorry.  IIRC the concern was whether or not we need to do something special for irreducible regions.  In that

[committed][PATCH] libgcc: m68k: avoid TEXTRELs in shared library (PR 86224)

2022-03-19 Thread Jeff Law via Gcc-patches
Not a regression, but a patch to fix a bug that should have been ACK'd long ago (as in years ago). Basically Sergei proposed this patch back in July 2018: https://gcc.gnu.org/legacy-ml/gcc-patches/2018-07/msg01791.html Andreas objected to that patch.  Sergei posted another which Rich

Re: [PATCH] reload: Adjust comment in find_reloads about subset, not intersection

2022-03-19 Thread Jeff Law via Gcc-patches
On 2/2/2022 8:16 AM, Richard Sandiford via Gcc-patches wrote: Richard Sandiford writes: Hans-Peter Nilsson writes: From: Richard Sandiford Hans-Peter Nilsson via Gcc-patches writes: The mystery isn't so much that there's code mismatching comments or intent, but that this code has been

Re: [PATCH] PR middle-end/104885: Fix ICE with large stack frame on powerpc64.

2022-03-19 Thread Jeff Law via Gcc-patches
On 3/12/2022 12:40 PM, Roger Sayle wrote: My recent testcase for PR c++/84964.C stress tests the middle-end by attempting to pass a UINT_MAX sized structure on the stack. Although my fix to PR84964 avoids the ICE after sorry() on x86_64 and similar targets, a related issue still exists on

Re: [PATCH] selftest: Move C-specific tests to c_family

2022-03-19 Thread Jeff Law via Gcc-patches
On 2/16/2022 3:44 AM, Arthur Cohen wrote: When trying to make use of the selftest framework over on the rust frontend, we ran into issues where rust1 was expected to produce errors containing C-like type names such as `int`. I had gotten in contact with David Malcolm on the gcc mailing list

Re: [PATCH] gcc: pass-manager: Fix memory leak. [PR jit/63854]

2022-03-19 Thread Jeff Law via Gcc-patches
On 1/31/2022 4:42 AM, Marc Nieper-Wißkirchen wrote: Before the patch, compiling the hello world example of libgccjit with the external driver under Valgrind shows a loss of 12,611 (48 direct) bytes. After the patch, no memory leaks are reported anymore. (Memory leaks occurring when using the

Re: [PATCH] gcc: rename floatformat_ia64_quad_{big, little} to floatformat_ieee_quad_{big, little}

2022-03-19 Thread Jeff Law via Gcc-patches
On 3/13/2022 9:10 PM, Tiezhu Yang wrote: I submitted a GDB patch [1] to rename floatformats_ia64_quad to floatformats_ieee_quad to reflect the reality, and then we can clean up the related code. As GDB Global Maintainer Tom Tromey said [2]: These files are maintained in gcc and then

Re: [PATCH] i386: Don't emit pushf; pop for __builtin_ia32_readeflags_u* with unused lhs [PR104971]

2022-03-19 Thread Uros Bizjak via Gcc-patches
On Sat, Mar 19, 2022 at 8:39 AM Jakub Jelinek wrote: > > Hi! > > __builtin_ia32_readeflags_u* aren't marked const or pure I think > intentionally, so that they aren't CSEd from different regions of a function > etc. because we don't and can't easily track all dependencies between > it and

Re: [PATCH v8 04/12] LoongArch Port: Machine description files.

2022-03-19 Thread 程璐璐
在 2022/3/7 上午12:16, Richard Sandiford 写道: +(define_split + [(match_operand 0 "small_data_pattern")] + "reload_completed" + [(match_dup 0)] + { operands[0] = loongarch_rewrite_small_data (operands[0]); }) + + +;; Match paired HI/SI/SF/DFmode load/stores. +(define_insn "*join2_load_store" +

Re: [PATCH v8 05/12] LoongArch Port: Machine description C files and .h files.

2022-03-19 Thread 程璐璐
在 2022/3/8 上午2:17, Richard Sandiford 写道: […] +/* This definition replaces the formerly used 'm' constraint with a + different constraint letter in order to avoid changing semantics of + the 'm' constraint when accepting new address formats in + TARGET_LEGITIMATE_ADDRESS_P. The

[PATCH v9 08/12] LoongArch Port: libgcc

2022-03-19 Thread chenglulu
libgcc/ * config/loongarch/crtfastmath.c: New file. * config/loongarch/linux-unwind.h: Like wise. * config/loongarch/sfp-machine.h: Like wise. * config/loongarch/t-crtstuff: Like wise. * config/loongarch/t-loongarch: Like wise. *

[PATCH v9 02/12] LoongArch Port: gcc build

2022-03-19 Thread chenglulu
gcc/ * common/config/loongarch/loongarch-common.cc: New file. * config/loongarch/genopts/genstr.sh: New file. * config/loongarch/genopts/loongarch-strings: New file. * config/loongarch/genopts/loongarch.opt.in: New file. * config/loongarch/loongarch-str.h:

[PATCH v9 12/12] LoongArch Port: Add doc.

2022-03-19 Thread chenglulu
* contrib/config-list.mk: Add LoongArch triplet. * gcc/doc/install.texi: Add LoongArch options section. * gcc/doc/invoke.texi: Add LoongArch options section. * gcc/doc/md.texi: Add LoongArch options section. --- contrib/config-list.mk | 4 +- gcc/doc/install.texi

[PATCH v9 06/12] LoongArch Port: Builtin functions.

2022-03-19 Thread chenglulu
gcc/ * config/loongarch/larchintrin.h: New file. * config/loongarch/loongarch-builtins.cc: New file. --- gcc/config/loongarch/larchintrin.h | 409 + gcc/config/loongarch/loongarch-builtins.cc | 511 + 2 files changed, 920 insertions(+)

[PATCH v9 10/12] LoongArch Port: libgomp

2022-03-19 Thread chenglulu
libgomp/ * configure.tgt: Add LoongArch triplet. --- libgomp/configure.tgt | 4 1 file changed, 4 insertions(+) diff --git a/libgomp/configure.tgt b/libgomp/configure.tgt index d4f1e741b5a..2cd7272fcd8 100644 --- a/libgomp/configure.tgt +++ b/libgomp/configure.tgt @@ -56,6 +56,10

[PATCH v9 11/12] LoongArch Port: gcc/testsuite

2022-03-19 Thread chenglulu
gcc/testsuite/ * g++.dg/cpp0x/constexpr-rom.C: Add build options for LoongArch. * g++.old-deja/g++.abi/ptrmem.C: Add LoongArch support. * g++.old-deja/g++.pt/ptrmem6.C: xfail for LoongArch. * gcc.dg/20020312-2.c: Add LoongArch support. *

[PATCH v9 07/12] LoongArch Port: Builtin macros.

2022-03-19 Thread chenglulu
gcc/ * config/loongarch/loongarch-c.cc --- gcc/config/loongarch/loongarch-c.cc | 109 1 file changed, 109 insertions(+) create mode 100644 gcc/config/loongarch/loongarch-c.cc diff --git a/gcc/config/loongarch/loongarch-c.cc

[PATCH v9 03/12] LoongArch Port: Regenerate gcc/configure.

2022-03-19 Thread chenglulu
gcc/ * configure: Regenerate file. --- gcc/configure | 66 ++- 1 file changed, 60 insertions(+), 6 deletions(-) diff --git a/gcc/configure b/gcc/configure index 14b19c8fe0c..1c1195e95cb 100755 --- a/gcc/configure +++ b/gcc/configure @@

[PATCH v9 09/12] LoongArch Port: Regenerate libgcc/configure.

2022-03-19 Thread chenglulu
libgcc/ * configure: Regenerate file. --- libgcc/configure | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libgcc/configure b/libgcc/configure index 52bf25d4e94..1f9b2ac578b 100755 --- a/libgcc/configure +++ b/libgcc/configure @@ -2403,6 +2403,9 @@ case "${host}"

[PATCH v9 01/12] LoongArch Port: Regenerate configure

2022-03-19 Thread chenglulu
* config/picflag.m4: Default add build option '-fpic' for LoongArch. * configure: Add LoongArch tuples. * configure.ac: Like wise. --- config/picflag.m4 | 3 +++ configure | 10 +- configure.ac | 10 +- 3 files changed, 21 insertions(+), 2

[PATCH v9 00/12] Add LoongArch support.

2022-03-19 Thread chenglulu
Hi, all: This is the v9 version of LoongArch Port based on 9fc8f278ebebc57537dc0cb9d33e36d932be0bc3. Please review. We know it is stage4, I think it is ok for a new prot. The kernel side upstream waiting for a approval by gcc side, if it is blocked by stage4, a approval for GCC13 will be

[PATCH] i386: Don't emit pushf;pop for __builtin_ia32_readeflags_u* with unused lhs [PR104971]

2022-03-19 Thread Jakub Jelinek via Gcc-patches
Hi! __builtin_ia32_readeflags_u* aren't marked const or pure I think intentionally, so that they aren't CSEd from different regions of a function etc. because we don't and can't easily track all dependencies between it and surrounding code (if somebody looks at the condition flags, it is