Re: [PATCH][RFC] Add gimple-cfg.h.

2018-08-27 Thread Martin Liška
Hi. There's updated version with notes that were discussed with Richi on IRC. As pointed out label_to_block can potentially lead to quadratic complexity, but it's not ambition of the patch to resolve that. Martin >From 393a0b87d7d667f0db6e512a840f2da3f51c8f7b Mon Sep 17 00:00:00 2001 From: marxin

[C++ PATCH] Improve location for cxx_readonly_error diagnostics (PR c++/86993)

2018-08-27 Thread Jakub Jelinek
Hi! This patch improves location of the cxx_readonly_error diagnostics by letting caller's pass the preferred location for it rather than always using input_location. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2018-08-27 Jakub Jelinek PR c++/86993 *

Re: [PATCH] Use more DECL_BUILT_IN_P macro.

2018-08-27 Thread Martin Liška
On 08/23/2018 03:58 PM, Richard Biener wrote: > On Thu, Aug 23, 2018 at 3:30 PM Martin Liška wrote: >> >> On 08/23/2018 01:58 PM, Richard Biener wrote: >>> On Thu, Aug 23, 2018 at 12:46 PM Martin Liška wrote: On 08/20/2018 10:34 AM, Richard Biener wrote: > On Wed, Aug 15, 2018 at 2:

[PATCH] Partial combiner fix for vector conditions (PR rtl-optimization/87065)

2018-08-27 Thread Jakub Jelinek
Hi! This patch is just a partial fix, combine.c has lots of other code that was written before vector modes were introduced and won't work well with them. The patch also uses ? x : const_true_rtx rather than ? CONSTM1_RTX (GET_MODE (x)) : const_true_rtx or some new CONST_TRUE_RTX (GET_MODE (x)),

Re: [PATCH][RFC] Add gimple-cfg.h.

2018-08-27 Thread Richard Biener
On Mon, Aug 27, 2018 at 9:13 AM Martin Liška wrote: > > Hi. > > There's updated version with notes that were discussed with Richi > on IRC. As pointed out label_to_block can potentially lead to > quadratic complexity, but it's not ambition of the patch to resolve > that. Please don't @@ -3239,7

Re: [PATCH] Partial combiner fix for vector conditions (PR rtl-optimization/87065)

2018-08-27 Thread Richard Biener
On Mon, 27 Aug 2018, Jakub Jelinek wrote: > Hi! > > This patch is just a partial fix, combine.c has lots of other code that was > written before vector modes were introduced and won't work well with them. > > The patch also uses ? x : const_true_rtx rather than > ? CONSTM1_RTX (GET_MODE (x)) : c

Re: Fix MIPS builds

2018-08-27 Thread Richard Biener
On Mon, Aug 27, 2018 at 4:56 AM Jeff Law wrote: > > > MIPS builds have been failing to build due to trying to use an > incomplete struct function type. The uses are coming from cfg.h which > typically isn't included in the target files. > > Fixed by including "backend.h" and removing the "cfg.h"

Re: [PATCH] Use more DECL_BUILT_IN_P macro.

2018-08-27 Thread Richard Biener
On Mon, Aug 27, 2018 at 9:20 AM Martin Liška wrote: > > On 08/23/2018 03:58 PM, Richard Biener wrote: > > On Thu, Aug 23, 2018 at 3:30 PM Martin Liška wrote: > >> > >> On 08/23/2018 01:58 PM, Richard Biener wrote: > >>> On Thu, Aug 23, 2018 at 12:46 PM Martin Liška wrote: > > On 08/20/

Re: [PATCH] avoid warning on constant strncpy until next statement is reachable (PR 87028)

2018-08-27 Thread Richard Biener
On Sun, Aug 26, 2018 at 7:26 AM Jeff Law wrote: > > On 08/24/2018 09:58 AM, Martin Sebor wrote: > > The warning suppression for -Wstringop-truncation looks for > > the next statement after a truncating strncpy to see if it > > adds a terminating nul. This only works when the next > > statement ca

Re: [PATCH] convert MIN_EXPR operands to the same type (PR 87059)

