[PATCH PR83695]Fix ICE by resetting cached scev info after interchange.

2018-01-11 Thread Bin Cheng
Hi, As explained in comment of PR83695, outdated cached scev info could be referred by later interchange of outer loops in nest. This simple patch fixes ICE by resetting cached scev info after interchange. It's expensive resetting all scev information but might not be a problem here given we

[committed][AArch64] Avoid GET_MODE_NUNITS in v8.4 support

2018-01-11 Thread Richard Sandiford
This patch replaces GET_MODE_NUNITS in some of the v8.4 support with equivalent values, in preparation for the switch to NUM_POLY_INT_COEFFS==2. Tested on aarch64-linux-gnu and committed as an obvious extension of the previous patches. Richard 2018-01-11 Richard Sandiford

Re: [PATCH 0/5] x86: CVE-2017-5715, aka Spectre

2018-01-11 Thread H.J. Lu
On Thu, Jan 11, 2018 at 2:16 AM, Richard Biener wrote: > On Thu, Jan 11, 2018 at 1:18 AM, Jeff Law wrote: >> On 01/10/2018 06:14 AM, Jakub Jelinek wrote: >>> On Wed, Jan 10, 2018 at 02:08:48PM +0100, Richard Biener wrote: On Wed, Jan 10, 2018 at

[PR 83178] Adjust scan-dump-times count of devirt-22.C

2018-01-11 Thread Martin Jambor
Hi, IPA-CP does an extra devirtualization in devirt-22.C now because Honza's profiling changes have caused an extra edge to be maybe_hot_p. The scan dump is guarded with scan-dump-times, I assume so that we are alerted to any changes in behavior of the patch, like now. I have looked at the

Re: [PATCH] Add VEC_ORDERED_REMOVE_IF

2018-01-11 Thread Tom de Vries
On 01/10/2018 07:03 PM, Bernhard Reutner-Fischer wrote: On 5 January 2018 22:06:10 CET, Tom de Vries wrote: [ was: Re: [RFC] Add vec::ordered_remove_if ] Tom, s/an an/an/g Fixed. Also: - added '()' around more macro args in VEC_ORDERED_REMOVE_IF - added PR number

Re: [PATCH 0/5] x86: CVE-2017-5715, aka Spectre

2018-01-11 Thread H.J. Lu
On Mon, Jan 8, 2018 at 3:37 AM, H.J. Lu wrote: > On Sun, Jan 7, 2018 at 8:07 PM, Sandra Loosemore > wrote: >> On 01/07/2018 03:58 PM, H.J. Lu wrote: >>> >>> This set of patches for GCC 8 mitigates variant #2 of the speculative >>> execution >>>

[PATCH] MicroBlaze resolve section change issues for ident output

2018-01-11 Thread Nathan Rossi
Change 'microblaze_asm_output_ident' so that instead of just switching section to .sdata2/.rodata it uses the assembler .pushsection and .popsection directives to preserve the section context when emitting the ident string content. This resolves issues associated with the use of the

[committed][AArch64] Extra scalar_float_mode patch

2018-01-11 Thread Richard Sandiford
In preparation for the switch to NUM_POLY_INT_COEFFS==2. Tested on aarch64-linux-gnu and committed as obvious. Richard 2018-01-11 Richard Sandiford gcc/ * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int): Use scalar_float_mode.

Re: [PATCH PR83695]Fix ICE by resetting cached scev info after interchange.

2018-01-11 Thread Richard Biener
On Thu, Jan 11, 2018 at 1:49 PM, Bin Cheng wrote: > Hi, > As explained in comment of PR83695, outdated cached scev info could be > referred > by later interchange of outer loops in nest. This simple patch fixes ICE by > resetting cached scev info after interchange. It's

[PATCH] Fix PR83435

