Re: [PATCH v2 1/2] MIPS: use mips_isa enum instead hardcoded numbers

2021-08-29 Thread Xi Ruoyao via Gcc-patches
These two patches look good to me. Still, need a maintainer's approval. On Sun, 2021-08-29 at 22:59 -0400, YunQiang Su wrote: > Currently mips-cpu.defs, mips.h, netbsd.h and config.gcc are > using hardcoded numbers for isa level. > > Let's replace them with more readable enum mips_isa. > > gcc/

Re: [committed] Reduce vector comparison of uniform vectors to a scalar comparison

2021-08-29 Thread Richard Biener via Gcc-patches
On Fri, Aug 27, 2021 at 9:31 PM Jeff Law via Gcc-patches wrote: > > > I was working some aspects of our port's vector support and stumbled > across a bit of silly code. We were comparing two vectors that were > both uniform. > > We can simplify a comparison of uniform vectors to a comparison of a

Re: [PATCH] Set bound/cmp/control for until wrap loop.

2021-08-29 Thread guojiufu via Gcc-patches
On 2021-08-30 14:15, Jiufu Guo wrote: Hi, In patch r12-3136, niter->control, niter->bound and niter->cmp are derived from number_of_iterations_lt. While for 'until wrap condition', the calculation in number_of_iterations_lt is not align the requirements on the define of them and requirements

Re: [RFH] ME optimizes variable assignment away / Fortran bind(C) descriptor conversion

2021-08-29 Thread Richard Biener via Gcc-patches
On Sun, Aug 29, 2021 at 10:07 AM Tobias Burnus wrote: > > Hi all, hi Richard, > > On 27.08.21 21:48, Richard Biener wrote: > >> It looks really nice with "-O1 -fno-inline" :-) > >>The callee 'rank_p()' is mostly optimized and in the > >>caller only those struct elements are set, which ar

Re: [Patch v2] C, C++, Fortran, OpenMP: Add support for device-modifiers for 'omp target device'

2021-08-29 Thread Jakub Jelinek via Gcc-patches
On Wed, Aug 25, 2021 at 12:14:09PM +0200, Marcel Vollweiler wrote: > Add support for device-modifiers for 'omp target device'. > > 'device_num' and 'ancestor' are now parsed on target device constructs for C, > C++, and Fortran (see OpenMP specification 5.0, p. 170). When 'ancestor' is > used, th

[PATCH] Set bound/cmp/control for until wrap loop.

2021-08-29 Thread Jiufu Guo via Gcc-patches
Hi, In patch r12-3136, niter->control, niter->bound and niter->cmp are derived from number_of_iterations_lt. While for 'until wrap condition', the calculation in number_of_iterations_lt is not align the requirements on the define of them and requirements in determine_exit_conditions. This patch

[PATCH v2 2/2] MIPS: add .module mipsREV to all output asm file

2021-08-29 Thread YunQiang Su
Currently, the asm output file for MIPS has no rev info. It can make some trouble, for example: assembler is mips1 by default, gcc is fpxx by default. To assemble the output of gcc -S, we have to pass -mips2 to assembler. gcc/ChangeLog: * gcc/config/mips/mips.c (mips_module_isa_name): New

[PATCH v2 1/2] MIPS: use mips_isa enum instead hardcoded numbers

2021-08-29 Thread YunQiang Su
Currently mips-cpu.defs, mips.h, netbsd.h and config.gcc are using hardcoded numbers for isa level. Let's replace them with more readable enum mips_isa. gcc/ChangeLog: * config/mips/mips.h (struct mips_cpu_info): define enum mips_isa; use enum instead of int for 'isa' member.

Re: [PATCH v2] MIPS: add .module mipsREV to all output asm file

2021-08-29 Thread YunQiang Su
Please ignore this post, as I mistakenly used -1 instead of -2. YunQiang Su 于2021年8月30日周一 上午10:57写道: > > Currently, the asm output file for MIPS has no rev info. > It can make some trouble, for example: > assembler is mips1 by default, > gcc is fpxx by default. > To assemble the output of gcc

[PATCH v2] MIPS: add .module mipsREV to all output asm file

