Re: [PATCH] Make strlen range computations more conservative

2018-07-24 Thread Jeff Law
On 07/24/2018 05:18 PM, Bernd Edlinger wrote: > On 07/24/18 23:46, Jeff Law wrote: >> I'd like to ask we hold on this until I return from PTO (Aug 1) so that >> we can discuss the best thing to do here for each class of change. >> > > Okay. > >> I think you, Martin, Richi and myself should hash

Re: [2/5] C-SKY port: Backend implementation

2018-07-24 Thread Jeff Law
On 07/24/2018 06:17 PM, Sandra Loosemore wrote: > On 07/24/2018 03:24 PM, Jeff Law wrote: >>> Any thoughts on using the newer function descriptor bits rather than old style stack trampolines? >>> >>> Has that been committed?  I vaguely remembered discussion of a new way >>> to

[PATCH] treat -Wxxx-larger-than=HWI_MAX special (PR 86631)

2018-07-24 Thread Martin Sebor
The very large option argument enhancement committed last week inadvertently introduced an assumption about the LP64 data model that makes the -Wxxx-larger-than options have a different effect at their default documented setting of PTRDIFF_MAX between ILP32 and LP64. As a result, the options are

Re: [2/5] C-SKY port: Backend implementation

2018-07-24 Thread Sandra Loosemore
On 07/24/2018 03:24 PM, Jeff Law wrote: Any thoughts on using the newer function descriptor bits rather than old style stack trampolines? Has that been committed?  I vaguely remembered discussion of a new way to handle nested functions without using the trampoline interface, but I couldn't

Re: [PATCH] Make strlen range computations more conservative

2018-07-24 Thread Bernd Edlinger
On 07/24/18 23:46, Jeff Law wrote: > On 07/24/2018 01:59 AM, Bernd Edlinger wrote: >> Hi! >> >> This patch makes strlen range computations more conservative. >> >> Firstly if there is a visible type cast from type A to B before passing >> then value to strlen, don't expect the type layout of B to

Re: [PATCH] fix a couple of bugs in const string folding (PR 86532)

2018-07-24 Thread Jeff Law
On 07/24/2018 02:16 PM, Martin Sebor wrote: > On 07/20/2018 04:20 AM, Richard Biener wrote: >> On Thu, 19 Jul 2018, Martin Sebor wrote: >> >>> Here's one more update with tweaks addressing a couple more >>> of Bernd's comments: >>> >>> 1) correct the use of TREE_STRING_LENGTH() where a number of

Re: [Patch] [Aarch64] PR 86538 - Define __ARM_FEATURE_LSE if LSE is available

2018-07-24 Thread Steve Ellcey
On Tue, 2018-07-24 at 22:04 +0100, James Greenhalgh wrote: >  > > I'd say this patch isn't desirable for trunk. I'd be interested in use cases > that need a static decision on presence of LSE that are not better expressed > using higher level language features. > > Thanks, > James How about

Re: [PATCH] Explain asan parameters in params.def (PR sanitizer/79635).

2018-07-24 Thread Jeff Law
On 07/24/2018 06:18 AM, Martin Liška wrote: > Hi. > > That's simple patch that improves documentation as requested > in the PR. > > Ready for trunk? > Martin > > gcc/ChangeLog: > > 2018-07-24 Martin Liska > > PR sanitizer/79635 > * params.def: Explain ASan abbreviation and

Re: [PATCH] Make strlen range computations more conservative

2018-07-24 Thread Jeff Law
On 07/24/2018 01:59 AM, Bernd Edlinger wrote: > Hi! > > This patch makes strlen range computations more conservative. > > Firstly if there is a visible type cast from type A to B before passing > then value to strlen, don't expect the type layout of B to restrict the > possible return value

Re: [PATCH 6/7] AArch64 - new pass to add conditional-branch speculation tracking

2018-07-24 Thread Jeff Law
On 07/23/2018 08:33 AM, Richard Earnshaw (lists) wrote: > [sorry, missed this mail somehow] > > On 11/07/18 22:01, Jeff Law wrote: >> On 07/09/2018 10:38 AM, Richard Earnshaw wrote: >>> This patch is the main part of the speculation tracking code. It adds >>> a new target-specific pass that is

Re: [2/5] C-SKY port: Backend implementation

2018-07-24 Thread Jeff Law
On 07/24/2018 12:18 PM, Sandra Loosemore wrote: > On 07/24/2018 09:45 AM, Jeff Law wrote: >> On 07/23/2018 10:21 PM, Sandra Loosemore wrote: >>> 2018-07-23  Jojo  >>> Huibin Wang  >>> Sandra Loosemore  >>> Chung-Lin Tang  >>> >>> C-SKY port:

Re: [PATCH] combine: Allow combining two insns to two insns

2018-07-24 Thread Jeff Law
On 07/24/2018 11:18 AM, Segher Boessenkool wrote: > This patch allows combine to combine two insns into two. This helps > in many cases, by reducing instruction path length, and also allowing > further combinations to happen. PR85160 is a typical example of code > that it can improve. > > This

[PATCH] Add initial version of C++17 header

2018-07-24 Thread Jonathan Wakely
This is missing the synchronized_pool_resource and unsynchronized_pool_resource classes but is otherwise complete. This is a new implementation, not based on the existing code in , but memory_resource and polymorphic_allocator ended up looking almost the same anyway. The constant_init kluge in