2018-01-11 Thread Richard Biener
The following fixes VRP to be less susceptible to TREE_OVERFLOW in the GIMPLE IL (which we don't really want...). It also fixes fallout from my earlier graphite fixes (look better at this stage than ignoring fake edges when computing loop exists everywhere...). Bootstrapped and tested on

[Ada] Integer overflow in SS_Allocate

2018-01-11 Thread Pierre-Marie de Rodat
This patch imposes a new check and rewrites existing ones to ensure operations involving SS_Ptr do not cause an Integer overflow. The Default_Sec_Stack_Size function was removed in the process to simplify System.Parameter. SS_Ptr was derived from the integer System.Parameters.Size_Type to ease

[Ada] Illegal protected calls in inherited pre/postconditions

2018-01-11 Thread Pierre-Marie de Rodat
AI12-0166 specifies that it is illegal for a pre/postcondition of a protected operation to contain an internal call to a protected function. This patch completes the implementation of this rule in the case the condition is inherited from a classwide condition of an abstract operation of an

[Ada] Different runtime behavior of Predicate_Failure

2018-01-11 Thread Pierre-Marie de Rodat
This patch corrects the generation of predicate checks to handle the case where Predicate_Failure appears as a pragma. -- Source -- -- main.adb with Ada.Assertions; use Ada.Assertions; with Ada.Exceptions; use Ada.Exceptions; with Ada.Text_IO;use Ada.Text_IO;

[Ada] Crash on build-in-place call with address specification for target

2018-01-11 Thread Pierre-Marie de Rodat
The presence of an address clause complicates the build-in-place expansion because the indicated address must be processed before the indirect call is generated, including the definition of a local pointer to the object. The address clause may come from an aspect specification or from an explicit

[Ada] Warning on out-of-range value for default-initialized scalar object

2018-01-11 Thread Pierre-Marie de Rodat
When an object of a type with a specified Default_Value aspect is declared without an explicit initial value and the default value is out of range of the objects subtype, the compiler now issues a warning that Constraint_Error will be raised due to an out-of-range value. The test below must

[committed] Fix mode_for_size units in caller-save.c (PR83761)

2018-01-11 Thread Richard Sandiford
The new opt_mode asserts triggered for replace_reg_with_saved_mem because it was passing bytes rather than bits to mode_for_size. Previously we ended up with a BLKmode register instead, but presumably that didn't matter because this is "only" used for debug insns. Tested on bfin-elf (as far as

Re: PR81703 and Martin's fix for PR83501

2018-01-11 Thread Prathamesh Kulkarni
On 11 January 2018 at 14:52, Christophe Lyon wrote: > Hi > > On 10 January 2018 at 19:42, Prathamesh Kulkarni > wrote: >> Hi, >> I have attached patch for PR81703 rebased on Martin's fix for PR83501 >> posted here since both had

Re: PR81703 and Martin's fix for PR83501

2018-01-11 Thread Prathamesh Kulkarni
On 11 January 2018 at 16:14, Prathamesh Kulkarni wrote: > On 11 January 2018 at 14:52, Christophe Lyon > wrote: >> Hi >> >> On 10 January 2018 at 19:42, Prathamesh Kulkarni >> wrote: >>> Hi, >>> I have

Re: [PATCH] Fix PR81968

2018-01-11 Thread Richard Biener
On Wed, 10 Jan 2018, Richard Biener wrote: > On January 10, 2018 6:28:57 PM GMT+01:00, Jeff Law wrote: > >On 01/10/2018 03:05 AM, Richard Biener wrote: > >> > >> This joint work rewrites LTO debug section copying to not leave > >> discarded sections around as SHT_NULL but to

Re: [PATCH 2/5] Introduce PROB_UNINITIALIZED constant and use it in, predict.def.

2018-01-11 Thread Jan Hubicka
> Second patch cleans up predictors that do not use a value from predict.def, > but their value is derived from e.g. number of iterations of a loop. > These predictors have set probability to PROB_UNINITIALIZED and > analyze_branch.py > does not compare statistics to values defined in

Fix ICE in partial inlining profile scaling

2018-01-11 Thread Jan Hubicka
Hi, ipa-fnsplit sometimes ICEs on profile update because profile_count::adjust_for_ipa_scaling is called too early. Bootstrapped/regtested x86_64-linux, will commit it shortly. PR middle-end/83718 * tree-inline.c (copy_cfg_body): Adjust num for scaling after they are

Re: [PATCH 0/5] x86: CVE-2017-5715, aka Spectre

2018-01-11 Thread Richard Biener
On Thu, Jan 11, 2018 at 1:18 AM, Jeff Law wrote: > On 01/10/2018 06:14 AM, Jakub Jelinek wrote: >> On Wed, Jan 10, 2018 at 02:08:48PM +0100, Richard Biener wrote: >>> On Wed, Jan 10, 2018 at 11:18 AM, Eric Botcazou >>> wrote: > It's really just a

Re: PR83775

2018-01-11 Thread Kyrill Tkachov
Hi Prathamesh, On 10/01/18 19:01, Prathamesh Kulkarni wrote: Hi, The attached patch tries to fix PR83775. Validation in progress. OK to commit if passes ? I've read the relevant PRs and other's inputs on this (thanks for the perspectives!) I agree with Richard's design that the driver does

Re: [PATCH 4/5] Remove predictors that are unrealiable.

2018-01-11 Thread Jan Hubicka
> These predictors are in my opinion not reliable and thus I decided to remove > them: > > 1) PRED_NEGATIVE_RETURN: probability is ~51% > 2) PRED_RECURSIVE_CALL: there are 2 dominant edges that influence value to > 63%; > w/o these edges it goes down to 52% > 3) PRED_POLYMORPHIC_CALL: having

Re: [PATCH PR82096] Fix ICE in int_mode_for_mode, at stor-layout.c:403 with arm-linux-gnueabi

2018-01-11 Thread Sudakshina Das
Hi Jeff On 10/01/18 21:08, Jeff Law wrote: On 01/10/2018 09:25 AM, Sudakshina Das wrote: Hi Jeff On 10/01/18 10:44, Sudakshina Das wrote: Hi Jeff On 09/01/18 23:43, Jeff Law wrote: On 01/05/2018 12:25 PM, Sudakshina Das wrote: Hi Jeff On 05/01/18 18:44, Jeff Law wrote: On 01/04/2018