2021-08-29 Thread YunQiang Su
Currently, the asm output file for MIPS has no rev info. It can make some trouble, for example: assembler is mips1 by default, gcc is fpxx by default. To assemble the output of gcc -S, we have to pass -mips2 to assembler. gcc/ChangeLog: * gcc/config/mips/mips.c (mips_module_isa_name): New

Re: [PATCH] rs6000: Add missing unsigned info for some P10 bifs

2021-08-29 Thread Kewen.Lin via Gcc-patches
on 2021/8/11 下午1:44, Kewen.Lin via Gcc-patches wrote: > Hi, > > This patch is to make prototypes of some Power10 built-in > functions consistent with what's in the documentation, as > well as the vector version. Otherwise, useless conversions > can be generated in gimple IR, and the vectorized ve

Re: [PATCH 2/3] MIPS: use mips_isa enum instead hardcoded numbers

2021-08-29 Thread YunQiang Su
Xi Ruoyao 于2021年8月29日周日 下午1:54写道: > > On Sat, 2021-08-28 at 08:05 -0400, YunQiang Su wrote: > > Currently mips-cpu.defs and mips.h are using hardcoded numbers > > for isa level. > > > > Let's replace them with more readable enum mips_isa. > > Good, but there is something like "mips_isa_rev >= 32 &

Re: [PATCH 1/3] libiberty: Add support for D `typeof(*null)' types

2021-08-29 Thread Iain Buclaw via Gcc-patches
Excerpts from Jeff Law's message of August 29, 2021 10:55 pm: > > > On 8/29/2021 12:46 PM, Iain Buclaw via Gcc-patches wrote: >> Hi, >> >> The D language has a new bottom type `typeof(*null)'. Null types were >> also incorrectly being demangled as `none', this has been fixed to be >> `typeof(nul

Re: Committed: [PATCH] MIPS: use N64 ABI by default if the triple end with -gnuabi64

2021-08-29 Thread Jeff Law via Gcc-patches
On 8/28/2021 1:17 AM, Xi Ruoyao wrote: On Fri, 2021-08-27 at 15:38 -0600, Jeff Law wrote: On 8/26/2021 10:20 PM, Xi Ruoyao via Gcc-patches wrote: On Thu, 2021-08-26 at 23:56 -0400, YunQiang Su wrote: gcc/ChangeLog:  PR target/102089  * config.gcc: MIPS: use N64 ABI by de

Re: [PATCH] libffi: Fix MIPS r6 support

2021-08-29 Thread Jeff Law via Gcc-patches
On 8/28/2021 1:23 AM, Xi Ruoyao wrote: On Fri, 2021-08-27 at 15:28 -0600, Jeff Law via Gcc-patches wrote: On 8/26/2021 10:58 PM, YunQiang Su wrote: for some instructions, MIPS r6 uses different encoding other than the previous releases. 1. mips/n32.S disable .set mips4: since it casuses ol

Re: [PATCH] Preserve SUBREG_PROMOTED_VAR_P on (extend:HI (subreg/s:QI (reg:SI)))

2021-08-29 Thread Jeff Law via Gcc-patches
On 8/29/2021 1:46 AM, Roger Sayle wrote: SUBREG_PROMOTED_VAR_P is a mechanism for tracking that a partial subreg is correctly zero-extended or sign-extended in the parent register. For example, the RTL (subreg/s/v:QI (reg/v:SI 23 [ x ]) 0) indicates that the byte x is zero extended in reg:SI

Re: [PATCH 1/3] libiberty: Add support for D `typeof(*null)' types

2021-08-29 Thread Jeff Law via Gcc-patches
On 8/29/2021 12:46 PM, Iain Buclaw via Gcc-patches wrote: Hi, The D language has a new bottom type `typeof(*null)'. Null types were also incorrectly being demangled as `none', this has been fixed to be `typeof(null)'. Bootstrapped and regression tested on x86_64-linux-gnu. OK for mainline?

[pushed] Darwin: Fixes for darwin_libc_has_function.

2021-08-29 Thread Iain Sandoe
Hi, Firstly, the checks for availability need not be run for any currently supported Darwin version (or for any version of Darwin on x86). In fact, the only test that is needed that differs from the default is for the availability of sincos. Test that and then fall back to the default implementat

[PATCH v2] x86-64: Add ABI warning for 64-bit vectors

