Re: [PATCH][4/4][v2] RPO-style value-numbering for FRE/PRE

2018-09-05 Thread Richard Biener
On Wed, 5 Sep 2018, Gerald Pfeifer wrote: > On Fri, 24 Aug 2018, Richard Biener wrote: > > Comments are still welcome - I've re-bootstrapped and tested the series > > on x86_64-unknown-linux-gnu for all languages and will talk about > > this work at the Cauldron in more detail. > > Is there any c

Backports to 8.3

2018-09-05 Thread Jakub Jelinek
Hi! I've bootstrapped/regtested the following backports on gcc-8-branch on x86_64-linux and i686-linux and committed. Jakub 2018-09-05 Jakub Jelinek Backported from mainline 2018-08-03 Jason Merrill PR c++/86706 * class.c (build_base_path): Use curr

Re: [PATCH][4/4][v2] RPO-style value-numbering for FRE/PRE

2018-09-05 Thread Gerald Pfeifer
On Tue, 4 Sep 2018, Jeff Law wrote: >> On the other hand, this ICE has been consistent across a week of >> daily builds now. > An FYI, My i686 builds have been running OK. But given what you've > described this could well be an uninitialized read, dangling pointer, > out of bounds write or some si

Re: [PATCH][4/4][v2] RPO-style value-numbering for FRE/PRE

2018-09-05 Thread Richard Biener
On Wed, 5 Sep 2018, Gerald Pfeifer wrote: > On Tue, 4 Sep 2018, Jeff Law wrote: > >> On the other hand, this ICE has been consistent across a week of > >> daily builds now. > > An FYI, My i686 builds have been running OK. But given what you've > > described this could well be an uninitialized rea

Re: [PATCH] Ignore properly -mdirect-move (PR target/87164).

2018-09-05 Thread Martin Liška
On 09/04/2018 09:40 PM, Segher Boessenkool wrote: > Hi! > > On Tue, Sep 04, 2018 at 04:02:23PM +0200, Martin Liška wrote: >> Option mdirect-move should be Deprecated, that means option value is ignored >> and user can't influence rs6000_isa_flags. >> >> Patch can bootstrap on ppc64le-redhat-linux

[PATCH] Group switch cases in switch lowering (PR tree-optimization/87205).

2018-09-05 Thread Martin Liška
Hi. It's beneficial to group cases before switch lowering machinery is making a decision what to do with a switch. Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. Ready to be installed? Martin gcc/ChangeLog: 2018-09-04 Martin Liska PR tree-optimization/8

Re: Do not stream TYPE_STUB_DECL

2018-09-05 Thread Richard Biener
On Thu, Aug 23, 2018 at 2:28 PM Jan Hubicka wrote: > > Hi, > this patch removes streaming of TYPE_STUB_DECL. The sanity checking part > depends > on the coverage change but I may just drop it (though I think it is useful as > a sanity check that things are consistend within the middle-end). > > l

[PATCH] S/390: Fix conditional returns

2018-09-05 Thread Ilya Leoshkevich
S/390 epilogue ends with (parallel [(return) (use %r14)]) instead of the more usual (return) or (simple_return). This sequence is not recognized by the conditional return logic in try_optimize_cfg (). gcc/ChangeLog: 2018-08-28 Ilya Leoshkevich PR target/80080 * cfgcleanup.c (

[PATCH 1/2] S/390: Register pass_s390_early_mach statically

2018-09-05 Thread Ilya Leoshkevich
The dump file used to come at the end of the sorted dump file list, because the pass was registered dynamically. This did not reflect the order in which passes are executed. Static registration fixes this: * foo4.c.277r.split2 * foo4.c.281r.early_mach * foo4.c.282r.pro_and_epilogue gcc/ChangeLog:

[PATCH 2/2] S/390: Repeat jump threading after combine

2018-09-05 Thread Ilya Leoshkevich
Combine can change basic blocks in a way that they end up containing a single jump_insn. This creates an opportunity to improve code with jump threading. gcc/ChangeLog: 2018-08-28 Ilya Leoshkevich PR target/80080 * cfgcleanup.c: Make jump pass clonable. * config/s390/s

[PATCH][OBVIOUS] Fix a scan in test for Darwin target (PR testsuite/87216).

2018-09-05 Thread Martin Liška
Hi. I would like to update a test-case, tested on x86_64-linux-gnu and on Darwin by Rainer. I'm going to install that. Martin gcc/testsuite/ChangeLog: 2018-09-05 Martin Liska PR testsuite/87216 * gcc.dg/tree-prof/pr59521-3.c: Update scanned pattern to support Dawrin

Re: [PATCH][OBVIOUS] Fix a scan in test for Darwin target (PR testsuite/87216).

2018-09-05 Thread Rainer Orth
Hi Martin, > 2018-09-05 Martin Liska > > PR testsuite/87216 > * gcc.dg/tree-prof/pr59521-3.c: Update scanned pattern > to support Dawring names. ^ Darwin ;-) Rainer -- - R

Re: [PATCH][OBVIOUS] Fix a scan in test for Darwin target (PR testsuite/87216).