Re: [PATCH] Fix PR80846, change vectorizer reduction epilogue (on x86)

2018-01-11 Thread Richard Biener
On Wed, 10 Jan 2018, Richard Biener wrote: > On Tue, 9 Jan 2018, Jeff Law wrote: > > > On 01/05/2018 02:01 AM, Richard Biener wrote: > > > On Tue, 28 Nov 2017, Richard Biener wrote: > > > > > >> > > >> The following adds a new target hook, targetm.vectorize.split_reduction, > > >> which allows

[Ada] Wrong column in sloc of "expect name" error for loop variant

2018-01-11 Thread Pierre-Marie de Rodat
This patch corrects error messages printed when using the pragma Loop_Variant without a named argument from having an incorrect column number in some cases. Tested on x86_64-pc-linux-gnu, committed on trunk 2018-01-11 Justin Squirek gcc/ada/ * sem_prag.adb

[Ada] Inconsistent scope chain due to quantified expression

2018-01-11 Thread Pierre-Marie de Rodat
This patch corrects the minor decoration performed on invariant procedures in case the procedure is not inserted into the tree and analyzed. The decoration now constructs a proper first/next/last entity chain containing the single formal parameter which represents the object of the related type.

[Ada] No error on missing enclosing parentheses in Expression Function

2018-01-11 Thread Pierre-Marie de Rodat
This patch fixes an issue whereby an expression within an expression function declaration or completion without proper parenthesization is incorrectly accepted by the compiler. Tested on x86_64-pc-linux-gnu, committed on trunk 2018-01-11 Justin Squirek gcc/ada/

[Ada] Missing diagnostic of categorization dependency

2018-01-11 Thread Pierre-Marie de Rodat
This patch modifies the analysis of subprogram bodies to catch a case where a pure subprogram body unit depends on non-pure units. Tested on x86_64-pc-linux-gnu, committed on trunk 2018-01-11 Hristian Kirtchev gcc/ada/ * sem_ch6.adb

Re: Go patch committed: Update to Go1.10beta1

2018-01-11 Thread Rainer Orth
Hi Ian, > On Wed, Jan 10, 2018 at 5:42 AM, Ian Lance Taylor wrote: >> >> Whoops, there's a bug on big-endian 32-bit systems. I'm testing >> https://golang.org/cl/87135. > > Committed as follows. thanks, that fixed quite a lot of the failures. However, many others remain, too

[Ada] Incorrect diagnostic on illegal with clause

2018-01-11 Thread Pierre-Marie de Rodat
This patch updates the detection of illegal with clauses which import private child packages to properly detect a grandchild of Ada. -- Source -- -- fake.ads package Fake is end Fake; -- fake-ada.ads package Fake.Ada is end Fake.Ada; -- fake-ada-text_io.ads

[Ada] Spurious error on referene to subcoponrnt in dynamic predicate

2018-01-11 Thread Pierre-Marie de Rodat
This patch fixes a visibility error in the expression for a dynamic predicate of a record type, when the expression contains a reference to a subcomponent of the record given by a selected component whose prefix is the name of the enclosing component. Executing gnatmake -q -gnata main

Re: PR82665 - missing value range optimization for memchr

2018-01-11 Thread Richard Biener
On Wed, Jan 10, 2018 at 9:59 PM, Jeff Law wrote: > On 01/06/2018 11:58 PM, Prathamesh Kulkarni wrote: > [ Snip ] > >>> I think with those changes we're probably in good shape. But please >>> repost for final approval. >> I have the updated the attached version with your

Re: [PATCH 0/5] x86: CVE-2017-5715, aka Spectre

2018-01-11 Thread Alan Modra
On Wed, Jan 10, 2018 at 05:13:36PM -0700, Jeff Law wrote: > On 01/08/2018 07:23 AM, Alan Modra wrote: > > On Sun, Jan 07, 2018 at 04:36:20PM -0700, Jeff Law wrote: > >> On 01/07/2018 03:58 PM, H.J. Lu wrote: > >>> This set of patches for GCC 8 mitigates variant #2 of the speculative > >>>

Re: [nvptx, committed] Disable -gstatement-frontiers for nvptx

2018-01-11 Thread Tom de Vries
On 12/31/2017 09:04 PM, Alexandre Oliva wrote: On Dec 29, 2017, Tom de Vries wrote: On 12/29/2017 05:12 AM, Alexandre Oliva wrote: On Dec 27, 2017, Tom de Vries wrote: .loc file_index line_number column_position so this causes ptxas

[Ada] Secondary stack leak due to controlled component

2018-01-11 Thread Pierre-Marie de Rodat
This pach modifies the expansion related to initialization calls and secondary stack usage to inspec the components of a type derived from Limited_Controlled or Controlled. Previously controlled types were treated as never utilizing the secondary stack, however this is not true because a

