Symver attribute

2019-11-15 Thread Jan Hubicka
Hi, this patch implements symver attribute which can be use din place of .symver directive and is LTO friendly. I would welcome feedback for this, in particular some evidence that codebases can be easily converted to use it. There is some discussion in the PR and its duplicate filled by Carlos.

Re: [PATCH V2] Refactor tree-loop-distribution for thread safety

2019-11-15 Thread Richard Biener
On Thu, Nov 14, 2019 at 10:35 PM Giuliano Belinassi wrote: > > Previously, the suggested patch removed all tree-loop-distributions.c global > variables moving them into a struct and passing it aroung across the > functions. > This patch address this problem by using C++ classes instead, avoiding

[PATCH] musl: Fix invalid tls model in libgomp and libitm PR91938

2019-11-15 Thread Szabolcs Nagy
Musl does not support initial-exec tls in dynamically loaded shared libraries. libgomp/ChangeLog: 2019-11-15 Szabolcs Nagy * configure.tgt: Avoid IE tls on *-*-musl*. libitm/ChangeLog: 2019-11-15 Szabolcs Nagy * configure.tgt: Avoid IE tls on *-*-musl*. diff --git

[PATCH] microblaze: fix PR65649

2019-11-15 Thread Szabolcs Nagy
microblaze-linux-musl build fails without this. (This is a rebase of an earlier patch posted on bugzilla.) gcc/ChangeLog: 2019-11-15 Nick Clifton Szabolcs Nagy * config/microblaze/microblaze.c (print_operand): Print value as long. diff --git

Re: Use known value ranges while evaluating ipa predicates

2019-11-15 Thread Jan Hubicka
> PASS: gcc.dg/ipa/inline-9.c (test for excess errors) > gcc.dg/ipa/inline-9.c: dump file does not exist > UNRESOLVED: gcc.dg/ipa/inline-9.c scan-tree-dump inline "Inlined 1 calls" > > but fixing the obvious bug in there, s/scan-tree-dump/scan-ipa-dump/ > doesn't help, nothing is really inlined.

Re: Symver attribute

2019-11-15 Thread Jan Hubicka
> * Jan Hubicka: > > > Internally the patch tries to mimic what happens in ELF. In particular > > > > __attribute__ ((__symver__ ("foo@VERS_1"))) int > > foo_v1 (void) > > { > > } > > > > creates a special form of alias with symver flag. Its assembler name is > > foo@VERS_1 since it is what

[rs6000] Use VIEW_CONVERT_EXPR to reinterpret vectors (PR 92515)