2018-09-05 Thread Martin Liška
On 09/05/2018 11:08 AM, Rainer Orth wrote: > Hi Martin, > >> 2018-09-05 Martin Liska >> >> PR testsuite/87216 >> * gcc.dg/tree-prof/pr59521-3.c: Update scanned pattern >> to support Dawring names. >^ Darwin ;-) > > Rainer > Thanks, fixed. Martin

[PING][PATCH] Frame pointer for arm with THUMB2 mode

2018-09-05 Thread Denis Khalikov
Hello everyone, can someone, please, take a look on this patch https://gcc.gnu.org/ml/gcc-patches/2018-08/msg01656.html Thanks.

Re: [PATCH] Group switch cases in switch lowering (PR tree-optimization/87205).

2018-09-05 Thread Richard Biener
On Wed, Sep 5, 2018 at 10:31 AM Martin Liška wrote: > > Hi. > > It's beneficial to group cases before switch lowering machinery > is making a decision what to do with a switch. > > Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. > > Ready to be installed? Hmm, do we wan

Re: [PATCH 2/2] S/390: Repeat jump threading after combine

2018-09-05 Thread Richard Biener
On Wed, Sep 5, 2018 at 10:44 AM Ilya Leoshkevich wrote: > > Combine can change basic blocks in a way that they end up containing > a single jump_insn. This creates an opportunity to improve code with > jump threading. Hmm, I think CFG cleanup performs this as well (if run in the correct mode) so

Re: [PING 5][PATCH] [v4][aarch64] Avoid tag collisions for loads falkor

2018-09-05 Thread Siddhesh Poyarekar
On Thursday 30 August 2018 01:28 PM, Siddhesh Poyarekar wrote: On Wednesday 29 August 2018 10:05 PM, James Greenhalgh wrote: Sorry that this took me so long to get to.  > > The code is outstanding quality, a textbook example of writing an > analysis/optimization pass using modern GCC framework

[PATCH] Fix PR87225

2018-09-05 Thread Richard Biener
Committed as obvious. Richard. 2018-09-05 Richard Biener PR bootstrap/87225 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus return. Index: gcc/tree-vect-stmts.c === --- gcc/tree-vect-stmts

Re: [PATCH] fixincludes: vxworks: regs.h: Guard include of vxTypesOld.h by !_ASMLANGUAGE

2018-09-05 Thread Olivier Hainque
Hi Rasmus, > On 3 Sep 2018, at 15:20, Rasmus Villemoes wrote: >> How do we not get in assembly the problems we'd get in C >> when not including vxTypesOld ? Answering part of my own question: turns out that some pieces included via regs.h are already taking care of the _ASMLANGUAGE case. > Wel

[PR c++/87185] ICE in prune-lambdas

2018-09-05 Thread Nathan Sidwell
I'm applying this patch of Pádraig's. It's a sufficiently obvious NULL-ptr-dereference fix. tested on x86_64-linux. nathan -- Nathan Sidwell 2018-09-05 Pádraig Brady p...@draigbrady.com cp/ PR c++/87185 * lambda.c (prune_lambda_captures): Protect against const_vars.get returning NULL.

Re: PR85787: Extend malloc_candidate_p to handle multiple phis.

2018-09-05 Thread Prathamesh Kulkarni
On 28 August 2018 at 16:56, Prathamesh Kulkarni wrote: > H > The attached patch extends malloc_candidate_p to handle multiple phis. > There's a lot of noise in the patch because I moved most of > malloc_candidate_p into > new function malloc_candidate_p_1. The only real change is following hunk: >

[PATCH] Fix PR87217

2018-09-05 Thread Richard Biener
This re-introduces the region boundary checking for the alias walk. It's really also necessary for correctness, not only for compile-time. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2018-09-05 Richard Biener PR tree-optimization/87217 * tree-ssa

Re: [patch, fortan] PR87103 - [OOP] ICE in gfc_new_symbol() due to overlong symbol name