[Ada] New implementation for Normalize_Pathname

2018-01-11 Thread Pierre-Marie de Rodat
This implementation fixes an issue on Windows where a single drive letter was not followed by a directory separator. On Windows the following program: with Ada.Text_IO; use Ada.Text_IO; with GNAT.OS_Lib; use GNAT.OS_Lib; procedure Main is begin Put_Line (Normalize_Pathname

[Ada] Annotate standard File_Type with Default_Initial_Condition (for SPARK)

2018-01-11 Thread Pierre-Marie de Rodat
GNATprove was emitting spurious checks about objects of the File_Type being uninitialized and there was no easy to fix that (those checks could only be silenced by pragma Annotate or by hiding File_Type behind as SPARK wrapper). Now the full view of File_Type is annotated with

[Ada] Warning on use of predefined operations on an actual fixed-point type

2018-01-11 Thread Pierre-Marie de Rodat
The compiler warns when a generic actual is a fixed-point type, because arithmetic operations in the instance will use the predefined operations on it, even if the type has user-defined primitive operations (unless formsl surprograms for these operations appear in the generic). This patch refines

[Ada] Handling of pragma Predicate

2018-01-11 Thread Pierre-Marie de Rodat
This patch fixes an omission in the processing of pragma Predicate, which should have the same semantics as the corresponding aspect, which is more commonly used. Executing gnatmake -q -gnata predicate predicate must yield: Even1 violated Even2 violated with Text_IO; use

[Ada] Crash on expression function as completion, with implicit dereference

2018-01-11 Thread Pierre-Marie de Rodat
An implicit dereference freezes the corresponding designated type. Most implicit dereferences are made explicit during expansion, but this is not the case for a dispatching call where the the controlling parameter and the corresponding controlling argument are access to a tagged type. In that

Fix predictive commoning profile update ICE

2018-01-11 Thread Jan Hubicka
Hi, in this testcase predictive commoning decides to duplicate loop with profile count of entry being 0. This leads to division by zero. This patch fixes the profile ICE, but I will look into why such update happens at first place. Bootstrapped/regtested x86_64-linux, comitted. Honza

Re: PR83648

2018-01-11 Thread Richard Biener
On Thu, 11 Jan 2018, Marc Glisse wrote: > On Tue, 9 Jan 2018, Prathamesh Kulkarni wrote: > > > As Jakub pointed out for the case: > > void *f() > > { > > return __builtin_malloc (0); > > } > > > > The malloc propagation would set f() to malloc. > > However AFAIU, malloc(0) returns NULL (?) and

[Ada] Secondary stack leaks during object initialization

2018-01-11 Thread Pierre-Marie de Rodat
This patch modifies the transient scope mechanism to prevent secondary stack leaks during object initialization. The modifications are as follows: 1) Prior to this change, the secondary stack was never managed within type initialization procedures, for reasons unknown. It is speculated that the

[Ada] Null procedures not allowed in protected definitions

2018-01-11 Thread Pierre-Marie de Rodat
The syntax rules do not allow null procedures in protected definitions. This patch fixes a bug that accidentally allowed them. Tested on x86_64-pc-linux-gnu, committed on trunk 2018-01-11 Bob Duff gcc/ada/ * par-ch9.adb (P_Protected_Operation_Declaration_Opt): Give

[Ada] gnatbind -f switch gives an error for duplicates

2018-01-11 Thread Pierre-Marie de Rodat
If the -felab-order.txt switch is given to gnatbind, and there are duplicate unit names in elab-order.txt, an error will be given. The following test should get errors: this (spec) <-- that (body) error: elab-order.txt:5: duplicate unit name "this (spec)" from line 1 error: elab-order.txt:7:

[Ada] Allow uses of range utility routines on private types

2018-01-11 Thread Pierre-Marie de Rodat
Frontend only calls Is_Null_Range and Not_Null_Range routines on full views of types, but backends (for example GNATprove) might call them also on private types. This patch adapts those routines to transparently retrieve the full type when called on a private type. No frontend test, because only

[Ada] Prohibit concurrent types in Ghost regions

2018-01-11 Thread Pierre-Marie de Rodat
This patch ensures that single concurrent type declarations are marked as Ghost when they appear within a Ghost region. In addition, the patch verifies that no concurrent type is declared within a Ghost region and issues an error. -- Source -- -- types.ads package

[Ada] Detection of illegal constituent assignments

2018-01-11 Thread Pierre-Marie de Rodat
This patch modifies the analysis of assignment statements to detect an illegal attempt to alter the value of single protected type Part_Of constituent when inside a protected function. Tested on x86_64-pc-linux-gnu, committed on trunk 2018-01-11 Hristian Kirtchev

[Ada] Encoding of with clauses in ALI files

2018-01-11 Thread Pierre-Marie de Rodat
This patch modifies the encodings of with clauses in ALI files to adhere to the existing API. The encodigs are as follows: * Explicit with clauses are encoded on a 'W' line (same as before). * Implicit with clauses for ancestor units are encoded on a 'W' line (same as before). *