2018-08-27 Thread Richard Biener
On Sat, Aug 25, 2018 at 9:14 PM Jeff Law wrote: > > On 08/24/2018 01:06 PM, Martin Sebor wrote: > > PR 87059 points out an ICE in the recently enhanced VRP code > > that was traced back to a MIN_EXPR built out of operands of > > types with different sign by expand_builtin_strncmp(). > > > > The at

Re: [PATCH][RFC] Add gimple-cfg.h.

2018-08-27 Thread Martin Liška
On 08/27/2018 09:56 AM, Richard Biener wrote: > On Mon, Aug 27, 2018 at 9:13 AM Martin Liška wrote: >> >> Hi. >> >> There's updated version with notes that were discussed with Richi >> on IRC. As pointed out label_to_block can potentially lead to >> quadratic complexity, but it's not ambition of t

Re: [PATCH] Optimize more boolean functions

2018-08-27 Thread MCC CS
Hi all, One week ago I proposed a patch that catches ~(~x | y), (~x | y) & (x | ~y) and (~x | y) ^ (x | ~y) Although it was straightforward, it got only one review. Could you please review it? If you find it OK, I don't have push access. Is it possible for you to push it? Best regards. History:

Re: [PATCH] Partial combiner fix for vector conditions (PR rtl-optimization/87065)

2018-08-27 Thread Segher Boessenkool
Hi Jakub, On Mon, Aug 27, 2018 at 09:24:16AM +0200, Jakub Jelinek wrote: > This patch is just a partial fix, combine.c has lots of other code that was > written before vector modes were introduced and won't work well with them. Yeah. But somehow it works fine almost all of the time. Maybe most

[PATCH] Frame pointer for arm with THUMB2 mode

2018-08-27 Thread Denis Khalikov
Hello everyone, I've created the patch which sets the frame pointer to the predictable location in the stack frame for arm with THUMB2 and non-leaf functions. Issue: At this moment GCC emits frame layout for arm with THUMB2 mode, "-fno-omit-frame-pointer" and AAPCS, and does not set frame pointer

Re: [PATCH] Partial combiner fix for vector conditions (PR rtl-optimization/87065)

2018-08-27 Thread Jakub Jelinek
On Mon, Aug 27, 2018 at 04:29:25AM -0500, Segher Boessenkool wrote: > Hi Jakub, > > On Mon, Aug 27, 2018 at 09:24:16AM +0200, Jakub Jelinek wrote: > > This patch is just a partial fix, combine.c has lots of other code that was > > written before vector modes were introduced and won't work well wit

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

2018-08-27 Thread Martin Liška
On 08/13/2018 03:00 PM, Martin Liška wrote: > On 08/13/2018 02:54 PM, Ramana Radhakrishnan wrote: >> On Mon, Aug 13, 2018 at 1:49 PM, Martin Liška wrote: >>> PING^1 >>> >>> On 07/24/2018 02:05 PM, Martin Liška wrote: Hi. I'm sending updated version of the patch. It comes up with a n

Re: [PATCH][RFC] Add gimple-cfg.h.

2018-08-27 Thread Richard Biener
On Mon, Aug 27, 2018 at 10:43 AM Martin Liška wrote: > > On 08/27/2018 09:56 AM, Richard Biener wrote: > > On Mon, Aug 27, 2018 at 9:13 AM Martin Liška wrote: > >> > >> Hi. > >> > >> There's updated version with notes that were discussed with Richi > >> on IRC. As pointed out label_to_block can p

Re: [PATCH] Optimize more boolean functions

