[PATCH, testsuite] Fix PR92464 by adjust test case loop bound

2019-11-12 Thread Kewen.Lin
Hi, As PR92464 shows, the recent vectorization cost adjustment on load insns is responsible for this regression. It leads the profitable min iteration count to change from 19 to 12. The case happens to hit the threshold. By actual runtime performance evaluation, the vectorized version perform

[PATCH 3/3] Improve efficiency of copying section from another tree

2019-11-12 Thread Strager Neds
Several parts of GCC need to copy a section name from one tree (or symtab_node) to another. Currently, this is implemented naively: 1. Query the source's section name 2. Hash the section name string 3. Find the section_hash_entry in the symbol table 4. Increment the section_hash_entry's reference

[PATCH 2/3] Refactor section name ref counting

2019-11-12 Thread Strager Neds
symtab_node::set_section_for_node manages the reference count of section_hash_entry objects. I plan to add another function which needs to manage the reference count of these objects. To avoid duplicating code, factor the existing logic into reusable functions. This patch should not change

[PATCH 1/3] Refactor copying decl section names

2019-11-12 Thread Strager Neds
Sometimes, we need to copy a section name from one decl or symtab node to another. Currently, this is done by getting the source's section name and setting the destination's section name. For example: set_decl_section_name (dest, DECL_SECTION_NAME (source)); dest->set_section

Re: [golang-dev] [PATCH] libgo/test: Add flags to find libgcc_s in build-tree testing

2019-11-12 Thread Maciej W. Rozycki
On Mon, 11 Nov 2019, Ian Lance Taylor wrote: > > gcc/testsuite/ > > * lib/go.exp (go_link_flags): Add `ld_library_path' setting to > > find shared `libgcc_s' library at run time in build-tree > > testing. > > Is there similar code for other languages, such as

[PATCH] libgo/test: Pass $GOLIBS to compilation in DejaGNU testing

2019-11-12 Thread Maciej W. Rozycki
Pass $GOLIBS to compilation in DejaGNU testing like with direct compiler invocation from `libgo/testsuite/gotest', removing link problems in cross-toolchain testing like: .../bin/riscv64-linux-gnu-ld: _gotest_.o: in function `cmd..z2fgo..z2finternal..z2fcache.Cache.get':

Re: Fix ICE in ipa-cp when mixing -O0 and -O2 code in LTO

2019-11-12 Thread Jan Hubicka
> > this fixes second ICE seen during profiledbootstrap with Ada enabled. > > The problem is that Ada builds some object files with -O2 -O0 (not sure > > why) and these functions get flag_ipa_cp but !optimize. > > # Compile s-excdeb.o without optimization and with debug info to let the > #

Re: [PATCH 5/7 libgomp,amdgcn] Optimize GCN OpenMP malloc performance

2019-11-12 Thread Jakub Jelinek
On Tue, Nov 12, 2019 at 05:47:11PM +, Andrew Stubbs wrote: > > Not really sure if it is a good idea to print anything, at least not when > > in some debugging mode. I mean, it is fairly easy to write code that will > > trigger this. And, what is the reason why you can't free the > >

Re: Free ipa-prop edge summaries for inline calls

2019-11-12 Thread Martin Jambor
On Sun, Oct 27 2019, Jan Hubicka wrote: > Hi, > this patch makes ipa-prop to free edge summaries (jump functions) for > calls which has been inlined because they are no longer useful. > The main change is to change IPA_EDGE_REF from get_create to get > and thus we need to watch for missing

[PATCH] rs6000: Use ULL on big hexadecimal literal

2019-11-12 Thread Segher Boessenkool
C++98 does not have long long int, and does not use (unsigned) long long int for hexadecimal literals. So let's use an ULL suffix here, which is still not strict C++98, but which works with more compilers. Tested etc.; committing to trunk. Segher 2019-11-12 Segher Boessenkool *

Re: [PATCH] Enable libsanitizer build on riscv64

2019-11-12 Thread Jim Wilson
On Mon, Nov 11, 2019 at 3:45 AM Andreas Schwab wrote: > Only ubsan is supported so far. This has been tested on openSUSE > Tumbleweed, there are no testsuite failures. > > * configure.tgt (riscv64-*-linux*): Enable build. With a workaround for the ipc_perm/mode issue, I can reproduce

[C++ PATCH] Merge some using-decl handling

2019-11-12 Thread Nathan Sidwell
We currently process member and nonmember using decls completely separately. C++20 will have some new using decls for enums (see wg21.link/p1099 for details), and there will be some commonality -- member using decls can refer to non-member enumerators and non-member using-decls can refer to

Re: [Patch, RFC] PR81651/Fortran - Enhancement request: have f951 print out fully qualified module file name

2019-11-12 Thread Harald Anlauf
On 11/11/19 23:37, Janne Blomqvist wrote: > On Mon, Nov 11, 2019 at 11:54 PM Harald Anlauf wrote: >> >> Dear all, >> >> the attached patch prints the fully qualified path if an error occurs >> during module read. E.g., instead of a less helpful error message, >> >> pr81651.f90:2:6: >> >> 2 |

Re: [PATCH 4/7] Remove gcc/params.* files.