[Ada] Aspect/pragma Secondary_Stack_Size can evaluate non-literals as zero

2018-01-11 Thread Pierre-Marie de Rodat
This patch fixes the problem of aspect/pragma Secondary_Stack_Size expressions with non-literals evaluating as zero in static secondary stacks allocations. The aspect Secondary_Stack_Size is now converted to a pragma instead of an attribute as the attribute does not have visibility on the

[Ada] Crash on iterated_component_association in expression function

2018-01-11 Thread Pierre-Marie de Rodat
This patch improves on the handling of the Ada2020 construct Iterated_ Component_Association in various contexts, when the expression involved is a record or array aggregate. Executing: gnatmake -gnatX -q main ./main must yield: 123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ with

[Ada] Finding proper scope when inside entry body

2018-01-11 Thread Pierre-Marie de Rodat
This patch modifies routine Find_Enclosing_Scope which obtains the scope of an arbitrary node to return the unique defining entity of an enclosing body. This automatically takes care of the following corner cases: * The body is a subprogram body which does not complete a previous

[Ada] Missing finalization in case expression

2018-01-11 Thread Pierre-Marie de Rodat
This patch modifies the processing of controlled transient objects within case expressions represented by an Expression_With_Actions node. The inspection of an individual action must continue in case it denotes a complex expression, such as a case statement, which in turn may contain additional

Re: Fix predictive commoning profile update ICE

2018-01-11 Thread Jan Hubicka
Hi, this patch fixes the profile misupdate. Isolate-path was actually dropping to 0 the BB on the likely path rather than the duplicate. Will commit it after bootstrap/regtestest on x86-64 finishes. Honza PR middle-end/83189 * gimple-ssa-isolate-paths.c (isolate_path): Fix

Re: PR81703 and Martin's fix for PR83501

2018-01-11 Thread Christophe Lyon
Hi On 10 January 2018 at 19:42, Prathamesh Kulkarni wrote: > Hi, > I have attached patch for PR81703 rebased on Martin's fix for PR83501 > posted here since both had considerable overlaps: > https://gcc.gnu.org/ml/gcc-patches/2018-01/msg00180.html > > The patch

Re: [PATCH 0/5] x86: CVE-2017-5715, aka Spectre

2018-01-11 Thread Richard Biener
On Wed, Jan 10, 2018 at 2:52 PM, H.J. Lu wrote: > On Wed, Jan 10, 2018 at 5:14 AM, Jakub Jelinek wrote: >> On Wed, Jan 10, 2018 at 02:08:48PM +0100, Richard Biener wrote: >>> On Wed, Jan 10, 2018 at 11:18 AM, Eric Botcazou >>>

Re: [RX] Fix PR 81821

2018-01-11 Thread Nick Clifton
Hi Oleg, > OK for trunk and GCC 7? Approved. Do you have access to the repository, or would you like me to apply the patch for you ? Cheers Nick

[RX] Fix PR 81819

2018-01-11 Thread Oleg Endo
Hi, The attached patch fixes PR 81819, which popped up on GCC 7.  I assume it's also there on trunk, but can't build my app with trunk compiler because it's got other issues. Unfortunately I can't add the reproducer test case since it happens only when building a bigger app with LTO.  But I have

[RX] Fix PR 81821

2018-01-11 Thread Oleg Endo
Hi, The attached patch fixes PR 81821.  It is the same as the patch proposed in the PR.  I have briefly checked it in a private application that uses atomic variables and I think it's rather obvious. I have added atomics support on RX in GCC 7 and that was an initial bug.  Thus I'd like to also

Re: [PR 83178] Adjust scan-dump-times count of devirt-22.C

2018-01-11 Thread Jeff Law
On 01/11/2018 06:52 AM, Martin Jambor wrote: > Hi, > > IPA-CP does an extra devirtualization in devirt-22.C now because Honza's > profiling changes have caused an extra edge to be maybe_hot_p. The scan > dump is guarded with scan-dump-times, I assume so that we are alerted to > any changes in

Re: [PATCH][arm][1/3] Add -march=armv8.4-a option