Re: Fix ceil_log2(0) (PR 86644)

2018-07-24 Thread Jeff Law
On 07/24/2018 12:11 PM, Richard Sandiford wrote: > This PR shows a pathological case in which we try SLP vectorisation on > dead code. We record that 0 bits of the result are enough to satisfy > all users (which is true), and that led to precision being 0 in: > > static unsigned int >

Re: [RFC 1/3, debug] Add fdebug-nops

2018-07-24 Thread Tom de Vries
On 07/24/2018 09:06 PM, Alexandre Oliva wrote: > On Jul 24, 2018, Tom de Vries wrote: > >> There's a design principle in GCC that code generation and debug generation >> are independent. This guarantees that if you're encountering a problem in an >> application without debug info, you can

Re: [Patch] [Aarch64] PR 86538 - Define __ARM_FEATURE_LSE if LSE is available

2018-07-24 Thread James Greenhalgh
On Tue, Jul 24, 2018 at 03:22:02PM -0500, Steve Ellcey wrote: > This is a patch for PR 86538, to define an __ARM_FEATURE_LSE macro > when LSE is available.  Richard Earnshaw closed PR 86538 as WONTFIX > because the ACLE (Arm C Language Extension) does not require this > macro and because he is

[PATCH] PR libstdc++/86658 fix __niter_wrap to not copy invalid iterators

2018-07-24 Thread Jonathan Wakely
An output iterator passed as the unused first argument to __niter_wrap might have already been invalidated, so don't copy it. PR libstdc++/86658 * include/bits/stl_algobase.h (__niter_wrap<_Iterator>): Pass unused parameter by reference, to avoid copying invalid

[PATCH 11/11] [nvptx] Generalize state propagation and synchronization

2018-07-24 Thread cesar
From: Tom de Vries As the title mentions, this patch generalizes the state propagation and synchronization code. Note that while the patch makes reference to large_vectors, they are not enabled in nvptx_goacc_validate_dims. Therefore, only the worker case is exercised in this patch. 2018-XX-YY

[PATCH 09/11] [nvptx] Use TARGET_SET_CURRENT_FUNCTION

2018-07-24 Thread cesar
From: Cesar Philippidis Chung-Lin had originally defined TARGET_SET_CURRENT_FUNCTION as part of his gang-local variable patch. But I intend to introduce those changes at a later time. Eventually the state propagation code will utilize nvptx_set_current_function to reset the reduction buffer

[PATCH 10/11] [nvptx] Use MAX, MIN, ROUND_UP macros

2018-07-24 Thread cesar
From: Tom de Vries This patch replaces the confusing, in-lined min, max and rounding code sprinkled throughout the nvptx BE with calls to MIN, MAX, and ROUND_UP macros. 2018-XX-YY Tom de Vries Cesar Philippidis gcc/ * config/nvptx/nvptx.c

[PATCH 08/11] [nvptx] Add axis_dim

2018-07-24 Thread cesar
From: Tom de Vries This patch introduces an axis_dim member to the machine_function struct. The launch geometry will be queried frequently enough so that its justified to store that information with each cfun. 2018-XX-YY Tom de Vries Cesar Philippidis gcc/ *

[PATCH 06/11] [nvptx] only use one bar.sync barriers in OpenACC offloaded code

2018-07-24 Thread cesar
From: Cesar Philippidis This patch teaches nvptx_single to always use barrier '0' for CTA synchronization. This started off as a cosmetic change, but later on each large vector (i.e. one that larger than a PTX warp) will need to use its own unique thread barrier to avoid thread divergence.

[PATCH 07/11] [nvptx] Add thread count parm to bar.sync

2018-07-24 Thread cesar
From: Tom de Vries This patch extends the nvptx_barsync pattern to accept an integeral parameter to specify how many threads utilize the requested barrier. This is necessary variable length vectors, as each large vector will require own thread barrier. 2018-XX-YY Tom de Vries

[PATCH 05/11] [nvptx] Fix whitespace in nvptx_single and nvptx_neuter_pars

2018-07-24 Thread cesar
From: Tom de Vries This patch only adjusts white space. 2018-XX-YY Cesar Philippidis gcc/ * config/nvptx/nvptx.c (nvptx_single): Fix whitespace. (nvptx_neuter_pars): Likewise. (cherry picked from openacc-gcc-7-branch commit 10f697dfcdaa77b842de6e9a62c68b33a49d3c16)

[PATCH 03/11] [nvptx] Consolidate offloaded function attributes into struct offload_attrs

2018-07-24 Thread cesar
From: Cesar Philippidis This patch introduces a new struct offload_attrs, which contains the details regarding the offload function launch geometry. In addition to its current usage to neuter worker and vector threads, it will eventually by used to validate the compile-time launch geometry

[PATCH 04/11] [nvptx] Make nvptx state propagation function names more generic

2018-07-24 Thread cesar
From: Cesar Philippidis This patch renames various state propagation functions into somewhat that reflects their usage in generic worker and vector contexts. E.g., whereas before nvptx_wpropagate used to be used exclusively for worker state propagation, it will eventually be used for any state

[PATCH 02/11] [nvptx] Rename worker_bcast variables oacc_bcast.