2019-11-12 Thread Rainer Orth
Hi Martin, > gcc/ChangeLog: > > 2019-11-06 Martin Liska > > * Makefile.in: Remove PARAMS_H and params.list > and params.options. this has obviously not been tested properly: it completely broke gcc.dg/params/params.exp: +ERROR: couldn't open

Re: [PATCH 2/4] MSP430: Disable exception handling by default for C++

2019-11-12 Thread Richard Sandiford
Jozef Lawrynowicz writes: > diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp > index 1df645e283c..1ce449cb935 100644 > --- a/gcc/testsuite/lib/gcc-dg.exp > +++ b/gcc/testsuite/lib/gcc-dg.exp > @@ -417,6 +417,16 @@ proc gcc-dg-prune { system text } { > return

[PATCH 2/2] testsuite: Add testcases for PR92449

2019-11-12 Thread Segher Boessenkool
2019-11-12 Segher Boessenkool gcc/testsuite/ * gcc.c-torture/compile/pr92449.c: New test. * gcc.target/powerpc/pr92449-1.c: New test. --- gcc/testsuite/gcc.c-torture/compile/pr92449.c | 7 +++ gcc/testsuite/gcc.target/powerpc/pr92449-1.c | 7 +++ 2 files changed, 14

[PATCH 0/2] Fix PR 92449 (unordered with -ffast-math)

2019-11-12 Thread Segher Boessenkool
Patch 1 fixes the target builtin mentioned in PR 92449 comment 1, where the user code asks us to generate code for unordered although we are compiling without NaNs. This fixes it by simple hardcoding the result for that case. Patch 2 adds a testcase for this, and one for the tree-complex part

[PATCH 1/2] rs6000: Handle unordered for xscmpexp[dq]p without NaNs (PR92449)

2019-11-12 Thread Segher Boessenkool
2019-11-12 Segher Boessenkool * config/rs6000/vsx.md (xscmpexpdp_ for CMP_TEST): Handle UNORDERED if !HONOR_NANS (DFmode). (xscmpexpqp__ for CMP_TEST and IEEE128): Handle UNORDERED if !HONOR_NANS (mode). --- gcc/config/rs6000/vsx.md | 12 1 file

Re: Fix ICE in ipa-cp when mixing -O0 and -O2 code in LTO

2019-11-12 Thread Eric Botcazou
> this fixes second ICE seen during profiledbootstrap with Ada enabled. > The problem is that Ada builds some object files with -O2 -O0 (not sure > why) and these functions get flag_ipa_cp but !optimize. # Compile s-excdeb.o without optimization and with debug info to let the # debugger set

Re: [Patch] PR fortran/92470 Fixes for CFI_address

2019-11-12 Thread Tobias Burnus
Hi all, On 11/12/19 3:42 PM, Tobias Burnus wrote: (2) CFI_establish: For allocatables, it is clear – base_addr == NULL. For pointers, it is clear as well – it has to be '0' according to the standard. But for CFI_attribute_other … I have now asked at

Re: [PATCH] Set AVX128_OPTIMAL for all avx targets.

2019-11-12 Thread H.J. Lu
On Tue, Nov 12, 2019 at 2:48 AM Hongtao Liu wrote: > > On Tue, Nov 12, 2019 at 4:41 PM Richard Biener > wrote: > > > > On Tue, Nov 12, 2019 at 9:29 AM Hongtao Liu wrote: > > > > > > On Tue, Nov 12, 2019 at 4:19 PM Richard Biener > > > wrote: > > > > > > > > On Tue, Nov 12, 2019 at 8:36 AM

Re: [PATCH 0/6] Implement asm flag outputs for arm + aarch64

2019-11-12 Thread Richard Sandiford
Richard Henderson writes: > I've put the implementation into config/arm/aarch-common.c, so > that it can be shared between the two targets. This required > a little bit of cleanup to the CC modes and constraints to get > the two targets to match up. > > I really should have done more than just

Re: [PATCH] include size and offset in -Wstringop-overflow

2019-11-12 Thread Martin Sebor
On 11/12/19 10:54 AM, Jeff Law wrote: On 11/12/19 1:15 AM, Richard Biener wrote: On Tue, Nov 12, 2019 at 6:10 AM Jeff Law wrote: On 11/6/19 3:34 PM, Martin Sebor wrote: On 11/6/19 2:06 PM, Martin Sebor wrote: On 11/6/19 1:39 PM, Jeff Law wrote: On 11/6/19 1:27 PM, Martin Sebor wrote: On

handle VIEW_CONVERT_EXPR in debug_node

2019-11-12 Thread Ulrich Drepper
I am using debug_node() to emit the tree of functions for later processing. For this I need all the information to be present. So far I came across one expression type that isn't handled correctly. For VIEW_CONVERT_EXPR only the type value is printed, not the first tree operand. The following

Fix ICE in ipa-cp when mixing -O0 and -O2 code in LTO

2019-11-12 Thread Jan Hubicka
Hi, this fixes second ICE seen during profiledbootstrap with Ada enabled. The problem is that Ada builds some object files with -O2 -O0 (not sure why) and these functions get flag_ipa_cp but !optimize. Because of -O0 ipa-cp pass is not run at compile time and summaries are never produced. So In

[PATCH] contrib/download_prerequisites: Use http instead of ftp

2019-11-12 Thread Janne Blomqvist
Convert the download_prerequisites script to use http instead of ftp. This works better with firewalls, proxies, and so on. It's also faster, a quick test on my system before patch: time contrib/download_prerequisites --directory=/tmp/foo --force ... real0m17,843s After patch: time

Watch for missing summaires in ipa-profile

2019-11-12 Thread Jan Hubicka
Hi, this patch fixes ICE when callee summary is missing in ipa-profile (and fixes previously latent bug on handling thunks) Bootstrapped/regtested x86_64-linux, comitted. Honza PR ipa/92471 * ipa-profile.c (check_argument_count): Break out from ...; watch for missing

Re: [PATCH 5/7] Remove last leftover usage of params* files.

2019-11-12 Thread Martin Liška
On 11/12/19 4:39 PM, Harwath, Frederik wrote: Hi Martin, On 06.11.19 13:40, Martin Liska wrote: (finalize_options_struct): Remove. This patch has been committed by now, but it seems that a single use of finalize_options_struct has been overlooked in gcc/tree-streamer-in.c. Thank

Re: Teach ipa-cp to propagate value ranges over binary operaitons too

2019-11-12 Thread Jan Hubicka
> > well, it all relies on the simple fact that arithmetic jump function > discovery does not cross NOP_EXPRs, or any chain of assignments, so they > are only constructed from things like > > _2 = param_2(D) + 4; > bar (_2); > > but not from > > _1 = (NOP_EXPR) param_2(D); > _2 = _1 +

Re: [PATCH] implement -Wrestrict for sprintf (PR 83688)

2019-11-12 Thread Martin Sebor
On 11/12/19 10:22 AM, Martin Sebor wrote: Committed in r278098. I thought I'd tested the kernel with the patch before and got no warnings, so having rebuilt it again just now I'm surprised to see the 16 instances below (7 of which are distinct). I'm happy to report that none looks like a

Re: Teach ipa-cp to propagate value ranges over binary operaitons too

2019-11-12 Thread Martin Jambor
Hi, On Tue, Nov 12 2019, Richard Biener wrote: > On Tue, 12 Nov 2019, Jan Hubicka wrote: > >> Hi, >> this patch adds propagation of value ranges through binary operations. >> This is disabled for value ranges within SCC to avoid infinite loop during >> propagation. I am bit worried about types

Re: [PATCH] include size and offset in -Wstringop-overflow

2019-11-12 Thread Jeff Law
On 11/12/19 1:15 AM, Richard Biener wrote: > On Tue, Nov 12, 2019 at 6:10 AM Jeff Law wrote: >> >> On 11/6/19 3:34 PM, Martin Sebor wrote: >>> On 11/6/19 2:06 PM, Martin Sebor wrote: On 11/6/19 1:39 PM, Jeff Law wrote: > On 11/6/19 1:27 PM, Martin Sebor wrote: >> On 11/6/19 11:55 AM,

Re: [8/n] Replace autovectorize_vector_sizes with autovectorize_vector_modes

2019-11-12 Thread Richard Sandiford
Richard Biener writes: > On Wed, Oct 30, 2019 at 4:58 PM Richard Sandiford > wrote: >> >> Richard Biener writes: >> > On Fri, Oct 25, 2019 at 2:37 PM Richard Sandiford >> > wrote: >> >> >> >> This is another patch in the series to remove the assumption that >> >> all modes involved in

Re: [PATCH 5/7 libgomp,amdgcn] Optimize GCN OpenMP malloc performance

2019-11-12 Thread Andrew Stubbs
On 12/11/2019 13:56, Jakub Jelinek wrote: s/reeduced/reduced/ Done. Not really sure if it is a good idea to print anything, at least not when in some debugging mode. I mean, it is fairly easy to write code that will trigger this. And, what is the reason why you can't free the gomp_malloced

Re: [PATCH][AArch64] Implement Armv8.5-A memory tagging (MTE) intrinsics

2019-11-12 Thread Dennis Zhang
Hi Kyrill, On 12/11/2019 15:57, Kyrill Tkachov wrote: > > On 11/12/19 3:50 PM, Dennis Zhang wrote: >> Hi Kyrill, >> >> On 12/11/2019 09:40, Kyrill Tkachov wrote: >>> Hi Dennis, >>> >>> On 11/7/19 1:48 PM, Dennis Zhang wrote: Hi Kyrill, I have rebased the patch on top of current

Re: [PATCH][gcc] libgccjit: handle long literals in playback::context::new_string_literal

2019-11-12 Thread Andrea Corallo
Andrea Corallo writes: > Andrea Corallo writes: > >> Andrea Corallo writes: >> >>> Hi all, >>> yesterday I've found an interesting bug in libgccjit. >>> Seems we have an hard limitation of 200 characters for literal strings. >>> Attempting to create longer strings lead to ICE during pass_expand

Re: [PATCH] implement -Wrestrict for sprintf (PR 83688)

2019-11-12 Thread Martin Sebor
On 10/31/19 10:31 AM, Jeff Law wrote: On 10/8/19 5:51 PM, Martin Sebor wrote: Attached is a resubmission of the -Wrestrict implementation for the sprintf family of functions.  The original patch was posted in 2017 but never approved.  This revision makes only a few minor changes to the original 

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

2019-11-12 Thread Thomas König
Hi Tobias, > On 11/12/19 1:42 PM, Thomas König wrote: >>> Ah, of course. I should have said module procedures. Or even module >>> procedures without bind(C)? >> It would probably be the latter. The change would actually be rather small: >> If conditions are met, just add attr.value for

[C++ PATCH] c++/89070 - bogus [[nodiscard]] warning in SFINAE.

2019-11-12 Thread Marek Polacek
This is a complaint that we issue a [[nodiscard]] warning even in SFINAE contexts. Here 'complain' is tf_decltype, but not tf_warning so I guess we can fix it as below. Bootstrapped/regtested on x86_64-linux, ok for trunk? 2019-11-12 Marek Polacek PR c++/89070 - bogus [[nodiscard]]

Re: [PATCH] Fix slowness in demangler

2019-11-12 Thread Tim Rühsen
On 11/12/19 4:15 PM, Ian Lance Taylor wrote: > On Tue, Nov 12, 2019 at 6:15 AM Tim Rühsen wrote: >> >> this is a proposal to fix >> https://sourceware.org/bugzilla/show_bug.cgi?id=25180 >> >> In short: >> cxxfilt >>

[C] Add a target hook that allows targets to verify type usage

2019-11-12 Thread Richard Sandiford
This patch adds a new target hook to check whether there are any target-specific reasons why a type cannot be used in a certain source-language context. It works in a similar way to existing hooks like TARGET_INVALID_CONVERSION and TARGET_INVALID_UNARY_OP. The reason for adding the hook is to

Re: [PATCH][AArch64] Implement Armv8.5-A memory tagging (MTE) intrinsics

2019-11-12 Thread Kyrill Tkachov
On 11/12/19 3:50 PM, Dennis Zhang wrote: Hi Kyrill, On 12/11/2019 09:40, Kyrill Tkachov wrote: Hi Dennis, On 11/7/19 1:48 PM, Dennis Zhang wrote: Hi Kyrill, I have rebased the patch on top of current truck. For resolve_overloaded, I redefined my memtag overloading function to fit the

Re: [PATCH][AArch64] Implement Armv8.5-A memory tagging (MTE) intrinsics

2019-11-12 Thread Dennis Zhang
Hi Kyrill, On 12/11/2019 09:40, Kyrill Tkachov wrote: > Hi Dennis, > > On 11/7/19 1:48 PM, Dennis Zhang wrote: >> Hi Kyrill, >> >> I have rebased the patch on top of current truck. >> For resolve_overloaded, I redefined my memtag overloading function to >> fit the latest

Re: [committed] Handle POLY_INT_CST in copy_reference_ops_from_ref

2019-11-12 Thread Andreas Schwab
On Nov 12 2019, Richard Sandiford wrote: > I'll try to make the tests ILP32 clean once we're in stage 3, including > fixing the problems that Andreas pointed out. Note that the massive testsuite failures cause the gcc-testresults mail to become so huge (> 4Mb) that gcc.gnu.org rejects it.

Re: [PATCH] include size and offset in -Wstringop-overflow

2019-11-12 Thread Martin Sebor
On 11/11/19 10:10 PM, Jeff Law wrote: On 11/6/19 3:34 PM, Martin Sebor wrote: On 11/6/19 2:06 PM, Martin Sebor wrote: On 11/6/19 1:39 PM, Jeff Law wrote: On 11/6/19 1:27 PM, Martin Sebor wrote: On 11/6/19 11:55 AM, Jeff Law wrote: On 11/6/19 11:00 AM, Martin Sebor wrote: The 

Re: [PATCH 5/7] Remove last leftover usage of params* files.

2019-11-12 Thread Harwath, Frederik
Hi Martin, On 06.11.19 13:40, Martin Liska wrote: > (finalize_options_struct): Remove. This patch has been committed by now, but it seems that a single use of finalize_options_struct has been overlooked in gcc/tree-streamer-in.c. Best regards, Frederik

Re: [PATCH] Free dominance info at the beginning of pass_jump_after_combine

2019-11-12 Thread Ilya Leoshkevich
> Am 12.11.2019 um 15:32 schrieb Segher Boessenkool > : > > Hi! > > On Tue, Nov 12, 2019 at 03:11:05PM +0100, Ilya Leoshkevich wrote: >> try_forward_edges does not update dominance info, and merge_blocks >> relies on it being up-to-date. In PR92430 stale dominance info makes >> merge_blocks

Re: [PATCH] [MIPS] Sanitize the constant argument for rotr3

2019-11-12 Thread Jeff Law
On 11/12/19 7:56 AM, Dragan Mladjenovic wrote: > From: "Dragan Mladjenovic" > > This was dormant for quite some time, but it started happening for me > on gcc.c-torture/compile/pr65153.c sometime after r276645 for -mabi=32 linux > runs. > > The pattern accepts any SMALL_OPERAND constant value

Re: [C++] Fix interaction between aka changes and DR1558 (PR92206)

2019-11-12 Thread Jason Merrill
On 10/25/19 2:53 PM, Richard Sandiford wrote: One of the changes in r277281 was to make the typedef variant handling in strip_typedefs pass the raw DECL_ORIGINAL_TYPE to the recursive call, instead of applying TYPE_MAIN_VARIANT first. This PR shows that that interacts badly with the

Re: [PATCH] Fix slowness in demangler

2019-11-12 Thread Ian Lance Taylor via gcc-patches
On Tue, Nov 12, 2019 at 6:15 AM Tim Rühsen wrote: > > this is a proposal to fix > https://sourceware.org/bugzilla/show_bug.cgi?id=25180 > > In short: > cxxfilt > _ZZ1_DO1z1Dclaa1D1VEE1VE2zo > > takes several minutes with 100%

Re: [committed] Handle POLY_INT_CST in copy_reference_ops_from_ref

2019-11-12 Thread Richard Sandiford
Christophe Lyon writes: > On Fri, 8 Nov 2019 at 10:44, Richard Sandiford > wrote: >> >> Tested on aarch64-linux-gnu and x86_64-linux-gnu. Applied as obvious. >> > > Hi Richard, > > The new deref_2.c test fails with -mabi=ilp32: > FAIL: gcc.target/aarch64/sve/acle/general/deref_2.c >

Re: [Patch] PR fortran/92470 Fixes for CFI_address

2019-11-12 Thread Paul Richard Thomas
Hi Tobias, Thanks for taking care of this so rapidly :-) OK for trunk and for 9-branch. Cheers Paul On Tue, 12 Nov 2019 at 14:42, Tobias Burnus wrote: > > Regarding the uncontroversial part: CFI_address. This has been reported > by Vipul Parekh a few hours ago and the problem is: The lower