2019-11-15 Thread Richard Sandiford
The new tree-cfg.c checking in r278245 tripped on folds of ALTIVEC_BUILTIN_VPERM_*, which were using gimple_convert rather than VIEW_CONVERT_EXPR to reinterpret the contents of a vector as a different type. Spot-tested on powerpc64-linux-gnu. OK to install? Richard (There are actually two bugs

Re: [PATCH] PR92398: Fix testcase failure of pr72804.c

2019-11-15 Thread Segher Boessenkool
Hi! On Thu, Nov 14, 2019 at 09:12:32PM -0600, Xiong Hu Luo wrote: > P9LE generated instruction is not worse than P8LE. > mtvsrdd;xxlnot;stxv vs. not;not;std;std. > Update the test case to fix failures. So this no longer runs it for p7, and it also doesn't run it for cpus after p9 anymore. Could

Re: [PATCH 1/2] Update iterator of next

2019-11-15 Thread Jan Hubicka
> On Fri, Nov 15, 2019 at 10:16 AM Richard Biener > wrote: > > > > On Fri, Nov 15, 2019 at 9:10 AM Jan Hubicka wrote: > > > > > > > next is initialized only in the loop before, it is never updated > > > > in it's own loop. > > > > > > > > gcc/ChangeLog > > > > > > > > 2019-11-15 Xiong Hu

Re: [PATCH v3] gdbinit.in: allow to pass function argument explicitly

2019-11-15 Thread Konstantin Kharlamov
On Пт, ноя 15, 2019 at 00:17, Konstantin Kharlamov wrote: On 14.11.2019 23:50, Segher Boessenkool wrote: Hi! On Thu, Nov 14, 2019 at 07:01:47PM +0300, Konstantin Kharlamov wrote: Generally, people expect functions to accept arguments directly. But ones defined in gdbinit did not use the

Re: [PATCH 1/2] Update iterator of next

2019-11-15 Thread Jan Hubicka
> On Fri, Nov 15, 2019 at 9:10 AM Jan Hubicka wrote: > > > > > next is initialized only in the loop before, it is never updated > > > in it's own loop. > > > > > > gcc/ChangeLog > > > > > > 2019-11-15 Xiong Hu Luo > > > > > > * ipa-inline.c (inline_small_functions): Update iterator

Re: [PATCH, GCC, AArch64] Fix PR88398 for AArch64

2019-11-15 Thread Richard Biener
On Thu, Nov 14, 2019 at 4:41 PM Sudakshina Das wrote: > > Hi > > This patch is trying to fix PR88398 for AArch64. As discussed in the PR, > loop unrolling is probably what we can do here. As an easy fix, the > existing unroll_stupid is unrolling the given example better than the >

Re: [PATCH 1/2] Update iterator of next

2019-11-15 Thread Richard Biener
On Fri, Nov 15, 2019 at 9:10 AM Jan Hubicka wrote: > > > next is initialized only in the loop before, it is never updated > > in it's own loop. > > > > gcc/ChangeLog > > > > 2019-11-15 Xiong Hu Luo > > > > * ipa-inline.c (inline_small_functions): Update iterator of next. > > OK, >

Re: Symver attribute

2019-11-15 Thread Florian Weimer
* Jan Hubicka: > Internally the patch tries to mimic what happens in ELF. In particular > > __attribute__ ((__symver__ ("foo@VERS_1"))) int > foo_v1 (void) > { > } > > creates a special form of alias with symver flag. Its assembler name is > foo@VERS_1 since it is what happens in ELF too

[PATCH] musl: Don't use gthr weak refs in libgcc PR91737

2019-11-15 Thread Szabolcs Nagy
The gthr weak reference based single thread detection is unsafe with static linking and in case of dynamic linking it's ineffective on musl since pthread symbols are defined in libc.so. Ideally this should be fixed for all targets, since glibc plans to move libpthread.so into libc.so too and

[committed] declare variant scoring when at least one variant needs to be deferred

2019-11-15 Thread Jakub Jelinek
Hi! The following patch is in preparation of the deferred declare variant resolution, where we need to compute the scores during gimplification for all variants. This patch just picks the candidate with highest score if that variant doesn't need to be deferred and thus is an unconditional win,

[PATCH] Fix PR92039, mostly revert PR91975 changes

2019-11-15 Thread Richard Biener
The following reverts back to the old unroll heuristics before my PR91975 changes but implements "consistency" the other way around. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk. Richard. 2019-11-15 Richard Biener PR tree-optimization/92039 PR

[PATCH 2/2] Fix comments typo

2019-11-15 Thread Xiong Hu Luo
I'm going to install it as obvious. gcc/ChangeLog: 2019-11-15 Luo Xiong Hu * ipa-comdats.c: Fix comments typo. * ipa-profile.c: Fix comments typo. * tree-profile.c (gimple_gen_ic_profiler): Use the new variable __gcov_indirect_call.counters and

[PATCH 1/2] Update iterator of next

2019-11-15 Thread Xiong Hu Luo
next is initialized only in the loop before, it is never updated in it's own loop. gcc/ChangeLog 2019-11-15 Xiong Hu Luo * ipa-inline.c (inline_small_functions): Update iterator of next. --- gcc/ipa-inline.c | 15 +-- 1 file changed, 9 insertions(+), 6

Re: Ping: [PATCH V6] Extend IPA-CP to support arithmetically-computed value-passing on by-ref argument (PR ipa/91682)

2019-11-15 Thread Jan Hubicka
Hi, building Firefox I now get: #0 internal_error (gmsgid=0x28f8597 "in %s, at %s:%d") at ../../gcc/diagnostic.c:1578 #1 0x01e20ae2 in fancy_abort (file=0x2892574 "../../gcc/ipa-cp.c", line=386, function=0x2 893510 "ipa_get_parm_lattices") at ../../gcc/diagnostic.c:1649 #2

Re: [PATCH 1/2] Update iterator of next

2019-11-15 Thread Jan Hubicka
> next is initialized only in the loop before, it is never updated > in it's own loop. > > gcc/ChangeLog > > 2019-11-15 Xiong Hu Luo > > * ipa-inline.c (inline_small_functions): Update iterator of next. OK, thanks! Honza > --- > gcc/ipa-inline.c | 15 +-- > 1 file

Re: [PATCH 1/2] Update iterator of next

2019-11-15 Thread Richard Biener
On Fri, Nov 15, 2019 at 10:16 AM Richard Biener wrote: > > On Fri, Nov 15, 2019 at 9:10 AM Jan Hubicka wrote: > > > > > next is initialized only in the loop before, it is never updated > > > in it's own loop. > > > > > > gcc/ChangeLog > > > > > > 2019-11-15 Xiong Hu Luo > > > > > >

[PATCH] Fixes PR c++/89913

2019-11-15 Thread Andrew Sutton
Avoid ICE when the alias is ill-formed. gcc/cp/ * pt.c (get_underlying_template): Exit loop if the original type of the alias is null. gcc/testsuite/ * g++.dg/cpp2a/pr89913.C: New test. Andrew Sutton 0001-Don-t-segfault-on-error-PR-c-89913.patch Description: Binary data

Re: [PATCH, GCC, AArch64] Fix PR88398 for AArch64

2019-11-15 Thread Wilco Dijkstra
Hi Richard, > So what do we actually do unpatched with -funroll-loops here? Yes so it does the insane "fully unrolled trailing loop before the unrolled loop" thing. One always does the trailing loop last (and typically as an actual loop of course) and then the code ends up much faster, close to

[PING][PATCH][GCC][ARM] Arm generates out of range conditional branches in Thumb2 (PR91816)

2019-11-15 Thread Stam Markianos-Wright
Pinging with more correct maintainers this time :) Also would need to backport to gcc7,8,9, but need to get this approved first! Thank you, Stam Forwarded Message Subject: Re: [PATCH][GCC][ARM] Arm generates out of range conditional branches in Thumb2 (PR91816) Date: Mon,