2018-09-05 Thread Bernhard Reutner-Fischer
On Wed, 5 Sep 2018 at 03:30, Jerry DeLisle wrote: > > On 09/04/2018 10:43 AM, Bernhard Reutner-Fischer wrote: > > On Tue, 4 Sep 2018 at 18:43, Andrew Benson > > wrote: > >> > >> As suggested by Janus, PR87103 is easily fixed by the attached patch which > >> increases GFC_MAX_SYMBOL_LEN to 76 (su

Committed: io/async.h: Use __gthread_mutex_t, not pthread_mutex_t.

2018-09-05 Thread Hans-Peter Nilsson
These pthread_mutex_t were obviously meant to be __gthread_mutex_t. See other declarations. Not being that, broke cris-elf build at r264070, restored with this patch. Also regtested on native x86_64-pc-linux-gnu. I'm not sure know why no other bare-iron target saw this, but perhaps it's because

Re: Committed: io/async.h: Use __gthread_mutex_t, not pthread_mutex_t.

2018-09-05 Thread Bernhard Reutner-Fischer
On Wed, 5 Sep 2018 at 12:35, Hans-Peter Nilsson wrote: > > These pthread_mutex_t were obviously meant to be > __gthread_mutex_t. See other declarations. Not being that, > broke cris-elf build at r264070, restored with this patch. Also > regtested on native x86_64-pc-linux-gnu. > > I'm not sure

[wwwdocs] Document 87137 fix

2018-09-05 Thread Nathan Sidwell
Gerald, this documents the fix for pr87137. Discovered as a GCC-8 regression, turned out to be an ABI bug. Decided to fix the entire bug in one go. Are these changes.html changes ok? Patch discussion at https://gcc.gnu.org/ml/gcc-patches/2018-08/msg01900.html nathan -- Nathan Sidwell Index:

For our betterment

2018-09-05 Thread Evan Kachukwu
My pleasure to communicate with you through this medium. I know you will be surprise reading my email message. However, it is my sincere pleasure at this moment to exhibit my total confidence bestowed on you in accordance of which I am fully convinced that you will really be of immense assistanc

[PATCH] Maybe fix PR87134

2018-09-05 Thread Richard Biener
The following makes sure to call the default CTOR when emplacing a vec<> in the avail hash-map. Certainly the intent was to zero-initialize the m_vec member. It looks like some versions of clang do not agree that vec<> is POD so that might also help the reported FreeBSD issue. Bootstrap runnin

Re: [PATCH] Maybe fix PR87134

2018-09-05 Thread Jakub Jelinek
On Wed, Sep 05, 2018 at 12:55:55PM +0200, Richard Biener wrote: > > The following makes sure to call the default CTOR when emplacing a > vec<> in the avail hash-map. Certainly the intent was to zero-initialize > the m_vec member. Guess it would be nice to see what older versions of system g++ do

Re: [PATCH] Group switch cases in switch lowering (PR tree-optimization/87205).

2018-09-05 Thread Martin Liška
On 09/05/2018 11:31 AM, Richard Biener wrote: > On Wed, Sep 5, 2018 at 10:31 AM Martin Liška wrote: >> >> Hi. >> >> It's beneficial to group cases before switch lowering machinery >> is making a decision what to do with a switch. >> >> Patch can bootstrap on ppc64le-redhat-linux and survives regre

Re: [PATCH] Maybe fix PR87134

2018-09-05 Thread Richard Biener
On Wed, 5 Sep 2018, Jakub Jelinek wrote: > On Wed, Sep 05, 2018 at 12:55:55PM +0200, Richard Biener wrote: > > > > The following makes sure to call the default CTOR when emplacing a > > vec<> in the avail hash-map. Certainly the intent was to zero-initialize > > the m_vec member. > > Guess it w

Re: [PATCH] Maybe fix PR87134

2018-09-05 Thread Richard Biener
On Wed, 5 Sep 2018, Richard Biener wrote: > On Wed, 5 Sep 2018, Jakub Jelinek wrote: > > > On Wed, Sep 05, 2018 at 12:55:55PM +0200, Richard Biener wrote: > > > > > > The following makes sure to call the default CTOR when emplacing a > > > vec<> in the avail hash-map. Certainly the intent was t

Re: [PATCH] Optimise sqrt reciprocal multiplications

2018-09-05 Thread Kyrill Tkachov
On 04/09/18 17:52, Kyrill Tkachov wrote: > > On 04/09/18 15:31, Richard Biener wrote: >> On Tue, 4 Sep 2018, Kyrill Tkachov wrote: >>> Hi Richard, >>> >>> On 31/08/18 12:07, Richard Biener wrote: On Thu, 30 Aug 2018, Kyrill Tkachov wrote: > Ping. > > https://gcc.gnu.org/ml/gcc-pat

Re: [PATCH] Optimise sqrt reciprocal multiplications

2018-09-05 Thread Richard Biener
On Wed, 5 Sep 2018, Kyrill Tkachov wrote: > On 04/09/18 17:52, Kyrill Tkachov wrote: > > > > On 04/09/18 15:31, Richard Biener wrote: > >> On Tue, 4 Sep 2018, Kyrill Tkachov wrote: > >>> Hi Richard, > >>> > >>> On 31/08/18 12:07, Richard Biener wrote: > On Thu, 30 Aug 2018, Kyrill Tkachov wro

[PATCH 01/25] Handle vectors that don't fit in an integer.

2018-09-05 Thread ams
GCN vector sizes range between 64 and 512 bytes, none of which have correspondingly sized integer modes. This breaks a number of assumptions throughout the compiler, but I don't really want to create modes just for this purpose. Instead, this patch fixes up the cases that I've found, so far, suc

[PATCH 02/25] Propagate address spaces to builtins.

2018-09-05 Thread ams
At present, pointers passed to builtin functions, including atomic operators, are stripped of their address space properties. This doesn't seem to be deliberate, it just omits to copy them. Not only that, but it forces pointer sizes to Pmode, which isn't appropriate for all address spaces. This

[PATCH 00/25] AMD GCN Port

2018-09-05 Thread ams
Hi All, This patch series contains the non-OpenACC/OpenMP portions of a port to AMD GCN3 and GCN5 GPU processors. It's sufficient to build single-threaded programs, with vectorization in the usual way. C and Fortran are supported, C++ is not supported, and the other front-ends have not been test

[PATCH 07/25] [pr82089] Don't sign-extend SFV 1 in BImode

2018-09-05 Thread ams
This is an update of the patch posted to PR82089 long ago. We ran into the same bug on GCN, so we need this fixed as part of this series. 2018-09-05 Andrew Stubbs Tom de Vries PR82089 gcc/ * expmed.c (emit_cstore): Fix handling of result_mode == BImode

[PATCH 04/25] SPECIAL_REGNO_P

2018-09-05 Thread ams
GCN has some registers which are special purpose, but not "fixed" because we want the register allocator to track their usage and select alternatives that use different special registers (e.g. scalar cc vs. vector cc). Sometimes this leads the regrename pass to ICE. Quite how it gets confused is

[PATCH 03/25] Improve TARGET_MANGLE_DECL_ASSEMBLER_NAME.

2018-09-05 Thread ams
The HSA GPU drivers can't cope with binaries that have the same symbol defined multiple times, even though the names are not exported. This happens whenever there are file-scope static variables with matching names. I believe it's also an issue with switch tables. This is a bug, but outside our

[PATCH 05/25] Add sorry_at diagnostic function.

2018-09-05 Thread ams
The plain "sorry" diagnostic only gives the "current" location, which is typically the last line of the function or translation unit by time we get to the back end. GCN uses "sorry" to report unsupported language features, such as static constructors, so it's useful to have a "sorry_at" variant.

[PATCH 06/25] Remove constant vec_select restriction.

2018-09-05 Thread ams
The vec_select operator is documented to require a const_int for the lane selector operand, but GCN has an instruction that can select the lane at runtime, so it seems reasonable to remove this restriction. This patch simply replaces assertions that the operand is constant with early exits from t

[PATCH 09/25] Elide repeated RTL elements.

2018-09-05 Thread ams
GCN's 64-lane vectors tend to make RTL dumps very long. This patch makes them far more bearable by eliding long sequences of the same element into "repeated" messages. 2018-09-05 Andrew Stubbs Jan Hubicka Martin Jambor * print-rtl.c (print_rtx_operand_code

[PATCH 08/25] Fix co-array allocation

2018-09-05 Thread ams
The Fortran front-end has a bug in which it uses "int" values for "size_t" parameters. I don't know why this isn't problem for all 64-bit architectures, but GCN ends up with the data in the wrong argument register and/or stack slot, and bad things happen. This patch corrects the issue by setting

[PATCH 11/25] Simplify vec_merge according to the mask.

2018-09-05 Thread ams
This patch was part of the original patch we acquired from Honza and Martin. It simplifies vector elements that are inactive, according to the mask. 2018-09-05 Jan Hubicka Martin Jambor * simplify-rtx.c (simplify_merge_mask): New function. (simplify_ternary_oper

[PATCH 10/25] Convert BImode vectors.

2018-09-05 Thread ams
GCN uses V64BImode to represent vector masks in the middle-end, and DImode bit-masks to represent them in the back-end. These must be converted at expand time and the most convenient way is to simply use a SUBREG. This works fine except that simplify_subreg needs to be able to convert immediates

[PATCH 12/25] Make default_static_chain return NULL in non-static functions

2018-09-05 Thread ams
This patch allows default_static_chain to be called from the back-end without it knowing if the function is static or not. Or, to put it another way, without duplicating the check everywhere it's used. 2018-09-05 Tom de Vries gcc/ * targhooks.c (default_static_chain): Return

[PATCH 13/25] Create TARGET_DISABLE_CURRENT_VECTOR_SIZE

2018-09-05 Thread ams
This feature probably ought to be reworked as a proper target hook, but I would like to know if this is the correct solution to the problem first. The problem is that GCN vectors have a fixed number of elements (64) and the vector size varies with element size. E.g. V64QI is 64 bytes and V64SI i

[PATCH 16/25] Fix IRA ICE.

2018-09-05 Thread ams
The IRA pass makes an assumption that any pseudos created after the pass begins were created explicitly by the pass itself and therefore will have corresponding entries in its other tables. The GCN back-end, however, often creates additional pseudos, in expand patterns, to represent the necessary

[PATCH 14/25] Disable inefficient vectorization of elementwise loads/stores.

2018-09-05 Thread ams
If the autovectorizer tries to load a GCN 64-lane vector elementwise then it blows away the register file and produces horrible code. This patch simply disallows elementwise loads for such large vectors. Is there a better way to disable this in the middle-end? 2018-09-05 Julian Brown

[PATCH 17/25] Fix Fortran STOP.

2018-09-05 Thread ams
The minimal libgfortran setup was created for NVPTX, but will also be used by AMD GCN. This patch simply removes an assumption that NVPTX is the only user. Specifically, NVPTX exit is broken, but AMD GCN exit works just fine. 2018-09-05 Andrew Stubbs libgfortran/ * runtime/mi

[PATCH 15/25] Don't double-count early-clobber matches.

2018-09-05 Thread ams
Given a pattern with a number of operands: (match_operand 0 "" "=&v") (match_operand 1 "" " v0") (match_operand 2 "" " v0") (match_operand 3 "" " v0") GCC will currently increment "reject" once, for operand 0, and then decrement it once for each of the other operands, ending with reject == -2 an

[PATCH 19/25] GCN libgfortran.

2018-09-05 Thread ams
This patch contains the GCN port of libgfortran. We use the minimal configuration created for NVPTX. That's all that's required, besides the target-independent bug fixes posted already. 2018-09-05 Andrew Stubbs Kwok Cheung Yeung Julian Brown Tom de Vri

[PATCH 18/25] Fix interleaving of Fortran stop messages

2018-09-05 Thread ams
Fortran STOP and ERROR STOP use a different function to print the "STOP" string and the message string. On GCN this results in out-of-order output, such as "ERROR STOP ". This patch fixes the problem by making estr_write use the proper Fortran write, not C printf, so both parts are now output th

[PATCH 20/25] GCN libgcc.

2018-09-05 Thread ams
This patch contains the GCN port of libgcc. I've broken it out just to keep both parts more manageable. We have the usual stuff, plus a "gomp_print" implementation intended to provide a means to output text to console without using the full printf. Originally this was because we did not have a

[PATCH 22/25] Add dg-require-effective-target exceptions

2018-09-05 Thread ams
There are a number of tests that fail because they assume that exceptions are available, but GCN does not support them, yet. This patch adds "dg-require-effective-target exceptions" in all the affected tests. There's probably an automatic way to test for exceptions, but the current implementatio

[PATCH 23/25] Testsuite: GCN is always PIE.

2018-09-05 Thread ams
The GCN/HSA loader ignores the load address and uses a random location, so we build all GCN binaries as PIE, by default. This patch makes the necessary testsuite adjustments to make this work correctly. 2018-09-05 Andrew Stubbs gcc/testsuite/ * gcc.dg/graphite/scop-19.c: Chec

[PATCH 24/25] Ignore LLVM's blank lines.

2018-09-05 Thread ams
The GCN toolchain must use the LLVM assembler and linker because there's no binutils port. The LLVM tools do not have the same diagnostic style as binutils, so the "blank line(s) in output" tests are inappropriate (and very noisy). The LLVM tools also have different command line options, so it's

[PATCH 25/25] Port testsuite to GCN

2018-09-05 Thread ams
This collection of miscellaneous patches configures the testsuite to run on AMD GCN in a standalone (i.e. not offloading) configuration. It assumes you have your Dejagnu set up to run binaries via the gcn-run tool. 2018-09-05 Andrew Stubbs Kwok Cheung Yeung Julian Br

Re: [PATCH 01/25] Handle vectors that don't fit in an integer.

2018-09-05 Thread Jakub Jelinek
On Wed, Sep 05, 2018 at 12:48:49PM +0100, a...@codesourcery.com wrote: > +++ b/gcc/combine.c > @@ -8621,7 +8621,13 @@ gen_lowpart_or_truncate (machine_mode mode, rtx x) > { >/* Bit-cast X into an integer mode. */ >if (!SCALAR_INT_MODE_P (GET_MODE (x))) > - x = gen_lowpart

Re: [PATCH 10/25] Convert BImode vectors.

2018-09-05 Thread Jakub Jelinek
On Wed, Sep 05, 2018 at 12:50:25PM +0100, a...@codesourcery.com wrote: > 2018-09-05 Andrew Stubbs > > gcc/ > * simplify-rtx.c (convert_packed_vector): New function. > (simplify_immed_subreg): Recognised Boolean vectors and call > convert_packed_vector. > --- > + in

[PATCH v2] combine: perform jump threading at the end

2018-09-05 Thread Ilya Leoshkevich
gcc/ChangeLog: 2018-09-05 Ilya Leoshkevich PR target/80080 * combine.c (rest_of_handle_combine): Perform jump threading. gcc/testsuite/ChangeLog: 2018-09-05 Ilya Leoshkevich PR target/80080 * gcc.target/s390/pr80080-4.c: New test. --- gcc/combine.c

Re: [PATCH 10/25] Convert BImode vectors.

2018-09-05 Thread Richard Biener
On Wed, Sep 5, 2018 at 1:51 PM wrote: > > > GCN uses V64BImode to represent vector masks in the middle-end, and DImode > bit-masks to represent them in the back-end. These must be converted at > expand > time and the most convenient way is to simply use a SUBREG. x86 with AVX512 uses SImode in

Re: [ARM/FDPIC v2 04/21] [ARM] FDPIC: Add support for FDPIC for arm architecture

2018-09-05 Thread Christophe Lyon
On Tue, 4 Sep 2018 at 17:29, Richard Earnshaw (lists) wrote: > > On 29/08/18 11:46, Kyrill Tkachov wrote: > > Hi Christophe, > > > > On 13/07/18 17:10, christophe.l...@st.com wrote: > >> From: Christophe Lyon > >> > >> The FDPIC register is hard-coded to r9, as defined in the ABI. > >> > >> We ha

Re: [PATCH v2] combine: perform jump threading at the end

2018-09-05 Thread Richard Biener
On Wed, Sep 5, 2018 at 2:01 PM Ilya Leoshkevich wrote: > > gcc/ChangeLog: > > 2018-09-05 Ilya Leoshkevich > > PR target/80080 > * combine.c (rest_of_handle_combine): Perform jump threading. > > gcc/testsuite/ChangeLog: > > 2018-09-05 Ilya Leoshkevich > > PR target/800

Re: [PATCH] Frame pointer for arm with THUMB2 mode

2018-09-05 Thread Wilco Dijkstra
Hi Denis, > We are working on applying Address/LeakSanitizer for the full Tizen OS > distribution. It's about ~1000 packages, ASan/LSan runtime is installed > to ld.so.preload. As we know ASan/LSan has interceptors for > allocators/deallocators such as (malloc/realloc/calloc/free) and so on. > O

Re: [PATCH 04/25] SPECIAL_REGNO_P

2018-09-05 Thread Joseph Myers
On Wed, 5 Sep 2018, a...@codesourcery.com wrote: > This patch creates a new macro SPECIAL_REGNO_P which disables regrename. In > other words, the register is fixed once allocated. Creating new target macros is generally suspect - the presumption is that target hooks should be used instead, unle

Re: [PATCH 20/25] GCN libgcc.

2018-09-05 Thread Joseph Myers
On Wed, 5 Sep 2018, a...@codesourcery.com wrote: > diff --git a/libgcc/config/gcn/crt0.c b/libgcc/config/gcn/crt0.c > new file mode 100644 > index 000..f4f367b > --- /dev/null > +++ b/libgcc/config/gcn/crt0.c > @@ -0,0 +1,23 @@ > +/* Copyright (C) 2017 Free Software Foundation, Inc. Copyright

Re: [PATCH 10/25] Convert BImode vectors.

2018-09-05 Thread Andrew Stubbs
On 05/09/18 13:05, Richard Biener wrote: On Wed, Sep 5, 2018 at 1:51 PM wrote: GCN uses V64BImode to represent vector masks in the middle-end, and DImode bit-masks to represent them in the back-end. These must be converted at expand time and the most convenient way is to simply use a SUBREG.

Re: [PATCH] Improve x % c1 == c2 expansion (PR middle-end/82853)

2018-09-05 Thread Richard Biener
On Tue, 4 Sep 2018, Jakub Jelinek wrote: > Hi! > > Improve expansion of x % c1 == c2 and x % c1 != c2 checks. > > As mentioned in Hacker's Delight book, section 10-{16,17}, we can improve > generated code for modulo by constant, if we only use the result to equality > compare against some other

Re: [PATCH 10/25] Convert BImode vectors.

2018-09-05 Thread Richard Biener
On Wed, Sep 5, 2018 at 2:40 PM Andrew Stubbs wrote: > > On 05/09/18 13:05, Richard Biener wrote: > > On Wed, Sep 5, 2018 at 1:51 PM wrote: > >> > >> > >> GCN uses V64BImode to represent vector masks in the middle-end, and DImode > >> bit-masks to represent them in the back-end. These must be con

Re: VRP: abstract out wide int CONVERT_EXPR_P code

2018-09-05 Thread Michael Matz
Hi, On Tue, 4 Sep 2018, Aldy Hernandez wrote: > > to make the result ~[0, 5], is it? At least the original code dropped > > that to VARYING. For the same reason truncating [3, 765] from > > short to unsigned char isn't [3, 253]. But maybe I'm missing something. Sorry for chiming in, but this

Re: [PATCH] Improve x % c1 == c2 expansion (PR middle-end/82853)

2018-09-05 Thread Jakub Jelinek
On Wed, Sep 05, 2018 at 02:42:36PM +0200, Richard Biener wrote: > IIRC you said we're already doing x % power-of-two == 0 optimized but the > new > code isn't in that place? For unsigned %, there is no need for anything special, we just expand that as x % (power-of-two - 1) == 0, as any other % p

[PATCH][OBVIOUS] Close file on return from verify-intermediate

2018-09-05 Thread Joey Ye
regression will disappear completely one month after this patch committed to trunk. Tested with make check with no new regressions. OK to trunk? testsuite/ChangeLog: 2018-09-05  Joey Ye      * lib/gcov.exp (verify-intermediate): Add missing close. gcov-20180905.patch Description: gcov

Re: [PATCH 05/25] Add sorry_at diagnostic function.

2018-09-05 Thread David Malcolm
On Wed, 2018-09-05 at 12:49 +0100, a...@codesourcery.com wrote: > The plain "sorry" diagnostic only gives the "current" location, which > is > typically the last line of the function or translation unit by time > we get to > the back end. > > GCN uses "sorry" to report unsupported language feature

Re: [PATCH 05/25] Add sorry_at diagnostic function.

2018-09-05 Thread David Malcolm
On Wed, 2018-09-05 at 09:39 -0400, David Malcolm wrote: > On Wed, 2018-09-05 at 12:49 +0100, a...@codesourcery.com wrote: > > The plain "sorry" diagnostic only gives the "current" location, > > which > > is > > typically the last line of the function or translation unit by time > > we get to > > th

Re: [PATCH] Frame pointer for arm with THUMB2 mode

2018-09-05 Thread Denis Khalikov
Hi Wilco, thanks for the answer. > Adding support for a frame chain would require an ABI change. It would have to > work across GCC, LLVM, Arm, Thumb-1 and Thumb-2 - not a trivial amount of > effort. Clang already works that way. Please look at this commit: http://llvm.org/viewvc/llvm-project/

Re: [PATCH] Improve x % c1 == c2 expansion (PR middle-end/82853)

2018-09-05 Thread Jakub Jelinek
On Wed, Sep 05, 2018 at 03:14:40PM +0200, Jakub Jelinek wrote: > It isn't really a GIMPLE transform, just needs to provide the callers > with a tree. Specifically, if it passes several initial checks, it > expands the X expression unconditionally and then just uses the result of > that. What I co

Re: [PATCH] Frame pointer for arm with THUMB2 mode

2018-09-05 Thread Denis Khalikov
Hi Wilco, thanks for the answer. > Adding support for a frame chain would require an ABI change. It would have to > work across GCC, LLVM, Arm, Thumb-1 and Thumb-2 - not a trivial amount of > effort. Clang already works that way. Please look at this commit: http://llvm.org/viewvc/llvm-project/

Re: VRP: abstract out wide int CONVERT_EXPR_P code

2018-09-05 Thread Aldy Hernandez
On 09/05/2018 08:58 AM, Michael Matz wrote: Hi, On Tue, 4 Sep 2018, Aldy Hernandez wrote: to make the result ~[0, 5], is it? At least the original code dropped that to VARYING. For the same reason truncating [3, 765] from short to unsigned char isn't [3, 253]. But maybe I'm missing somet

Re: [PATCH] Frame pointer for arm with THUMB2 mode

2018-09-05 Thread Richard Earnshaw (lists)
On 05/09/18 14:55, Denis Khalikov wrote: > Hi Wilco, > thanks for the answer. > >> Adding support for a frame chain would require an ABI change. It would > have to >> work across GCC, LLVM, Arm, Thumb-1 and Thumb-2 - not a trivial amount of >> effort. > > Clang already works that way. > Please

[PATCH] C++: special-case single non-viable candidate (more PR c++/85110)

2018-09-05 Thread David Malcolm
On Thu, 2018-08-30 at 18:18 -0400, Jason Merrill wrote: > On Thu, Aug 23, 2018 at 2:08 PM, David Malcolm > wrote: > > This is a followup to: > > > > "[PATCH] C++: underline param in print_conversion_rejection (more > > PR c++/85110)" > > https://gcc.gnu.org/ml/gcc-patches/2018-08/msg01480.h

Re: [PATCH 21/25] GCN Back-end (part 2/2).

2018-09-05 Thread Joseph Myers
On Wed, 5 Sep 2018, Andrew Stubbs wrote: > + warning_at (decl ? DECL_SOURCE_LOCATION (decl) : UNKNOWN_LOCATION, > + OPT_Wopenacc_dims, > + (dims[GOMP_DIM_VECTOR] > +? "using vector_length (64), ignoring %d" > +: "usi

Re: [patch, fortan] PR87103 - [OOP] ICE in gfc_new_symbol() due to overlong symbol name

2018-09-05 Thread Andrew Benson
On Wednesday, September 5, 2018 12:35:04 PM PDT Bernhard Reutner-Fischer wrote: > On Wed, 5 Sep 2018 at 03:30, Jerry DeLisle wrote: > > On 09/04/2018 10:43 AM, Bernhard Reutner-Fischer wrote: > > > On Tue, 4 Sep 2018 at 18:43, Andrew Benson wrote: > > >> As suggested by Janus, PR87103 is easily

Re: [patch,nvptx] Basic -misa support for nvptx

2018-09-05 Thread Tom de Vries
On 09/05/2018 12:19 AM, Cesar Philippidis wrote: > On 09/02/2018 07:57 AM, Cesar Philippidis wrote: >> On 09/01/2018 12:04 PM, Tom de Vries wrote: >>> On 08/31/2018 04:14 PM, Cesar Philippidis wrote: >> Is this patch OK for trunk? >>> >>> Well, how did you test this ( >>> https://gcc.gnu.

[PATCH] PR libstdc++/87228 Use heap for large buffers instead of alloca

2018-09-05 Thread Jonathan Wakely
Using a huge width in a formatted output operation results in stack overflow due to no restriction on the size passed to alloca. This patch causes the formatting functions to use the heap instead of the stack when a large buffer is needed. PR libstdc++/87228 * include/bits/locale_

Re: [PATCH 21/25] GCN Back-end (part 2/2).

2018-09-05 Thread Andrew Stubbs
On 05/09/18 15:22, Joseph Myers wrote: +gcn-run$(exeext): gcn-run.o + +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ $< -ldl I'd expect this to fail on non-Unix configurations that don't have -ldl, and thus to need appropriate conditionals / configure tests to avoid that build failure. W

Re: [PATCH 21/25] GCN Back-end (part 2/2).

2018-09-05 Thread Joseph Myers
On Wed, 5 Sep 2018, Andrew Stubbs wrote: > I suppose someone might choose to compile things on an alternative system for > running on a compatible system, in which case we'd want to simply skip this > binary. > > How does one normally do this? I'd expect a configure test plus makefile conditiona

Re: [PATCH] PR libstdc++/87228 Use heap for large buffers instead of alloca

2018-09-05 Thread Jonathan Wakely
On 05/09/18 15:32 +0100, Jonathan Wakely wrote: Using a huge width in a formatted output operation results in stack overflow due to no restriction on the size passed to alloca. This patch causes the formatting functions to use the heap instead of the stack when a large buffer is needed.

Re: VRP: abstract out wide int CONVERT_EXPR_P code

2018-09-05 Thread Michael Matz
Hi, On Wed, 5 Sep 2018, Aldy Hernandez wrote: > No apologies needed. I welcome all masochists to join me in my personal hell > :). ;-) > > How can this test and following code catch all problematic cases? Assume > > a range of [253..257], truncating to 8 bits unsigned. The size of the > > ra

[PATCH,FORTRAN 01/29] gdbinit: break on gfc_internal_error

2018-09-05 Thread Bernhard Reutner-Fischer
From: Bernhard Reutner-Fischer Aids debugging the fortran FE. gcc/ChangeLog: 2017-11-12 Bernhard Reutner-Fischer * gdbinit.in: Break on gfc_internal_error. --- gcc/gdbinit.in | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/gdbinit.in b/gcc/gdbinit.in index 4db977f0bab..ac4d

[PATCH,FORTRAN 00/29] Move towards stringpool, part 1

2018-09-05 Thread Bernhard Reutner-Fischer
Hi, The fortran frontend still uses stack-based handling of (symbol) names with fixed-sized buffers. Furthermore these buffers often are too small when dealing with F2003 identifiers which can be up to, including 63 bytes long. Other frontends use the stringpool since many years. This janitorial

[PATCH,FORTRAN 02/29] Use stringpool for gfc_match_defined_op_name()

2018-09-05 Thread Bernhard Reutner-Fischer
From: Bernhard Reutner-Fischer The openmp part will be cleaned up later in this series. gcc/fortran/ChangeLog: 2017-10-22 Bernhard Reutner-Fischer * match.h (gfc_match_defined_op_name): Adjust prototype and add a parameter USER_OPERATOR. * matchexp.c (gfc_match_defin

[PATCH,FORTRAN 08/29] Add uop/name helpers

2018-09-05 Thread Bernhard Reutner-Fischer
From: Bernhard Reutner-Fischer Introduce a helper to construct a user operator from a name and the reverse operation, i.e. a helper to construct a name from a user operator. gcc/fortran/ChangeLog: 2017-10-29 Bernhard Reutner-Fischer * gfortran.h (gfc_get_uop_from_name): (gfc

[PATCH,FORTRAN 07/29] Use stringpool for some gfc_code2string return values

2018-09-05 Thread Bernhard Reutner-Fischer
From: Bernhard Reutner-Fischer Use a stringpool-node for those gfc_code2string values that are used as names. gcc/fortran/ChangeLog: 2017-10-26 Bernhard Reutner-Fischer * interface.c (gfc_match_generic_spec, gfc_check_dtio_interfaces, gfc_find_typebound_dtio_proc, gfc_find_s

[PATCH,FORTRAN 06/29] Use stringpool for association_list

2018-09-05 Thread Bernhard Reutner-Fischer
From: Bernhard Reutner-Fischer 2017-10-26 Bernhard Reutner-Fischer * gfortran.h (struct gfc_association_list): Change name to pointer. * match.c (gfc_match_associate): Adjust. --- gcc/fortran/gfortran.h | 2 +- gcc/fortran/match.c| 6 ++ 2 files changed, 3 ins

[PATCH,FORTRAN 04/29] Use stringpool for gfc_match_generic_spec

2018-09-05 Thread Bernhard Reutner-Fischer
From: Bernhard Reutner-Fischer Ideally we would populate mstrings structs with strings obtained through the stringpool. Doing so by means of minit wouldn't work out too well though, see comment in gfortran.h. We could replace the initialized strings in gfc_init_1 but that's for a later patch. gc

[PATCH,FORTRAN 09/29] Use stringpool for modules

2018-09-05 Thread Bernhard Reutner-Fischer
From: Bernhard Reutner-Fischer gcc/fortran/ChangeLog: 2017-10-29 Bernhard Reutner-Fischer * gfortran.h (struct gfc_use_rename): Use pointers for local_name and use_name. * match.c (gfc_match): Set name to NULL on failed match. * module.c (gfc_match_use): Use p

[PATCH,FORTRAN 13/29] Use stringpool for intrinsics and common

2018-09-05 Thread Bernhard Reutner-Fischer
From: Bernhard Reutner-Fischer gcc/fortran/ChangeLog: 2017-11-15 Bernhard Reutner-Fischer * gfortran.h (struct gfc_common_head, struct gfc_intrinsic_arg): Make name a pointer. * intrinsic.c (add_sym): Use stringpool for name. * match.c (gfc_get_common): Likewi

[PATCH,FORTRAN 03/29] Use stringpool for gfc_get_name

2018-09-05 Thread Bernhard Reutner-Fischer
From: Bernhard Reutner-Fischer Occurrences of name2 in this patch will be fixed later in this series. gcc/fortran/ChangeLog: 2017-10-23 Bernhard Reutner-Fischer * match.h (gfc_match_name): Pass argument by reference. Adjust all callers. (match_common_name): Likewise.

  1   2   >