[PATCH] [MIPS] Sanitize the constant argument for rotr3

2019-11-12 Thread Dragan Mladjenovic
From: "Dragan Mladjenovic" This was dormant for quite some time, but it started happening for me on gcc.c-torture/compile/pr65153.c sometime after r276645 for -mabi=32 linux runs. The pattern accepts any SMALL_OPERAND constant value while it asserts during the final that the value is in the

Re: [PATCH][arm][2/X] Implement __qadd, __qsub, __qdbl intrinsics

2019-11-12 Thread Christophe Lyon
On Thu, 7 Nov 2019 at 11:27, Kyrill Tkachov wrote: > > Hi all, > > This patch implements some more Q-bit-setting intrinsics from ACLE. > With the plumbing from patch 1 in place they are a simple builtin->RTL > affair. > > Bootstrapped and tested on arm-none-linux-gnueabihf. > > Committing to

[Patch] PR fortran/92470 Fixes for CFI_address

2019-11-12 Thread Tobias Burnus
Regarding the uncontroversial part: CFI_address. This has been reported by Vipul Parekh a few hours ago and the problem is: The lower bounds stored in a bind(C) descriptor are either 0 – or, for pointer/allocatable arrays, the value used during allocation/pointer association (cf. F2018,

Re: [PATCH 7/7 libgomp,amdgcn] GCN Libgomp Plugin

2019-11-12 Thread Andrew Stubbs
On 12/11/2019 14:01, Jakub Jelinek wrote: On Tue, Nov 12, 2019 at 01:29:16PM +, Andrew Stubbs wrote: 2019-11-12 Andrew Stubbs libgomp/ * plugin/Makefrag.am: Add amdgcn plugin support. * plugin/configfrag.ac: Likewise. * plugin/plugin-gcn.c: New file.

[PR c++/6936] Delete duplicate test

2019-11-12 Thread Nathan Sidwell
6936 and using38 are the same test. Deleting one of them. nathan -- Nathan Sidwell 2019-11-12 Nathan Sidwell * g++.dg/lookup/pr6936.C: Delete, identical to using38.C Index: g++.dg/lookup/pr6936.C === ---

[PATCH] PR90838: Support ctz idioms

2019-11-12 Thread Wilco Dijkstra
Hi, Support common idioms for count trailing zeroes using an array lookup. The canonical form is array[((x & -x) * C) >> SHIFT] where C is a magic constant which when multiplied by a power of 2 contains a unique value in the top 5 or 6 bits. This is then indexed into a table which maps it to the

Re: [PATCH] Free dominance info at the beginning of pass_jump_after_combine

2019-11-12 Thread Segher Boessenkool
Hi! On Tue, Nov 12, 2019 at 03:11:05PM +0100, Ilya Leoshkevich wrote: > try_forward_edges does not update dominance info, and merge_blocks > relies on it being up-to-date. In PR92430 stale dominance info makes > merge_blocks produce a loop in the dominator tree, which in turn makes >

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

2019-11-12 Thread Tobias Burnus
Hi Thomas, On 11/12/19 1:42 PM, Thomas König wrote: Ah, of course. I should have said module procedures. Or even module procedures without bind(C)? It would probably be the latter. The change would actually be rather small: If conditions are met, just add attr.value for INTENT(IN). This is

Re: [PATCH 4/7 libgomp,amdgcn] GCN libgomp port

2019-11-12 Thread Andrew Stubbs
On 12/11/2019 13:46, Jakub Jelinek wrote: On Tue, Nov 12, 2019 at 01:29:13PM +, Andrew Stubbs wrote: 2019-11-12 Andrew Stubbs include/ * gomp-constants.h (GOMP_DEVICE_GCN): Define. (GOMP_VERSION_GCN): Define. Perhaps this could be 0, but not a big deal. OG9

[PATCH] Fix slowness in demangler

2019-11-12 Thread Tim Rühsen
Hi, this is a proposal to fix https://sourceware.org/bugzilla/show_bug.cgi?id=25180 In short: cxxfilt _ZZ1_DO1z1Dclaa1D1VEE1VE2zo takes several minutes with 100% CPU before it comes back with a result. With this patch the

Re: [PATCH] Free dominance info at the beginning of pass_jump_after_combine

2019-11-12 Thread Richard Biener
On Tue, 12 Nov 2019, Ilya Leoshkevich wrote: > Bootstrapped and regtested on x86_64-redhat-linux, s390x-redhat-linux > and ppc64le-redhat-linux. OK for trunk and gcc-9-branch? > > try_forward_edges does not update dominance info, and merge_blocks > relies on it being up-to-date. In PR92430

[PATCH] Free dominance info at the beginning of pass_jump_after_combine

2019-11-12 Thread Ilya Leoshkevich
Bootstrapped and regtested on x86_64-redhat-linux, s390x-redhat-linux and ppc64le-redhat-linux. OK for trunk and gcc-9-branch? try_forward_edges does not update dominance info, and merge_blocks relies on it being up-to-date. In PR92430 stale dominance info makes merge_blocks produce a loop in

Re: [PATCH 7/7 libgomp,amdgcn] GCN Libgomp Plugin

2019-11-12 Thread Jakub Jelinek
On Tue, Nov 12, 2019 at 01:29:16PM +, Andrew Stubbs wrote: > 2019-11-12 Andrew Stubbs > > libgomp/ > * plugin/Makefrag.am: Add amdgcn plugin support. > * plugin/configfrag.ac: Likewise. > * plugin/plugin-gcn.c: New file. > * configure: Regenerate. I'm a

Re: [PATCH 5/7 libgomp,amdgcn] Optimize GCN OpenMP malloc performance

2019-11-12 Thread Jakub Jelinek
On Tue, Nov 12, 2019 at 01:29:14PM +, Andrew Stubbs wrote: > 2019-11-12 Andrew Stubbs > > libgomp/ > * config/gcn/team.c (gomp_gcn_enter_kernel): Set up the team arena > and use team_malloc variants. > (gomp_gcn_exit_kernel): Use team_free. > * libgomp.h

Re: Teach ipa-cp to propagate value ranges over binary operaitons too

2019-11-12 Thread Jan Hubicka
> > + tree op = ipa_get_jf_pass_through_operand (jfunc); > > + value_range op_vr (op, op); > > + value_range op_res,res; > > + > > Do we really know operation is tcc_binary here? Constant propagation already assumes that at the same spot: if (TREE_CODE_CLASS (opcode) == tcc_unary)

Re: [PATCH 4/7 libgomp,amdgcn] GCN libgomp port

2019-11-12 Thread Jakub Jelinek
On Tue, Nov 12, 2019 at 01:29:13PM +, Andrew Stubbs wrote: > 2019-11-12 Andrew Stubbs > > include/ > * gomp-constants.h (GOMP_DEVICE_GCN): Define. > (GOMP_VERSION_GCN): Define. Perhaps this could be 0, but not a big deal. > libgomp/ > * Makefile.am

Re: [PATCH 3/7 libgomp,nvptx] Add device number to GOMP_OFFLOAD_openacc_async_construct

2019-11-12 Thread Jakub Jelinek
On Tue, Nov 12, 2019 at 01:29:12PM +, Andrew Stubbs wrote: > 2019-11-12 Andrew Stubbs > > libgomp/ > * libgomp-plugin.h (GOMP_OFFLOAD_openacc_async_construct): Add int > parameter. > * oacc-async.c (lookup_goacc_asyncqueue): Pass device number to the > queue

Re: [PATCH 1/7 libgomp,nvptx] Move generic libgomp files from nvptx to accel

2019-11-12 Thread Jakub Jelinek
On Tue, Nov 12, 2019 at 01:29:10PM +, Andrew Stubbs wrote: > 2019-11-12 Andrew Stubbs > > libgomp/ > * configure.tgt (nvptx*-*-*): Add "accel" directory. > * config/nvptx/libgomp-plugin.c: Move ... > * config/accel/libgomp-plugin.c: ... to here. > *

Re: [PATCH 2/2] gdbinit.in: fix wrong reference to function argument

2019-11-12 Thread Andreas Schwab
On Nov 12 2019, Konstantin Kharlamov wrote: > Besides, I suspect, the number of actual users of this gdbinit is around > zero, otherwise someone would have noticed the warning that gdb prints on > every usage of these functions while the PATCH 1/2 is not applied. It's easy to ignore it.

Re: Teach ipa-cp to propagate value ranges over binary operaitons too

2019-11-12 Thread Richard Biener
On Tue, 12 Nov 2019, Jan Hubicka wrote: > Hi, > this patch adds propagation of value ranges through binary operations. > This is disabled for value ranges within SCC to avoid infinite loop during > propagation. I am bit worried about types here. As far as I can say we > have something like > >

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

2019-11-12 Thread Giuliano Belinassi
Hi, Richard. On 11/12, Richard Biener wrote: > On Sat, Nov 9, 2019 at 3:26 PM Giuliano Belinassi > wrote: > > > > Hi all, > > > > This patch refactors tree-loop-distribution.c for thread safety without > > use of C11 __thread feature. All global variables were moved to a struct > > which is

[PATCH 6/7 amdgcn] Use a single worker for OpenACC on AMD GCN

2019-11-12 Thread Andrew Stubbs
This patch prevents the compiler using multiple workers in a gang. This should be reverted when worker support is committed. I will commit this with the reset of the series. Andrew 2019-11-12 Andrew Stubbs Julian Brown gcc/ * config/gcn/gcn.c

[PATCH 5/7 libgomp,amdgcn] Optimize GCN OpenMP malloc performance

2019-11-12 Thread Andrew Stubbs
This patch implements a malloc optimization to improve the startup and shutdown overhead for each OpenMP team. New malloc functions are created, "team_malloc" and "team_free", that take memory from a per-team memory arena provided by the plugin, rather than the shared heap space, which is slow,

[PATCH 7/7 libgomp,amdgcn] GCN Libgomp Plugin

2019-11-12 Thread Andrew Stubbs
This patch contributes the GCN libgomp plugin, with the various configure and make bits to go with it. This implementation is a much-cleaned-up version of the one present on the openacc-gcc-9-branch. OK to commit? Thanks Andrew 2019-11-12 Andrew Stubbs libgomp/ *

[PATCH 4/7 libgomp,amdgcn] GCN libgomp port

2019-11-12 Thread Andrew Stubbs
This patch contributes a libgomp implementation for AMD GCN, minus the plugin which is later in this series. GCN has been allocated ID number "8", even though devices "6" and "7" are no longer present in every place where the IDs exist (they were HSA and Intel MIC). Most of these changes are

[PATCH 3/7 libgomp,nvptx] Add device number to GOMP_OFFLOAD_openacc_async_construct

2019-11-12 Thread Andrew Stubbs
This patch is preparatory for the amdgcn plugin. The current implementation was written for CUDA in which the device associated with the queue is inferred by some hidden magic (which seems questionable to me but then I don't fully understand it). The GCN plugin needs to know for which device the

[PATCH 2/7 amdgcn] GCN mkoffload

2019-11-12 Thread Andrew Stubbs
This patch adds the mkoffload tool to the amdgcn backend. It's similar, but not quite the same as that on the openacc-gcc-9-branch. I will commit this patch when the others in this series are approved. Andrew 2019-11-12 Andrew Stubbs gcc/ * config/gcn/mkoffload.c: New

[PATCH 1/7 libgomp,nvptx] Move generic libgomp files from nvptx to accel

2019-11-12 Thread Andrew Stubbs
This patch shouldn't change anything much at all; it's just an internal reorganization of files. The idea is to move files from libgomp "nvptx" directory that have nothing NVPTX-specific in them. By placing them in a separate "accel" directory they can be shared with the GCN port, thus

[PATCH 0/7 libgomp,amdgcn] AMD GCN Offloading Support

2019-11-12 Thread Andrew Stubbs
Hi all, This patch series contributes initial OpenMP and OpenACC support for AMD GCN GPUs. The test results are not yet perfect, but there are many more passes than failures, so this is a good starting point. The rest of the issues can be addressed as bugs during stage 3. I have another,

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

2019-11-12 Thread Jan Hubicka
> Hi, > > On Tue, Nov 12 2019, Jan Hubicka wrote: > > Also note that there is a long standing problem with inlining ipacp > > clones. This can be shown on the following example: > > > > struct a {int a;}; > > static int foo (struct a a) > > { > > return a.a; > > } > > __attribute__

Re: [PATCH 2/2] gdbinit.in: fix wrong reference to function argument

2019-11-12 Thread Konstantin Kharlamov
On Вт, ноя 12, 2019 at 14:08, Andreas Schwab wrote: On Nov 12 2019, Konstantin Kharlamov wrote: I'm definitely missing something. Who are these users, and how can they make anything useful of these functions if they don't even pass an argument? By printing the desired value. Hah,

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

2019-11-12 Thread Martin Jambor
Hi, On Tue, Nov 12 2019, Jan Hubicka wrote: > Also note that there is a long standing problem with inlining ipacp > clones. This can be shown on the following example: > > struct a {int a;}; > static int foo (struct a a) > { > return a.a; > } > __attribute__ ((noinline)) > static int bar

Re: [PATCH 2/2] gdbinit.in: fix wrong reference to function argument

2019-11-12 Thread Andreas Schwab
On Nov 12 2019, Konstantin Kharlamov wrote: > I'm definitely missing something. Who are these users, and how can they > make anything useful of these functions if they don't even pass an > argument? By printing the desired value. Andreas. -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key

Use known value ranges while evaluating ipa predicates

2019-11-12 Thread Jan Hubicka
Hi, this implements use of value ranges in ipa-predicates so inliner know when some tests are going to be removed (especially NULL pointer checks). Bootstrapped/regtested x86_64-linux. Martin, I would apprechiate if you look on the patch. Honza * ipa-cp.c

Re: [PATCH 2/2] gdbinit.in: fix wrong reference to function argument

2019-11-12 Thread Konstantin Kharlamov
On Вт, ноя 12, 2019 at 13:50, Andreas Schwab wrote: On Nov 12 2019, Konstantin Kharlamov wrote: Gdb documentation says that gdb-defined functions refer to their args as $arg0…$argN. The just "$" that gdbinit is using here refers to something else, That's the last thing printed.

Teach ipa-cp to propagate value ranges over binary operaitons too

2019-11-12 Thread Jan Hubicka
Hi, this patch adds propagation of value ranges through binary operations. This is disabled for value ranges within SCC to avoid infinite loop during propagation. I am bit worried about types here. As far as I can say we have something like VR in lattice of type1 foo (type1 param) { bar

Re: [PATCH 2/2] gdbinit.in: fix wrong reference to function argument

2019-11-12 Thread Andreas Schwab
On Nov 12 2019, Konstantin Kharlamov wrote: > Gdb documentation says that gdb-defined functions refer to their args as > $arg0…$argN. The just "$" that gdbinit is using here refers to something > else, That's the last thing printed. > which results in gdb errors, or even crashes of debuggee.

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

2019-11-12 Thread Thomas König
Hi Janne, > Ah, of course. I should have said module procedures. Or even module > procedures without bind(C)? It would probably be the latter. The change would actually be rather small: If conditions are met, just add attr.value for INTENT(IN). This is something we should probably do when we

Re: [PATCH, OpenACC, v2] Non-contiguous array support for OpenACC data clauses

2019-11-12 Thread Chung-Lin Tang
Hi Thomas, thanks for the first review. I'm still working on another revision, but wanted to respond to some of the issues you raised first: On 2019/11/7 8:48 AM, Thomas Schwinge wrote: (1) The simplest solution: implement a processing which searches and reverts such non-contiguous array map

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

2019-11-12 Thread Jan Hubicka
> > +2019-11-05 Feng Xue > > + > > + PR ipa/91682 > > + * ipa-prop.h (jump_func_type): New value IPA_JF_LOAD_AGG. > > + (ipa_load_agg_data, ipa_agg_value, ipa_agg_value_set): New structs. > > + (ipa_agg_jf_item): Add new field jftype and type, redefine field value. > > +

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

2019-11-12 Thread Jan Hubicka
> +2019-11-05 Feng Xue > + > + PR ipa/91682 > + * ipa-prop.h (jump_func_type): New value IPA_JF_LOAD_AGG. > + (ipa_load_agg_data, ipa_agg_value, ipa_agg_value_set): New structs. > + (ipa_agg_jf_item): Add new field jftype and type, redefine field value. > +

[PATCH] Fix PR92460

2019-11-12 Thread Richard Biener
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2019-11-12 Richard Biener PR tree-optimization/92460 * tree-vect-stmts.c (vectorizable_simd_clone_call): Unshare expression before gimplifying. Index: gcc/tree-vect-stmts.c

Re: [PATCH 3/X] [libsanitizer] Add option to bootstrap using HWASAN

2019-11-12 Thread Martin Liška
On 11/11/19 5:03 PM, Matthew Malcomson wrote: Ah! My apologies -- I sent up a series with a few documentation mistakes. (the others were wording problems so less noticeable) That's fine, I fixed that very easily. Right now, I can confirm using a aarch64 KVM with the following linux kernel:

[PATCH] Fix PR92461

2019-11-12 Thread Richard Biener
Bootstrapped & tested on x86_64-unknown-linux-gnu, applied. Richard. 2019-11-12 Richard Biener PR tree-optimization/92461 * tree-vect-loop.c (vect_create_epilog_for_reduction): Update stmt after propagation. * gcc.dg/torture/pr92461.c: New testcase. Index:

[PATCH 0/2] gdbinit.in fixes

2019-11-12 Thread Konstantin Kharlamov
This includes the unmerged previously posted here patch about calling with `call`. I made a typo in commit message formatting, so I fix it here. I'd like to note that I am not subscribed to the list, so please add me to CC when replying. Thanks in advance. Konstantin Kharlamov (2): gdbinit.in:

[PATCH 2/2] gdbinit.in: fix wrong reference to function argument

2019-11-12 Thread Konstantin Kharlamov
Gdb documentation says that gdb-defined functions refer to their args as $arg0…$argN. The just "$" that gdbinit is using here refers to something else, which results in gdb errors, or even crashes of debuggee. Let's fix that. * (debug,debug_rtx,pr,prl,pt,pct,pgg,pgq,pgq,pgs,pge,pmz,ptc,

[PATCH 1/2] gdbinit.in: call a function with "call", not "set"

2019-11-12 Thread Konstantin Kharlamov
Last time a command that calls a function of debuggee with "set" was added is 2013 year. Apparently something has changed since then, since doing "set foo()" in gdb to call a "foo()" results in error. Disregarding, it looks wrong to call a function with "set". Let's use "call" instead. *

Re: [PATCH] Enable libsanitizer build on riscv64

2019-11-12 Thread Jakub Jelinek
On Tue, Nov 12, 2019 at 11:32:56AM +0100, Jakub Jelinek wrote: > On Tue, Nov 12, 2019 at 10:56:21AM +0100, Andreas Schwab wrote: > > On Nov 11 2019, Jim Wilson wrote: > > > > > ../../../../gcc-git/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp:1136:1: > > > note: in expansion

  1   2   >