[PATCH] musl: use correct long double abi by default

2019-11-15 Thread Szabolcs Nagy
On powerpc and s390x the musl ABI requires 64 bit and 128 bit long double respectively, so adjust the default. gcc/ChangeLog: 2019-11-15 Szabolcs Nagy * configure.ac: Set gcc_cv_target_ldbl128 for musl targets. * configure: Regenerate. diff --git a/gcc/configure

[RFC][GCC][AArch64] Add minmax phi-reduction pattern

2019-11-15 Thread Joel Hutton
Hi all, Just looking for some feedback on the approach. Currently the loop vectorizer can't vectorize the following typical loop for getting max value and index from an array: void test_vec(int *data, int n) {     int best_i, best = 0;     for (int i = 0; i < n; i++) {  

Re: [PATCH] musl: use correct long double abi by default

2019-11-15 Thread Szabolcs Nagy
On 15/11/2019 17:48, Segher Boessenkool wrote: > On Fri, Nov 15, 2019 at 05:26:41PM +, Szabolcs Nagy wrote: >> On powerpc and s390x the musl ABI requires 64 bit and 128 bit long >> double respectively, so adjust the default. >> >> gcc/ChangeLog: >> >> 2019-11-15 Szabolcs Nagy >> >> *

Re: Symver attribute

2019-11-15 Thread Joseph Myers
On Fri, 15 Nov 2019, Jan Hubicka wrote: > I was originaly supporting multiple symvers like: > __attribute__ ((__symver__ ("foo@VERS_1"))) int > __attribute__ ((__symver__ ("foo@VERS_2"))) int > foo_v1 (void) > { > } > > but then noticed it is rejected by gas. That's

Re: Symver attribute

2019-11-15 Thread Florian Weimer
* Jan Hubicka: >> It's sometimes useful to define multiple versions for a single symbol. >> For maximum binutils compatibility, you would have to use intermediate >> aliases. __attribute__ ((__symver__ ("foo@VERS_1", "foo@@VERS_2"))) >> could turn into this: >> >> .set foo_v1.symver.1, foo_v1

Re: [rs6000] Use VIEW_CONVERT_EXPR to reinterpret vectors (PR 92515)

2019-11-15 Thread Richard Sandiford
Richard Biener writes: > On Fri, Nov 15, 2019 at 11:02 AM Richard Sandiford > wrote: >> >> The new tree-cfg.c checking in r278245 tripped on folds of >> ALTIVEC_BUILTIN_VPERM_*, which were using gimple_convert >> rather than VIEW_CONVERT_EXPR to reinterpret the contents >> of a vector as a

Re: [7/8] Use a single comparison for index-based alias checks

