Re: [PATCH] [RFC] vect: Fix infinite loop while determining peeling amount

2020-07-27 Thread Richard Biener via Gcc-patches
On Wed, Jul 22, 2020 at 5:18 PM Stefan Schulze Frielinghaus via Gcc-patches wrote: > > This is a follow up to commit 5c9669a0e6c respectively discussion > https://gcc.gnu.org/pipermail/gcc-patches/2020-June/549132.html > > In case that an alignment constraint is less than the size of a > correspon

Re: [PATCH] LTO: Add -fcf-protection=check

2020-07-27 Thread Richard Biener via Gcc-patches
On Fri, Jul 24, 2020 at 11:15 PM H.J. Lu via Gcc-patches wrote: > > Mixing -fcf-protection and -fcf-protection=none objects are allowed. > Linker just merges -fcf-protection values from all input objects. > > Add -fcf-protection=check for the final link with LTO. An error is > issued if LTO objec

Re: [PATCH] Use vec::reserve before vec_safe_grow_cleared is called

2020-07-27 Thread Richard Biener via Gcc-patches
On Sat, Jul 25, 2020 at 2:23 PM Martin Liška wrote: > > Hello. > > When inserting into fast_call_summary (or fast_function_summary), we grow > a vector to a _exact_ size based on cgraph_max_summary_id or > edges_max_summary_id. > Problem is that it causes very many reallocation and we should rath

Re: [PATCH] Use vec::reserve before vec_safe_grow_cleared is called

2020-07-27 Thread Martin Liška
On 7/27/20 9:11 AM, Richard Biener wrote: OK. I guess the previous code tried to use less memory. It did. But I didn't realize that such exact growth would lead to a massive reallocation for huge apps like chromium. I'm going to backport the patch older releases as well. Martin

Re: [PATCH] ipa/96291: don't crash on unoptimized lto functions

2020-07-27 Thread Richard Biener via Gcc-patches
On Sat, Jul 25, 2020 at 8:35 PM Sergei Trofimovich via Gcc-patches wrote: > > From: Sergei Trofimovich > > In PR ipa/96291 the test contained an SCC with one > unoptimized function. This tricked ipa-cp into NULL dereference. > > has_undead_caller_from_outside_scc_p() did not take into account > t

[patch, committed] fortran/openmp.c - silence static analyzer warning (was: [Patch] OpenMP: Fixes for omp critical + hint)