2021-08-29 Thread H.J. Lu via Gcc-patches
TYPE_MODE of record and union depends on whether vector_mode_supported_p returns true or not. x86-64 backend uses TYPE_MODE to decide how to pass a parameter and return a value in a function. 64-bit integer vectors were supported only by MMX and 64-bit float vector was supported only by 3DNOW. G

Re: [PATCH] x86-64: Add ABI warning for 64-bit vectors

2021-08-29 Thread Jakub Jelinek via Gcc-patches
On Sun, Aug 29, 2021 at 09:17:10AM -0700, H.J. Lu wrote: > How does it work? Depends on the terminal. E.g. in recent, at most a few years old gnome-terminal, that GCC 11.1 is dotted underlined and hovering with mouse on it shows it normal underlined and prints the URL, right click shows a menu in

[PATCH 3/3] libiberty: Add support for demangling local D template declarations

2021-08-29 Thread Iain Buclaw via Gcc-patches
Hi, The D language now allows multiple different template declarations in the same function that have the same mangled name. To make the mangled names unique, a fake parent in the form `__Sddd' is added to the symbol. This information is not important for the user, so the demangler now handles an

[PATCH 2/3] libiberty: Add support for demangling D function literals as template value parameters

2021-08-29 Thread Iain Buclaw via Gcc-patches
Hi, The D language now allows instantiating templates using struct literals that have function literal fields as a value argument. Bootstrapped and regression tested on x86_64-linux-gnu. OK for mainline? Regards, Iain. --- libiberty/ChangeLog: * d-demangle.c (dlang_parse_arrayliteral)

[PATCH 1/3] libiberty: Add support for D `typeof(*null)' types

2021-08-29 Thread Iain Buclaw via Gcc-patches
Hi, The D language has a new bottom type `typeof(*null)'. Null types were also incorrectly being demangled as `none', this has been fixed to be `typeof(null)'. Bootstrapped and regression tested on x86_64-linux-gnu. OK for mainline? Regards, Iain. --- libiberty/ChangeLog: * d-demangl

[wwwdocs] [PATCH] x86-64: Document ABI changes for structures with a 64-bit vector

2021-08-29 Thread H.J. Lu via Gcc-patches
TYPE_MODE of record and union depends on whether vector_mode_supported_p returns true or not. x86-64 backend uses TYPE_MODE to decide how to pass a parameter and return a value in a function. 64-bit integer vectors were supported only by MMX and 64-bit float vector was supported only by 3DNOW. G

[committed] d: Call the assertp and boundsp variants for assert and array contract failures.

2021-08-29 Thread Iain Buclaw via Gcc-patches
Hi, This patch updates the code generator to call _d_assertp or _d_arrayboundsp when an assert or array bounds check fails respectively. These functions accept an `immutable(char)*` instead of an `immutable(char)[]`. The subtle difference being that the length of the string no longer has to be in

[committed] d: Update comment for TypeInfoVisitor::layout_base