2019-11-15 Thread Richard Biener
On Mon, Nov 11, 2019 at 7:51 PM Richard Sandiford wrote: > > This patch rewrites the index-based alias checks to use conditions > of the form: > > (unsigned T) (a - b + bias) <= limit > > E.g. before the patch: > > struct s { int x[100]; }; > > void > f1 (struct s *s1, int a, int b) > {

[Patch] [mid-end][__RTL] Set global epilogue_completed in skip_pass

2019-11-15 Thread Matthew Malcomson
Set global epilogue_completed when skipping pro_and_epilogue pass When compiling RTL functions marked to start at a pass after the reload pass, `skip_pass` is used to mark the reload pass as having completed since many patterns use the `reload_completed` variable to determine whether to run or

Re: [PATCH, GCC, AArch64] Fix PR88398 for AArch64

2019-11-15 Thread Sudakshina Das
Hi Richard ​ I apologise I should have given more explanation on my cover letter.​ Although the bug was filed for vectorization, the conversation on it talked​ about loops with two exits not being supported in the vectorizer and being not​ being possible without lto and peeling causing more harm

Re: [RFC C++ PATCH] __builtin_source_location ()

2019-11-15 Thread Jonathan Wakely
On 14/11/19 23:39 +0100, Jakub Jelinek wrote: On Thu, Nov 14, 2019 at 10:15:21PM +, Jonathan Wakely wrote: > namespace std { > struct source_location { >struct __impl { Will this work if the library type is actually in an inline namespace, such as std::__8::source_location::__impl (as

Re: [patch, libgomp] Enable OpenACC GCN testing

2019-11-15 Thread Andrew Stubbs
On 15/11/2019 12:21, Jakub Jelinek wrote: On Thu, Nov 14, 2019 at 04:36:38PM +, Andrew Stubbs wrote: This patch adds some necessary bits to enable OpenACC testings for amdgcn offloading. The two "check_effective" procedures are not actually needed yet, but later patches to test cases will

Re: [PATCH] Fix PR92512

2019-11-15 Thread Richard Biener
On Fri, 15 Nov 2019, Richard Biener wrote: > > The following fixes PR92512, we were failing to disqualify > _2 < 1 ? _2 : 2 with _2 being part of the reduction chain. > > Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. And the following is what I committed. Richard. 2019-11-15

Re: Ping: [PATCH V6] Extend IPA-CP to support arithmetically-computed value-passing on by-ref argument (PR ipa/91682)

2019-11-15 Thread Jan Hubicka
> I checked update_jump_functions_after_inlining(), and found one suspicious > place: > > for (i = 0; i < count; i++) > { > struct ipa_jump_func *dst = ipa_get_ith_jump_func (args, i); > if (!top) > { > ipa_set_jf_unknown (dst); > <

Re: [Patch][ARM] backport r266665 to gcc8

2019-11-15 Thread Richard Earnshaw (lists)
On 14/11/2019 08:40, Christophe Lyon wrote: Hi, Is it OK to backport r25 to gcc8 (Ensure dotproduct is only enabled on armv8 neon) ? I've noticed unnecessary failure of gcc.target/arm/simd/vdot-compile.c after I upgraded to recent binutils. Thanks, Christophe Is there a PR for this?

[C++ PATCH] Implement P1816R0, class template argument deduction for aggregates.

2019-11-15 Thread Jason Merrill
Rather than reimplement brace elision here, we call reshape_init and then discard the result. We needed to set CLASSTYPE_NON_AGGREGATE a bit more in this patch, since outside a template it's set in check_bases_and_members. Tested x86_64-pc-linux-gnu, applying to trunk. * pt.c

Re: [PATCH v3] Extend the simd function attribute

2019-11-15 Thread Szabolcs Nagy
On 15/11/2019 15:05, Francesco Petrogalli wrote: > Thank you Szabolcs for working on this. > >> On Nov 14, 2019, at 2:23 PM, Szabolcs Nagy wrote: >> >> Sorry v2 had a bug. >> >> v2: added documentation and tests. >> v3: fixed expand_simd_clones so different isa variants are actually >>

Re: [PATCH] microblaze: fix PR65649

2019-11-15 Thread Michael Eager
On 11/15/19 2:07 AM, Szabolcs Nagy wrote: microblaze-linux-musl build fails without this. (This is a rebase of an earlier patch posted on bugzilla.) gcc/ChangeLog: 2019-11-15 Nick Clifton Szabolcs Nagy * config/microblaze/microblaze.c (print_operand): Print value as

Re: [PATCH] musl: use correct long double abi by default

2019-11-15 Thread Segher Boessenkool
On Fri, Nov 15, 2019 at 05:26:41PM +, Szabolcs Nagy wrote: > On powerpc and s390x the musl ABI requires 64 bit and 128 bit long > double respectively, so adjust the default. > > gcc/ChangeLog: > > 2019-11-15 Szabolcs Nagy > > * configure.ac: Set gcc_cv_target_ldbl128 for musl

Re: Avoid trashing of polymorphic call cache during inlining

2019-11-15 Thread Martin Jambor
On Thu, Nov 14 2019, Jan Hubicka wrote: >> On Mon, Nov 04 2019, Jan Hubicka wrote: >> > Index: ipa-utils.h >> > === >> > --- ipa-utils.h(revision 277780) >> > +++ ipa-utils.h(working copy) >> > @@ -47,6 +47,9 @@ void

Re: [PATCH 0/4] Eliminate cc0 from m68k

2019-11-15 Thread Andreas Schwab
On Nov 15 2019, Bernd Schmidt wrote: > Are these with the patch? Yes. > Are you on real hardware No, I'm using aranym. 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 v3] Extend the simd function attribute

2019-11-15 Thread Francesco Petrogalli
> On Nov 15, 2019, at 10:01 AM, Szabolcs Nagy wrote: > > On 15/11/2019 15:05, Francesco Petrogalli wrote: >> Thank you Szabolcs for working on this. >> >>> On Nov 14, 2019, at 2:23 PM, Szabolcs Nagy wrote: >>> >>> Sorry v2 had a bug. >>> >>> v2: added documentation and tests. >>> v3: fixed

using ENUM::V;

2019-11-15 Thread Nathan Sidwell
Jason, using ENUM::v is proving rather tricky, when the memberness of the enumerator and the context of the using decl differ. struct B { enum E {e}; }; struct D { private: using B::e; // ok static inline const auto ok1 = e; // #1 accessible }; struct F : D { static inline const auto

[PATCH] m68k: add musl support

2019-11-15 Thread Szabolcs Nagy
Add the dynamic linker name and fix a type name to use the public name instead of the glibc internal name. Build tested on m68k-linux-musl and m68k-linux-gnu. gcc/ChangeLog: 2019-11-15 Szabolcs Nagy * config/m68k/linux.h (MUSL_DYNAMIC_LINKER): Define. libgcc/ChangeLog: 2019-11-15

[PATCH] s390: add musl support

2019-11-15 Thread Szabolcs Nagy
Add the musl dynamic linker names. Build tested on s390x-linux-musl and s390x-linux-gnu. gcc/ChangeLog: 2019-11-15 Szabolcs Nagy * config/s390/linux.h (MUSL_DYNAMIC_LINKER32): Define. (MUSL_DYNAMIC_LINKER64): Define. diff --git a/gcc/config/s390/linux.h

Re: [patch, fortran] Load scalar intent-in variables at the beginning of procedures

2019-11-15 Thread Thomas König
Hi Tobias, I think you need to add at least VOLATILE to this list Yes, I'll do that. Any other comments? Regards Thomas

[PING**4] [PATCH] Fix dwarf-lineinfo inconsistency of inlined subroutines

2019-11-15 Thread Bernd Edlinger
Ping... FYI this jumping into fake inline frames happens rather often when debugging, and is especially annoying once you know how easy it is to fix it... Bernd. On 11/9/19 11:20 AM, Bernd Edlinger wrote: > Ping... > > On 11/2/19 7:49 AM, Bernd Edlinger wrote: >> Ping... >> >> On 10/27/19

Re: [PATCH 4/5] [amdgcn] Update lower limits requested by non-leaf kernels

2019-11-15 Thread Kwok Cheung Yeung
On 15/11/2019 11:32 am, Andrew Stubbs wrote: On 14/11/2019 15:33, Kwok Cheung Yeung wrote: The kernel attributes are changed to request at least 64 SGPRs and 24 VGPRs (i.e. the non-kernel maximum, otherwise the callees may not have enough registers to run in) for non-leaf kernels to take

Re: Symver attribute

2019-11-15 Thread Jan Hubicka
Hi, thanks for feedback. Here is updated patch that incorporates Martin's changes, formatting corrections and makes symvers of aliases work. Honza * c-family/c-attribs.c (handle_symver_attribute): New. (c_common_attribytes): Add symver. * cgraph.h (symtab_node): Add

Re: [RFC][GCC][AArch64] Add minmax phi-reduction pattern

2019-11-15 Thread Joel Hutton
Forgot to CC maintainer. On 15/11/2019 18:03, Joel wrote: > Hi all, > > Just looking for some feedback on the approach. > > Currently the loop vectorizer can't vectorize the following typical > loop for getting max value and index from an array: > > void test_vec(int *data, int n) { >     int

Re: [patch] follow up on the aarch64 r18 story

2019-11-15 Thread Richard Earnshaw (lists)
On 07/11/2019 16:16, Olivier Hainque wrote: Hello, About a year ago we discussed various possibilities regarding an issue with the aarch64 selection of r18 as the static chain, problematic in environments where the OS uses r18 for "private" reasons. VxWorks uses this permission to use r18 as a

Re: [PATCH 0/4] Eliminate cc0 from m68k

2019-11-15 Thread Bernd Schmidt
On 11/15/19 2:48 PM, Andreas Schwab wrote: > Here are the results of running the testsuite on m68k-linux: > > http://gcc.gnu.org/ml/gcc-testresults/2019-11/msg00908.html > > This is a list of regressions: Are these with the patch? I'm not seeing any of these in my testing with qemu. Are you on

[PATCH] [MIPS] Prevent MSA branches from being put into delay slots

2019-11-15 Thread Dragan Mladjenovic
From: "Dragan Mladjenovic" This patch tightens the instruction definitions to make sure that MSA branch instructions cannot be put into delay slots and have their delay slots eligible for being filled. Also, MSA *div*3 patterns use MSA branches for zero checks but are not marked as being

Re: [PATCH] Support multi-versioning on self-recursive function (ipa/92133)

2019-11-15 Thread Feng Xue OS
Honza, I made some changes: do not penalize self-recursive function, and add --param ipa-cp-min-recursive-probability, similar to recursive inline. Please review this new one. Thanks, Feng From: Jan Hubicka Sent: Friday, November 15, 2019 4:33 AM

Re: [PATCH 4/5] [amdgcn] Update lower limits requested by non-leaf kernels

2019-11-15 Thread Andrew Stubbs
On 15/11/2019 15:51, Kwok Cheung Yeung wrote: On 15/11/2019 11:32 am, Andrew Stubbs wrote: On 14/11/2019 15:33, Kwok Cheung Yeung wrote: The kernel attributes are changed to request at least 64 SGPRs and 24 VGPRs (i.e. the non-kernel maximum, otherwise the callees may not have enough

Re: [PATCH, fortran] Extend the builtin directive

2019-11-15 Thread Tobias Burnus
On 11/14/19 9:29 PM, Szabolcs Nagy wrote: The builtin directive allows specifying the simd attribute for a builtin function. Similarly how the C language simd attribtue got extended to allow declaring a specific vector variant, update the fortran builtin directive too. Sounds useful. For the

Re: [PATCH] musl: use correct long double abi by default

2019-11-15 Thread Segher Boessenkool
On Fri, Nov 15, 2019 at 06:03:25PM +, Szabolcs Nagy wrote: > On 15/11/2019 17:48, Segher Boessenkool wrote: > > I think it would be much more readable and maintainable if you did > > something like > > > > case "$target" in > > powerpc*-*-linux-musl) > > gcc_cv_target_ldbl128=no > >

Re: [2/8] Delay swapping data refs in prune_runtime_alias_test_list

2019-11-15 Thread Richard Biener
On Mon, Nov 11, 2019 at 7:47 PM Richard Sandiford wrote: > > prune_runtime_alias_test_list swapped dr_as between two dr_with_seg_len > pairs before finally deciding whether to merge them. Bailing out later > would therefore leave the pairs in an incorrect state. > > IMO a better fix would be to

Re: [1/8] Move canonicalisation of dr_with_seg_len_pair_ts

2019-11-15 Thread Richard Biener
On Mon, Nov 11, 2019 at 7:46 PM Richard Sandiford wrote: > > The two users of tree-data-ref's runtime alias checks both canonicalise > the order of the dr_with_seg_lens in a pair before passing them to > prune_runtime_alias_test_list. It's more convenient for later patches > if

Re: [patch, libgomp] Enable OpenACC GCN testing

2019-11-15 Thread Jakub Jelinek
On Thu, Nov 14, 2019 at 04:36:38PM +, Andrew Stubbs wrote: > This patch adds some necessary bits to enable OpenACC testings for amdgcn > offloading. > > The two "check_effective" procedures are not actually needed yet, but later > patches to test cases will use them. > > OK to commit? I'm

Re: [C++ PATCH] __builtin_source_location ()

2019-11-15 Thread Jonathan Wakely
On 15/11/19 13:28 +0100, Jakub Jelinek wrote: On Thu, Nov 14, 2019 at 08:34:26PM +0100, Jakub Jelinek wrote: The following WIP patch implements __builtin_source_location (), which returns const void pointer to a std::source_location::__impl struct that is required to contain __file, __function,

Re: [PATCH 1/2] Update iterator of next

2019-11-15 Thread Jan Hubicka
> Hi, > > On Fri, Nov 15 2019, luoxhu wrote: > > > > Sorry to break the bootstrap. This was my lack of consideration when > > splitting this small piece of code from the previous patch, the line > > should be in the first line of the second loop. Could you please add > > some comments that

Re: [PATCH 1/2] Update iterator of next

2019-11-15 Thread Jan Hubicka
> The bug in the walker loop here IMO predated C++ conversion, but to > avoid member function freeing THIS we probably want to have: > > cgraph_edge::remove (e), > symtab_node::remove (e), > ipa_ref::remove (ref), > cgraph_node::resolve_speculation (e, target) Actually thinking of this, perhas

Re: [patch, libgomp] Enable OpenACC GCN testing

2019-11-15 Thread Andrew Stubbs
On 15/11/2019 12:43, Jakub Jelinek wrote: APUs, such as Carizzo are shared memory. DGPUs, such as Fiji and Vega, have their own memory. A DGPU can access host memory, provided that it has been set up just so, but that is very slow, and I don't know of a way to do that without still having to

Re: [C++ PATCH] __builtin_source_location ()

2019-11-15 Thread David Malcolm
On Fri, 2019-11-15 at 13:28 +0100, Jakub Jelinek wrote: > On Thu, Nov 14, 2019 at 08:34:26PM +0100, Jakub Jelinek wrote: > > The following WIP patch implements __builtin_source_location (), > > which returns const void pointer to a std::source_location::__impl > > struct that is required to

Re: [C++ PATCH] __builtin_source_location ()

2019-11-15 Thread Jakub Jelinek
On Fri, Nov 15, 2019 at 09:04:17AM -0500, David Malcolm wrote: > > +/* Helper of fold_builtin_source_location, return the > > + std::source_location::__impl type after performing verification > > + on it. */ > > + > > +static tree > > +get_source_location_impl (location_t loc) > > +{ > >

Re: [Patch] [mid-end][__RTL] Set global epilogue_completed in skip_pass

2019-11-15 Thread Richard Biener
On Fri, 15 Nov 2019, Matthew Malcomson wrote: > Set global epilogue_completed when skipping pro_and_epilogue pass > > When compiling RTL functions marked to start at a pass after the reload > pass, `skip_pass` is used to mark the reload pass as having completed > since many patterns use the

[C++ PATCH] __builtin_source_location ()

2019-11-15 Thread Jakub Jelinek
On Thu, Nov 14, 2019 at 08:34:26PM +0100, Jakub Jelinek wrote: > The following WIP patch implements __builtin_source_location (), > which returns const void pointer to a std::source_location::__impl > struct that is required to contain __file, __function, __line and __column > fields, the first

Re: [patch, libgomp] Enable OpenACC GCN testing

2019-11-15 Thread Jakub Jelinek
On Fri, Nov 15, 2019 at 12:38:06PM +, Andrew Stubbs wrote: > On 15/11/2019 12:21, Jakub Jelinek wrote: > > On Thu, Nov 14, 2019 at 04:36:38PM +, Andrew Stubbs wrote: > > > This patch adds some necessary bits to enable OpenACC testings for amdgcn > > > offloading. > > > > > > The two

Re: [C++ PATCH] __builtin_source_location ()

2019-11-15 Thread Jonathan Wakely
On 15/11/19 13:49 +0100, Jakub Jelinek wrote: On Fri, Nov 15, 2019 at 12:35:22PM +, Jonathan Wakely wrote: On 15/11/19 13:28 +0100, Jakub Jelinek wrote: > On Thu, Nov 14, 2019 at 08:34:26PM +0100, Jakub Jelinek wrote: > > The following WIP patch implements __builtin_source_location (), > >

Re: [arm] Follow up for asm-flags vs thumb1

2019-11-15 Thread Richard Earnshaw (lists)
On 14/11/2019 17:42, Richard Henderson wrote: What I committed today does in fact ICE for thumb1, as you suspected. I'm currently testing the following vs arm-sim/ arm-sim/-mthumb arm-sim/-mcpu=cortex-a15/-mthumb. which, with the default cpu for arm-elf-eabi, should test all of arm,

Re: [Patch][ARM] backport r266665 to gcc8

2019-11-15 Thread Christophe Lyon
On Fri, 15 Nov 2019 at 15:27, Richard Earnshaw (lists) wrote: > > On 14/11/2019 08:40, Christophe Lyon wrote: > > Hi, > > > > Is it OK to backport r25 to gcc8 (Ensure dotproduct is only > > enabled on armv8 neon) ? > > I've noticed unnecessary failure of gcc.target/arm/simd/vdot-compile.c > >

Re: [PATCH] Add support for C++2a stop_token

2019-11-15 Thread Jonathan Wakely
On 13/11/19 17:59 -0800, Thomas Rodgers wrote: + // TODO verify the standard requires this +#if 0 + // register another callback + bool cb3called{false}; + std::stop_callback scb3{stok, [&] +{ + cb3called = true; +

Re: [rs6000] Use VIEW_CONVERT_EXPR to reinterpret vectors (PR 92515)

2019-11-15 Thread Richard Biener
On Fri, Nov 15, 2019 at 11:02 AM Richard Sandiford wrote: > > The new tree-cfg.c checking in r278245 tripped on folds of > ALTIVEC_BUILTIN_VPERM_*, which were using gimple_convert > rather than VIEW_CONVERT_EXPR to reinterpret the contents > of a vector as a different type. > > Spot-tested on

Re: [5/8] Dump the list of merged alias pairs

2019-11-15 Thread Richard Biener
On Mon, Nov 11, 2019 at 7:49 PM Richard Sandiford wrote: > > This patch dumps the final (merged) list of alias pairs. It also adds: > > - WAW and RAW versions of vect-alias-check-8.c > - a "well-ordered" version of vect-alias-check-9.c (i.e. all reads > before any writes) > - a test with mixed

Re: [6/8] Print the type of alias check in a dump message

2019-11-15 Thread Richard Biener
On Mon, Nov 11, 2019 at 7:50 PM Richard Sandiford wrote: > > This patch prints a message to say how an alias check is being > implemented. OK. > > 2019-11-11 Richard Sandiford > > gcc/ > * tree-data-ref.c (create_intersect_range_checks_index) >

Re: [PATCH 3/5] [amdgcn] Restrict register usage in non-kernel functions

2019-11-15 Thread Andrew Stubbs
On 14/11/2019 15:32, Kwok Cheung Yeung wrote: This patch restricts non-kernel functions to using a maximum of 64 SGPRs and 24 VGPRs. Kernels can request various pieces of information from the HSA runtime, and these will be loaded into the registers consecutively before the kernel executes.

Re: [C++ PATCH] __builtin_source_location ()

2019-11-15 Thread Jakub Jelinek
On Fri, Nov 15, 2019 at 12:35:22PM +, Jonathan Wakely wrote: > On 15/11/19 13:28 +0100, Jakub Jelinek wrote: > > On Thu, Nov 14, 2019 at 08:34:26PM +0100, Jakub Jelinek wrote: > > > The following WIP patch implements __builtin_source_location (), > > > which returns const void pointer to a

[Patch][libgomp] Add 'gcn' to oacc-init.c's name_of_acc_device_t

2019-11-15 Thread Tobias Burnus
While investigating some other failure, I saw that 'gcn' was missing from that function. – It is only used in the error case and I failed to trigger it in a quick way. – Hence, only compiled and regtested w/o triggering this issue. If needed be, I can try harder, though. OK? Tobias PS: On

Re: [PATCH, fortran] Extend the builtin directive

2019-11-15 Thread Szabolcs Nagy
> +++ b/gcc/testsuite/gfortran.dg/simd-builtins-10.h > @@ -0,0 +1,6 @@ > +!GCC$ builtin (sinf) attributes simd (notinbranch, 4, 'n', 'vec_sinf') > if('aarch64') > +!GCC$ builtin (sinf) attributes simd (notinbranch, 4, 'n', 'vec_sinf') > if('aarch64_be') > +!GCC$ builtin (sinf) attributes simd

Re: [PATCH v3] Extend the simd function attribute

2019-11-15 Thread Francesco Petrogalli
Thank you Szabolcs for working on this. > On Nov 14, 2019, at 2:23 PM, Szabolcs Nagy wrote: > > Sorry v2 had a bug. > > v2: added documentation and tests. > v3: fixed expand_simd_clones so different isa variants are actually >generated. > > GCC currently supports two ways to declare the

Re: Ping: [PATCH V6] Extend IPA-CP to support arithmetically-computed value-passing on by-ref argument (PR ipa/91682)

2019-11-15 Thread Feng Xue OS
I checked update_jump_functions_after_inlining(), and found one suspicious place: for (i = 0; i < count; i++) { struct ipa_jump_func *dst = ipa_get_ith_jump_func (args, i); if (!top) { ipa_set_jf_unknown (dst); < we should also

[Patch, Fortran] dec comparisons - for review

2019-11-15 Thread Mark Eggleston
This patch allows comparison of numeric values with Holleriths. This feature is not guarded by a compiler option as it is preferred that extra options should avoided, this seems reasonable as current Hollerith support does not have such an option. In addition it also allows comparison of

[PATCH] Fix PR92512

2019-11-15 Thread Richard Biener
The following fixes PR92512, we were failing to disqualify _2 < 1 ? _2 : 2 with _2 being part of the reduction chain. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. 2019-11-15 Richard Biener PR tree-optimization/92512 * tree-vect-loop.c

Re: [PATCH 1/2] Update iterator of next

2019-11-15 Thread Martin Jambor
Hi, On Fri, Nov 15 2019, luoxhu wrote: > > Sorry to break the bootstrap. This was my lack of consideration when > splitting this small piece of code from the previous patch, the line > should be in the first line of the second loop. Could you please add > some comments that edge may be freed

[PATCH] Verify NOP_EXPR LHS type in IPA ICF.

2019-11-15 Thread Martin Liška
Hi. After I removed ::add_type hashing in r278207, we don't hash types of SSA names. Moreover, compare_gimple_assign just compares all operands and ICF does not compare types of SSA names in order to not be too much conservative. So that, I'm suggesting to compare LHS type of NOP_EXPRs, which is

Re: [PATCH] Verify NOP_EXPR LHS type in IPA ICF.

2019-11-15 Thread Richard Biener
On Fri, Nov 15, 2019 at 2:40 PM Martin Liška wrote: > > Hi. > > After I removed ::add_type hashing in r278207, we don't hash > types of SSA names. Moreover, compare_gimple_assign just compares > all operands and ICF does not compare types of SSA names in order > to not be too much conservative.

Re: [rs6000] Use VIEW_CONVERT_EXPR to reinterpret vectors (PR 92515)

2019-11-15 Thread Segher Boessenkool
Hi Richard, On Fri, Nov 15, 2019 at 10:02:15AM +, Richard Sandiford wrote: > The new tree-cfg.c checking in r278245 tripped on folds of > ALTIVEC_BUILTIN_VPERM_*, which were using gimple_convert > rather than VIEW_CONVERT_EXPR to reinterpret the contents > of a vector as a different type. >

Re: [PATCH 2/5] [amdgcn] Reinitialize registers for every function

2019-11-15 Thread Andrew Stubbs
On 14/11/2019 15:30, Kwok Cheung Yeung wrote: The set of fixed registers is adjusted by the TARGET_CONDITIONAL_REGISTER_USAGE hook, but this needs to be done on a per-function basis, whereas the hook is normally called once during GCC initialization before any functions have been processed

Re: [PATCH 1/2] Update iterator of next

2019-11-15 Thread luoxhu
On 2019/11/15 17:19, Jan Hubicka wrote: >> On Fri, Nov 15, 2019 at 9:10 AM Jan Hubicka wrote: >>> next is initialized only in the loop before, it is never updated in it's own loop. gcc/ChangeLog 2019-11-15 Xiong Hu Luo * ipa-inline.c

Re: [rs6000] Use VIEW_CONVERT_EXPR to reinterpret vectors (PR 92515)

2019-11-15 Thread Richard Biener
On Fri, Nov 15, 2019 at 11:59 AM Richard Sandiford wrote: > > Richard Biener writes: > > On Fri, Nov 15, 2019 at 11:02 AM Richard Sandiford > > wrote: > >> > >> The new tree-cfg.c checking in r278245 tripped on folds of > >> ALTIVEC_BUILTIN_VPERM_*, which were using gimple_convert > >> rather

Re: [PATCH 4/5] [amdgcn] Update lower limits requested by non-leaf kernels

2019-11-15 Thread Andrew Stubbs
On 14/11/2019 15:33, Kwok Cheung Yeung wrote: The kernel attributes are changed to request at least 64 SGPRs and 24 VGPRs (i.e. the non-kernel maximum, otherwise the callees may not have enough registers to run in) for non-leaf kernels to take advantage of the reduced number of registers used

Re: [3/8] Add flags to dr_with_seg_len_pair_t

2019-11-15 Thread Richard Sandiford
Richard Biener writes: > On Mon, Nov 11, 2019 at 7:47 PM Richard Sandiford > wrote: >> >> This patch adds a bunch of flags to dr_with_seg_len_pair_t, >> for use by later patches. The update to tree-loop-distribution.c >> is conservatively correct, but might be tweakable later. > > Does this all

[Patch] [mid-end][__RTL] Account for column numbers in __RTL functions

2019-11-15 Thread Matthew Malcomson
The documentation for __RTL tests (see "(gccint) RTL Tests" info node) has the following snippet. ``` The parser expects the RTL body to be in the format emitted by this dumping function: DEBUG_FUNCTION void print_rtx_function (FILE *outfile, function *fn, bool compact); when

Re: [Patch] [mid-end][__RTL] Account for column numbers in __RTL functions

2019-11-15 Thread Richard Biener
On Fri, 15 Nov 2019, Matthew Malcomson wrote: > The documentation for __RTL tests (see "(gccint) RTL Tests" info node) has the > following snippet. > > ``` > The parser expects the RTL body to be in the format emitted by this > dumping function: > > DEBUG_FUNCTION void >

Fix vector/scalar to vecto/vector conversion (PR92515)

2019-11-15 Thread Richard Sandiford
r278235 broke conversions of vector/scalar shifts into vector/vector shifts on targets that only provide the latter. We need to record whether a conversion is required in that case too. Also, the old useless_type_conversion_p condition seemed unnecessarily strong, since the shift amount can have

  1   2   3   >