2020-07-27 Thread Tobias Burnus
As complained by Coverity, which was pointed out to my by Fredering (thanks!), that patch lead to an inconsistency: + if (code->ext.omp_clauses) + resolve_omp_clauses (code, code->ext.omp_clauses, NULL); + if (!code->ext.omp_clauses->critical_name Before, we had: !$omp critical

RE: [PATCH v2] driver: fix a problem with implementation of -falign-foo=0 [PR96247]

2020-07-27 Thread Hu, Jiangping
> In addition to Segher's comments, I wonder if it would be better > to pass &opts->x_flag_align_foo and &opts->x_str_align_jumps to > check_alignment_argument and do the check there instead. > The condition for whether to do this would then be: > > align_result.length () == 1 && align_result[0]

[PATCH v3] driver: fix a problem with implementation of -falign-foo=0 [PR96247]

2020-07-27 Thread Hu Jiangping
Hi! This patch makes the -falign-foo=0 work as described in the documentation. Thanks for all the suggestions, Richard and Segher! v3: make change more readable and self-consistent v2: at a high level handles -falign-foo=0 like -falign-foo Regards! Hujp --- gcc/opts.c | 24 +++-

RE: [PATCH v3] driver: fix a problem with implementation of -falign-foo=0 [PR96247]

2020-07-27 Thread Hu, Jiangping
Tested on x86_64. > -Original Message- > From: Gcc-patches On Behalf Of Hu > Jiangping > Sent: Monday, July 27, 2020 3:46 PM > To: gcc-patches@gcc.gnu.org; richard.sandif...@arm.com; > seg...@kernel.crashing.org > Subject: [PATCH v3] driver: fix a problem with implementation of -falign-fo

[Ada] x86-lynx178elf: use a-numaux.ads instead of a-numaux__libc-x86.ads

2020-07-27 Thread Pierre-Marie de Rodat
a-numaux__libc-x86.ads wraps around long double trig functions that Lynx178 does not have, so use the default a-numaux.ads instead to match what is offered on Lynx178. This is done by removing X86_TARGET_PAIRS from the x86-lynx178elf configuration as it is now redundant: the default a-numaux pacak

[Ada] AI12-0382: Loosen type-invariant overriding requirement of AI12-0042

2020-07-27 Thread Pierre-Marie de Rodat
The requirement for overriding an inherited visible private operation when extending from an ancestor that specifies Type_Invariant'Class as specified in RM 7.3.2(6.1/4) (AI12-0042) was unintentionally overrestrictive. The rule is loosened by AI12-0382 so that it only applies to type extensions th

[Ada] Warnings on overloays involving generic In_Parameters

2020-07-27 Thread Pierre-Marie de Rodat
Warnings aare emitted when a declaration for a constant C has an address aspect or an address_specification clause of the form O'Address, where O is a previously declared entity that is not a constant, The warning must br supppressed if O is a generic formal In_Parameter, which is a constant within

[Ada] Add range check for GNATprove on 'Pos to Long_Integer conversion

2020-07-27 Thread Pierre-Marie de Rodat
In GNAT mode attribute Pos is typically expanded into either a type conversion (unless applied to enumeration types with custom representation values) and analysis of this type conversion adds check flags as required. In GNATprove mode we expand the attribute with Apply_Universal_Integer_Attribute

[Ada] AI12-0194: Language-defined aspects and entry bodies

2020-07-27 Thread Pierre-Marie de Rodat
AI12-0194 specifies that language-defined aspects aren't permitted on entry bodies, which is already effectively enforced by GNAT, however the error message given when Max_Entry_Queue_Length is applied to an entry body is potentially confusing, because it says that the aspect "must apply to a prote

[Ada] Unbounded string overriding control

2020-07-27 Thread Pierre-Marie de Rodat
Unbounded string operation has to raise Constraint_Error if resulting string going to be over Integer'Last length. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/a-strunb.adb (Sum, Mul, Saturated_Sum, Saturated_Mul): New routines. Use them when resulting st

[Ada] Ada2020: wording of 'Image messages

2020-07-27 Thread Pierre-Marie de Rodat
Change the wording of error messages about 'Image to indicate that newer versions of the language allow more cases. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * errout.ads, errout.adb (Error_Msg_Ada_2020_Feature): New procedure analogous to Error_Msg_Ada_2012_Feat

[Ada] Remove disabled code

2020-07-27 Thread Pierre-Marie de Rodat
This old code is likely made obsolete by recent changes related to the handling of the universal access "=" operator. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_attr.adb (Resolve_Attribute): Remove dead code.diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb -

[Ada] Remove obsolete special case in Switch_View

2020-07-27 Thread Pierre-Marie de Rodat
This removes obsolete code that would prevent a subtype dependent on a private type from having its views switched when those of the private type are switched by Switch_View. Not switching the views in this case is problematic because this is not in keeping with what the mechanism based on Install

[Ada] Ada2020: AI12-0304 Put_Image attrs of lang-def types

2020-07-27 Thread Pierre-Marie de Rodat
Implement Put_Image for the random number packages and for Ada.Containers.Vectors. More to come. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/s-rannum.ads, libgnat/s-rannum.adb: Add Put_Image. This will be inherited by the language-defined packages

[Ada] Bug in Enum_Subtype'Image in Ada 2020 mode

2020-07-27 Thread Pierre-Marie de Rodat
This patch fixes a bug in which Enum_Subtype'Image, where Enum_Subtype is a non-first subtype of an enumeration type, would return the image of the 'Pos -- that is, an integer instead of the text of the enumeration literal. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp

[Ada] AI12-0383 Renaming values

2020-07-27 Thread Pierre-Marie de Rodat
This AI allows names that denote values rather than objects to nevertheless be renamed using an object renaming. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch8.adb (Analyze_Object_Renaming): Allow values in Ada 2020 mode.diff --git a/gcc/ada/sem_ch8.adb b/gc

[Ada] AI12-0377 View conversions and out parameters revisited

2020-07-27 Thread Pierre-Marie de Rodat
This AI refines AI12-0074 to disallow cases of potential de-initializing of out parameters. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_res.adb (Resolve_Actuals): Refine 6.4.1 rules as per AI12-0377.diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb --- a

[Ada] Wrong accessibility on 'Access of formal in call

2020-07-27 Thread Pierre-Marie de Rodat
This patch fixes a bug in the compiler whereby taking 'Access on a component of an anonymous access formal parameter and using such an expression as an actual in a call where the corresponding formal is also an anonymous access type will cause dynamic accessibility checks within the callee function

[Ada] Revert "Revamp dump and aux output names"

2020-07-27 Thread Pierre-Marie de Rodat
This reverts commit 593627b4562814d2206e53e9ad6ce2e85295aa58. That commit was installed in GCC by mistake, bringing it in sync with an earlier, internal transitory state that had just been resolved in a separate patch. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * switch.

[Ada] Switch Ada_Version_Runtime to Ada 2020

2020-07-27 Thread Pierre-Marie de Rodat
Now that we're adding more and more Ada 2020 specific aspects in runtime units, this is the convenient thing to do. Note that this doesn't impact the Ada version used by user code. Also fix a latent bug in sem_ch3 along the way, showing up when System.Atomic_Primitives generic children are compile

[Ada] Refactor pragma argument getters

2020-07-27 Thread Pierre-Marie de Rodat
This refactoring replaces exp_prag.adb's Arg1, Arg2 and Arg3 functions with a new function Arg_N which enables fetching any pragma arguments. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_prag.adb (Arg1, Arg2, Arg3): Removed. (Arg_N): New function.diff --git a/

Re: [PATCH] [RFC] vect: Fix infinite loop while determining peeling amount

2020-07-27 Thread Richard Sandiford
Richard Biener via Gcc-patches writes: > On Wed, Jul 22, 2020 at 5:18 PM Stefan Schulze Frielinghaus via > Gcc-patches wrote: >> >> This is a follow up to commit 5c9669a0e6c respectively discussion >> https://gcc.gnu.org/pipermail/gcc-patches/2020-June/549132.html >> >> In case that an alignment

Re: [PATCH v3] driver: fix a problem with implementation of -falign-foo=0 [PR96247]

2020-07-27 Thread Richard Sandiford
Hu Jiangping writes: > Hi! > > This patch makes the -falign-foo=0 work as described in the > documentation. Thanks for all the suggestions, Richard and Segher! > > v3: make change more readable and self-consistent > v2: at a high level handles -falign-foo=0 like -falign-foo Thanks, this is OK wit

Re: [PATCH] [RFC] vect: Fix infinite loop while determining peeling amount

2020-07-27 Thread Richard Biener via Gcc-patches
On Mon, Jul 27, 2020 at 11:09 AM Richard Sandiford wrote: > > Richard Biener via Gcc-patches writes: > > On Wed, Jul 22, 2020 at 5:18 PM Stefan Schulze Frielinghaus via > > Gcc-patches wrote: > >> > >> This is a follow up to commit 5c9669a0e6c respectively discussion > >> https://gcc.gnu.org/pip

Re: [PATCH] Using gen_int_mode instead of GEN_INT to avoid ICE caused by type promotion.

2020-07-27 Thread Hongtao Liu via Gcc-patches
ping On Wed, Jul 22, 2020 at 3:57 PM Hongtao Liu wrote: > > Bootstrap is ok, regression test is ok for i386 backend. > > gcc/ > PR target/96262 > * config/i386/i386-expand.c > (ix86_expand_vec_shift_qihi_constant): Refine. > > gcc/testsuite/ > * gcc.target/i386/p

Re: [PATCH] [AVX512]For vector compare to mask register, UNSPEC is needed instead of comparison operator [PR96243]

2020-07-27 Thread Hongtao Liu via Gcc-patches
ping On Mon, Jul 20, 2020 at 4:40 PM Hongtao Liu wrote: > > Correct PR number in ChangeLog > it's pr96243. > > On Mon, Jul 20, 2020 at 1:46 PM Hongtao Liu wrote: > > > > Hi: > > For rtx like (eq:HI (V8SI 90) (V8SI 91)), cse will take it as a > > boolean value and try to do some optimization. B

Re: [PATCH][AVX512][PR96246] Merge two define_insn: _blendm, _load_mask.

2020-07-27 Thread Hongtao Liu via Gcc-patches
ping On Wed, Jul 22, 2020 at 12:59 PM Hongtao Liu wrote: > > Those two define_insns have same pattern, and > _load_mask would always be matched since it show up > earlier in the md file, and it may lose some opportunity in > pass_reload since _load_mask only have constraint "0C" > for operand2,

Re: [PATCH] Remove dead vector comparisons

2020-07-27 Thread Martin Liška
On 7/10/20 10:24 AM, Richard Biener wrote: On Fri, Jul 10, 2020 at 9:50 AM Martin Liška wrote: As mentioned in the PR, we need to clean up orphan vector comparisons that tend to happen be gimplification of VEC_COND_EXPR. I've done that easily in expand_vector_comparison where I add these to a

Re: [PATCH v3] driver: fix a problem with implementation of -falign-foo=0 [PR96247]

2020-07-27 Thread Martin Liška
On 7/27/20 9:46 AM, Hu Jiangping wrote: Hi! This patch makes the -falign-foo=0 work as described in the documentation. Thanks for all the suggestions, Richard and Segher! Hello. I'm the author of the original code. v3: make change more readable and self-consistent v2: at a high level handl

Re: [committed] libstdc++: Add std::from_chars for floating-point types

2020-07-27 Thread Rainer Orth
Hi Jonathan, > This adds the missing std::from_chars overloads for floating-point > types, as required for C++17 conformance. > > The implementation is a hack and not intended to be used in the long > term. Rather than parsing the string directly, this determines the > initial portion of the strin

Re: [PATCH] [RFC] vect: Fix infinite loop while determining peeling amount

2020-07-27 Thread Richard Sandiford
Richard Biener writes: > On Mon, Jul 27, 2020 at 11:09 AM Richard Sandiford > wrote: >> >> Richard Biener via Gcc-patches writes: >> > On Wed, Jul 22, 2020 at 5:18 PM Stefan Schulze Frielinghaus via >> > Gcc-patches wrote: >> >> >> >> This is a follow up to commit 5c9669a0e6c respectively discu

Re: [committed] libstdc++: Add std::from_chars for floating-point types

2020-07-27 Thread Jonathan Wakely via Gcc-patches
On 27/07/20 11:41 +0200, Rainer Orth wrote: Hi Jonathan, This adds the missing std::from_chars overloads for floating-point types, as required for C++17 conformance. The implementation is a hack and not intended to be used in the long term. Rather than parsing the string directly, this determi

Re: [PATCH] Use vec::reserve before vec_safe_grow_cleared is called

2020-07-27 Thread Jan Hubicka
> On 7/27/20 9:11 AM, Richard Biener wrote: > > OK. I guess the previous code tried to use less memory. > > It did. But I didn't realize that such exact growth would lead > to a massive reallocation for huge apps like chromium. > > I'm going to backport the patch older releases as well. Thank y

Re: [PATCH v3] driver: fix a problem with implementation of -falign-foo=0 [PR96247]

2020-07-27 Thread Richard Sandiford
Martin Liška writes: > On 7/27/20 9:46 AM, Hu Jiangping wrote: >> Hi! >> >> This patch makes the -falign-foo=0 work as described in the >> documentation. Thanks for all the suggestions, Richard and Segher! > > Hello. > > I'm the author of the original code. > >> >> v3: make change more readable

Re: [PATCH] [RFC] vect: Fix infinite loop while determining peeling amount

2020-07-27 Thread Richard Biener via Gcc-patches
On Mon, Jul 27, 2020 at 11:45 AM Richard Sandiford wrote: > > Richard Biener writes: > > On Mon, Jul 27, 2020 at 11:09 AM Richard Sandiford > > wrote: > >> > >> Richard Biener via Gcc-patches writes: > >> > On Wed, Jul 22, 2020 at 5:18 PM Stefan Schulze Frielinghaus via > >> > Gcc-patches wrot

Re: [PATCH] Use vec::reserve before vec_safe_grow_cleared is called

2020-07-27 Thread Martin Liška
On 7/27/20 11:51 AM, Jan Hubicka wrote: On 7/27/20 9:11 AM, Richard Biener wrote: OK. I guess the previous code tried to use less memory. It did. But I didn't realize that such exact growth would lead to a massive reallocation for huge apps like chromium. I'm going to backport the patch olde

RE: [PATCH v3] driver: fix a problem with implementation of -falign-foo=0 [PR96247]

2020-07-27 Thread Hu, Jiangping
> > This patch makes the -falign-foo=0 work as described in the > > documentation. Thanks for all the suggestions, Richard and Segher! > > Hello. > > I'm the author of the original code. > > > > > v3: make change more readable and self-consistent > > v2: at a high level handles -falign-foo=0 lik

Re: [PATCH] Use vec::reserve before vec_safe_grow_cleared is called

2020-07-27 Thread Jan Hubicka
> Yes, I verified that. > > > I guess I can try > > to do some profiling since this problem did not show on Firefox (that i > > find odd given that Firefox is just about half of the size). > > Yep, I'm also surprised about it. > > > Perhaps glibc has some stupid limit in realloc that makes it to

Re: [PATCH v3] driver: fix a problem with implementation of -falign-foo=0 [PR96247]

2020-07-27 Thread Martin Liška
On 7/27/20 12:25 PM, Richard Sandiford wrote: So I don't think there's a different value that parse_and_check_align_values could sensibly insert instead of zero. All right, works for me. Martin

Re: [PATCH] Use vec::reserve before vec_safe_grow_cleared is called

2020-07-27 Thread Martin Liška
On 7/27/20 12:48 PM, Jan Hubicka wrote: Yes, I verified that. I guess I can try to do some profiling since this problem did not show on Firefox (that i find odd given that Firefox is just about half of the size). Yep, I'm also surprised about it. Perhaps glibc has some stupid limit in reall

Re: [PATCH] Use vec::reserve before vec_safe_grow_cleared is called

2020-07-27 Thread Jan Hubicka
> It runs for me in: > > $ time ./a.out 10 > > real 0m10.048s > user 0m9.742s > sys 0m0.305s Did you do chroot to the chromium build? > > Note that there may be an interleaving load on the machine. > Perf says: > > 55.40% a.outlibc-2.26.so [.] realloc > 36.01% a.

Re: [PATCH] Use vec::reserve before vec_safe_grow_cleared is called

2020-07-27 Thread Richard Biener via Gcc-patches
On Mon, Jul 27, 2020 at 12:48 PM Jan Hubicka wrote: > > > Yes, I verified that. > > > > > I guess I can try > > > to do some profiling since this problem did not show on Firefox (that i > > > find odd given that Firefox is just about half of the size). > > > > Yep, I'm also surprised about it. > >

Re: [PATCH] Use vec::reserve before vec_safe_grow_cleared is called

2020-07-27 Thread Jan Hubicka
> On 7/27/20 9:11 AM, Richard Biener wrote: > > OK. I guess the previous code tried to use less memory. > > It did. But I didn't realize that such exact growth would lead > to a massive reallocation for huge apps like chromium. I would consider it an API issue - it is not really at all that obvi

Re: [PATCH] Use vec::reserve before vec_safe_grow_cleared is called

2020-07-27 Thread Martin Liška
On 7/27/20 1:03 PM, Jan Hubicka wrote: Did you do chroot to the chromium build? Oh, you are right! It really takes move than 60 seconds with: 35.43% a.outlibc-2.31.so [.] mem2chunk_check 26.54% a.outlibc-2.31.so [.] mem2mem_check 21.50% a.outlibc-2.31.so

Re: [PATCH] Remove dead vector comparisons

2020-07-27 Thread Richard Biener via Gcc-patches
On Mon, Jul 27, 2020 at 11:32 AM Martin Liška wrote: > > On 7/10/20 10:24 AM, Richard Biener wrote: > > On Fri, Jul 10, 2020 at 9:50 AM Martin Liška wrote: > >> > >> As mentioned in the PR, we need to clean up orphan vector comparisons > >> that tend to happen be gimplification of VEC_COND_EXPR.

Re: [PATCH] Use vec::reserve before vec_safe_grow_cleared is called

2020-07-27 Thread Martin Liška
On 7/27/20 1:11 PM, Jan Hubicka wrote: On 7/27/20 9:11 AM, Richard Biener wrote: OK. I guess the previous code tried to use less memory. It did. But I didn't realize that such exact growth would lead to a massive reallocation for huge apps like chromium. I would consider it an API issue - i

Re: [PATCH] Use vec::reserve before vec_safe_grow_cleared is called

2020-07-27 Thread Richard Biener via Gcc-patches
On Mon, Jul 27, 2020 at 1:24 PM Martin Liška wrote: > > On 7/27/20 1:11 PM, Jan Hubicka wrote: > >> On 7/27/20 9:11 AM, Richard Biener wrote: > >>> OK. I guess the previous code tried to use less memory. > >> > >> It did. But I didn't realize that such exact growth would lead > >> to a massive re

[PATCH v4] driver: fix a problem with implementation of -falign-foo=0 [PR96247]

2020-07-27 Thread Hu Jiangping
Hi! This patch makes the -falign-foo=0 work as described in the documentation. Thanks for all the suggestions. v4: do changes for coding conventions v3: make change more readable and self-consistent Changelog: 2020-07-27 Hu Jiangping PR driver/96247 * opts.c (check_alignment_

[PATCH] expr: build string_constant only for a char type

2020-07-27 Thread Martin Liška
Hey. As mentioned in the PR, we should not create a string constant for a type that is different from char_type_node. Looking at expr.c, I was inspired and used 'TYPE_MAIN_VARIANT (chartype) == char_type_node' to verify that underlying type is a character type. Patch can bootstrap on x86_64-lin

Re: [PATCH] ipa/96291: don't crash on unoptimized lto functions

2020-07-27 Thread Martin Jambor
Hi, On Sat, Jul 25 2020, Sergei Trofimovich wrote: > From: Sergei Trofimovich > > In PR ipa/96291 the test contained an SCC with one > unoptimized function. This tricked ipa-cp into NULL dereference. > > has_undead_caller_from_outside_scc_p() did not take into account > that unoptimized funtions

Re: [PATCH] ipa/96291: don't crash on unoptimized lto functions

2020-07-27 Thread Martin Jambor
Hi, On Mon, Jul 27 2020, Richard Biener via Gcc-patches wrote: > On Sat, Jul 25, 2020 at 8:35 PM Sergei Trofimovich via Gcc-patches > wrote: >> >> From: Sergei Trofimovich >> >> In PR ipa/96291 the test contained an SCC with one >> unoptimized function. This tricked ipa-cp into NULL dereference.

Re: [PATCH] Use vec::reserve before vec_safe_grow_cleared is called

2020-07-27 Thread Andreas Schwab
On Jul 27 2020, Martin Liška wrote: > @Andreas: Is it a known issue? Which issue? Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."

Re: [PATCH] Remove dead vector comparisons

2020-07-27 Thread Martin Liška
On 7/27/20 1:22 PM, Richard Biener wrote: I wonder what happens if we make vector lowering not allow the compare expanded via expand_vec_cond_expr_p? So the following patch survives bootstrap and tests on x86_64-linux-gnu: diff --git a/gcc/tree-vect-generic.c b/gcc/tree-vect-generic.c index f8

Re: [PATCH] Use vec::reserve before vec_safe_grow_cleared is called

2020-07-27 Thread Richard Biener via Gcc-patches
On Mon, Jul 27, 2020 at 2:50 PM Andreas Schwab wrote: > > On Jul 27 2020, Martin Liška wrote: > > > @Andreas: Is it a known issue? > > Which issue? I guess Martin means the checking glibc done looks excessive (for the specific case of realloc). But yes, it's enabled in the build roots so we just

Re: [PATCH] Remove dead vector comparisons

2020-07-27 Thread Richard Biener via Gcc-patches
On Mon, Jul 27, 2020 at 2:50 PM Martin Liška wrote: > > On 7/27/20 1:22 PM, Richard Biener wrote: > > I wonder what happens if we make vector lowering not allow the compare > > expanded via expand_vec_cond_expr_p? > > So the following patch survives bootstrap and tests on x86_64-linux-gnu: > > dif

Re: [PATCH] Use vec::reserve before vec_safe_grow_cleared is called

2020-07-27 Thread Martin Liška
On 7/27/20 2:51 PM, Richard Biener wrote: On Mon, Jul 27, 2020 at 2:50 PM Andreas Schwab wrote: On Jul 27 2020, Martin Liška wrote: @Andreas: Is it a known issue? Which issue? I guess Martin means the checking glibc done looks excessive (for the specific case of realloc). But yes, it's e

Re: [PATCH] Use vec::reserve before vec_safe_grow_cleared is called

2020-07-27 Thread Richard Biener via Gcc-patches
On Mon, Jul 27, 2020 at 2:54 PM Martin Liška wrote: > > On 7/27/20 2:51 PM, Richard Biener wrote: > > On Mon, Jul 27, 2020 at 2:50 PM Andreas Schwab > > wrote: > >> > >> On Jul 27 2020, Martin Liška wrote: > >> > >>> @Andreas: Is it a known issue? > >> > >> Which issue? > > > > I guess Martin me

RE: [PATCH PR96053] Add "#pragma GCC no_reduc_chain"

2020-07-27 Thread zhoukaipeng (A)
Sorry for the late reply! -Original Message- From: Richard Biener [mailto:rguent...@suse.de] Sent: Wednesday, July 22, 2020 3:02 PM > First of all I think giving users more control over vectorization is > good. Now as for "#pragma GCC no_reduc_chain" I'd like to avoid > negatives and t

Re: Refactor peel_iters_{pro,epi}logue cost model handlings

2020-07-27 Thread Richard Sandiford
"Kewen.Lin" writes: > Hi, > > As Richard S. suggested in the thread: > > https://gcc.gnu.org/pipermail/gcc-patches/2020-July/550633.html > > this patch is separated from the one of that thread, mainly to refactor the > existing peel_iters_{pro,epi}logue cost model handlings. > > I've addressed Ric

Re: [PATCH] expr: build string_constant only for a char type

2020-07-27 Thread Jakub Jelinek via Gcc-patches
On Mon, Jul 27, 2020 at 02:32:15PM +0200, Martin Liška wrote: > As mentioned in the PR, we should not create a string constant for a type > that is different from char_type_node. Looking at expr.c, I was inspired > and used 'TYPE_MAIN_VARIANT (chartype) == char_type_node' to verify that > underlyi

Re: [PATCH v4] vect/rs6000: Support vector with length cost modeling

2020-07-27 Thread Richard Sandiford
"Kewen.Lin" writes: > Hi Richard, > > Thanks for the review again! > > on 2020/7/25 上午12:21, Richard Sandiford wrote: >> "Kewen.Lin" writes: >> >> Thanks, the rearrangement of the existing code looks good. Could you >> split that and the new LOOP_VINFO_FULLY_WITH_LENGTH_P (loop_vinfo) stuff >>

[PATCH] [PATCH][GCC] arm: Enable no-writeback vldr.16/vstr.16.

2020-07-27 Thread Joe Ramsay
Hi, There was previously no way to specify that a register operand cannot have any writeback modifiers, and as a result the argument to vldr.16 and vstr.16 could be erroneously output with post-increment. This change adds an operand specifier which forbids all writeback, and selects it in the rele

Re: [PATCH] expr: build string_constant only for a char type

2020-07-27 Thread Martin Liška
On 7/27/20 3:16 PM, Jakub Jelinek wrote: On Mon, Jul 27, 2020 at 02:32:15PM +0200, Martin Liška wrote: As mentioned in the PR, we should not create a string constant for a type that is different from char_type_node. Looking at expr.c, I was inspired and used 'TYPE_MAIN_VARIANT (chartype) == char

Re: [PATCH] expr: build string_constant only for a char type

2020-07-27 Thread Jakub Jelinek via Gcc-patches
On Mon, Jul 27, 2020 at 04:12:09PM +0200, Martin Liška wrote: > On 7/27/20 3:16 PM, Jakub Jelinek wrote: > > On Mon, Jul 27, 2020 at 02:32:15PM +0200, Martin Liška wrote: > > > As mentioned in the PR, we should not create a string constant for a type > > > that is different from char_type_node. Loo

[PATCH 00/29] rs6000: Auto-generate builtins from descriptions [V2]

2020-07-27 Thread Bill Schmidt
From: Bill Schmidt This is a slight reworking of the patches posted on June 17. I have made a couple of improvements, but the general arrangement of the patches is the same as before. Two major things to call out: - I've introduced a uniform set of parsing error codes to make it easier to

[PATCH 01/29] rs6000: Initial create of rs6000-gen-builtins.c

2020-07-27 Thread Bill Schmidt
From: Bill Schmidt Add header commentary explaining the purpose of rs6000-gen-builtins.c, along with an initial set of includes. 2020-07-26 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c: New. --- gcc/config/rs6000/rs6000-gen-builtins.c | 141 1 file cha

[PATCH 10/29] rs6000: Parsing built-in input file, part 1 of 3

2020-07-27 Thread Bill Schmidt
From: Bill Schmidt 2020-07-26 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c (bif_stanza): New enum. (curr_bif_stanza): Likewise. (stanza_entry): New struct. (stanza_map): New initialized filescope variable. (enable_string): Likewise. (fnkin

[PATCH 03/29] rs6000: Add file support and functions for diagnostic support

2020-07-27 Thread Bill Schmidt
From: Bill Schmidt 2020-07-26 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c (bif_file): New filescope variable. (ovld_file): Likewise. (header_file): Likewise. (init_file): Likewise. (defines_file): Likewise. (pgm_path): Likewise.

[PATCH 07/29] rs6000: Add functions for matching types, part 3 of 3

2020-07-27 Thread Bill Schmidt
From: Bill Schmidt 2020-07-26 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c (restriction): New enum. (typeinfo): Add restriction field. (match_const_restriction): Implement. --- gcc/config/rs6000/rs6000-gen-builtins.c | 136 1 file change

[PATCH 09/29] rs6000: Main function with stubs for parsing and output

2020-07-27 Thread Bill Schmidt
From: Bill Schmidt 2020-07-26 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c (rbtree.h): New #include. (num_bifs): Likewise. (num_ovld_stanzas): Likewise. (num_ovlds): Likewise. (exit_codes): Add more enum values. (parse_codes): New enum.

[PATCH 02/29] rs6000: Add initial input files

2020-07-27 Thread Bill Schmidt
From: Bill Schmidt This patch adds a tiny subset of the built-in and overload descriptions. 2020-07-26 Bill Schmidt * config/rs6000/rs6000-builtin-new.def: New. * config/rs6000/rs6000-overload.def: New. --- gcc/config/rs6000/rs6000-builtin-new.def | 179 +

[PATCH 08/29] rs6000: Red-black tree implementation for balanced tree search

2020-07-27 Thread Bill Schmidt
From: Bill Schmidt 2020-07-26 Bill Schmidt * config/rs6000/rbtree.c: New file. * config/rs6000/rbtree.h: New file. --- gcc/config/rs6000/rbtree.c | 233 + gcc/config/rs6000/rbtree.h | 51 2 files changed, 284 insertions(+) create

[PATCH 04/29] rs6000: Add helper functions for parsing

2020-07-27 Thread Bill Schmidt
From: Bill Schmidt 2020-07-26 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c (MININT): New defined constant. (exit_codes): New enum. (consume_whitespace): New function. (advance_line): Likewise. (safe_inc_pos): Likewise. (match_ident

[PATCH 06/29] rs6000: Add functions for matching types, part 2 of 3

2020-07-27 Thread Bill Schmidt
From: Bill Schmidt 2020-07-26 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c (match_basetype): Implement. --- gcc/config/rs6000/rs6000-gen-builtins.c | 49 + 1 file changed, 49 insertions(+) diff --git a/gcc/config/rs6000/rs6000-gen-builtins.c b/

[PATCH 05/29] rs6000: Add functions for matching types, part 1 of 3

2020-07-27 Thread Bill Schmidt
From: Bill Schmidt 2020-07-26 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c (void_status): New enum. (basetype): Likewise. (typeinfo): New struct. (handle_pointer): New function. (match_basetype): New stub function. (match_const_restriction

[PATCH 11/29] rs6000: Parsing built-in input file, part 2 of 3

2020-07-27 Thread Bill Schmidt
From: Bill Schmidt 2020-07-26 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c (parse_args): New function. (parse_prototype): Implement. --- gcc/config/rs6000/rs6000-gen-builtins.c | 143 1 file changed, 143 insertions(+) diff --git a/gcc/config/rs

[PATCH 12/29] rs6000: Parsing built-in input file, part 3 of 3

2020-07-27 Thread Bill Schmidt
From: Bill Schmidt 2020-07-26 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c (parse_bif_attrs): Implement. --- gcc/config/rs6000/rs6000-gen-builtins.c | 86 + 1 file changed, 86 insertions(+) diff --git a/gcc/config/rs6000/rs6000-gen-builtins.c b

[PATCH 19/29] rs6000: Write output to the builtins init file, part 3 of 3

2020-07-27 Thread Bill Schmidt
From: Bill Schmidt 2020-07-26 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c (typemap): New struct. (TYPE_MAP_SIZE): New defined constant. (type_map): New filescope variable; initialize. (map_token_to_type_node): New function. (write_type_node): New

[PATCH 18/29] rs6000: Write output to the builtins init file, part 2 of 3

2020-07-27 Thread Bill Schmidt
From: Bill Schmidt 2020-07-26 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c (write_init_bif_table): Implement. --- gcc/config/rs6000/rs6000-gen-builtins.c | 153 1 file changed, 153 insertions(+) diff --git a/gcc/config/rs6000/rs6000-gen-builtin

[PATCH 16/29] rs6000: Write output to the builtins header file

2020-07-27 Thread Bill Schmidt
From: Bill Schmidt 2020-07-26 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c (write_autogenerated_header): New function. (write_bif_enum): Likewise. (write_ovld_enum): Likewise. (write_decls): Likewise. (write_extern_fntype): Likewise.

[PATCH 23/29] rs6000: Add available-everywhere and ancient builtins

2020-07-27 Thread Bill Schmidt
From: Bill Schmidt 2020-07-26 Bill Schmidt * config/rs6000/rs6000-builtin-new.def: Add always, power5, and power6 builtins. --- gcc/config/rs6000/rs6000-builtin-new.def | 78 1 file changed, 78 insertions(+) diff --git a/gcc/config/rs6000/rs6000-buil

[PATCH 14/29] rs6000: Build and store function type identifiers

2020-07-27 Thread Bill Schmidt
From: Bill Schmidt 2020-07-26 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c (complete_vector_type): New function. (complete_base_type): Likewise. (construct_fntype_id): Likewise. (parse_bif_entry): Call construct_fntype_id. (parse_ovld_entr

[PATCH 22/29] rs6000: Add VSX builtins

2020-07-27 Thread Bill Schmidt
From: Bill Schmidt 2020-07-26 Bill Schmidt * config/rs6000/rs6000-builtin-new.def: Add VSX builtins. --- gcc/config/rs6000/rs6000-builtin-new.def | 840 +++ 1 file changed, 840 insertions(+) diff --git a/gcc/config/rs6000/rs6000-builtin-new.def b/gcc/config/rs60

[PATCH 15/29] rs6000: Write output to the vector definition include file

2020-07-27 Thread Bill Schmidt
From: Bill Schmidt 2020-07-26 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c (write_defines_file): Implement. --- gcc/config/rs6000/rs6000-gen-builtins.c | 4 1 file changed, 4 insertions(+) diff --git a/gcc/config/rs6000/rs6000-gen-builtins.c b/gcc/config/rs6000/r

[PATCH 24/29] rs6000: Add Power7 builtins

2020-07-27 Thread Bill Schmidt
From: Bill Schmidt 2020-07-26 Bill Schmidt * config/rs6000/rs6000-builtin-new.def: Add power7 and power7-64 builtins. --- gcc/config/rs6000/rs6000-builtin-new.def | 39 1 file changed, 39 insertions(+) diff --git a/gcc/config/rs6000/rs6000-builtin-ne

[PATCH 17/29] rs6000: Write output to the builtins init file, part 1 of 3

2020-07-27 Thread Bill Schmidt
From: Bill Schmidt 2020-07-26 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c (write_fntype): New function. (write_fntype_init): New stub function. (write_init_bif_table): Likewise. (write_init_ovld_table): New function. (write_init_file): Im

[PATCH 13/29] rs6000: Parsing of overload input file

2020-07-27 Thread Bill Schmidt
From: Bill Schmidt 2020-07-26 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c (ovld_stanza): New struct. (MAXOVLDSTANZAS): New defined constant. (ovld_stanzas): New filescope variable. (curr_ovld_stanza): Likewise. (MAXOVLDS): New defined constant.

[PATCH 20/29] rs6000: Incorporate new builtins code into the build machinery

2020-07-27 Thread Bill Schmidt
From: Bill Schmidt 2020-07-26 Bill Schmidt * config.gcc (powerpc*-*-*): Add rs6000-builtins.o to extra_objs. * config/rs6000/t-rs6000 (rs6000-gen-builtins.o): New target. (rbtree.o): Likewise. (rs6000-gen-builtins): Likewise. (rs6000-builtins.c): Likewi

[PATCH 21/29] rs6000: Add remaining AltiVec builtins

2020-07-27 Thread Bill Schmidt
From: Bill Schmidt 2020-07-26 Bill Schmidt * config/rs6000/rs6000-builtin-new.def: Add remaining AltiVec builtins. --- gcc/config/rs6000/rs6000-builtin-new.def | 843 +++ 1 file changed, 843 insertions(+) diff --git a/gcc/config/rs6000/rs6000-builtin-new.

[PATCH 26/29] rs6000: Add Power9 builtins

2020-07-27 Thread Bill Schmidt
From: Bill Schmidt 2020-07-26 Bill Schmidt * config/rs6000/rs6000-builtin-new.def: Add power9, power9-vector, and power9-64 builtins. --- gcc/config/rs6000/rs6000-builtin-new.def | 354 +++ 1 file changed, 354 insertions(+) diff --git a/gcc/config/rs6000/

[PATCH 25/29] rs6000: Add Power8 vector builtins

2020-07-27 Thread Bill Schmidt
From: Bill Schmidt 2020-07-26 Bill Schmidt * config/rs6000/rs6000-builtin-new.def: Add power8-vector builtins. --- gcc/config/rs6000/rs6000-builtin-new.def | 417 +++ 1 file changed, 417 insertions(+) diff --git a/gcc/config/rs6000/rs6000-builtin-new.def

[PATCH 27/29] rs6000: Add remaining builtins

2020-07-27 Thread Bill Schmidt
From: Bill Schmidt 2020-07-26 Bill Schmidt * config/rs6000/rs6000-builtin-new.def: Add ieee128-hw, dfp, crypto, and htm builtins. --- gcc/config/rs6000/rs6000-builtin-new.def | 217 +++ 1 file changed, 217 insertions(+) diff --git a/gcc/config/rs6000/rs60

[PATCH 29/29] rs6000: Call rs6000_autoinit_builtins from rs6000_builtins

2020-07-27 Thread Bill Schmidt
From: Bill Schmidt 2020-07-26 Bill Schmidt * config/rs6000/rs6000-call.c (rs6000-builtins.h): New #include. (rs6000_init_builtins): Call rs6000_autoinit_builtins. --- gcc/config/rs6000/rs6000-call.c | 4 1 file changed, 4 insertions(+) diff --git a/gcc/config/rs6000/rs6

[PATCH 28/29] rs6000: Add comments to help with transition

2020-07-27 Thread Bill Schmidt
From: Bill Schmidt 2020-07-26 Bill Schmidt * config/rs6000/rs6000-builtin.def: Add comments. * config/rs6000/rs6000-call.c: Likewise. --- gcc/config/rs6000/rs6000-builtin.def | 15 +++ gcc/config/rs6000/rs6000-call.c | 166 +++ 2 files changed, 1

Re: [PATCH] [RFC] vect: Fix infinite loop while determining peeling amount

2020-07-27 Thread Stefan Schulze Frielinghaus via Gcc-patches
On Mon, Jul 27, 2020 at 12:29:11PM +0200, Richard Biener wrote: > On Mon, Jul 27, 2020 at 11:45 AM Richard Sandiford > wrote: > > > > Richard Biener writes: > > > On Mon, Jul 27, 2020 at 11:09 AM Richard Sandiford > > > wrote: > > >> > > >> Richard Biener via Gcc-patches writes: > > >> > On Wed

  1   2   >