2018-08-27 Thread Richard Biener
On Tue, Aug 21, 2018 at 7:20 PM MCC CS wrote: > > Hello all, > > I have updated the testcase and run "make check" on Ubuntu x86_64. > All of them passed. (However the last part "do-check" couldn't be > run, probably due to a missing testsuite dependency?) > > The match.pd is the same as the origin

[PATCH] Avoid redundand RPO order compute in PPRE

2018-08-27 Thread Richard Biener
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2018-08-27 Richard Biener * tree-ssa-pre.c (compute_antic): Re-use inverted postorder for partial antic compute. Index: gcc/tree-ssa-pre.c

[PATCH] match.pd: add single-use check for (x & y) ^ y -> ~x & y (PR85758)

2018-08-27 Thread Alexander Monakov
Hello, I'd like to apply this to resolve PR 85758. In bug discussion Marc noted that what we are doing leads to code with higher instruction-level parallelism, but it also has higher register pressure and longer code if the target does not expose and-not patterns. Now that we have 2->2 combine, i

Re: [PATCH] match.pd: add single-use check for (x & y) ^ y -> ~x & y (PR85758)

2018-08-27 Thread Richard Biener
On Mon, Aug 27, 2018 at 1:03 PM Alexander Monakov wrote: > > Hello, > > I'd like to apply this to resolve PR 85758. In bug discussion Marc noted that > what we are doing leads to code with higher instruction-level parallelism, > but it also has higher register pressure and longer code if the targe

Re: [PATCH] Optimize more boolean functions

2018-08-27 Thread Marc Glisse
On Mon, 27 Aug 2018, Richard Biener wrote: On Tue, Aug 21, 2018 at 7:20 PM MCC CS wrote: Hello all, I have updated the testcase and run "make check" on Ubuntu x86_64. All of them passed. (However the last part "do-check" couldn't be run, probably due to a missing testsuite dependency?) The

Re: [PATCH] convert MIN_EXPR operands to the same type (PR 87059)

2018-08-27 Thread Martin Liška
On 08/27/2018 10:32 AM, Richard Biener wrote: > On Sat, Aug 25, 2018 at 9:14 PM Jeff Law wrote: >> >> On 08/24/2018 01:06 PM, Martin Sebor wrote: >>> PR 87059 points out an ICE in the recently enhanced VRP code >>> that was traced back to a MIN_EXPR built out of operands of >>> types with differen

Re: [PATCH][RFC] Add gimple-cfg.h.

2018-08-27 Thread Martin Liška
On 08/27/2018 12:00 PM, Richard Biener wrote: > On Mon, Aug 27, 2018 at 10:43 AM Martin Liška wrote: >> >> On 08/27/2018 09:56 AM, Richard Biener wrote: >>> On Mon, Aug 27, 2018 at 9:13 AM Martin Liška wrote: Hi. There's updated version with notes that were discussed with Rich

VRP: abstract out wide int CONVERT_EXPR_P code

2018-08-27 Thread Aldy Hernandez
Howdy! Phew, I think this is the last abstraction. This handles the unary CONVERT_EXPR_P code. It's the usual story-- normalize the symbolics to [-MIN,+MAX] and handle everything generically. Normalizing the symbolics brought about some nice surprises. We now handle a few things we were

[PATCHv3][PR 59521] Respect __builtin_expect in switch statements

2018-08-27 Thread Martin Liška
Hello. I'm sending updated version of the patch that is now built on top of recent switch expansion changes. Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. Ready to be installed? Martin >From 1e362576dacb8a601f3362e033a725c234f6bc7c Mon Sep 17 00:00:00 2001 From: marx

[PATCH] Sanopt: ignore params with DECL_HAS_VALUE_EXPR_P (PR sanitizer/86962).

2018-08-27 Thread Martin Liška
Hello. In case of nested functions it may happen that we end up with a PARAM_DECL with DECL_HAS_VALUE_EXPR_P. If would skip these. Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. Ready to be installed? Martin gcc/ChangeLog: 2018-08-16 Martin Liska PR sani

Re: [PATCH] Add test for memcpy expansion with hint.

2018-08-27 Thread Martin Liška
PING^1 On 08/13/2018 02:27 PM, Martin Liška wrote: > Hi. > > i386 target uses hint-based expansion of memcpy-like and memset-like > functions. > I would like to add a test in order to cover the functionality. > > Ready for trunk? > Martin > > gcc/ChangeLog: > > 2018-08-13 Martin Liska > >

Re: [PATCH] Sanopt: ignore params with DECL_HAS_VALUE_EXPR_P (PR sanitizer/86962).

2018-08-27 Thread Jakub Jelinek
On Mon, Aug 27, 2018 at 03:00:18PM +0200, Martin Liška wrote: > Hello. > > In case of nested functions it may happen that we end up > with a PARAM_DECL with DECL_HAS_VALUE_EXPR_P. If would > skip these. > > Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. > > Ready to b

Re: [PATCH] Add test for memcpy expansion with hint.

2018-08-27 Thread Jan Hubicka
> PING^1 OK, thanks! Honza > > On 08/13/2018 02:27 PM, Martin Liška wrote: > > Hi. > > > > i386 target uses hint-based expansion of memcpy-like and memset-like > > functions. > > I would like to add a test in order to cover the functionality. > > > > Ready for trunk? > > Martin > > > > gcc/Cha

Re: [Patch][GCC] Document and fix -r (partial linking)

2018-08-27 Thread Joseph Myers
On Sun, 26 Aug 2018, Allan Sandfeld Jensen wrote: > Patch updated. I specifically edited a number of the existing tests that used > both -r and -nostdlib and removed -nostdlib so the patch is exercised by > existing tests. The patch bootstrapped, I didn't notice any relevant failures > when run

[committed] diagnostics: show an extra line of context in line-insertion fix-it hints (PR 87091)

2018-08-27 Thread David Malcolm
This patch tweaks how we print line-insertion fix-it hints, so that the line before the insertion point is also printed, to give the user more context on the proposed change. For example, it changes: ../x86_64-pc-linux-gnu/libstdc++-v3/include/vector:87:22: note: message +++ |+#include 74

Re: Fix MIPS builds

2018-08-27 Thread Jeff Law
On 08/27/2018 02:14 AM, Richard Biener wrote: > On Mon, Aug 27, 2018 at 4:56 AM Jeff Law wrote: >> >> >> MIPS builds have been failing to build due to trying to use an >> incomplete struct function type. The uses are coming from cfg.h which >> typically isn't included in the target files. >> >> F

[committed] Less verbose fix-it hints for missing header files (PR 87091)

2018-08-27 Thread David Malcolm
This patch tweaks maybe_add_include_fixit so that if we're emitting a note about adding the header file, the note's primary location will be replaced by that of the fix-it hint, to avoid repeating a location we've already emitted (or one close to it). For example, this simplifies: ../x86_64-pc-

[PATCH] Strenghten assumption about gswitch statements.

2018-08-27 Thread Martin Liška
Hi. Now we should not meet a degenerated gswitch statements. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Martin gcc/ChangeLog: 2018-08-27 Martin Liska * tree-cfg.c (find_taken_edge_switch_expr): Replace not possible conditio

[PATCH] Fix PR86927

2018-08-27 Thread Richard Biener
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk. Richard. 2018-08-27 Richard Biener PR tree-optimization/86927 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly use const cond reduction code. * gcc.dg/vect/pr86927.c: New t

Re: [C++ PATCH] Improve location for cxx_readonly_error diagnostics (PR c++/86993)

2018-08-27 Thread David Malcolm
On Mon, 2018-08-27 at 09:14 +0200, Jakub Jelinek wrote: > Hi! > > This patch improves location of the cxx_readonly_error diagnostics by > letting caller's pass the preferred location for it rather than > always using > input_location. > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok

Re: [PATCH] convert MIN_EXPR operands to the same type (PR 87059)

2018-08-27 Thread Martin Sebor
On 08/27/2018 02:32 AM, Richard Biener wrote: On Sat, Aug 25, 2018 at 9:14 PM Jeff Law wrote: On 08/24/2018 01:06 PM, Martin Sebor wrote: PR 87059 points out an ICE in the recently enhanced VRP code that was traced back to a MIN_EXPR built out of operands of types with different sign by expan

Re: [PATCH] [AArch64, Falkor] Switch to using Falkor-specific vector costs

2018-08-27 Thread Luis Machado
Hi, On 08/08/2018 04:54 AM, Siddhesh Poyarekar wrote: On 08/01/2018 04:23 AM, James Greenhalgh wrote: On Wed, Jul 25, 2018 at 01:10:34PM -0500, Luis Machado wrote: The adjusted vector costs give Falkor a reasonable boost in performance for FP benchmarks (both CPU2017 and CPU2006) and doesn't c

Re: [PATCH] [AArch64, Falkor] Adjust Falkor's sign extend reg+reg address cost

2018-08-27 Thread Luis Machado
Hi, On 08/08/2018 04:46 AM, Siddhesh Poyarekar wrote: On 08/01/2018 04:24 AM, James Greenhalgh wrote: OK if this is what is best for your subtarget. I have pushed this on behalf of Luis since he is on holiday. Thanks, Siddhesh Similarly to the vector cost changes, we've also noticed a non

Re: [PATCH] Optimize more boolean functions

2018-08-27 Thread Richard Biener
On Mon, Aug 27, 2018 at 1:52 PM Marc Glisse wrote: > > On Mon, 27 Aug 2018, Richard Biener wrote: > > > On Tue, Aug 21, 2018 at 7:20 PM MCC CS wrote: > >> > >> Hello all, > >> > >> I have updated the testcase and run "make check" on Ubuntu x86_64. > >> All of them passed. (However the last part "

Re: [PATCH] Strenghten assumption about gswitch statements.

2018-08-27 Thread Jeff Law
On 08/27/2018 08:05 AM, Martin Liška wrote: > Hi. > > Now we should not meet a degenerated gswitch statements. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed? > Martin > > gcc/ChangeLog: > > 2018-08-27 Martin Liska > > * tree-cfg.

Re: [PATCH] Strenghten assumption about gswitch statements.

2018-08-27 Thread Richard Biener
On Mon, Aug 27, 2018 at 4:05 PM Martin Liška wrote: > > Hi. > > Now we should not meet a degenerated gswitch statements. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed? Hum. This relies on us doing CFG cleanup. Do we really want find_taken_e

Re: [PATCH] convert MIN_EXPR operands to the same type (PR 87059)

2018-08-27 Thread Jeff Law
On 08/27/2018 02:32 AM, Richard Biener wrote: > On Sat, Aug 25, 2018 at 9:14 PM Jeff Law wrote: >> >> On 08/24/2018 01:06 PM, Martin Sebor wrote: >>> PR 87059 points out an ICE in the recently enhanced VRP code >>> that was traced back to a MIN_EXPR built out of operands of >>> types with differen

Re: [PATCH] convert MIN_EXPR operands to the same type (PR 87059)

2018-08-27 Thread Richard Biener
On Mon, Aug 27, 2018 at 4:41 PM Martin Sebor wrote: > > On 08/27/2018 02:32 AM, Richard Biener wrote: > > On Sat, Aug 25, 2018 at 9:14 PM Jeff Law wrote: > >> > >> On 08/24/2018 01:06 PM, Martin Sebor wrote: > >>> PR 87059 points out an ICE in the recently enhanced VRP code > >>> that was traced

Re: [PATCH] Optimize more boolean functions

2018-08-27 Thread MCC CS
Added :s to the second pattern, updated dates. Thank you so much for your reviews! 2018-08-27 MCC CS gcc/ PR tree-optimization/87009 * match.pd: Add boolean optimizations. 2018-08-27 MCC CS gcc/testsuite/ PR tree-optimization/87009 * gcc.dg/pr8

Re: [PATCH] convert MIN_EXPR operands to the same type (PR 87059)

2018-08-27 Thread Richard Biener
On Mon, Aug 27, 2018 at 5:27 PM Jeff Law wrote: > > On 08/27/2018 02:32 AM, Richard Biener wrote: > > On Sat, Aug 25, 2018 at 9:14 PM Jeff Law wrote: > >> > >> On 08/24/2018 01:06 PM, Martin Sebor wrote: > >>> PR 87059 points out an ICE in the recently enhanced VRP code > >>> that was traced back

Re: [PATCH] avoid warning on constant strncpy until next statement is reachable (PR 87028)

2018-08-27 Thread Jeff Law
On 08/27/2018 02:29 AM, Richard Biener wrote: > On Sun, Aug 26, 2018 at 7:26 AM Jeff Law wrote: >> >> On 08/24/2018 09:58 AM, Martin Sebor wrote: >>> The warning suppression for -Wstringop-truncation looks for >>> the next statement after a truncating strncpy to see if it >>> adds a terminating nu

Re: [PATCH] avoid warning on constant strncpy until next statement is reachable (PR 87028)

2018-08-27 Thread Richard Biener
On Mon, Aug 27, 2018 at 5:32 PM Jeff Law wrote: > > On 08/27/2018 02:29 AM, Richard Biener wrote: > > On Sun, Aug 26, 2018 at 7:26 AM Jeff Law wrote: > >> > >> On 08/24/2018 09:58 AM, Martin Sebor wrote: > >>> The warning suppression for -Wstringop-truncation looks for > >>> the next statement af

Re: [PATCH] convert MIN_EXPR operands to the same type (PR 87059)

2018-08-27 Thread Martin Sebor
On 08/27/2018 09:28 AM, Richard Biener wrote: On Mon, Aug 27, 2018 at 4:41 PM Martin Sebor wrote: On 08/27/2018 02:32 AM, Richard Biener wrote: On Sat, Aug 25, 2018 at 9:14 PM Jeff Law wrote: On 08/24/2018 01:06 PM, Martin Sebor wrote: PR 87059 points out an ICE in the recently enhanced V

Re: Fix MIPS builds

2018-08-27 Thread Steve Ellcey
On Sun, 2018-08-26 at 20:56 -0600, Jeff Law wrote: > MIPS builds have been failing to build due to trying to use an > incomplete struct function type.  The uses are coming from cfg.h which > typically isn't included in the target files. > > Fixed by including "backend.h" and removing the "cfg.h" i

Re: [PATCH] Use more DECL_BUILT_IN_P macro.

2018-08-27 Thread Martin Sebor
On 08/27/2018 01:20 AM, Martin Liška wrote: +/* For a FUNCTION_DECL NODE, nonzero means a built in function of a + standard library or more generally a built in function that is + recognized by optimizers and expanders. I'm a little confused by this description: the last part makes me wonder ab

Re: [PATCH] convert MIN_EXPR operands to the same type (PR 87059)

2018-08-27 Thread Richard Biener
On Mon, Aug 27, 2018 at 5:51 PM Martin Sebor wrote: > > On 08/27/2018 09:28 AM, Richard Biener wrote: > > On Mon, Aug 27, 2018 at 4:41 PM Martin Sebor wrote: > >> > >> On 08/27/2018 02:32 AM, Richard Biener wrote: > >>> On Sat, Aug 25, 2018 at 9:14 PM Jeff Law wrote: > > On 08/24/2018

Re: Fix MIPS builds

2018-08-27 Thread Jeff Law
On 08/27/2018 09:55 AM, Steve Ellcey wrote: > On Sun, 2018-08-26 at 20:56 -0600, Jeff Law wrote: >> MIPS builds have been failing to build due to trying to use an >> incomplete struct function type.  The uses are coming from cfg.h which >> typically isn't included in the target files. >> >> Fixed b

Re: [PATCH] avoid warning on constant strncpy until next statement is reachable (PR 87028)

2018-08-27 Thread Martin Sebor
On 08/27/2018 02:29 AM, Richard Biener wrote: On Sun, Aug 26, 2018 at 7:26 AM Jeff Law wrote: On 08/24/2018 09:58 AM, Martin Sebor wrote: The warning suppression for -Wstringop-truncation looks for the next statement after a truncating strncpy to see if it adds a terminating nul. This only w

Re: Fix MIPS builds

2018-08-27 Thread Steve Ellcey
On Mon, 2018-08-27 at 10:27 -0600, Jeff Law wrote: > External Email > > On 08/27/2018 09:55 AM, Steve Ellcey wrote: > > > > On Sun, 2018-08-26 at 20:56 -0600, Jeff Law wrote: > > > > > > MIPS builds have been failing to build due to trying to use an > > > incomplete struct function type.  The us

Re: [PATCH 3/3] or1k: gcc: initial support for openrisc

2018-08-27 Thread Joseph Myers
On Mon, 27 Aug 2018, Stafford Horne wrote: > gcc/config/or1k/elf.opt | 33 + > gcc/config/or1k/or1k.opt | 41 + Command-line options need documenting in invoke.texi. This patch is missing documentation updates. Please see sourcebuild.texi, section "Back End", for

[PATCH 1/2] configure.ac: use 'suppress' instead of 'don't'

2018-08-27 Thread Alexander Monakov
Hello, If patch 2/2 is approved, I'd like to apply this alongside with that. Use positive form ("suppress") rather than negative ("don't") to explain the option, because using the option results in passing -Wno-format rather than not passing -Wformat. I felt confused when trying to follow the l

Re: [PATCH] Add a character size parameter to c_strlen/get_range_strlen

2018-08-27 Thread Martin Sebor
On 08/25/2018 11:44 PM, Jeff Law wrote: On 08/21/2018 10:35 AM, Martin Sebor wrote: On 08/21/2018 09:59 AM, Jeff Law wrote: On 08/21/2018 09:57 AM, Martin Sebor wrote: On 08/21/2018 02:59 AM, Richard Biener wrote: On Tue, 21 Aug 2018, Bernd Edlinger wrote: gcc -S -O2 -Wall -Wformat-overflow

[PATCH RFC 2/2] bootstrap: disable most warnings in stage 3

2018-08-27 Thread Alexander Monakov
Currently bootstrap stages 2 and 3 use the same warning options, but that is redundant: if any warnings are generated, they will be present in stage 2 (and stop bootstrap). By not enabling any warnings for stage 3, we would get simple automated checking that warnings do not affect code generation.

Re: [PATCH RFC 2/2] bootstrap: disable most warnings in stage 3

2018-08-27 Thread Joseph Myers
On Mon, 27 Aug 2018, Alexander Monakov wrote: > * gcc/configure.ac (--disable-build-warnings): New option. Note that for any version of this patch actually proposed for inclusion (as opposed to an RFC) you'll need to include documentation in install.texi for the new configure option. --

Re: [PATCH RFC 2/2] bootstrap: disable most warnings in stage 3

2018-08-27 Thread Jeff Law
On 08/27/2018 12:20 PM, Alexander Monakov wrote: > Currently bootstrap stages 2 and 3 use the same warning options, but that is > redundant: if any warnings are generated, they will be present in stage 2 (and > stop bootstrap). By not enabling any warnings for stage 3, we would get > simple automa

[PATCH] Add a dwarf unit type to represent 24 bit values.

2018-08-27 Thread John Darrington
* include/dwarf2.h (enum dwarf_unit_type) [DE_EH_PE_udata3]: New member. --- include/dwarf2.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/dwarf2.h b/include/dwarf2.h index cf0039a92a..0fe88a3a7e 100644 --- a/include/dwarf2.h +++ b/include/dwarf2.h @@ -474,6 +474,7 @@ enum d

Re: [Patch, fortran] PRs 80477 and 86481 - memory leaks following function calls.

2018-08-27 Thread Thomas Koenig
Hi Paul, Bootstrapped and regtested on FC28/x86_64 - OK for trunk? OK, and thanks for the patch! Regards Thomas

Re: [PATCH] avoid warning on constant strncpy until next statement is reachable (PR 87028)

2018-08-27 Thread Martin Sebor
On 08/25/2018 11:24 PM, Jeff Law wrote: On 08/24/2018 09:58 AM, Martin Sebor wrote: The warning suppression for -Wstringop-truncation looks for the next statement after a truncating strncpy to see if it adds a terminating nul. This only works when the next statement can be reached using the Gim

[committed] Fix minor bug in recently added sanity test in tree-ssa-dse.c

2018-08-27 Thread Jeff Law
We recently changes tree-ssa-dse.c to not trim stores outside the bounds of the referenced object. This is generally a good thing. However, there are cases where the object doesn't have a usable size. We see this during kernel builds, at least on the microblaze target. We've got... _1 = p_47(D

[PATCH] adjust strnlen to convert MIN_EXPR to the same type (PR 87112)

2018-08-27 Thread Martin Sebor
The assertion I added in the fix for PR 87059 to help find mismatched MIN/MAX_EXPR operands has exposed another instance of such a mismatch, this one in expand_builtin_strnlen(). The attached patch adjusts the function to convert the signed result of c_strlen() to the unsigned type of the second

Re: [PATCH] adjust strnlen to convert MIN_EXPR to the same type (PR 87112)

2018-08-27 Thread Jeff Law
On 08/27/2018 04:57 PM, Martin Sebor wrote: > The assertion I added in the fix for PR 87059 to help find > mismatched MIN/MAX_EXPR operands has exposed another instance > of such a mismatch, this one in expand_builtin_strnlen(). > > The attached patch adjusts the function to convert the signed > r

[committed] C++: fix-it hint for missing "typename" (PR c++/63392)

2018-08-27 Thread David Malcolm
This patch adds a fix-it hint to missing "typename" errors in the C++ frontend, suggesting the insertion of "typename ". This addresses part of PR c++/63392; however it does not improve the error-recovery for such cases. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu; adds 9 PASS r

[PATCH] Fix version check for ATTRIBUTE_GCC_DUMP_PRINTF

2018-08-27 Thread David Malcolm
On Mon, 2018-08-27 at 08:57 +0200, Jakub Jelinek wrote: > On Thu, Aug 02, 2018 at 01:54:07PM -0400, David Malcolm wrote: > > +/* An attribute for annotating formatting printing functions that > > use > > + the dumpfile/optinfo formatting codes. These are the > > pretty_printer > > + format cod

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

2018-08-27 Thread Wilco Dijkstra
Hi, > But we still have an issue with performance, when we are using default > unwinder, which uses unwind tables. It could be up to 10 times faster to > use frame based stack unwinder instead "default unwinder". Switching on the frame pointer typically costs 1-2% performance, so it's a bad idea

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

2018-08-27 Thread Martin Sebor
Richard, please let me know if the patch is acceptable as is (with the RejectNegative property added). As I said, I realize it's not ideal, but neither is any of the alternatives we have discussed. They all involve trade- offs, and I think they would all make the behavior of the options less reg

Re: [PATCH] Add a character size parameter to c_strlen/get_range_strlen

2018-08-27 Thread Jeff Law
On 08/23/2018 08:48 AM, Bernd Edlinger wrote: > On 08/23/18 16:24, Jeff Law wrote: >>> >>> Yes, and which one was the earlier, more controversial patch from me? >> >> https://gcc.gnu.org/ml/gcc-patches/2018-07/msg01800.html >> >> >> Which is the issue I'm working through right now :-) >> > > Okay,

[committed] [PR tree-optimization/87110] Further refine check in compute_trims

2018-08-27 Thread Jeff Law
As shown in the testcase within the PR we need to handle VLAs in compute_trims as well. We can't pass down a non-constant to compare_tree_int. Bootstrapped & regression tested on x86. Installing on the trunk. jeff diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4cbea7a195d..a8553043887 100644

Re: [PATCH] avoid warning on constant strncpy until next statement is reachable (PR 87028)

2018-08-27 Thread Jeff Law
On 08/27/2018 10:27 AM, Martin Sebor wrote: > On 08/27/2018 02:29 AM, Richard Biener wrote: >> On Sun, Aug 26, 2018 at 7:26 AM Jeff Law wrote: >>> >>> On 08/24/2018 09:58 AM, Martin Sebor wrote: The warning suppression for -Wstringop-truncation looks for the next statement after a trunca

Re: [PATCH RFC] add generic expansion for MULT_HIGHPART_EXP

2018-08-27 Thread Alexander Monakov
> > > So - how difficult is it to fix BRIG to not use MULT_HIGHPART_EXPR if > > > not supported? Richard, how should we proceed from here? Do you like the solution in the initial mail, or would you prefer something else? FWIW I agree with Pekka, no need to burden BRIG FE with expanding mul-highp

Re: [PATCH] Fix version check for ATTRIBUTE_GCC_DUMP_PRINTF

2018-08-27 Thread Jakub Jelinek
On Mon, Aug 27, 2018 at 08:32:11PM -0400, David Malcolm wrote: > gcc/ChangeLog: > * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on > GCC_VERSION for usage of "__gcc_dump_printf__" format from > >= 3005 to >= 9000. Ok, thanks. > --- > gcc/dumpfile.h | 2 +- > 1