2018-07-24 Thread cesar
From: Cesar Philippidis Eventually, we want the nvptx BE to use a common shared memory buffer for both worker and vector state propagation (albeit using different partitions of shared memory for each logical thread). This patch renames the worker_bcast variables into a more generic oacc_bcast.

[PATCH 00/11] [nvptx] Initial vector length changes

2018-07-24 Thread cesar
From: Cesar Philippidis This patch series contains various cleanups and structural reorganizations to the NVPTX BE in preparation for the forthcoming variable length vector length enhancements. Tom, in order to make these changes easier for you to review, I broke these patches into logical

[PATCH 01/11] [nvptx] Update openacc dim macros

2018-07-24 Thread cesar
From: Cesar Philippidis Besides for updating the macros for the NVPTX OpenACC dims, this patch also renames PTX_GANG_DEFAULT to PTX_DEFAULT_RUNTIME_DIM. I had originally included the PTX_GANG_DEFAULT hunk in an earlier libgomp patch, but going forward it makes sense to isolate the nvptx and

[Patch] [Aarch64] PR 86538 - Define __ARM_FEATURE_LSE if LSE is available

2018-07-24 Thread Steve Ellcey
This is a patch for PR 86538, to define an __ARM_FEATURE_LSE macro when LSE is available.  Richard Earnshaw closed PR 86538 as WONTFIX because the ACLE (Arm C Language Extension) does not require this macro and because he is concerned that it might encourage people to use inline assembly instead

Re: committed: remove redundant -Wall from -Warray-bounds (PR 82063)

2018-07-24 Thread Martin Sebor
On 07/24/2018 01:48 PM, Franz Sirl wrote: Am 2018-07-24 um 17:35 schrieb Martin Sebor: On 07/24/2018 03:24 AM, Franz Sirl wrote: Am 2018-07-20 um 23:22 schrieb Martin Sebor: As the last observation in PR 82063 Jim points out that Both -Warray-bounds and -Warray-bounds= are listed in the

Re: [PATCH] fix a couple of bugs in const string folding (PR 86532)

2018-07-24 Thread Martin Sebor
On 07/20/2018 04:20 AM, Richard Biener wrote: On Thu, 19 Jul 2018, Martin Sebor wrote: Here's one more update with tweaks addressing a couple more of Bernd's comments: 1) correct the use of TREE_STRING_LENGTH() where a number of array elements is expected and not bytes 2) set CHARTYPE as soon

Re: committed: remove redundant -Wall from -Warray-bounds (PR 82063)

2018-07-24 Thread Franz Sirl
Am 2018-07-24 um 17:35 schrieb Martin Sebor: On 07/24/2018 03:24 AM, Franz Sirl wrote: Am 2018-07-20 um 23:22 schrieb Martin Sebor: As the last observation in PR 82063 Jim points out that    Both -Warray-bounds and -Warray-bounds= are listed in the c.opt    file as being enabled by -Wall, but

Re: [5/5] C-SKY port: libgcc

2018-07-24 Thread Segher Boessenkool
On Tue, Jul 24, 2018 at 12:19:30PM -0600, Sandra Loosemore wrote: > On 07/24/2018 12:10 PM, Segher Boessenkool wrote: > >On Mon, Jul 23, 2018 at 10:26:35PM -0600, Sandra Loosemore wrote: > >>diff --git a/libgcc/config.host b/libgcc/config.host > >>index 18cabaf..b2ee0c9 100644 > >>---

Re: [PATCH] include more detail in -Warray-bounds (PR 86650)

2018-07-24 Thread Martin Sebor
On 07/24/2018 11:05 AM, David Malcolm wrote: On Mon, 2018-07-23 at 20:56 -0600, Martin Sebor wrote: On 07/23/2018 07:20 PM, David Malcolm wrote: On Mon, 2018-07-23 at 17:49 -0600, Martin Sebor wrote: (David, I'm hoping your your help here. Please see the end.) While looking into a recent

Re: [PATCH][GCC][front-end][build-machinery][opt-framework] Allow setting of stack-clash via configure options. [Patch (4/6)]

2018-07-24 Thread Alexandre Oliva
Hello, Christina, On Jul 24, 2018, Tamar Christina wrote: > gcc/ > 2018-07-24 Tamar Christina > PR target/86486 > * configure.ac: Add stack-clash-protection-guard-size. > * doc/install.texi: Document it. > * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New. > *

Re: [RFC 2/3, debug] Add fkeep-vars-live

2018-07-24 Thread Alexandre Oliva
On Jul 24, 2018, Tom de Vries wrote: > This patch adds fake uses of user variables at the point where they go out of > scope, to keep user variables inspectable throughout the application. I suggest also adding such uses before sets, so that variables aren't regarded as dead and get optimized

Re: [RFC 1/3, debug] Add fdebug-nops

2018-07-24 Thread Alexandre Oliva
On Jul 24, 2018, Tom de Vries wrote: > There's a design principle in GCC that code generation and debug generation > are independent. This guarantees that if you're encountering a problem in an > application without debug info, you can recompile it with -g and be certain > that you can

Re: [PATCH] Introduce instance discriminators

2018-07-24 Thread Alexandre Oliva
On Jul 19, 2018, Richard Biener wrote: > Oh, that probably wasn't omitted on purpose. Cary said it was used > for profiling but I can't see any such use. > Is the instance discriminator stuff also used for profiling? Not that I know, but... I probably wouldn't know yet ;-) Anyway, it was

Re: [5/5] C-SKY port: libgcc

2018-07-24 Thread Sandra Loosemore
On 07/24/2018 12:10 PM, Segher Boessenkool wrote: On Mon, Jul 23, 2018 at 10:26:35PM -0600, Sandra Loosemore wrote: diff --git a/libgcc/config.host b/libgcc/config.host index 18cabaf..b2ee0c9 100644 --- a/libgcc/config.host +++ b/libgcc/config.host @@ -94,6 +94,9 @@ am33_2.0-*-linux*)