2021-08-29 Thread Iain Buclaw via Gcc-patches
Hi, This patch updates the comment for TypeInfoVisitor::layout_base to reflect a recent change that made the emission of a __monitor optional. Bootstrapped and regression tested on x86_64-linux-gnu/-m32/-mx32, committed to mainline. Regards, Iain --- gcc/d/ChangeLog: * typeinfo.cc (cla

[committed] d: Use `int` to store class and struct flags

2021-08-29 Thread Iain Buclaw via Gcc-patches
Hi, This patch replaces ClassFlags and StructFlags with an int. In the D implementation of the D front-end, this type has been changed to an `enum class`. Bootstrapped and regression tested on x86_64-linux-gnu/-m32/-mx32, committed to mainline. Regards, Iain --- gcc/d/ChangeLog: * typ

[committed] d: Get __c_wchar_t type from build_frontend_type

2021-08-29 Thread Iain Buclaw via Gcc-patches
Hi This patch uses build_frontend_type to get the underlying type for __c_wchar_t. The previous field has been removed from the upstream D implementation of the D front-end. Bootstrapped and regression tested on x86_64-linux-gnu/-m32/-mx32, committed to mainline. Regards, Iain --- gcc/d/Change

[committed] d: Convert convert_for_rvalue switch statement into if condition

2021-08-29 Thread Iain Buclaw via Gcc-patches
Hi, This patch replaces the switch statement in convert_for_rvalue with an if condition. In the D implementation of the D front-end, the condition value has been changed to an `enum class` type. Bootstrapped and regression tested on x86_64-linux-gnu/-m32/-mx32, committed to mainline. Regards, I

[committed] d: Use POINTER_SIZE for testing whether to predefine D_LP64

2021-08-29 Thread Iain Buclaw via Gcc-patches
Hi, This patch removes uses of global.params to get information about the target. Using POINTER_SIZE is assumed to be reliably set at the point where predefined version conditions are inserted into the compilation. Bootstrapped and regression tested on x86_64-linux-gnu/-m32/-mx32, committed to m

[committed] d: ICE in gimple_register_canonical_type_1, at lto/lto-common.c:430 (PR102094)

2021-08-29 Thread Iain Buclaw via Gcc-patches
Hi, User defined types have the TYPE_CXX_ODR_P flag set, but closure frames did not. This mismatch led to an ICE in the conflict detection for ODR and interoperable non-ODR types. As a given closure frame is tied explicitly to a function, it already conforms to ODR. Bootstrapped and regression

Re: [PATCH] x86-64: Add ABI warning for 64-bit vectors

2021-08-29 Thread H.J. Lu via Gcc-patches
On Sun, Aug 29, 2021 at 8:34 AM Jakub Jelinek wrote: > > On Sun, Aug 29, 2021 at 08:24:10AM -0700, H.J. Lu via Gcc-patches wrote: > > + if (gcc_version) > > + { > > + if (in_return) > > + { > > + static bool warnedm64_ret; > > + if (!warnedm64_ret) > > +

Re: [PATCH] x86-64: Add ABI warning for 64-bit vectors

2021-08-29 Thread Jakub Jelinek via Gcc-patches
On Sun, Aug 29, 2021 at 08:24:10AM -0700, H.J. Lu via Gcc-patches wrote: > + if (gcc_version) > + { > + if (in_return) > + { > + static bool warnedm64_ret; > + if (!warnedm64_ret) > + { > + if (warning (OPT_Wpsabi, > +

[PATCH] x86-64: Add ABI warning for 64-bit vectors

2021-08-29 Thread H.J. Lu via Gcc-patches
TYPE_MODE of record and union depends on whether vector_mode_supported_p returns true or not. x86-64 backend uses TYPE_MODE to decide how to pass a parameter and return a value in a function. 64-bit integer vectors were supported only by MMX and 64-bit float vector was supported only by 3DNOW. GC

[PATCH take 3] Experimental -fpreserve-traps option

2021-08-29 Thread Roger Sayle
This is another attempt to add an -fpreserve-traps command line option to GCC. Many thanks to Richard Beiner for approving the code clean-up pieces of my earlier submission: This revision contains just the actual functional change(s). My recent attempt at humour in comment #8 of PR 77980 has rem

Re: [RFH] ME optimizes variable assignment away / Fortran bind(C) descriptor conversion

2021-08-29 Thread Tobias Burnus
Hi all, hi Richard, On 27.08.21 21:48, Richard Biener wrote: It looks really nice with "-O1 -fno-inline" :-) The callee 'rank_p()' is mostly optimized and in the caller only those struct elements are set, which are used: integer(kind=4) rank_p (struct CFI_cdesc_t & _this) { _1 = _thi

[PATCH] Preserve SUBREG_PROMOTED_VAR_P on (extend:HI (subreg/s:QI (reg:SI)))

2021-08-29 Thread Roger Sayle
SUBREG_PROMOTED_VAR_P is a mechanism for tracking that a partial subreg is correctly zero-extended or sign-extended in the parent register. For example, the RTL (subreg/s/v:QI (reg/v:SI 23 [ x ]) 0) indicates that the byte x is zero extended in reg:SI 23, which is useful for optimization. An exam

*PING**2 – Re: [Patch] Fortran: Fix Bind(C) char-len check, add ptr-contiguous check

2021-08-29 Thread Tobias Burnus
PING**2 On 25.08.21 20:58, Tobias Burnus wrote: Early *PING*. (I also should still review several Fortan patches... There are lots of patches waiting for review :-/) On 20.08.21 19:24, Tobias Burnus wrote: The following is about interoperability (BIND(C)) only. * The patch adds a missing che