Re: [0/67] Add wrapper classes for machine_modes

2017-05-04 Thread Jeff Law
On 12/09/2016 05:48 AM, Richard Sandiford wrote: This series includes most of the changes in group C from: https://gcc.gnu.org/ml/gcc/2016-11/msg00033.html The idea is to add wrapper classes around machine_mode_enum for specific groups of modes, such as scalar integers, scalar floats, comp

Re: [PATCH] disable -Walloc-size-larger-than and -Wstringop-overflow for non-C front ends (PR 80545)

2017-05-04 Thread Jeff Law
On 04/28/2017 04:02 PM, Martin Sebor wrote: The two options were included in -Wall and enabled for all front ends but only made to be recognized by the driver for the C family of compilers. That made it impossible to suppress those warnings when compiling code for those other front ends (like Fo

Re: [PATCH] handling address mode changes inside extract_bit_field

2017-05-04 Thread Jeff Law
On 03/01/2017 03:06 PM, Jim Wilson wrote: This is a proposed patch for the bug 79794 which I just submitted. This isn't a regression, so this can wait for after the gcc 7 branch if necessary. The problem here is that a reg+offset MEM target is passed to extract_bit_field with a vector register s

Re: [PATCH] prevent -Wno-system-headers from suppressing -Wstringop-overflow (PR 79214)

2017-05-04 Thread Jeff Law
On 05/04/2017 03:09 PM, Martin Sebor wrote: On 05/04/2017 01:17 PM, Jeff Law wrote: On 01/25/2017 02:12 PM, Martin Sebor wrote: While putting together examples for the GCC 7 changes document I noticed that a few of the buffer overflow warnings issued by -Wstringop-overflow are defeated by Glibc

Re: [PATCH] Output DIEs for outlined OpenMP functions in correct lexical scope

2017-05-04 Thread Kevin Buettner
Ahem... I forgot to note that: I have bootstrapped and regression tested my patch on x86_64-pc-linux-gnu. Kevin On Thu, 4 May 2017 17:45:51 -0700 Kevin Buettner wrote: > Consider the following OpenMP program: > > void foo (int a1) {} > > int > main (void) > { > static

[PATCH] Output DIEs for outlined OpenMP functions in correct lexical scope

2017-05-04 Thread Kevin Buettner
Consider the following OpenMP program: void foo (int a1) {} int main (void) { static int s1 = -41; int i1 = 11, i2; for (i2 = 1; i2 <= 2; i2++) { int pass = i2; #pragma omp parallel num_threads (2) firstprivate (i1) {

[PATCH 1/2] C++ template type diff printing

2017-05-04 Thread David Malcolm
This patch kit implements two new options to make it easier to read diagnostics involving mismatched template types: -fdiagnostics-show-template-tree and -fno-elide-type. It adds two new formatting codes: %H and %I which are equivalent to %qT, but are to be used together for type comparisons e

[PATCH 2/2] Use %H and %I throughout C++ frontend.

2017-05-04 Thread David Malcolm
This is the second half of the kit, which uses %H and %I throughout the C++ frontend whenever describing type mismatches between a pair of %qT. gcc/cp/ChangeLog: * call.c (print_conversion_rejection): Replace pairs of %qT with %H and %I in various places. (build_user_type_c

[gomp4] Add front end support for the if_present clause with the update directive

2017-05-04 Thread Cesar Philippidis
This patch make the c, c++ and fortran FEs aware of the new OpenACC 2.5 if_present clause for the update directive. The ME and runtime support will come in a separate followup patch. Thomas, for some reason I'm seeing a couple of new UNRESOLVED tests for update-1.C. The c++ tests running with goac

[PATCH 11/12 rev1] [i386] Add remainder of -mcall-ms2sysv-xlogues implementation

2017-05-04 Thread Daniel Santos
Now generates RTL with appropriate stack restore and leave patterns. Slightly cleaned up code that calculates the number of vector elements for clarity. Tests are good when rebased onto gcc-7_1_0-release as HEAD currently fails to bootstrap. Signed-off-by: Daniel Santos --- gcc/config/i386/i38

[PATCH, rs6000] Fix vec_xl and vec_xst intrinsics for P8

2017-05-04 Thread Bill Schmidt
Hi, In an earlier patch, I changed vec_xl and vec_xst to make use of new POWER9 instructions when loading or storing vector short/char values. In so doing, I failed to enable the existing instruction use for -mcpu=power8, so these were no longer considered valid by the compiler. Not good. This pa

[PATCH 09/12 rev1] [i386] Add patterns and predicates mcall-ms2sysv-xlogues

2017-05-04 Thread Daniel Santos
I've cleaned up the patterns and predicates as per your instructions, resulting in 74 less lines of code. Adding explicit insns to restore the stack pointer and pointer perform the "leave" (to the patterns restore_multiple_and_return and restore_multiple_leave_return, respectively) disambiguates t

Re: [PATCH] prevent -Wno-system-headers from suppressing -Wstringop-overflow (PR 79214)

2017-05-04 Thread Martin Sebor
On 05/04/2017 01:17 PM, Jeff Law wrote: On 01/25/2017 02:12 PM, Martin Sebor wrote: While putting together examples for the GCC 7 changes document I noticed that a few of the buffer overflow warnings issued by -Wstringop-overflow are defeated by Glibc's macros for string manipulation functions l

Bump version namespace and remove _Rb_tree useless template parameter

2017-05-04 Thread François Dumont
Hi Here is the patch to remove the useless _Is_pod_comparator _Rb_tree_impl template parameter. As this is an ABI breaking change it is limited to the versioned namespace mode and the patch also bump the namespace version. Working on this patch I wonder if the gnu-versioned-namespace

Re: [PATCH] warn for reading past the end by library functions (PR 54924, 79234)

2017-05-04 Thread Jeff Law
On 04/20/2017 04:49 PM, Martin Sebor wrote: PR libstdc++/54924 - Warn for std::string constructor with wrong size asks for a warning when constructing a std::string from a character array and a number of elements that's in excess of the number of elements. E.g., std::string s ("abc", 7); PR

Re: [PATCH] prevent -Wno-system-headers from suppressing -Wstringop-overflow (PR 79214)

2017-05-04 Thread Jeff Law
On 01/25/2017 02:12 PM, Martin Sebor wrote: While putting together examples for the GCC 7 changes document I noticed that a few of the buffer overflow warnings issued by -Wstringop-overflow are defeated by Glibc's macros for string manipulation functions like strncat and strncpy. While testing m

Re: C PATCH to fix missing -Wlogical-op warning (PR c/80525)

2017-05-04 Thread Jeff Law
On 05/04/2017 06:23 AM, Marek Polacek wrote: On Thu, May 04, 2017 at 02:13:24PM +0200, Richard Biener wrote: On Thu, May 4, 2017 at 2:11 PM, Marek Polacek wrote: On Thu, May 04, 2017 at 12:42:03PM +0200, Richard Biener wrote: +static tree +unwrap_c_maybe_const (tree *tp, int *walk_subtrees, v

Re: PR80613

2017-05-04 Thread Jeff Law
On 05/04/2017 10:00 AM, Prathamesh Kulkarni wrote: Hi, As mentioned in PR, the issue is that cddce1 marks the call to __builtin_strdup as necessary: marking necessary through .MEM_6 stmt p_7 = __builtin_strdup (&d); and since p_7 doesn't get added to worklist in propagate_necessity() because it'

Re: PR80613

2017-05-04 Thread Jeff Law
On 05/04/2017 11:52 AM, Martin Sebor wrote: On 05/04/2017 10:00 AM, Prathamesh Kulkarni wrote: Hi, As mentioned in PR, the issue is that cddce1 marks the call to __builtin_strdup as necessary: marking necessary through .MEM_6 stmt p_7 = __builtin_strdup (&d); and since p_7 doesn't get added to

[C++ PATCH] fix constrait diag

2017-05-04 Thread Nathan Sidwell
Changing '%qE %S' to '%' is missing a % and ICES constraints/req4. Fixed thusly. -- Nathan Sidwell 2017-05-04 Nathan Sidwell * constraint.cc (diagnose_check_constraint): Fix %E thinko. Index: constraint.cc === --- constraint.cc

Re: [Patch, fortran] PR70071

2017-05-04 Thread Harald Anlauf
On 05/04/17 18:15, Steve Kargl wrote: > On Thu, May 04, 2017 at 05:26:17PM +0200, Harald Anlauf wrote: >> While trying to clean up my working copy, I found that the trivial >> patch for the ICE-on-invalid as described in the PR regtests cleanly >> for 7-release on i686-pc-linux-gnu. >> >> Here's th

Re: PR80613

2017-05-04 Thread Trevor Saunders
On Thu, May 04, 2017 at 11:52:31AM -0600, Martin Sebor wrote: > On 05/04/2017 10:00 AM, Prathamesh Kulkarni wrote: > > Hi, > > As mentioned in PR, the issue is that cddce1 marks the call to > > __builtin_strdup as necessary: > > marking necessary through .MEM_6 stmt p_7 = __builtin_strdup (&d); > >

Re: [PATCH GCC8][17/33]Treat complex cand step as invriant expression

2017-05-04 Thread Bin.Cheng
On Wed, May 3, 2017 at 2:43 PM, Richard Biener wrote: > On Tue, Apr 18, 2017 at 12:46 PM, Bin Cheng wrote: >> Hi, >> We generally need to compute cand step in loop preheader and use it in loop >> body. >> Unless it's an SSA_NAME of constant integer, an invariant expression is >> needed. > > I'm

Re: PR80613

2017-05-04 Thread Martin Sebor
On 05/04/2017 10:00 AM, Prathamesh Kulkarni wrote: Hi, As mentioned in PR, the issue is that cddce1 marks the call to __builtin_strdup as necessary: marking necessary through .MEM_6 stmt p_7 = __builtin_strdup (&d); and since p_7 doesn't get added to worklist in propagate_necessity() because it'

Re: [PATCH] Fix -fopt-info documentation in invoke.texi

2017-05-04 Thread Steve Ellcey
On Thu, 2017-05-04 at 12:24 +0200, Richard Biener wrote: > > > > OK to checkin? > Ok for trunk and branches. > > Richard. I just realized there is a problem/inconsistency with my patch. The ChangeLog says I am changing invoke.texi but the change is actually to optinfo.texi. It looks like invok

[PATCH] Fix-it hints for -Wimplicit-fallthrough

2017-05-04 Thread David Malcolm
As of r247522, fix-it-hints can suggest the insertion of new lines. This patch updates -Wimplicit-fallthrough to provide suggestions with fix-it hints, showing the user where to insert "break;" or fallthrough attributes. For example: test.c: In function 'set_x': test.c:15:9: warning: this stat

Re: [PATCH 5/7] clean up quoting problems - c-family (PR 80280 et al.)

2017-05-04 Thread Martin Sebor
On 05/03/2017 09:56 AM, Joseph Myers wrote: On Tue, 2 May 2017, Martin Sebor wrote: + inform (loc, "in the expansion of concept %qE %qS", check, sub); Are you sure about this (two consecutive quoted strings, open quote of %qS following closing quote of %qE) or should it be a single quote

[PATCH OBVIOUS]Remove unused structure field inv_expr

2017-05-04 Thread Bin Cheng
Hi, This patch removed unused field inv_expr in struct cost_pair left over by previous refactoring. Build on x86_64. Applying as obvious. Thanks, bin 2017-05-04 Bin Cheng * tree-ssa-loop-ivopts.c (struct cost_pair): Remove field inv_expr which is not used any more.diff --git

Re: [PATCH][ARM] Update max_cond_insns settings

2017-05-04 Thread Wilco Dijkstra
Richard Earnshaw wrote: > -  5, /* Max cond insns.  */ > +  2, /* Max cond insns.  */ > This parameter is also used for A32 code.  Is that really the right > number there as well? Yes, this parameter has always been

Re: [PATCH, rs6000] Avoid vectorizing versioned copy loops with vectorization factor 2

2017-05-04 Thread Bill Schmidt
...only without the typo in the ChangeLog below... > On May 3, 2017, at 2:43 PM, Bill Schmidt wrote: > > Hi, > > We recently became aware of some poor code generation as a result of > unprofitable (for POWER) loop vectorization. When a loop is simply copying > data with 64-bit loads and stores

Re: [PATCH] Allow building GCC with PTX offloading even without CUDA being installed (gcc and nvptx-tools patches)

2017-05-04 Thread Thomas Schwinge
Hi! On Wed, 3 May 2017 11:00:14 +0200, Jakub Jelinek wrote: > On Sat, Jan 21, 2017 at 03:50:43PM +0100, Thomas Schwinge wrote: > > > In order to configure gcc to load libcuda.so.1 dynamically, > > > one has to either configure it --without-cuda-driver, or without > > > --with-cuda-driver=/--with-

Re: Handle data dependence relations with different bases

2017-05-04 Thread Richard Sandiford
Richard Biener writes: > On Thu, May 4, 2017 at 2:12 PM, Richard Biener > wrote: >> On Wed, May 3, 2017 at 10:00 AM, Richard Sandiford >> wrote: >>> This patch tries to calculate conservatively-correct distance >>> vectors for two references whose base addresses are not the same. >>> It sets a n

[gomp5] Default to nonmonotonic schedule for dynamic/guided

2017-05-04 Thread Jakub Jelinek
Hi! OpenMP 5.0 will change the default, when neither monotonic nor nonmonotonic modifier is present on dynamic or guided schedule, it is now nonmonotonic, while in 4.5 the default was monotonic. 2017-05-04 Jakub Jelinek * omp-expand.c (expand_parallel_call, expand_omp_for): For dynami

Re: [PATCH] Small type_hash_canon improvement

2017-05-04 Thread Jakub Jelinek
On Thu, May 04, 2017 at 06:21:17PM +0200, Richard Biener wrote: > >the > >only other user after all calls free_node in a loop, so it is highly > >unlikely it would do anything there. > > > >If you mean the INTEGER_TYPE handling, then yes, I guess it could be > >done in free_node too and can move it

Re: [PATCH] Small type_hash_canon improvement

2017-05-04 Thread Richard Biener
On May 4, 2017 6:03:46 PM GMT+02:00, Jakub Jelinek wrote: >On Thu, May 04, 2017 at 05:54:47PM +0200, Richard Biener wrote: >> >2017-05-04 Jakub Jelinek >> > >> >* tree.c (next_type_uid): Change type to unsigned. >> >(type_hash_canon): Decrement back next_type_uid if >> >freeing a ty

Re: [PATCH 1/7] enhance -Wformat to detect quoting problems (PR 80280 et al.)

2017-05-04 Thread Martin Sebor
On 05/03/2017 03:27 PM, Joseph Myers wrote: On Wed, 3 May 2017, Martin Sebor wrote: Clarifying the comment is helpful, but a data structure involving putting the same character in both still doesn't make sense to me. It would seem a lot clearer to (for example) split "DFKTEV" into separate "DF

Re: [Patch, fortran] PR70071

2017-05-04 Thread Steve Kargl
On Thu, May 04, 2017 at 05:26:17PM +0200, Harald Anlauf wrote: > While trying to clean up my working copy, I found that the trivial > patch for the ICE-on-invalid as described in the PR regtests cleanly > for 7-release on i686-pc-linux-gnu. > > Here's the cleaned-up version (diffs attached). > >

Re: [PATCH][AArch64] Accept more addressing modes for PRFM

2017-05-04 Thread Kyrill Tkachov
On 15/02/17 15:30, Richard Earnshaw (lists) wrote: On 15/02/17 15:03, Kyrill Tkachov wrote: Hi Richard, On 15/02/17 15:00, Richard Earnshaw (lists) wrote: On 03/02/17 17:12, Kyrill Tkachov wrote: Hi all, While evaluating Maxim's SW prefetch patches [1] I noticed that the aarch64 prefetch pa

[PATCH] c/c++: Add fix-it hints for suggested missing #includes

2017-05-04 Thread David Malcolm
As of r247522, fix-it-hints can suggest the insertion of new lines. This patch uses this to implement a new "maybe_add_include_fixit" function in c-common.c and uses it in the two places where the C and C++ frontend can suggest missing #include directives. [1] The idea is that the user can then c

Re: [PATCH] Small type_hash_canon improvement

2017-05-04 Thread Jakub Jelinek
On Thu, May 04, 2017 at 05:54:47PM +0200, Richard Biener wrote: > >2017-05-04 Jakub Jelinek > > > > * tree.c (next_type_uid): Change type to unsigned. > > (type_hash_canon): Decrement back next_type_uid if > > freeing a type node with the highest TYPE_UID. For INTEGER_TYPEs > >

PR80613

2017-05-04 Thread Prathamesh Kulkarni
Hi, As mentioned in PR, the issue is that cddce1 marks the call to __builtin_strdup as necessary: marking necessary through .MEM_6 stmt p_7 = __builtin_strdup (&d); and since p_7 doesn't get added to worklist in propagate_necessity() because it's used only within free(), it's treated as "dead" and

Re: [PR 80622] Treat const pools as initialized in SRA

2017-05-04 Thread Richard Biener
On May 4, 2017 5:09:15 PM GMT+02:00, Martin Jambor wrote: >Hi, > >PR 80622 happens because when setting grp_write lazily, the code does >not acknowledge that constant pool bases come initialized and so >contain data even when not written to. The patch below fixes that but >it also puts a test for

Re: [PATCH] Small type_hash_canon improvement

2017-05-04 Thread Richard Biener
On May 4, 2017 4:43:45 PM GMT+02:00, Jakub Jelinek wrote: >Hi! > >While type_hash_canon in case of reusing an already existing type >ggc_frees the freshly created type, we still waste one type uid >for each such case, this patch attempts to avoid that. >Furthermore, for INTEGER_TYPE we keep around

[gomp5] Allow use_device_ptr clause on target data without map clauses

2017-05-04 Thread Jakub Jelinek
Hi! I've created branches/gomp-5_0-branch as a playground for OpenMP 5.0 implementation (so far mostly the TR4 - OpenMP Version 5.0 Preview 1 from last fall, but including later changes too). This is the first patch - OpenMP 5.0 will allow target data with just use_device_ptr clauses and no map c

Re: [PATCH GCC8][25/33]New loop constraint flags

2017-05-04 Thread Bin.Cheng
On Wed, Apr 26, 2017 at 3:01 PM, Bin.Cheng wrote: > On Wed, Apr 26, 2017 at 2:27 PM, Richard Biener > wrote: >> On Tue, Apr 18, 2017 at 12:51 PM, Bin Cheng wrote: >>> Hi, >>> This patch adds new loop constraint flags marking prologue, epilogue and >>> versioned loops generated >>> by vectorizer

[C++ PATCH[ global trees

2017-05-04 Thread Nathan Sidwell
This patch moves more things into the cp_global_trees array. 1) a set of identifiers, in particular initializer_list is no longer checked by strcmp or multiple get_identifier calls. 2) The anonymous namespace identifier 3) The global namespace and its name. committed to trunk. nathan -- Nat

Re: [PATCH GCC8][28/33]Don't count non-interger PHIs for register pressure

2017-05-04 Thread Bin.Cheng
On Wed, Apr 26, 2017 at 3:32 PM, Bin.Cheng wrote: > On Wed, Apr 26, 2017 at 3:23 PM, Richard Biener > wrote: >> On Wed, Apr 26, 2017 at 3:37 PM, Bin.Cheng wrote: >>> On Wed, Apr 26, 2017 at 2:32 PM, Richard Biener >>> wrote: On Tue, Apr 18, 2017 at 12:52 PM, Bin Cheng wrote: > Hi, >>>

[Patch, fortran] PR70071

2017-05-04 Thread Harald Anlauf
While trying to clean up my working copy, I found that the trivial patch for the ICE-on-invalid as described in the PR regtests cleanly for 7-release on i686-pc-linux-gnu. Here's the cleaned-up version (diffs attached). 2017-05-04 Harald Anlauf PR fortran/70071 * array.c (gfc

Re: [PATCH GCC8][13/33]Rewrite cost computation of ivopts

2017-05-04 Thread Bin.Cheng
On Wed, Apr 26, 2017 at 11:18 AM, Richard Biener wrote: > On Wed, Apr 26, 2017 at 12:12 PM, Bin.Cheng wrote: >> On Wed, Apr 26, 2017 at 10:50 AM, Richard Biener >> wrote: >>> On Tue, Apr 18, 2017 at 12:43 PM, Bin Cheng wrote: Hi, This is the major part of this patch series. It rewrit

Re: [PATCH GCC8][11/33]New interfaces for tree affine

2017-05-04 Thread Bin.Cheng
On Mon, Apr 24, 2017 at 11:43 AM, Richard Biener wrote: > On Tue, Apr 18, 2017 at 12:43 PM, Bin Cheng wrote: >> Hi, >> This patch adds three simple interfaces for tree affine which will be used in >> cost computation later. >> >> Is it OK? > > > +static inline tree > +aff_combination_type (aff_tr

Re: [PATCH, GCC/ARM 2/2, ping] Allow combination of aprofile and rmprofile multilibs

2017-05-04 Thread Thomas Preudhomme
Now that stage1 is open, ping? Best regards, Thomas On 03/01/17 17:23, Thomas Preudhomme wrote: Ping? Best regards, Thomas On 06/12/16 11:35, Thomas Preudhomme wrote: Ping? *** gcc/ChangeLog *** 2016-10-03 Thomas Preud'homme * config.gcc: Allow combinations of aprofile and rm

Re: [PATCH GCC8][07/33]Offset validity check in address expression

2017-05-04 Thread Bin.Cheng
On Wed, May 3, 2017 at 10:49 AM, Richard Biener wrote: > On Tue, May 2, 2017 at 7:06 PM, Bin.Cheng wrote: >> On Mon, Apr 24, 2017 at 11:34 AM, Richard Biener >> wrote: >>> On Tue, Apr 18, 2017 at 12:41 PM, Bin Cheng wrote: Hi, For now, we check validity of offset by computing the maxi

[arm-embedded] [PATCH, GCC/x86 mingw32] Add configure option to force wildcard behavior on Windows

2017-05-04 Thread Thomas Preudhomme
Hi, We've decided to apply the following patch to the ARM/embedded-7-branch as we did earlier for the ARM/embedded-6-branch. Patch attached for reference. Best regards, Thomas On 17/02/17 22:52, JonY wrote: On 02/17/2017 11:31 AM, Thomas Preudhomme wrote: Here you are: 2017-01-24 Thomas

[PR 80622] Treat const pools as initialized in SRA

2017-05-04 Thread Martin Jambor
Hi, PR 80622 happens because when setting grp_write lazily, the code does not acknowledge that constant pool bases come initialized and so contain data even when not written to. The patch below fixes that but it also puts a test for pre-initialization into a special function, uses it at all appro

[PATCH] Small type_hash_canon improvement

2017-05-04 Thread Jakub Jelinek
Hi! While type_hash_canon in case of reusing an already existing type ggc_frees the freshly created type, we still waste one type uid for each such case, this patch attempts to avoid that. Furthermore, for INTEGER_TYPE we keep around the min and max value INTEGER_CSTs and the cached values vector

Re: [wwwdocs] gcc-8/porting_to.html

2017-05-04 Thread Thomas Preudhomme
Committed with the suggested changes (see attachment for reference). Thanks. Best regards, Thomas On 23/03/17 06:47, Gerald Pfeifer wrote: Hi Thomas, On Wed, 22 Mar 2017, Thomas Preudhomme wrote: Is this ok for wwwdocs once [1] is committed in GCC 8 cycle? + GCC on Microsoft Windows c

Re: [PATCH 1/4][PR tree-optimization/78496] Don't simplify conditionals too early in VRP

2017-05-04 Thread Jeff Law
On 05/04/2017 04:59 AM, Richard Biener wrote: I think this is a hack ;) Basically the issue is that jump-threading uses ASSERT_EXPRs at all (which are an implementation detail of VRP). As far as I understand it does that because VRP can do "fancy" things and create ASSERT_EXPRs that do not di

Re: [wwwdocs] gcc-8/porting_to.html

2017-05-04 Thread Thomas Preudhomme
Great, thanks. I'll go and commit the corresponding wwwdocs change. Best regards, Thomas On 04/05/17 12:03, JonY wrote: On 03/23/2017 10:47 AM, Thomas Preudhomme wrote: Ack. Please find updated patch as per suggestions. Best regards, Thomas I've applied the changes to GCC 8 trunk as r247

[PATCH] Improve VR computation for [x, y] & z or [x, y] | z (PR tree-optimization/80558)

2017-05-04 Thread Jakub Jelinek
Hi! This patch improves value range computation of BIT_{AND,IOR}_EXPR with one singleton range and one range_int_cst_p, where the singleton range has n clear least significant bits, then m set bits and either that is all it has (i.e. negation of a power of 2), or the bits above those two sets of b

[PATCH] Improve memory CSE

2017-05-04 Thread Richard Biener
The following improves how we find the latest VUSE which definition dominates a PHI in get_continuation_for_phi. Rather than the very simplistic variant that requires one of the PHI args providing this we see if walking from any of the PHI args upwards will get us to such VUSE (with the exception

Re: Fix bootstrap issue with gcc 4.1

2017-05-04 Thread Jan Hubicka
> On Thu, May 4, 2017 at 11:04 AM, Jan Hubicka wrote: > >> > > >> >Sure, I'm not questioning the patch, just wondering if we shouldn't > >> >improve > >> >store-merging further (we want to do it anyway for e.g. bitop adjacent > >> >operations etc.). > >> > >> We definitely want to do that. It sho

[PATCH] RISC-V: Unify indention in riscv.md

2017-05-04 Thread Palmer Dabbelt
From: Kito Cheng This contains only whitespace changes. gcc/ChangeLog 2017-05-04 Kito Cheng * config/riscv/riscv.md: Unify indentation. --- gcc/ChangeLog | 4 + gcc/config/riscv/riscv.md | 559 -- 2 files changed, 291 insert

[PATCH] RISC-V: Add -mstrict-align option

2017-05-04 Thread Palmer Dabbelt
From: Andrew Waterman The RISC-V user ISA permits misaligned accesses, but they may trap and be emulated. That emulation software needs to be compiled assuming strict alignment. Even when strict alignment is not required, set SLOW_UNALIGNED_ACCESS based upon -mtune to avoid a performance pitfal

Re: Handle data dependence relations with different bases

2017-05-04 Thread Richard Biener
On Thu, May 4, 2017 at 2:12 PM, Richard Biener wrote: > On Wed, May 3, 2017 at 10:00 AM, Richard Sandiford > wrote: >> This patch tries to calculate conservatively-correct distance >> vectors for two references whose base addresses are not the same. >> It sets a new flag DDR_COULD_BE_INDEPENDENT_

Re: C PATCH to fix missing -Wlogical-op warning (PR c/80525)

2017-05-04 Thread Marek Polacek
On Thu, May 04, 2017 at 02:13:24PM +0200, Richard Biener wrote: > On Thu, May 4, 2017 at 2:11 PM, Marek Polacek wrote: > > On Thu, May 04, 2017 at 12:42:03PM +0200, Richard Biener wrote: > >> > +static tree > >> > +unwrap_c_maybe_const (tree *tp, int *walk_subtrees, void *) > >> > +{ > >> > + if

Re: C PATCH to fix missing -Wlogical-op warning (PR c/80525)

2017-05-04 Thread Richard Biener
On Thu, May 4, 2017 at 2:11 PM, Marek Polacek wrote: > On Thu, May 04, 2017 at 12:42:03PM +0200, Richard Biener wrote: >> > +static tree >> > +unwrap_c_maybe_const (tree *tp, int *walk_subtrees, void *) >> > +{ >> > + if (TREE_CODE (*tp) == C_MAYBE_CONST_EXPR) >> > +{ >> > + *tp = C_MAYB

Re: C PATCH to fix missing -Wlogical-op warning (PR c/80525)

2017-05-04 Thread Marek Polacek
On Thu, May 04, 2017 at 12:42:03PM +0200, Richard Biener wrote: > > +static tree > > +unwrap_c_maybe_const (tree *tp, int *walk_subtrees, void *) > > +{ > > + if (TREE_CODE (*tp) == C_MAYBE_CONST_EXPR) > > +{ > > + *tp = C_MAYBE_CONST_EXPR_EXPR (*tp); > > + /* C_MAYBE_CONST_EXPRs don

Re: Handle data dependence relations with different bases

2017-05-04 Thread Richard Biener
On Wed, May 3, 2017 at 10:00 AM, Richard Sandiford wrote: > This patch tries to calculate conservatively-correct distance > vectors for two references whose base addresses are not the same. > It sets a new flag DDR_COULD_BE_INDEPENDENT_P if the dependence > isn't guaranteed to occur. > > The motiv

Re: Handle data dependence relations with different bases

2017-05-04 Thread Richard Sandiford
"Bin.Cheng" writes: > On Thu, May 4, 2017 at 11:06 AM, Richard Sandiford > wrote: >> "Bin.Cheng" writes: >>> On Wed, May 3, 2017 at 9:00 AM, Richard Sandiford >>> wrote: Index: gcc/tree-data-ref.c === --- gcc/tree-da

Re: [RFC][PATCH] Introduce -fdump*-folding

2017-05-04 Thread Martin Liška
On 05/04/2017 12:40 PM, Richard Biener wrote: On Thu, May 4, 2017 at 11:22 AM, Martin Liška wrote: On 05/03/2017 12:12 PM, Richard Biener wrote: On Wed, May 3, 2017 at 10:10 AM, Martin Liška wrote: Hello Last release cycle I spent quite some time with reading of IVOPTS pass dump file. Usi

Re: [wwwdocs] gcc-8/porting_to.html

2017-05-04 Thread JonY
On 03/23/2017 10:47 AM, Thomas Preudhomme wrote: > Ack. Please find updated patch as per suggestions. > > Best regards, > > Thomas > I've applied the changes to GCC 8 trunk as r247588. signature.asc Description: OpenPGP digital signature

Re: [PATCH 1/4][PR tree-optimization/78496] Don't simplify conditionals too early in VRP

2017-05-04 Thread Richard Biener
On Wed, May 3, 2017 at 6:32 PM, Jeff Law wrote: > [ With the patch attached... ] > > > On 05/03/2017 10:31 AM, Jeff Law wrote: >> >> This is the first of 3-5 patches to address pr78496. >> >> The goal of these patches is to catch jump threads earlier in the pipeline >> to avoid undesirable behavio

Re: Handle data dependence relations with different bases

2017-05-04 Thread Bin.Cheng
On Thu, May 4, 2017 at 11:06 AM, Richard Sandiford wrote: > "Bin.Cheng" writes: >> On Wed, May 3, 2017 at 9:00 AM, Richard Sandiford >> wrote: >>> Index: gcc/tree-data-ref.h >>> === >>> --- gcc/tree-data-ref.h 2017-05-03 08:48:11.97

Re: C PATCH to fix missing -Wlogical-op warning (PR c/80525)

2017-05-04 Thread Richard Biener
On Thu, May 4, 2017 at 12:27 PM, Marek Polacek wrote: > This PR points out a missing -Wlogical-op warning (unless you use -fwrapv). > > We end up calling warn_logical_operator with op_left that is > C_M_C_E != 0 > and op_right that is > a + 1 > > But make_range just cannot handle C_M_C_Es right;

Re: [PATCH, GCC/ARM, Stage 1] PR71607: Fix ICE when loading constant

2017-05-04 Thread Prakhar Bahuguna
On 03/05/2017 11:30:13, Richard Earnshaw (lists) wrote: > On 20/04/17 10:54, Prakhar Bahuguna wrote: > > [ARM] PR71607: Fix ICE when loading constant > > > > gcc/ChangeLog: > > > > 2017-04-18 Andre Vieira > > Prakhar Bahuguna > > > > PR target/71607 > > * config/arm/arm.md (

Re: [RFC][PATCH] Introduce -fdump*-folding

2017-05-04 Thread Richard Biener
On Thu, May 4, 2017 at 11:22 AM, Martin Liška wrote: > On 05/03/2017 12:12 PM, Richard Biener wrote: >> >> On Wed, May 3, 2017 at 10:10 AM, Martin Liška wrote: >>> >>> Hello >>> >>> Last release cycle I spent quite some time with reading of IVOPTS pass >>> dump file. Using -fdump*-details causes

Re: [PATCH][AArch64] Model Cortex-A53 load forwarding

2017-05-04 Thread Richard Earnshaw (lists)
On 05/04/17 13:29, Wilco Dijkstra wrote: > Code scheduling for Cortex-A53 isn't as good as it could be. It turns out > code runs faster overall if we place loads and stores with a dependency > closer together. To achieve this effect, this patch adds a bypass between > cortex_a53_load1 and cortex_

Re: [PATCH] Fix ICE in get_range_info (PR tree-optimization/80612)

2017-05-04 Thread Richard Biener
On Thu, May 4, 2017 at 11:14 AM, Marek Polacek wrote: > We need to check that the SSA_NAME we're passing down to get_range_info > is of INTEGRAL_TYPE_P; on pointers we'd crash on an assert. > > Bootstrapped/regtested on x86_64-linux, ok for trunk and 7.2? Ok. Richard. > 2017-05-04 Marek Polace

Re: Fix bootstrap issue with gcc 4.1

2017-05-04 Thread Richard Biener
On Thu, May 4, 2017 at 11:04 AM, Jan Hubicka wrote: >> > >> >Sure, I'm not questioning the patch, just wondering if we shouldn't >> >improve >> >store-merging further (we want to do it anyway for e.g. bitop adjacent >> >operations etc.). >> >> We definitely want to do that. It should also 'nicely

Re: [PATCH][AArch64] Enable AUTOPREFETCHER_WEAK with -mcpu=generic

2017-05-04 Thread Richard Earnshaw (lists)
On 05/04/17 13:38, Wilco Dijkstra wrote: > Many supported cores use the AUTOPREFETCHER_WEAK setting which tries > to order loads and stores to improve streaming performance. Since significant > gains were reported in http://patchwork.ozlabs.org/patch/534469/ it seems > like a good idea to enable t

C PATCH to fix missing -Wlogical-op warning (PR c/80525)

2017-05-04 Thread Marek Polacek
This PR points out a missing -Wlogical-op warning (unless you use -fwrapv). We end up calling warn_logical_operator with op_left that is C_M_C_E != 0 and op_right that is a + 1 But make_range just cannot handle C_M_C_Es right; for exprs it simply picks the first operand and that doesn't work wit

Re: [PATCH][AArch64] Set jump alignment to 4 for Cortex cores

2017-05-04 Thread Richard Earnshaw (lists)
On 12/04/17 13:50, Wilco Dijkstra wrote: > Set jump alignment to 4 for Cortex cores as it reduces codesize by 0.4% on > average > with no obvious performance difference. See original discussion of the > overheads > of various alignments: > https://gcc.gnu.org/ml/gcc-patches/2016-06/msg02075.htm

Re: [PATCH][AArch64] Update alignment for -mcpu=generic

2017-05-04 Thread Richard Earnshaw (lists)
On 12/04/17 13:58, Wilco Dijkstra wrote: > With -mcpu=generic the loop alignment is currently 4. All but one of the > supported cores use 8 or higher. Since using 8 provides performance gains > on several cores, it is best to use that by default. As discussed in [1], > the jump alignment has no

Re: Cap niter_for_unrolled_loop to upper bound

2017-05-04 Thread Richard Biener
On Thu, May 4, 2017 at 8:47 AM, Richard Sandiford wrote: > For the reasons explained in PR77536, niter_for_unrolled_loop assumes 5 > iterations in the absence of profiling information, although it doesn't > increase beyond the estimate for the original loop. This left a hole in > which the new es

Re: [PATCH] Fix -fopt-info documentation in invoke.texi

2017-05-04 Thread Richard Biener
On Thu, May 4, 2017 at 12:51 AM, Steve Ellcey wrote: > The description of the default behavour of -fopt-info in invoke.texi is > wrong. This patch fixes it. I also added a sentence to explicitly say > what is implied by the note that -fopt-info-vec-missed is the same as > -fopt-info-missed-vec.

Re: [PATCH][ARM] Update max_cond_insns settings

2017-05-04 Thread Richard Earnshaw (lists)
On 12/04/17 14:02, Wilco Dijkstra wrote: > The existing setting of max_cond_insns for most cores is non-optimal. > Thumb-2 IT has a maximum limit of 4, so 5 means emitting 2 IT sequences. > Also such long sequences of conditional instructions can increase the number > of executed instructions signi

[OBVIOUS][PATCH] Remove an unused variable.

2017-05-04 Thread Martin Liška
Hi. Installed as obvious. Martin >From 67276230a5f6150a214d8be4ebbd4962f2ce371b Mon Sep 17 00:00:00 2001 From: marxin Date: Thu, 4 May 2017 11:59:31 +0200 Subject: [PATCH] Remove an unused variable. gcc/ChangeLog: 2017-05-04 Martin Liska * tree-vrp.c (simplify_cond_using_ranges_2): Remo

Re: [PATCH] Backport the recent ARM ABI patch to 6 (PR target/77728)

2017-05-04 Thread Marek Polacek
Ping. On Thu, Apr 27, 2017 at 12:44:42PM +0200, Marek Polacek wrote: > This is a backport of the ARM ABI fix, except that it doesn't change code, > only adds the ABI warning. > > So there were four changes, three of them are changing "else if (res < 0)" > to "if (res != 0)" and the fourth was the

Re: [PATCH, GCC] Require c99_runtime for pr78622.c

2017-05-04 Thread Thomas Preudhomme
And now with the patch. Best regards, Thomas On 04/05/17 10:36, Thomas Preudhomme wrote: Hi, Testcase gcc.c-torture/execute/pr78622.c uses %hhd printf specifier which was introduced in C99. C89 only recognizes h, l and L length specifier, it does not recognize hh length specifier. As such, th

Re: Handle data dependence relations with different bases

2017-05-04 Thread Richard Sandiford
"Bin.Cheng" writes: > On Wed, May 3, 2017 at 9:00 AM, Richard Sandiford > wrote: >> Index: gcc/tree-data-ref.h >> === >> --- gcc/tree-data-ref.h 2017-05-03 08:48:11.977015306 +0100 >> +++ gcc/tree-data-ref.h 2017-05-03 08:48:48.73703

Re: [PATCH][AArch64] Improve address cost for -mcpu=generic

2017-05-04 Thread Richard Earnshaw (lists)
On 12/04/17 14:08, Wilco Dijkstra wrote: > All cores which add a cpu_addrcost_table use a non-zero value for > HI and TI mode shifts (a non-zero value for general indexing also > applies to all shifts). Given this, it makes no sense to use a > different setting in generic_addrcost_table. So chan

[PATCH, GCC] Require c99_runtime for pr78622.c

2017-05-04 Thread Thomas Preudhomme
Hi, Testcase gcc.c-torture/execute/pr78622.c uses %hhd printf specifier which was introduced in C99. C89 only recognizes h, l and L length specifier, it does not recognize hh length specifier. As such, this commit adds a c99_runtime effective target requirement. ChangeLog entry is as follows: *

Re: Handle data dependence relations with different bases

2017-05-04 Thread Bin.Cheng
On Wed, May 3, 2017 at 9:00 AM, Richard Sandiford wrote: > This patch tries to calculate conservatively-correct distance > vectors for two references whose base addresses are not the same. > It sets a new flag DDR_COULD_BE_INDEPENDENT_P if the dependence > isn't guaranteed to occur. > > The motiva

Re: [RFC][PATCH] Introduce -fdump*-folding

2017-05-04 Thread Martin Liška
On 05/03/2017 12:12 PM, Richard Biener wrote: On Wed, May 3, 2017 at 10:10 AM, Martin Liška wrote: Hello Last release cycle I spent quite some time with reading of IVOPTS pass dump file. Using -fdump*-details causes to generate a lot of 'Applying pattern' lines, which can make reading of a dum

[PATCH] Fix ICE in get_range_info (PR tree-optimization/80612)

2017-05-04 Thread Marek Polacek
We need to check that the SSA_NAME we're passing down to get_range_info is of INTEGRAL_TYPE_P; on pointers we'd crash on an assert. Bootstrapped/regtested on x86_64-linux, ok for trunk and 7.2? 2017-05-04 Marek Polacek PR tree-optimization/80612 * calls.c (get_size_range): Che

[PATCH] Tweak array_at_struct_end_p

2017-05-04 Thread Richard Biener
The following picks the changes suggested as followup for PR80533 that do not cause the warning regression on accessing a [0] array. Additionally the patch removes the unnecessary allow_compref of the function. The question whether we want to allow an array to extend into padding still stands.

[PATCH 3/3] Vect peeling cost model

2017-05-04 Thread Robin Dapp
gcc/ChangeLog: 2017-04-26 Robin Dapp * tree-vect-data-refs.c (vect_peeling_hash_get_lowest_cost): Change cost model. (vect_peeling_hash_choose_best_peeling): Return extended peel info. (vect_peeling_supportable): Return peeling status. diff --git a/gcc/tree-vect

[PATCH 2/3] Vect peeling cost model

2017-05-04 Thread Robin Dapp
Wrap some frequently used snippets in separate functions. gcc/ChangeLog: 2017-04-26 Robin Dapp * tree-vect-data-refs.c (vect_update_misalignment_for_peel): Rename. (vect_get_peeling_costs_all_drs): Create function. (vect_peeling_hash_get_lowest_cost): Use vect_

Re: [PATCH, GCC/ARM, Stage 1] Enable Purecode for ARMv8-M Baseline

2017-05-04 Thread Ramana Radhakrishnan
On Thu, May 04, 2017 at 09:50:42AM +0100, Prakhar Bahuguna wrote: > > > > Otherwise ok. Please respin and test with an armhf thumb32 bootstrap > > and regression test run. > > > > regards > > Ramana > > I've respun this patch with the suggested changes, along with a new changelog > for docs:

Re: Fix bootstrap issue with gcc 4.1

2017-05-04 Thread Jan Hubicka
> > > >Sure, I'm not questioning the patch, just wondering if we shouldn't > >improve > >store-merging further (we want to do it anyway for e.g. bitop adjacent > >operations etc.). > > We definitely want to do that. It should also 'nicely' merge with bswap for > gathering the load side of a piec

  1   2   >