2018-01-11 Thread Kyrill Tkachov
On 10/01/18 12:53, Christophe Lyon wrote: On 10 January 2018 at 12:05, Kyrill Tkachov wrote: Hi Christophe, On 10/01/18 10:50, Christophe Lyon wrote: Hi Kyrill, On 8 January 2018 at 18:55, Kyrill Tkachov wrote: [resending due

Re: [RX] Fix PR 81821

2018-01-11 Thread Oleg Endo
On Thu, 2018-01-11 at 15:10 +, Nick Clifton wrote: >  > > OK for trunk and GCC 7? > Approved.  Do you have access to the repository, or would you like me > to apply the patch for you ? Thanks.  Committed as r256536 (trunk) and r256538 (GCC 7). Cheers, Oleg

[PATCH][arm] XFAIL advsimd-intrinsics/vld1x2.c

2018-01-11 Thread Kyrill Tkachov
Hi all, This recently added test fails on arm. We haven't implemented these intrinsics for arm (any volunteers?) so for now let's XFAIL these on that target. Also, the float64 versions of these intrinsics are not supposed to be available on arm so this patch slightly adjusts the test to not

Re: [PATCH][AArch64] Use LDP/STP in shrinkwrapping

2018-01-11 Thread Wilco Dijkstra
Segher Boessenkool wrote:   > Of course I see that ldp is useful.  I don't think that this particular > way of forcing more pairs is a good idea.  Needs testing / benchmarking / > instrumentation, and we haven't seen any of that. I wouldn't propose a patch if it caused slowdowns. In fact I am

Re: [PATCH, rs6000] Add __builtin_speculation_barrier

2018-01-11 Thread Segher Boessenkool
On Thu, Jan 11, 2018 at 10:25:25AM -0600, Bill Schmidt wrote: > This patch adds a pattern for "ori 31,31,0" as a speculation barrier, and > an associated built-in function. This is currently restricted to Power7 > and later. Documentation and test included. > > Bootstrapped and tested on

Remaining SVE-related patches

2018-01-11 Thread Richard Sandiford
Hi, Thanks again to everyone who's reviewed the large number of SVE-related patches. I just wanted to list in one place the patches that haven't yet been approved: * Use poly_int rtx accessors instead of hwi accessors https://gcc.gnu.org/ml/gcc-patches/2018-01/msg00661.html * Use poly_int

Re: [PATCH, rs6000] Add __builtin_speculation_barrier

2018-01-11 Thread Richard Biener
On January 11, 2018 6:14:34 PM GMT+01:00, Segher Boessenkool wrote: >On Thu, Jan 11, 2018 at 10:25:25AM -0600, Bill Schmidt wrote: >> This patch adds a pattern for "ori 31,31,0" as a speculation barrier, >and >> an associated built-in function. This is currently

Re: [PATCH, rs6000] Add __builtin_speculation_barrier

2018-01-11 Thread Bill Schmidt
On Jan 11, 2018, at 11:16 AM, Richard Biener wrote: > > On January 11, 2018 6:14:34 PM GMT+01:00, Segher Boessenkool > wrote: >> On Thu, Jan 11, 2018 at 10:25:25AM -0600, Bill Schmidt wrote: >>> This patch adds a pattern for "ori 31,31,0"

Re: [Patch, fortran] PR52162 - Bogus -fcheck=bounds with realloc on assignment to unallocated LHS

2018-01-11 Thread Paul Richard Thomas
Ping! On 8 January 2018 at 14:36, Paul Richard Thomas wrote: > I post this patch early last year and did not submit because I was up > to my eyeballs with PR34640. I just forgot about it until it came up > on clf a few days ago. > > Bootstraps and regtests on

Re: [Patch, fortran] PR52162 - Bogus -fcheck=bounds with realloc on assignment to unallocated LHS

2018-01-11 Thread Steve Kargl
On Thu, Jan 11, 2018 at 05:20:35PM +, Paul Richard Thomas wrote: > Ping! > OK -- Steve

Re: [PATCH] Fix PR80846, change vectorizer reduction epilogue (on x86)

2018-01-11 Thread Jeff Law
On 01/10/2018 01:10 AM, Richard Biener wrote: > On Tue, 9 Jan 2018, Jeff Law wrote: > >> On 01/05/2018 02:01 AM, Richard Biener wrote: >>> On Tue, 28 Nov 2017, Richard Biener wrote: >>> The following adds a new target hook, targetm.vectorize.split_reduction, which allows the target

[PATCH, rs6000] Add __builtin_speculation_barrier

2018-01-11 Thread Bill Schmidt
Hi, This patch adds a pattern for "ori 31,31,0" as a speculation barrier, and an associated built-in function. This is currently restricted to Power7 and later. Documentation and test included. Bootstrapped and tested on powerpc64le-linux-gnu with no regressions. Is this okay for trunk?

Re: [PATCH][arm] XFAIL advsimd-intrinsics/vld1x2.c

2018-01-11 Thread Christophe Lyon
On 11 January 2018 at 17:29, Kyrill Tkachov wrote: > Hi Christophe, > > On 11/01/18 16:21, Christophe Lyon wrote: >> >> On 11 January 2018 at 16:33, Kyrill Tkachov >> wrote: >>> >>> Hi all, >>> >>> This recently added test fails on arm.

Re: PR81703 and Martin's fix for PR83501

2018-01-11 Thread Martin Sebor
On 01/11/2018 05:02 AM, Prathamesh Kulkarni wrote: On 11 January 2018 at 16:14, Prathamesh Kulkarni wrote: On 11 January 2018 at 14:52, Christophe Lyon wrote: Hi On 10 January 2018 at 19:42, Prathamesh Kulkarni

Re: [PATCH][arm] XFAIL advsimd-intrinsics/vld1x2.c

2018-01-11 Thread Christophe Lyon
On 11 January 2018 at 16:33, Kyrill Tkachov wrote: > Hi all, > > This recently added test fails on arm. We haven't implemented these > intrinsics for arm > (any volunteers?) so for now let's XFAIL these on that target. > Also, the float64 versions of these intrinsics

Re: [PATCH][arm] XFAIL advsimd-intrinsics/vld1x2.c

2018-01-11 Thread Kyrill Tkachov
Hi Christophe, On 11/01/18 16:21, Christophe Lyon wrote: On 11 January 2018 at 16:33, Kyrill Tkachov wrote: Hi all, This recently added test fails on arm. We haven't implemented these intrinsics for arm (any volunteers?) so for now let's XFAIL these on that

Re: Go patch committed: Update to Go1.10beta1

2018-01-11 Thread Rainer Orth
Hi Ian, >> This patch updates libgo to the Go1.10beta1 release. The final Go >> 1.10 release is expected around February 1, so it's not clear how the >> release timing is going to work with GCC 8. In any case this updates >> GCC to something pretty close to the final Go 1.10 release. >> >> A

[C++ PATCH] kill unused enum

2018-01-11 Thread Nathan Sidwell
I noticed this enum, it must have been dead for a long while! nathan -- Nathan Sidwell 2018-01-11 Nathan Sidwell * method.c (enum mangling_flags): Delete long-dead enum. Index: method.c === --- method.c

Re: [RX] Fix PR 81819

2018-01-11 Thread Nick Clifton
Hi Oleg, > gcc/ChangeLog: > PR target/81819 > * config/rx/rx.c (rx_is_restricted_memory_address): > Handle SUBREG case. Go ahead make my day^H^H^H^H^H^H Approved - please apply. Cheers Nick

Re: [PATCH 0/5] x86: CVE-2017-5715, aka Spectre

2018-01-11 Thread David Woodhouse
On Thu, 2018-01-11 at 22:17 +0100, Florian Weimer wrote: > * David Woodhouse: > > > > > On Sun, 2018-01-07 at 16:36 -0700, Jeff Law wrote: > > > > > > > > > My fundamental problem with this patchkit is that it is 100% x86/x86_64 > > > specific. > > > > > > ISTM we want a target independent

Re: [PATCH, hsa]: Increase buffer size to avoid bootstrap failure on alpha

2018-01-11 Thread Richard Sandiford
Uros Bizjak writes: > Hello! > > Current gcc fails bootstrap on alpha-linux-gnu with: > > /space/homedirs/uros/gcc-svn/trunk/gcc/hsa-dump.c: In function ‘void > dump_hsa_symbol(FILE*, hsa_symbol*)’: > /space/homedirs/uros/gcc-svn/trunk/gcc/hsa-dump.c:784:21: error: ‘%s’ >

Re: [PATCH] Add PowerPC configuration option --with-long-double-format={ibm,ieee}

2018-01-11 Thread Michael Meissner
On Wed, Jan 10, 2018 at 11:48:30PM +, Joseph Myers wrote: > On Wed, 10 Jan 2018, Michael Meissner wrote: > > > This patch is next in my series of patches to enable us to configure the > > long > > double type on PowerPC systems. This patch is only about the configuration > > option. A

Re: [PATCH 5/5] x86: Add 'V' register operand modifier

2018-01-11 Thread Jeff Law
On 01/07/2018 03:59 PM, H.J. Lu wrote: > Add 'V', a special modifier which prints the name of the full integer > register without '%'. For > > extern void (*func_p) (void); > > void > foo (void) > { > asm ("call __x86_indirect_thunk_%V0" : : "a" (func_p)); > } > > it generates: > > foo: >

[wwwdocs] Fix contribute.html documentation on testing patches

2018-01-11 Thread Jozef Lawrynowicz
The instructions on https://gcc.gnu.org/contribute.html#testing for bootstrapping GCC are incorrect. The instructions say to run 'make bootstrap' from the top level GCC directory, but this results in the below error. $ make bootstrap make: *** No rule to make target 'bootstrap'. Stop. The

Re: [C++ PATCH] Fix some -Wused-but-set-variable regressions (PR c++/82728, PR c++/82799, PR c++/83690)

2018-01-11 Thread Jason Merrill
On Wed, Jan 10, 2018 at 11:59 AM, Jason Merrill wrote: > On Wed, Jan 10, 2018 at 11:56 AM, Jakub Jelinek wrote: >> On Wed, Jan 10, 2018 at 11:52:16AM -0500, Jason Merrill wrote: >>> On Fri, Jan 5, 2018 at 5:14 PM, Jakub Jelinek wrote: >>> >

Re: Disable autogeneration of gather instructions on Ryzen and generic

2018-01-11 Thread Toon Moene
On 01/09/2018 11:28 AM, Richard Biener wrote: Note that the vectorizer gives up on loops with gathers with no target support for gathers. It could simply open-code the gather though (and properly cost that open-coded variant), that's probably the way to go here. Man, I wish I had made this

Re: [PATCH] i386: Align stack frame if argument is passed on stack

2018-01-11 Thread H.J. Lu
On Thu, Jan 11, 2018 at 11:07 AM, Uros Bizjak wrote: > On Wed, Jan 10, 2018 at 9:40 PM, H.J. Lu wrote: >> When a function call is removed, it may become a leaf function. But if >> argument may be passed on stack, we need to align the stack frame when >>

Re: [PATCH 0/5] x86: CVE-2017-5715, aka Spectre

2018-01-11 Thread Florian Weimer
* David Woodhouse: > On Sun, 2018-01-07 at 16:36 -0700, Jeff Law wrote: >> >> My fundamental problem with this patchkit is that it is 100% x86/x86_64 >> specific. >> >> ISTM we want a target independent mechanism (ie, new standard patterns, >> options, etc) then an x86/x86_64 implementation

Re: [PATCH][AArch64] Use LDP/STP in shrinkwrapping

2018-01-11 Thread Segher Boessenkool
On Thu, Jan 11, 2018 at 03:35:37PM +, Wilco Dijkstra wrote: > Segher Boessenkool wrote: >   > > Of course I see that ldp is useful.  I don't think that this particular > > way of forcing more pairs is a good idea.  Needs testing / benchmarking / > > instrumentation, and we haven't seen any of

[PATCH] Fix failure building LLVM with location wrapper nodes (PR c++/83799)

2018-01-11 Thread David Malcolm
PR c++/83799 reports a failure building LLVM due to a bogus "no matching function for call to" error at a callsite like this: TLI->getTypeLegalizationCost(DL); where "DL" is from: using TargetTransformInfoImplBase::DL; The root cause is that type_dependent_expression_p on a USING_DECL should

Re: [PATCH] suppress -Wstringop-overflow when no-warning is set (PR 83508)

2018-01-11 Thread Jeff Law
On 01/10/2018 01:26 PM, Martin Sebor wrote: > To avoid issuing duplicate warnings for the same function call > in the source code the -Wrestrict warning code makes sure > the no-warning bit is propagated between trees and GIMPLE and > tested before issuing a warning.  But the warning also detects

Re: PR83648

2018-01-11 Thread Jeff Law
On 01/11/2018 01:27 AM, Richard Biener wrote: > On Thu, 11 Jan 2018, Marc Glisse wrote: > >> On Tue, 9 Jan 2018, Prathamesh Kulkarni wrote: >> >>> As Jakub pointed out for the case: >>> void *f() >>> { >>> return __builtin_malloc (0); >>> } >>> >>> The malloc propagation would set f() to malloc.

Re: [PATCH 0/5] x86: CVE-2017-5715, aka Spectre

2018-01-11 Thread Jeff Law
On 01/11/2018 04:40 PM, Joseph Myers wrote: > On Thu, 11 Jan 2018, Jeff Law wrote: > >>> Well, given retpolines are largely kernel relevant right now we don't >>> need to care here. >> That's still TBD as far as I can tell. I certainly hope we don't have >> to go retpolines in user space, at

Re: PR83648

2018-01-11 Thread Martin Sebor
On 01/11/2018 01:32 PM, Jan Hubicka wrote: As long as the marked definition still satisfies the assumptions GCC makes about the function it won't be harmful. I don't know all the nuances of pointer aliasing in GCC that might rely on it but assuming they faithfully reflect the standard

Re: [PATCH 1/5] x86: Add -mindirect-branch=

2018-01-11 Thread Jeff Law
On 01/07/2018 03:59 PM, H.J. Lu wrote: > Add -mindirect-branch= option to convert indirect call and jump to call > and return thunks. The default is 'keep', which keeps indirect call and > jump unmodified. 'thunk' converts indirect call and jump to call and > return thunk. 'thunk-inline'

Re: [PATCH 3/5] x86: Add -mfunction-return=

2018-01-11 Thread H.J. Lu
On Thu, Jan 11, 2018 at 2:54 PM, Jeff Law wrote: > On 01/07/2018 03:59 PM, H.J. Lu wrote: >> Add -mfunction-return= option to convert function return to call and >> return thunks. The default is 'keep', which keeps function return >> unmodified. 'thunk' converts function return

Re: Use poly_int tree accessors

2018-01-11 Thread Jeff Law
On 01/09/2018 11:39 AM, Richard Sandiford wrote: > This patch generalises various places that used hwi tree accessors > so that they can handle poly_ints instead. Earlier patches did > this while updating interfaces; this patch just mops up some > left-over pieces that weren't necessary to make

Re: PR83648

2018-01-11 Thread Jeff Law
On 01/10/2018 10:04 PM, Prathamesh Kulkarni wrote: > On 11 January 2018 at 04:50, Jeff Law wrote: >> On 01/09/2018 05:57 AM, Prathamesh Kulkarni wrote: >>> >>> As Jakub pointed out for the case: >>> void *f() >>> { >>> return __builtin_malloc (0); >>> } >>> >>> The malloc

  1   2   >