Re: [2/5] C-SKY port: Backend implementation

2018-07-24 Thread Sandra Loosemore
On 07/24/2018 09:45 AM, Jeff Law wrote: On 07/23/2018 10:21 PM, Sandra Loosemore wrote: 2018-07-23  Jojo      Huibin Wang      Sandra Loosemore      Chung-Lin Tang      C-SKY port: Backend implementation     gcc/     * config/csky/*: New.    

Fix ceil_log2(0) (PR 86644)

2018-07-24 Thread Richard Sandiford
This PR shows a pathological case in which we try SLP vectorisation on dead code. We record that 0 bits of the result are enough to satisfy all users (which is true), and that led to precision being 0 in: static unsigned int vect_element_precision (unsigned int precision) { precision = 1 <<

Re: [5/5] C-SKY port: libgcc

2018-07-24 Thread Segher Boessenkool
On Mon, Jul 23, 2018 at 10:26:35PM -0600, Sandra Loosemore wrote: > diff --git a/libgcc/config.host b/libgcc/config.host > index 18cabaf..b2ee0c9 100644 > --- a/libgcc/config.host > +++ b/libgcc/config.host > @@ -94,6 +94,9 @@ am33_2.0-*-linux*) > arc*-*-*) > cpu_type=arc > ;; >

Avoid _VINFO_MASKS for bb vectorisation (PR 86618)

2018-07-24 Thread Richard Sandiford
r262589 introduced another instance of the bug fixed in r258131. Tested on aarch64-linux-gnu and applied as obvious. Richard 2018-07-24 Richard Sandiford gcc/ PR tree-optimization/86618 * tree-vect-stmts.c (vectorizable_call): Don't take the address of

Re: [PATCH 1/7] Add __builtin_speculation_safe_value

2018-07-24 Thread Richard Biener
On Mon, Jul 9, 2018 at 6:40 PM Richard Earnshaw wrote: > > > This patch defines a new intrinsic function > __builtin_speculation_safe_value. A generic default implementation is > defined which will attempt to use the backend pattern > "speculation_safe_barrier". If this pattern is not defined,

[PATCH] combine: Allow combining two insns to two insns

2018-07-24 Thread Segher Boessenkool
This patch allows combine to combine two insns into two. This helps in many cases, by reducing instruction path length, and also allowing further combinations to happen. PR85160 is a typical example of code that it can improve. This patch does not allow such combinations if either of the

Re: [PATCH][debug] Handle references to skipped params in remap_ssa_name

2018-07-24 Thread Richard Biener
On Tue, Jul 24, 2018 at 4:41 PM Jakub Jelinek wrote: > > On Tue, Jul 24, 2018 at 04:33:30PM +0200, Richard Biener wrote: > > DW_OP_GNU_variable_value you mean. That's true. But I was talking about > > Sure. > > > omitting DW_AT_upper_bound which would correspond to int[] vs. > > a empty

Re: [PATCH] include more detail in -Warray-bounds (PR 86650)

2018-07-24 Thread David Malcolm
On Mon, 2018-07-23 at 20:56 -0600, Martin Sebor wrote: > On 07/23/2018 07:20 PM, David Malcolm wrote: > > On Mon, 2018-07-23 at 17:49 -0600, Martin Sebor wrote: > > > (David, I'm hoping your your help here. Please see the end.) > > > > > > While looking into a recent -Warray-bounds instance in

Re: [PATCH][GCC][mid-end] Allow larger copies when not slow_unaligned_access and no padding.

2018-07-24 Thread Tamar Christina
Hi Richard, Thanks for the review! The 07/23/2018 18:46, Richard Biener wrote: > On July 23, 2018 7:01:23 PM GMT+02:00, Tamar Christina > wrote: > >Hi All, > > > >This allows copy_blkmode_to_reg to perform larger copies when it is > >safe to do so by calculating > >the bitsize per iteration

Re: GCC 8.2 Status Report (2018-07-19), branch frozen for release

2018-07-24 Thread Richard Biener
On July 24, 2018 5:50:33 PM GMT+02:00, Ramana Radhakrishnan wrote: >On Thu, Jul 19, 2018 at 10:11 AM, Richard Biener >wrote: >> >> Status >> == >> >> The GCC 8 branch is frozen for preparation of the GCC 8.2 release. >> All changes to the branch now require release manager approval. >> >>

Re: [GCC][PATCH][Aarch64] Exploiting BFXIL when OR-ing two AND-operations with appropriate bitmasks

2018-07-24 Thread Sam Tebbs
On 07/23/2018 02:14 PM, Sam Tebbs wrote: On 07/23/2018 12:38 PM, Renlin Li wrote: +(define_insn "*aarch64_bfxil" +  [(set (match_operand:GPI 0 "register_operand" "=r,r") +    (ior:GPI (and:GPI (match_operand:GPI 1 "register_operand" "r,0") +    (match_operand:GPI 3

Re: [Patch, Fortran] PR 57160: short-circuit IF only with -ffrontend-optimize

2018-07-24 Thread Janus Weil
2018-07-24 17:41 GMT+02:00 Janne Blomqvist : > Optimization bugs that pop up at different optimization levels are hard > enough for users to figure out Right, and they're impossible to detect if there is no way to disable the optimization, which is what this PR is about. > without the frontend

Re: [PATCH] Make strlen range computations more conservative

2018-07-24 Thread Martin Sebor
On 07/24/2018 01:59 AM, Bernd Edlinger wrote: Hi! This patch makes strlen range computations more conservative. Firstly if there is a visible type cast from type A to B before passing then value to strlen, don't expect the type layout of B to restrict the possible return value range of strlen.

Re: GCC 8.2 Status Report (2018-07-19), branch frozen for release

2018-07-24 Thread Ramana Radhakrishnan
On Thu, Jul 19, 2018 at 10:11 AM, Richard Biener wrote: > > Status > == > > The GCC 8 branch is frozen for preparation of the GCC 8.2 release. > All changes to the branch now require release manager approval. > > > Previous Report > === > >

Re: [2/5] C-SKY port: Backend implementation

2018-07-24 Thread Jeff Law
On 07/23/2018 10:21 PM, Sandra Loosemore wrote: > 2018-07-23  Jojo  >     Huibin Wang  >     Sandra Loosemore  >     Chung-Lin Tang  > >     C-SKY port: Backend implementation > >     gcc/ >     * config/csky/*: New. >     * common/config/csky/*: New.

Re: [Patch, Fortran] PR 57160: short-circuit IF only with -ffrontend-optimize

2018-07-24 Thread Janne Blomqvist
On Tue, Jul 24, 2018 at 4:46 PM, Janus Weil wrote: > 2018-07-24 11:12 GMT+02:00 Dominique d'Humières : > > If you want non short-circuit evaluation, introduce an option for it. > > Your argument could easily be reversed: If you want short-circuiting, > go introduce an option for it. > > I'm sure

Re: [PATCH][GCC][AARCH64] Canonicalize aarch64 widening simd plus insns

2018-07-24 Thread Kyrill Tkachov
On 24/07/18 16:12, James Greenhalgh wrote: On Thu, Jul 19, 2018 at 07:35:22AM -0500, Matthew Malcomson wrote: > Hi again. > > Providing an updated patch to include the formatting suggestions. Please try not to top-post replies, it makes the conversation thread harder to follow (reply

Re: committed: remove redundant -Wall from -Warray-bounds (PR 82063)

2018-07-24 Thread Martin Sebor
On 07/24/2018 03:24 AM, Franz Sirl wrote: Am 2018-07-20 um 23:22 schrieb Martin Sebor: As the last observation in PR 82063 Jim points out that Both -Warray-bounds and -Warray-bounds= are listed in the c.opt file as being enabled by -Wall, but they are the same option, and it causes

Re: [0/5] C-SKY port

2018-07-24 Thread Sandra Loosemore
On 07/23/2018 10:17 PM, Sandra Loosemore wrote: C-SKY proposes Han Mao and Yunhai Shang as maintainers for this port. I apologize, I made a mistake here. The correct proposed maintainers are Xianmiao Qu and Yunhai Shang . We expect that C-SKY will also be providing a public link to

Re: [PATCH][GCC][AARCH64] Canonicalize aarch64 widening simd plus insns

2018-07-24 Thread James Greenhalgh
On Thu, Jul 19, 2018 at 07:35:22AM -0500, Matthew Malcomson wrote: > Hi again. > > Providing an updated patch to include the formatting suggestions. Please try not to top-post replies, it makes the conversation thread harder to follow (reply continues below!). > On 12/07/18 11:39, Sudakshina

Re: [5/5] C-SKY port: libgcc

2018-07-24 Thread Jeff Law
On 07/23/2018 10:26 PM, Sandra Loosemore wrote: > 2018-07-23  Jojo  >     Huibin Wang  >     Sandra Loosemore  >     Chung-Lin Tang  > >     C-SKY port: libgcc > >     libgcc/ >     * config.host: Add C-SKY support. >     * config/csky/*: New.

Re: [4/5] C-SKY port: Testsuite

2018-07-24 Thread Jeff Law
On 07/23/2018 10:25 PM, Sandra Loosemore wrote: > 2018-07-23  Sandra Loosemore  >     Chung-Lin Tang  > >     C-SKY port: Testsuite > >     gcc/testsuite/ >     * g++.dg/Wno-frame-address.C: Adjust for C-SKY. >     * g++.dg/torture/type-generic-1.C: Likewise. >    

Re: [3/5] C-SKY port: Documentation

2018-07-24 Thread Jeff Law
On 07/23/2018 10:23 PM, Sandra Loosemore wrote: > 2018-07-23  Sandra Loosemore  > >     C-SKY port: Documentation > >     gcc/ >     * doc/extend.texi (C-SKY Function Attributes): New section. >     * doc/invoke.texi (Option Summary): Add C-SKY options. >     (C-SKY

Re: [1/5] C-SKY port: Configury

2018-07-24 Thread Jeff Law
On 07/23/2018 10:19 PM, Sandra Loosemore wrote: > 2018-07-23  Jojo  >     Huibin Wang  >     Sandra Loosemore  >     Chung-Lin Tang  >     Andrew Jenner  > >     C-SKY port: Configury > >     gcc/ >     * config.gcc (csky-*-*): New. >     *

[PATCH] Fix PR86654

2018-07-24 Thread Richard Biener
I am testing the following patch to avoid forcing DIEs for a type context for method clones late via limbo processing. Instead hang them off comp_unit_die if there is no early DIE for the function. One question is whether the comment "If we're a nested function" matches up with the

[PATCH, debug] Add fkeep-vars-live

2018-07-24 Thread Tom de Vries
On Tue, Jul 24, 2018 at 02:34:26PM +0200, Tom de Vries wrote: > On 07/24/2018 01:46 PM, Jakub Jelinek wrote: > > On Tue, Jul 24, 2018 at 01:37:32PM +0200, Tom de Vries wrote: > >> Another drawback is that the fake uses confuse the unitialized warning > >> analysis, so that is switched off for

[PATCH, debug] Add fdebug-nops

2018-07-24 Thread Tom de Vries
On Tue, Jul 24, 2018 at 01:35:14PM +0200, Tom de Vries wrote: > On Tue, Jul 24, 2018 at 01:30:30PM +0200, Tom de Vries wrote: > > On 07/16/2018 05:10 PM, Tom de Vries wrote: > > > On 07/16/2018 03:50 PM, Richard Biener wrote: > > >> On Mon, 16 Jul 2018, Tom de Vries wrote: > > >>> Any comments? >

Re: [PATCH] Make strlen range computations more conservative

2018-07-24 Thread Richard Biener
On Tue, 24 Jul 2018, Bernd Edlinger wrote: > Hi! > > This patch makes strlen range computations more conservative. > > Firstly if there is a visible type cast from type A to B before passing > then value to strlen, don't expect the type layout of B to restrict the > possible return value range

Re: [PATCH][debug] Handle references to skipped params in remap_ssa_name

2018-07-24 Thread Jakub Jelinek
On Tue, Jul 24, 2018 at 04:33:30PM +0200, Richard Biener wrote: > DW_OP_GNU_variable_value you mean. That's true. But I was talking about Sure. > omitting DW_AT_upper_bound which would correspond to int[] vs. > a empty location list DW_AT_upper_bound which would correspond to > int[]. I think

Re: [PATCH][debug] Handle references to skipped params in remap_ssa_name

2018-07-24 Thread Richard Biener
On Tue, Jul 24, 2018 at 12:39 PM Jakub Jelinek wrote: > > On Tue, Jul 24, 2018 at 12:29:37PM +0200, Tom de Vries wrote: > > > I wonder if it makes sense to disambiguate things from the gcc side > > > by generating an empty location description for known optimized out > > > values (the standard

Re: [PATCH] Fix expand_divmod (PR middle-end/86627)

2018-07-24 Thread Richard Biener
On Tue, 24 Jul 2018, Jakub Jelinek wrote: > Hi! > > As the following testcase shows, expand_divmod stopped emitting int128 > signed divisions by positive small (fitting into hwi) power of two constants > in my r242690 aka PR78416 fix, where I've added next to > EXACT_POWER_OF_2_OR_ZERO_P uses a

Re: [PATCH] Limix dump_flag enum values range (PR middle-end/86645).

2018-07-24 Thread Richard Biener
On Tue, Jul 24, 2018 at 9:27 AM Martin Liška wrote: > > Hi. > > That fixes many UBSAN issues that are caused by: > > {"all", dump_flags_t (~(TDF_RAW | TDF_SLIM | TDF_LINENO | TDF_GRAPH > | TDF_STMTADDR | TDF_RHS_ONLY | TDF_NOUID > |

Re: [PATCH][GCC][front-end][build-machinery][opt-framework] Allow setting of stack-clash via configure options. [Patch (4/6)]

2018-07-24 Thread Tamar Christina
Hi All, Here's an updated patch with documentation. Ok for trunk? Thanks, Tamar gcc/ 2018-07-24 Tamar Christina PR target/86486 * configure.ac: Add stack-clash-protection-guard-size. * doc/install.texi: Document it. * config.in

Re: [PATCH] Fix segfault in -fsave-optimization-record (PR tree-optimization/86636)

2018-07-24 Thread Richard Biener
On Tue, Jul 24, 2018 at 1:44 AM David Malcolm wrote: > > There are various ways that it's possible for a gimple statement to > have an UNKNOWN_LOCATION, and for that UNKNOWN_LOCATION to be wrapped > in an ad-hoc location to capture inlining information. > > For such a location, LOCATION_FILE

Re: [PATCH] -fsave-optimization-record: add contrib/optrecord.py

2018-07-24 Thread Richard Biener
On Mon, Jul 23, 2018 at 9:20 PM David Malcolm wrote: > > On Mon, 2018-07-23 at 11:46 +0200, Richard Biener wrote: > > On Fri, Jul 20, 2018 at 6:27 PM David Malcolm > > wrote: > > > > > > This patch adds a Python 3 module to "contrib" for reading the > > > output of > > >

Re: [PATCH] Make function clone name numbering independent.

2018-07-24 Thread Michael Ploujnikov
On 2018-07-20 06:05 AM, Richard Biener wrote: > On Fri, Jul 20, 2018 at 4:48 AM Michael Ploujnikov > wrote: >> >> On 2018-07-17 04:25 PM, Michael Ploujnikov wrote: >>> On 2018-07-17 06:02 AM, Richard Biener wrote: On Tue, Jul 17, 2018 at 8:10 AM Bernhard Reutner-Fischer wrote: >

[PATCH] Minor refactoring in header

2018-07-24 Thread Jonathan Wakely
* include/std/bit (__countl_zero, __countr_zero, __popcount): Use local variables for number of digits instead of type aliases. (__log2p1): Remove redundant branch also checked in __countl_zero. Tested powerpc64le-linux, committed to trunk. commit

[PR 80689] Copy small aggregates element-wise

2018-07-24 Thread Martin Jambor
Hi, I'd like to propose again a new variant of a fix that I sent here in November (https://gcc.gnu.org/ml/gcc-patches/2017-10/msg00881.html) that avoids store-to-load forwarding stalls in the ImageMagick benchmark by expanding copies of very small simple aggregates element-wise rather than "by

Re: [Patch, Fortran] PR 57160: short-circuit IF only with -ffrontend-optimize

2018-07-24 Thread Janus Weil
2018-07-24 11:12 GMT+02:00 Dominique d'Humières : > Hi Janus, > >> gfortran currently does short-circuiting, and after my patch for PR >> 85599 warns about cases where this might remove an impure function >> call (which potentially can change results). >> >> Now, this PR (57160) is about code

[PATCH] Add BIT_FIELD_REF canonicalization patterns

2018-07-24 Thread Richard Biener
The following adds some simple BIT_FIELD_REF canonicalization patterns that fire during SCCVN expression simplification. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk. Richard. 2018-07-24 Richard Biener * match.pd: Add BIT_FIELD_REF canonicalizations.

[PATCH] Make __resource_adaptor_imp usable with C++17 memory_resource

2018-07-24 Thread Jonathan Wakely
By making the memory_resource base class a template parameter the __resource_adaptor_imp can be used to adapt an allocator into a std::pmr::memory_resource instead of experimental::pmr::memory_resource. No uses for this in the library but somebody might want to do it, and it costs us nothing to

[PATCH] PR libstdc++/70966 fix lifetime bug for default resource

2018-07-24 Thread Jonathan Wakely
Similar to what I did for the new_delete_resource and null_memory_resource objects, this makes the atomic immortal. This ensure it can still be used after static destructors start running. PR libstdc++/70966 * include/experimental/memory_resource (__get_default_resource): Use

[PATCH] Reorder conditions in uses-allocator construction helper

2018-07-24 Thread Jonathan Wakely
The erased_type condition is only true for code using the Library Fundamentals TS, so assume it's less common and only check it after checking for convertibility. This does mean for types using erased_type the more expensive convertibility check is done first, but such types are rare. *

Re: [RFC 2/3, debug] Add fkeep-vars-live

2018-07-24 Thread Tom de Vries
On 07/24/2018 01:46 PM, Jakub Jelinek wrote: > On Tue, Jul 24, 2018 at 01:37:32PM +0200, Tom de Vries wrote: >> Another drawback is that the fake uses confuse the unitialized warning >> analysis, so that is switched off for -fkeep-vars-live. > > Is that really needed? I.e. can't you for the

[PATCH] Explain asan parameters in params.def (PR sanitizer/79635).

2018-07-24 Thread Martin Liška
Hi. That's simple patch that improves documentation as requested in the PR. Ready for trunk? Martin gcc/ChangeLog: 2018-07-24 Martin Liska PR sanitizer/79635 * params.def: Explain ASan abbreviation and provide a documentation link. --- gcc/params.def | 2 ++ 1 file

[PATCH] Come up with TARGET_GET_VALID_OPTION_VALUES option hook (PR driver/83193).

2018-07-24 Thread Martin Liška
Hi. I'm sending updated version of the patch. It comes up with a new target common hook that provide option completion list. It's used both in --help=target and with --completion option. I implemented support for -match and -mtune for i386 target. Patch can bootstrap on x86_64-linux-gnu and

Re: [RFC 2/3, debug] Add fkeep-vars-live

2018-07-24 Thread Jakub Jelinek
On Tue, Jul 24, 2018 at 01:37:32PM +0200, Tom de Vries wrote: > Another drawback is that the fake uses confuse the unitialized warning > analysis, so that is switched off for -fkeep-vars-live. Is that really needed? I.e. can't you for the purpose of uninitialized warning analysis ignore the

[RFC 3/3, debug] Add fdebug-nops and fkeep-vars-live to Og only

2018-07-24 Thread Tom de Vries
On Tue, Jul 24, 2018 at 01:30:30PM +0200, Tom de Vries wrote: > On 07/16/2018 05:10 PM, Tom de Vries wrote: > > On 07/16/2018 03:50 PM, Richard Biener wrote: > >> On Mon, 16 Jul 2018, Tom de Vries wrote: > >>> Any comments? > >> > >> Interesting idea. I wonder if that should be generalized > >>

[RFC 2/3, debug] Add fkeep-vars-live

2018-07-24 Thread Tom de Vries
On Tue, Jul 24, 2018 at 01:30:30PM +0200, Tom de Vries wrote: > On 07/16/2018 05:10 PM, Tom de Vries wrote: > > On 07/16/2018 03:50 PM, Richard Biener wrote: > >> On Mon, 16 Jul 2018, Tom de Vries wrote: > >>> Any comments? > >> > >> Interesting idea. I wonder if that should be generalized > >>

[RFC 1/3, debug] Add fdebug-nops

2018-07-24 Thread Tom de Vries
On Tue, Jul 24, 2018 at 01:30:30PM +0200, Tom de Vries wrote: > On 07/16/2018 05:10 PM, Tom de Vries wrote: > > On 07/16/2018 03:50 PM, Richard Biener wrote: > >> On Mon, 16 Jul 2018, Tom de Vries wrote: > >>> Any comments? > >> > >> Interesting idea. I wonder if that should be generalized > >>

Re: [RFC][debug] Add -fadd-debug-nops

2018-07-24 Thread Tom de Vries
On 07/16/2018 05:10 PM, Tom de Vries wrote: > On 07/16/2018 03:50 PM, Richard Biener wrote: >> On Mon, 16 Jul 2018, Tom de Vries wrote: >>> Any comments? >> >> Interesting idea. I wonder if that should be generalized >> to other places > > I kept the option name general, to allow for that. > >

Re: [PATCH][debug] Handle references to skipped params in remap_ssa_name

2018-07-24 Thread Jakub Jelinek
On Tue, Jul 24, 2018 at 12:29:37PM +0200, Tom de Vries wrote: > > I wonder if it makes sense to disambiguate things from the gcc side > > by generating an empty location description for known optimized out > > values (the standard seems to explicitely call that out as a way to > > say "optimized

RE: [PATCH][GCC][front-end][build-machinery][opt-framework] Allow setting of stack-clash via configure options. [Patch (4/6)]

2018-07-24 Thread Joseph Myers
On Tue, 24 Jul 2018, tamar.christ...@arm.com wrote: > This patch defines a configure option to allow the setting of the default > guard size via configure flags when building the target. If you add a configure option, you must also add documentation for it in install.texi. -- Joseph S. Myers

Re: [PATCH][debug] Handle references to skipped params in remap_ssa_name

2018-07-24 Thread Tom de Vries
On 07/19/2018 10:30 AM, Richard Biener wrote: > On Wed, Jul 18, 2018 at 3:42 PM Tom de Vries wrote: >> >> On 07/06/2018 12:28 PM, Richard Biener wrote: >>> On Thu, Jul 5, 2018 at 4:12 PM Tom de Vries wrote: On 07/05/2018 01:39 PM, Richard Biener wrote: > On Thu, Jul 5, 2018 at 1:25

RE: [PATCH][GCC][front-end][opt-framework] Update options framework for parameters to properly handle and validate configure time params. [Patch (2/3)]

2018-07-24 Thread tamar . christina
Hi All, This patch is re-spun to handle the configure changes in patch 4 / 6 of the previous series. This patch now changes it so that default parameters are validated during initialization. This change is needed to ensure parameters set via by the target specific common initialization routines

RE: [PATCH][GCC][AArch64] Cleanup the AArch64 testsuite when stack-clash is on [Patch (6/6)]

2018-07-24 Thread tamar . christina
Hi All, This patch cleans up the testsuite when a run is done with stack clash protection turned on. Concretely this switches off -fstack-clash-protection for a couple of tests: * sve: We don't yet support stack-clash-protection and sve, so for now turn these off. * assembler scan: some tests

RE: [PATCH][GCC][AArch64] Set default values for stack-clash and do basic validation in back-end. [Patch (5/6)]

2018-07-24 Thread tamar . christina
Hi All, This patch is a cascade update from having to re-spin the configure patch (no# 4 in the series). This patch enforces that the default guard size for stack-clash protection for AArch64 be 64KB unless the user has overriden it via configure in which case the user value is used as long as

RE: [PATCH][GCC][front-end][build-machinery][opt-framework] Allow setting of stack-clash via configure options. [Patch (4/6)]

2018-07-24 Thread tamar . christina
Hi Jeff, This patch defines a configure option to allow the setting of the default guard size via configure flags when building the target. The new flag is: * --with-stack-clash-protection-guard-size= The patch defines a new macro DEFAULT_STK_CLASH_GUARD_SIZE which targets need to use

Re: [PATCH] Fix up pr19476-{1,5}.C (PR testsuite/86649)

2018-07-24 Thread Jakub Jelinek
On Tue, Jul 24, 2018 at 12:08:35PM +0200, Richard Biener wrote: > OK - can you add a variant with -O2 that tests it at EVRP time then? Here is what I've committed to trunk then: 2018-07-24 Jakub Jelinek PR testsuite/86649 * g++.dg/tree-ssa-/pr19476-1.C: Check dom2 dump

Re: Improve std::rotate usages

2018-07-24 Thread François Dumont
Ping. On 08/06/2018 07:54, François Dumont wrote: Gentle reminder. On 27/05/2018 19:25, François Dumont wrote: Still no chance to review it ? I'd like this one to go in before submitting other algo related patches.     * include/bits/stl_algo.h     (__rotate(_Ite, _Ite, _Ite,

  1   2   >