Re: [PING**2] [PATCH, ARM] Further improve stack usage on sha512 (PR 77308)

2017-09-06 Thread Christophe Lyon
On 5 September 2017 at 20:20, Christophe Lyon wrote: > On 5 September 2017 at 19:53, Kyrill Tkachov > wrote: >> >> On 05/09/17 18:48, Bernd Edlinger wrote: >>> >>> On 09/05/17 17:02, Wilco Dijkstra wrote: Bernd Edlinger wrote: > Combine creates an invalid insn out of these two

[PATCH] Fix SLSR issue

2017-09-06 Thread Richard Biener
This fixes a bogus check for a mode when the type matters. The test can get fooled by vector ops with integral mode and thus we later ICE trying to use wide-ints operating on vector constants. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2017-09-06 Richard Biener

Re: [PATCH] Improve alloca alignment

2017-09-06 Thread Rainer Orth
Jeff Law writes: > On 08/22/2017 08:15 AM, Wilco Dijkstra wrote: >> Jeff Law wrote: >> On 07/26/2017 05:29 PM, Wilco Dijkstra wrote: >> But then the check size_align % MAX_SUPPORTED_STACK_ALIGNMENT != 0 seems wrong too given that round_push uses a different alignment to align to.

Re: [PATCH, GCC/ARM, ping] Remove ARMv8-M code for D17-D31

2017-09-06 Thread Kyrill Tkachov
Hi Thomas, On 05/09/17 10:04, Thomas Preudhomme wrote: Ping? This is ok if a bootstrap and test run on arm-none-linux-gnueabihf shows no problems. Thanks, Kyrill Best regards, Thomas On 25/08/17 12:18, Thomas Preudhomme wrote: Hi, I've now also added a couple more changes: * size to_

Re: [PATCH v2] Python testcases to check DWARF output

2017-09-06 Thread Pierre-Marie de Rodat
On 09/05/2017 09:46 PM, Mike Stump wrote: I've included the dwarf people on the cc list. Seems like they may have an opinion on the direction or the patch itself. I was fine with the patch from the larger testsuite perspective. Good idea, thank you! And thank you for your feedback. :-) -- Pie

Re: [AArch64, PATCH] Improve Neon store of zero

2017-09-06 Thread Jackson Woodruff
Hi all, I've attached a new patch that addresses some of the issues raised with my original patch. On 08/23/2017 03:35 PM, Wilco Dijkstra wrote: Richard Sandiford wrote: Sorry for only noticing now, but the call to aarch64_legitimate_address_p is asking whether the MEM itself is a legitimat

RE: [PATCH] [Aarch64] Optimize subtract in shift counts

2017-09-06 Thread Michael Collison
Richard Sandiford do you have any objections to the patch as it stands? It doesn't appear as if anything is going to change in the mid-end anytime soon. -Original Message- From: Richard Sandiford [mailto:richard.sandif...@linaro.org] Sent: Tuesday, August 22, 2017 9:11 AM To: Richard Bie

[PR 82078] Enqueue all SRA links for write flag propagation

2017-09-06 Thread Martin Jambor
Hi, PR 82078 is another fallout from lazy setting of written flag in SRA. The problem here is that we do not enqueue assignment links going out of accesses of candidates that were disqualified before we start the loop with sort_and_splice_var_accesses. Given that the propagation is now a correctn

Re: [PR 82078] Enqueue all SRA links for write flag propagation

2017-09-06 Thread Richard Biener
On Wed, 6 Sep 2017, Martin Jambor wrote: > Hi, > > PR 82078 is another fallout from lazy setting of written flag in SRA. > The problem here is that we do not enqueue assignment links going out > of accesses of candidates that were disqualified before we start the > loop with sort_and_splice_var_a

[Ada] Compiler crash on call to eliminated protected operation.

2017-09-06 Thread Arnaud Charlet
This patch fixes an omission in the handling of pragma Eliminate when applied to a protected operation. The pragma was properly processed, but a call to an eliminated protected operation was not flagged as an error, and the code generator aborted on a call to an undefined operation. Compiling:

Re: [RFA] [PATCH][PR tree-optimization/64910] Fix reassociation of binary bitwise operations with 3 operands

2017-09-06 Thread Jakub Jelinek
On Tue, Sep 05, 2017 at 11:21:48PM -0600, Jeff Law wrote: > --- a/gcc/tree-ssa-reassoc.c > +++ b/gcc/tree-ssa-reassoc.c > @@ -5763,14 +5763,15 @@ reassociate_bb (basic_block bb) >"Width = %d was chosen for reassociation\n", > width); > > > - /* For bin

Re: [PING**2] [PATCH, ARM] Further improve stack usage on sha512 (PR 77308)

2017-09-06 Thread Bernd Edlinger
On 09/05/17 23:27, Wilco Dijkstra wrote: > Bernd Edlinger wrote: >> No, the split condition does not begin with "&& TARGET_32BIT...". >> Therefore the split is enabled in TARGET_NEON after reload_completed. >> And it is invoked from adddi3_neon for all alternatives without vfp >> registers: > > Hm

[Ada] Extension of 'Image in Ada2020.

2017-09-06 Thread Arnaud Charlet
AI12-0124 adds the notation Object'Image to the language, following the semantics of GNAT-defined attribute 'Img. This patch fixes an omission in the characterization of objects, which must include function calls and thus attribute references for attributes that are functions, as well as predefined

[Ada] Spurious error with formal incomplete types

2017-09-06 Thread Arnaud Charlet
This patch fixes a spurious error on the use of of a generic unit with formal incomplete types, as a formal package in another generic unit, when the actuals for the incomplete types are themselves formal incomplete types. The treatment of incomplete subtypes that are created for such formals is n

[Ada] Enable automatic reordering of components in record types

2017-09-06 Thread Arnaud Charlet
This activates the reordering of components in record types with convention Ada that was implemented some time ago in the compiler. The idea is to get rid of blatant inefficiencies that the layout in textual order of the source code can bring about, typically when the offset of components is not f

[Ada] Resolution of set membersip operations with overloaded alternatives

2017-09-06 Thread Arnaud Charlet
This patch fixes a bug in the resolution of set membership operations when the expression and/or the alternatives on the right-hand side are overloaded. If a given overloaded alternative is resolved to a unique type by intersection with the types of previous alternatives, the type is used subsequen

[PATCH] Factor out division by squares and remove division around comparisons (0/2)

2017-09-06 Thread Jackson Woodruff
Hi all, This patch is split from part (1/2). It includes the patterns that have been moved out of fold-const.c It also removes an (almost entirely) redundant pattern: (A / C1) +- (A / C2) -> A * (1 / C1 +- 1 / C2) which was only used in special cases, either with combinations of flags l

[Ada] Minor cleanup in support machinery for inter-unit inlining

2017-09-06 Thread Arnaud Charlet
The inter-unit inlining done by the compiler requires a dedicated machinery to deal with the public status of library-level entities, since it breaks the private/plublic semantic barrier of the language. This is a minor cleanup to this machinery, no functional changes. Tested on x86_64-pc-linux-g

[Ada] Spurious errors on derived untagged types with partial constraints

2017-09-06 Thread Arnaud Charlet
This patch fixes the handling of untagged discriminated derived types that constrain some parent discriminants and rename others. The compiler failed to handle a change of representation on the derived type, and generated faulty code for the initialization procedure or such a derived type. Executi

Re: [PATCH] Factor out division by squares and remove division around comparisons (2/2)

2017-09-06 Thread Jackson Woodruff
Hi all, A minor improvement came to mind while updating other parts of this patch. I've updated a testcase to make it more clear and a condition now uses a call to is_division_by rather than manually checking those conditions. Jackson On 08/30/2017 05:32 PM, Jackson Woodruff wrote: Hi all,

Re: [PATCH] Factor out division by squares and remove division around comparisons (1/2)

2017-09-06 Thread Jackson Woodruff
On 08/30/2017 01:46 PM, Richard Biener wrote: On Wed, Aug 30, 2017 at 11:46 AM, Jackson Woodruff wrote: On 08/29/2017 01:13 PM, Richard Biener wrote: On Tue, Aug 29, 2017 at 1:35 PM, Jackson Woodruff wrote: Hi all, Apologies again to those CC'ed, who (again) received this twice. Joseph:

[Ada] Restore original implementation of internal Table package

2017-09-06 Thread Arnaud Charlet
This wasn't explicitly mentioned but the previous changes also replaced the internal Table package used in the compiler by GNAT.Tables, resulting in a large performance hit for the compiler because the memory management scheme of the latter is very inefficient. This restores the original implement

[Ada] Primitive functions that require one formal and return an array

2017-09-06 Thread Arnaud Charlet
Primitive functions whose first formal is a controlling parameter, whose other formals have defaults and whose result is an array type can lead to ambiguities when the result of such a call is the prefix of an indexed component. The interpretation that analyzes Obj.F (X, Y) into F (Obj)(X, Y) is on

[Ada] Inherited aspects that may be delayed in a parent type

2017-09-06 Thread Arnaud Charlet
This patch fixes an omission in the handling of delayed aspects on derived types. The type may inherit a representation aspect from its parent, but have no explicit aspect specifications. At the point it is frozen, the parent is frozen as well and its explicit aspects have been analyzed. The inheri

[Ada] Pragma No_Return on generic units

2017-09-06 Thread Arnaud Charlet
This patch ensures that if a pragma No_Return applies to a generic subprogram , all its instantiations are treated as No_Return subprograms as well. Tested in ACATS 4.1D C651001. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-09-06 Ed Schonberg * sem_ch12.adb (Analyze_Subprog

[Ada] Crash on generic subprogram with aspect No_Return.

2017-09-06 Thread Arnaud Charlet
This patch fixes a compiler abort on a generic unit to which the aspect No_Return applies. Tested in ACATS 4.1D C651002. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-09-06 Ed Schonberg * freeze.adb (Freeze_Entity): Do not generate a freeze node for a generic unit, e

[Ada] Improve error message when function is used in a call statement

2017-09-06 Thread Arnaud Charlet
A typical error for new users of Ada is to call functions in a call statement. Improve the error message for these users, to better indicate what the error is in that case. The following compilation raises the new message. $ gcc -c main.adb 1. procedure Main is 2.function Lol

[Ada] No_Return procedures in renaming declarations.

2017-09-06 Thread Arnaud Charlet
This patch implements legality rule in 6.5.1 (7/2): if a renaming as body completes a nonreturning procedure declaration, the renamed procedure must be nonreturning as well. Previously GNAT only produced a warning in such cases. Tested in ACATS test B651002. Tested on x86_64-pc-linux-gnu, commit

[Ada] Better warning on access to string at negative or null index

2017-09-06 Thread Arnaud Charlet
The warning issued when accessing a string at a negative or null index was misleading, suggesting to use S'First - 1 as correct index, which it is obviously not. Add a detection for negative or null index when accessing a standard string, so that an appropriate warning is issued. Also add a corresp

[Ada] Missing finalization of cursor in "of" iterator loop

2017-09-06 Thread Arnaud Charlet
This patch modifies the finalization machinery to ensure that the cursor of an "of" iterator loop is properly finalized at the end of the loop. Previously it was incorrectly assumed that such a cursor will never need finalization ctions. -- Source -- -- leak.adb pragma

[Ada] Derived iterable types with noniterable parent

2017-09-06 Thread Arnaud Charlet
This patch fixes a bug in which if a derived type has a Default_Iterator specified, and the parent type does not, then a "for ... of" loop causes the compiler to crash. No small test case available. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-09-06 Bob Duff * exp_ch5.adb (G

Re: [PATCH] [Aarch64] Optimize subtract in shift counts

2017-09-06 Thread Richard Sandiford
Michael Collison writes: > Richard Sandiford do you have any objections to the patch as it stands? > It doesn't appear as if anything is going to change in the mid-end > anytime soon. I think one of the suggestions was to do it in expand, taking advantage of range info and TARGET_SHIFT_TRUNCATION

[AArch64] Merge stores of D register values of different modes

2017-09-06 Thread Jackson Woodruff
Hi all, This patch merges loads and stores from D-registers that are of different modes. Code like this: typedef int __attribute__((vector_size(8))) vec; struct pair { vec v; double d; } void assign (struct pair *p, vec v) { p->v = v; p->d

[Ada] Extension of 'Image in Ada2020

2017-09-06 Thread Arnaud Charlet
Refactor of all 'Image attributes for better error diagnostics and clarity. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-09-06 Justin Squirek * exp_imgv.adb (Expand_Image_Attribute), (Expand_Wide_Image_Attribute), (Expand_Wide_Wide_Image_Attribute): Added cas

[C++ PATCH] rename lookup_fnfields_slot

2017-09-06 Thread Nathan Sidwell
This patch renames lookup_fnfields_slot{,_nolazy} to get_class_binding{,_direct}. It also removes a few now-unneeded checks for CLASSTYPE_METHOD_VEC being non-null. You may notice that the new names mention nothing about the kind of member looked for. That's intentional. These functions wil

Re: Add support to trace comparison instructions and switch statements

2017-09-06 Thread 吴潍浠(此彼)
Hi Jakub I compiled libjpeg-turbo and libdng_sdk with options "-g -O3 -Wall -fsanitize-coverage=trace-pc,trace-cmp -fsanitize=address". And run my fuzzer with pc and cmp feedbacks for hours. It works fine. About __sanitizer_cov_trace_cmp{f,d} , yes, it isn't provided by llvm. But once we trace i

[Ada] Crash when issuing warning on uninitialized value

2017-09-06 Thread Arnaud Charlet
When issuing a warning on a read of an uninitialized variable through reading an attribute such as Loop_Entry, GNAT could crash. Now fixed. GNAT issues a warning as expected on the following code: $ gcc -c s.adb 1. package S is 2. 3.type Array_Range is range 1 .. 10;

[Ada] Eliminate out-of-line body of local inlined subprograms

2017-09-06 Thread Arnaud Charlet
This improves a little the algorithm used to compute the set of externally visible entities in package bodies to make it less conservative in the presence of local inlined subprograms. The typical effect is to eliminate the out-of-line body if the subprogram is inlined at every call site: package

[Ada] Time_IO.Value enhanced to parse ISO-8861 UTC date and time

2017-09-06 Thread Arnaud Charlet
The function Value of package GNAT.Calendar.Time_IO has been enhanced to parse strings containing UTC date and time. After this patch the following test works fine. with Ada.Calendar; use Ada.Calendar; with Ada.Text_IO; use Ada.Text_IO; with GNAT.Calendar.Time_IO; use GNAT.Cale

[Ada] Dimensional checking and generic subprograms

2017-09-06 Thread Arnaud Charlet
This patch enahnces dimensionality checking to cover generic subprograms that are intended to apply to types of different dimensions, such as an integration function. Dimensionality checking is performed in each instance. and rely on a special handling of conversion operations to prevent spurious d

[Ada] Handling of inherited and explicit postconditions

2017-09-06 Thread Arnaud Charlet
This patch fixes the handling of overriding operations that have both an explicit postcondition and an inherited classwide one. Executing: gnatmake -q -gnata post_class.adb post_class must yield: raised SYSTEM.ASSERTIONS.ASSERT_FAILURE : failed inherited postcondition from the_p

[Ada] Missing finalization of generalized indexed element

2017-09-06 Thread Arnaud Charlet
This patch modifies the finalization mechanism to recognize a heavily expanded generalized indexing where the element type requires finalization actions. -- Source -- -- types.ads with Ada.Finalization; use Ada.Finalization; package Types is type Element is new Con

[Ada] Reject invalid use of Global/Depends on object declaration

2017-09-06 Thread Arnaud Charlet
GNAT failed to issue an error on a Global/Depends aspect put on an object declaration, which is only allowed for a task object. Instead it crashed. Now fixed. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-09-06 Yannick Moy * sem_prag.adb (Analyze_Depends_Global): Reinforce te

[Ada] Issue error message on invalid representation clause for extension

2017-09-06 Thread Arnaud Charlet
This makes the compiler generate an error message also in the case where one of the specified components overlaps the parent field because its size has been explicitly set by a size clause. The compiler must issue an error on 32-bit platforms for the package: 1. package P is 2. 3.

[PATCH] Fix PR82108

2017-09-06 Thread Richard Biener
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk sofar. Richard. 2017-09-06 Richard Biener PR tree-optimization/82108 * tree-vect-stmts.c (vectorizable_load): Fix pointer adjustment for gap in the non-permutation SLP case. * gcc.dg/vect/

replace libiberty with gnulib (was: Re: [PATCH 0/2] add unique_ptr class)

2017-09-06 Thread Manuel López-Ibáñez
On 05/09/17 18:40, Pedro Alves wrote: On 09/05/2017 05:52 PM, Manuel López-Ibáñez wrote: Yeah, ISTR it was close, though there were a couple things that needed addressing still. The wiki seems to miss a pointer to following iterations/review of that patch (mailing list archives don't cross month

Re: [PATCH, ARM] correctly encode the CC reg data flow

2017-09-06 Thread Bernd Edlinger
On 09/04/17 21:54, Bernd Edlinger wrote: > Hi Kyrill, > > Thanks for your review! > > > On 09/04/17 15:55, Kyrill Tkachov wrote: >> Hi Bernd, >> >> On 18/01/17 15:36, Bernd Edlinger wrote: >>> On 01/13/17 19:28, Bernd Edlinger wrote: On 01/13/17 17:10, Bernd Edlinger wrote: > On 01/13/1

Re: [PATCH, ARM] correctly encode the CC reg data flow

2017-09-06 Thread Richard Earnshaw (lists)
On 06/09/17 13:44, Bernd Edlinger wrote: > On 09/04/17 21:54, Bernd Edlinger wrote: >> Hi Kyrill, >> >> Thanks for your review! >> >> >> On 09/04/17 15:55, Kyrill Tkachov wrote: >>> Hi Bernd, >>> >>> On 18/01/17 15:36, Bernd Edlinger wrote: On 01/13/17 19:28, Bernd Edlinger wrote: > On 01/

Re: [PATCH] Fix SLSR issue

2017-09-06 Thread Richard Biener
On Wed, 6 Sep 2017, Richard Biener wrote: > > This fixes a bogus check for a mode when the type matters. The > test can get fooled by vector ops with integral mode and thus we > later ICE trying to use wide-ints operating on vector constants. > > Bootstrapped and tested on x86_64-unknown-linux-

[PATCH] Adjust gcc.c-torture/execute/20050604-1.c

2017-09-06 Thread Richard Biener
When fiddling around with vector lowering I found the following adjusted testcase helpful testing proper vector lowering of word_mode vector plus. Tested on x86_64-unknown-linux-gnu, applied. Richard. 2017-09-06 Richard Biener * gcc.c-torture/execute/20050604-1.c: Adjust to be a bet

[Ada] Volatile component not treated as such

2017-09-06 Thread Arnaud Charlet
This patch corrects an issue where attributes applied to records were not propagated to components within the records - causing incorrect code to be generated by the backend. Additionally, this ticket fixes another issue with pragma Volatile_Full_Access that allowed the attribute to be applied to a

[Ada] Spurious warning in formal package when use clause is present.

2017-09-06 Thread Arnaud Charlet
This patch removes a spurious style warning on an operator declared in a generic package when the package is used as a formal of a generic subprogram, and the subprogream body includes a use clause on that package. The following must compile quietly: gcc -c -gnatyO generic_test.adb --- with Gene

Re: [PATCH, ARM] correctly encode the CC reg data flow

2017-09-06 Thread Bernd Edlinger
On 09/06/17 14:51, Richard Earnshaw (lists) wrote: > On 06/09/17 13:44, Bernd Edlinger wrote: >> On 09/04/17 21:54, Bernd Edlinger wrote: >>> Hi Kyrill, >>> >>> Thanks for your review! >>> >>> >>> On 09/04/17 15:55, Kyrill Tkachov wrote: Hi Bernd, On 18/01/17 15:36, Bernd Edlinger wr

[PATCH] Replace PRE "DCE"

2017-09-06 Thread Richard Biener
The following replaces the weird PRE "DCE" algorithm by a simple work-list based one seeded by inserted_exprs. This makes it possible to get rid of the error-prone marking of stmts necessary and allows re-ordering of elimination dead stmt removal and DCE again (I'm in the process of developing a

[PATCH, e500v2-vxworks] correct CPU name designation for 8548 targets on VxWorks7

2017-09-06 Thread Olivier Hainque
Compared to prior versions of regular VxWorks (not AE/653), the VxWorks 7 header files expect the e500v2 family of CPUs to be designated in a slightly different fashion. With this on top of previously posted patches, a build for e500v2-wrs-vxworks proceeds to completion. Committing to mainline.

Re: [PATCH, ARM] correctly encode the CC reg data flow

2017-09-06 Thread Bernd Edlinger
On 09/06/17 14:51, Richard Earnshaw (lists) wrote: > On 06/09/17 13:44, Bernd Edlinger wrote: >> On 09/04/17 21:54, Bernd Edlinger wrote: >>> Hi Kyrill, >>> >>> Thanks for your review! >>> >>> >>> On 09/04/17 15:55, Kyrill Tkachov wrote: Hi Bernd, On 18/01/17 15:36, Bernd Edlinger wr

[C++ PATCH] class FIELD_VEC initialization

2017-09-06 Thread Nathan Sidwell
Here's some cleanup of the SORTED_FIELDS vector initialization. Some function renaming, to be more specific. The functionality change is a minor bug in late enums. We only add them to the field vec, if there's already a field vec. But of course, their addition could have cause the class's T

[Ada] Wrong code on assignment of conditional expression to a mutable obkect

2017-09-06 Thread Arnaud Charlet
This patch fixes an error in an assignmen statement to an entity of a mutable type (variable or in-out parameter) when the righ-hand side of the assignment is a conditioal expression, some of whose alternatives are aggregates. Prior to this patch, not all components of the mutable object were prop

[C++ PATCH] method vec

2017-09-06 Thread Nathan Sidwell
This preparatory patch fixes up a couple of places where a non-function could start appearing in the METHOD_VEC. The warn_hidden change looks bigger than necessary, because of indentation change. I noticed check_classfn could check a template mismatch earlier, and avoid doing some work. app

[arm] auto-generate arm-isa.h from CPU descriptions

2017-09-06 Thread Richard Earnshaw (lists)
This patch autogenerates arm-isa.h from new entries in arm-cpus.in. This has the primary advantage that it makes the description file more self-contained, but it also solves the 'array dimensioning' problem that Tamar recently encountered. It adds two new constructs to arm-cpus.in: features and f

[PATCH 2/2] [arm] Improve error checking in parsecpu.awk

2017-09-06 Thread Richard Earnshaw (lists)
This patch adds a bit more error checking to parsecpu.awk to ensure that statements are not missing arguments or have excess arguments beyond those permitted. It also slightly improves the handling of errors so that we terminate properly if parsing fails and be as helpful as we can while in the p

Re: Add support to trace comparison instructions and switch statements

2017-09-06 Thread Jakub Jelinek
On Wed, Sep 06, 2017 at 07:47:29PM +0800, 吴潍浠(此彼) wrote: > Hi Jakub > I compiled libjpeg-turbo and libdng_sdk with options "-g -O3 -Wall > -fsanitize-coverage=trace-pc,trace-cmp -fsanitize=address". > And run my fuzzer with pc and cmp feedbacks for hours. It works fine. > About __sanitizer_cov_tra

Re: Add support to trace comparison instructions and switch statements

2017-09-06 Thread Jakub Jelinek
On Wed, Sep 06, 2017 at 04:37:18PM +0200, Jakub Jelinek wrote: > Ok. Please make sure those entrypoints make it into the various example > __sanitier_cov_trace* fuzzer implementations though, so that people using > -fsanitize-coverage=trace-cmp in GCC will not need to hack stuff themselves. > At l

[arm-embedded] [PATCH 1/3, GCC/ARM, ping] Add MIDR info for ARM Cortex-R7 and Cortex-R8

2017-09-06 Thread Thomas Preudhomme
Hi, We have decided to apply the following patch to the embedded-7-branch as a dependency patch to enable ARMv8-R support. ChangeLog entry is as follows: *** gcc/ChangeLog.arm *** 2017-09-04 Thomas Preud'homme Backport from mainline 2017-07-04 Thomas Preud'homme * conf

[arm-embedded] [PATCH 2/3, GCC/ARM] Add support for ARMv8-R architecture

2017-09-06 Thread Thomas Preudhomme
Hi, We have decided to apply the following patch to the embedded-7-branch to enable ARMv8-R support. ChangeLog entry is as follows: *** gcc/ChangeLog.arm *** 2017-09-04 Thomas Preud'homme Backport from mainline 2017-07-06 Thomas Preud'homme * config/arm/arm-cpus.in (arm

[arm-embedded] [PATCH, GCC/ARM] Rewire -mfpu=fp-armv8 as VFPv5 + D32 + DP

2017-09-06 Thread Thomas Preudhomme
Hi, We have decided to apply the following patch to the embedded-7-branch to enable ARMv8-R support. ChangeLog entry is as follows: *** gcc/ChangeLog.arm *** 2017-09-04 Thomas Preud'homme Backport from mainline 2017-07-14 Thomas Preud'homme * config/arm/arm-isa.h (isa_

[arm-embedded] [PATCH 3/3, GCC/ARM] Add support for ARM Cortex-R52 processor

2017-09-06 Thread Thomas Preudhomme
Hi, We have decided to apply the following patch to the embedded-7-branch to enable Arm Cortex-R52 support. *** gcc/ChangeLog.arm *** 2017-09-04 Thomas Preud'homme Backport from mainline 2017-07-14 Thomas Preud'homme * config/arm/arm-cpus.in (cortex-r52): Add new entry.

[PATCH, rs6000] Add support for vec_xst_len_r() and vec_xl_len_r() builtins

2017-09-06 Thread Carl Love
GCC Maintainers: The following patch adds support for the vec_xst_len_r() and vec_xl_len_r() Powerr 9 builtins. The patch has been run on powerpc64le-unknown-linux-gnu (Power 9 LE). No regressions were found but it does seem to "fix" a couple of existing tests. 136a137 > FAIL: TestCgoCallbackGC

[PATCH, config.gcc] fix case filter for powerpc-*-vxworkspe

2017-09-06 Thread Olivier Hainque
To match on vxworks*spe so it applies to VxWorks 7 as well. Committing to mainline after verifying for e500v2-wrs-vxworks7 that we now include config/powerpcspe/vxworks.h instead of config/rs6000/vxworks.h. Olivier 2017-09-06 Olivier Hainque * config.gcc (powerpc-wrs-vxworksspe): No

Re: [PATCH] Fix ICE in categorize_decl_for_section with TLS decl (PR middle-end/82095)

2017-09-06 Thread Jeff Law
On 09/05/2017 03:16 PM, Jakub Jelinek wrote: > Hi! > > If a DECL_THREAD_LOCAL_P decl has NULL DECL_INITIAL and > -fzero-initialized-in-bss (the default), we ICE starting with > r251602, which changed bss_initializer_p: > + /* Do not put constants into the .bss section, they belong in a readonly >

Re: [PATCH, ARM] correctly encode the CC reg data flow

2017-09-06 Thread Kyrill Tkachov
On 06/09/17 14:17, Bernd Edlinger wrote: On 09/06/17 14:51, Richard Earnshaw (lists) wrote: On 06/09/17 13:44, Bernd Edlinger wrote: On 09/04/17 21:54, Bernd Edlinger wrote: Hi Kyrill, Thanks for your review! On 09/04/17 15:55, Kyrill Tkachov wrote: Hi Bernd, On 18/01/17 15:36, Bernd Edl

[C++ PATCH] Merge fn and non-fn lookup interface

2017-09-06 Thread Nathan Sidwell
This patch merges the lookup of function and non-function member lookup into get_class_binding_direct. lookup_field_1 becomes an internal detail. We grow a tri-valued argument to get_class_binding_direct: <0 -- caller wants functions =0 -- caller wants whatever is bound >0 -- caller wants type

Re: [PATCH] Fix ICE in categorize_decl_for_section with TLS decl (PR middle-end/82095)

2017-09-06 Thread Jakub Jelinek
On Wed, Sep 06, 2017 at 09:29:25AM -0600, Jeff Law wrote: > > Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for > > trunk? > > > > 2017-09-05 Jakub Jelinek > > > > PR middle-end/82095 > > * varasm.c (categorize_decl_for_section): Use SECCAT_TBSS for TLS vars

RE: [PATCH] [Aarch64] Optimize subtract in shift counts

2017-09-06 Thread Michael Collison
Richard, The problem with this approach for Aarch64 is that TARGET_SHIFT_TRUNCATION_MASK is based on SHIFT_COUNT_TRUNCATED which is normally 0 as it based on the TARGET_SIMD flag. -Original Message- From: Richard Sandiford [mailto:richard.sandif...@linaro.org] Sent: Wednesday, Septembe

RE: [PATCH][compare-elim] Merge zero-comparisons with normal ops

2017-09-06 Thread Michael Collison
Patch updated with all relevant comments and suggestions. Bootstrapped and tested on arm-none-linux-gnueabihf, and aarch64-none-linux-gnu and x86_64. Ok for trunk? 2017-08-05 Kyrylo Tkachov Michael Collison * compare-elim.c: Include emit-rtl.h. (can_merge_compar

Re: [PATCH] Fix rs6000 sysv4 -fPIC hot/cold partitioning handling (PR target/81979)

2017-09-06 Thread Segher Boessenkool
Hi, On Tue, Sep 05, 2017 at 11:27:25PM +0200, Jakub Jelinek wrote: > On powerpc with sysv4 -fPIC we emit something like > .LCL0: > .long .LCTOC1-.LCF0 > before we start emitting the function, and in the prologue we emit > .LCF0: > and some code. This fails to assemble if the prologue is emi

[PATCH, rs6000] Add builtins to convert from float/double to int/long using current rounding mode

2017-09-06 Thread Carl Love
GCC Maintainers: The following patch adds support for a couple of requested builtins that convert from float/double to int / long using the current rounding mode. The patch has been tested on powerpc64le-unknown-linux-gnu (Power 8 LE). Please let me know if the following patch is acceptable. T

Re: [PATCH] Fix rs6000 sysv4 -fPIC hot/cold partitioning handling (PR target/81979)

2017-09-06 Thread Jakub Jelinek
On Wed, Sep 06, 2017 at 11:10:07AM -0500, Segher Boessenkool wrote: > >for (insn = get_insns (); insn; insn = NEXT_INSN (insn)) > > { > > > if (INSN_P (insn)) > > @@ -25270,10 +25273,14 @@ uses_TOC (void) > > sub = XEXP (sub, 0); > > if (GET_CODE (sub) == UNSP

[committed][Testsuite] PR78468 - add alloca alignment test

2017-09-06 Thread Wilco Dijkstra
Add an alignment test to check that aligned alloca's really do get correctly aligned. Some targets may not ensure SP is always a multiple of STACK_BOUNDARY (particularly with outgoing arguments), which means aligned alloca does not get correctly aligned. This can be fixed either by aligning the o

Re: [PATCH] Fix rs6000 sysv4 -fPIC hot/cold partitioning handling (PR target/81979)

2017-09-06 Thread Segher Boessenkool
On Wed, Sep 06, 2017 at 06:26:10PM +0200, Jakub Jelinek wrote: > > Maybe this "switch to the other section" thing should be abstracted out? > > Messing with in_cold_section_p is a bit dirty. > > But it reflects the reality, and is what final.c and varasm.c also do. Yes, but those aren't target co

Re: [PATCH] [Aarch64] Optimize subtract in shift counts

2017-09-06 Thread Richard Sandiford
Michael Collison writes: > Richard, > > The problem with this approach for Aarch64 is that > TARGET_SHIFT_TRUNCATION_MASK is based on SHIFT_COUNT_TRUNCATED which is > normally 0 as it based on the TARGET_SIMD flag. Maybe I'm wrong, but that seems like a missed optimisation in itself. Like you say

Re: [PATCH] [Aarch64] Optimize subtract in shift counts

2017-09-06 Thread Richard Sandiford
Richard Sandiford writes: > Michael Collison writes: >> Richard, >> >> The problem with this approach for Aarch64 is that >> TARGET_SHIFT_TRUNCATION_MASK is based on SHIFT_COUNT_TRUNCATED which is >> normally 0 as it based on the TARGET_SIMD flag. > > Maybe I'm wrong, but that seems like a missed

Re: [PATCH], Enable -mfloat128 by default on PowerPC VSX systems

2017-09-06 Thread Segher Boessenkool
On Wed, Sep 06, 2017 at 01:48:38AM -0400, Michael Meissner wrote: > Here is a respin of the patch to enable -mfloat128 on PowerPC Linux systems > now > that the libquadmath patch has been applied. I rebased the patches against > the > top of the trunk on Tuesday (subversion id 251609). > > I tw

Re: [PATCH] [Aarch64] Optimize subtract in shift counts

2017-09-06 Thread Richard Sandiford
Richard Sandiford writes: > Richard Sandiford writes: >> Michael Collison writes: >>> Richard, >>> >>> The problem with this approach for Aarch64 is that >>> TARGET_SHIFT_TRUNCATION_MASK is based on SHIFT_COUNT_TRUNCATED which is >>> normally 0 as it based on the TARGET_SIMD flag. >> >> Maybe I'

Re: [Patch, fortran] Parameterized Derived Types

2017-09-06 Thread Janus Weil
Hi Paul, thanks for your patch! It's really great to finally see PDTs come to gfortran. You're a hero, man ;) Also: Sorry about the silence. It's certainly not due to lack of interest, but rather lack of time (day job and private life taking up all of mine at the moment). In my current situation

Re: [Patch, fortran] Parameterized Derived Types

2017-09-06 Thread Damian Rouson
  Thanks for your tireless efforts on this, Paul! I look forward to trying this out after it hits the trunk. Your phrase “last unimplemented F2003” feature bolsters my suspicion that it might be ok to switch the features listed as “Partial” on the Fortran wiki to “Yes." I suppose the differen

C++ PATCH for c++/82070, error with nested lambda capture

2017-09-06 Thread Jason Merrill
I was expecting that references to capture proxies would be resolved in the reconstructed lambda by normal name lookup, but that doesn't work in decltype, and processing the nested lambda really wants to find the new capture proxy, not the captured variable. Tested x86_64-pc-linux-gnu, applying to

Re: [PATCH, rs6000] Add support for vec_xst_len_r() and vec_xl_len_r() builtins

2017-09-06 Thread Segher Boessenkool
Hi Carl, On Wed, Sep 06, 2017 at 08:22:03AM -0700, Carl Love wrote: > (define_insn "*stxvl"): add missing argument to the sldi instruction. s/add/Add/ . This one-liner fix is approved right now, please commit it as a separate patch. > +(define_insn "addi_neg16" > + [(set (match_operand:

Re: [PATCH 1/1] sparc: support for -mmisalign in the SPARC M8

2017-09-06 Thread Qing Zhao
Just a followup on this patch. We did some run-time performance testing internally on this set of change on sparc M8 machine with -mmisalign and -mno-misalign based on the latest upstream gcc for CPU2017 C/C++ SPEED run: ***without -O, -mmisalign slowdown the run-time performance about 4% on av

Re: Add support to trace comparison instructions and switch statements

2017-09-06 Thread David Edelsohn
This change broke bootstrap on AIX because sancov.c now references a macro that is defined as a function on AIX. sancov.c needs to include tm_p.h to pull in the target-dependent prototypes. The following patch works for me. Is this okay? * sancov.c: Include tm_p.h. Index: sancov.c

RFC: Representation of runtime offsets and sizes

2017-09-06 Thread Richard Sandiford
The next main step in the SVE submission is to add support for offsets and sizes that are a runtime invariant rather than a compile time constant. This is an RFC about our approach for doing that. It's an update of https://gcc.gnu.org/ml/gcc/2016-11/msg00031.html (which covered more topics than th

Re: [PATCH, rs6000] Add builtins to convert from float/double to int/long using current rounding mode

2017-09-06 Thread Pat Haugen
On 09/06/2017 11:24 AM, Carl Love wrote: > + "fctiw %1,%1; mfvsrd %0,%1; extsw %0,%0" > + [(set_attr "type" "integer") > + (set_attr "length" "4")]) Should be type "three" and length "12". -Pat

Re: Add support to trace comparison instructions and switch statements

2017-09-06 Thread Jakub Jelinek
On Wed, Sep 06, 2017 at 10:08:01PM +0200, David Edelsohn wrote: > This change broke bootstrap on AIX because sancov.c now references a > macro that is defined as a function on AIX. sancov.c needs to include > tm_p.h to pull in the target-dependent prototypes. The following > patch works for me.

Re: [RFA] [PATCH 4/4] Ignore reads of "dead" memory locations in DSE

2017-09-06 Thread Jeff Law
Another old patch getting resurrected... On 01/04/2017 06:50 AM, Richard Biener wrote: > On Thu, Dec 22, 2016 at 7:26 AM, Jeff Law wrote: >> This is the final patch in the kit to improve our DSE implementation. >> >> It's based on a observation by Richi. Namely that a read from bytes of >> memo

Re: [PATCH, rs6000] Add builtins to convert from float/double to int/long using current rounding mode

2017-09-06 Thread Carl Love
On Wed, 2017-09-06 at 16:13 -0500, Pat Haugen wrote: > On 09/06/2017 11:24 AM, Carl Love wrote: > > + "fctiw %1,%1; mfvsrd %0,%1; extsw %0,%0" > > + [(set_attr "type" "integer") > > + (set_attr "length" "4")]) > > Should be type "three" and length "12". > > -Pat Pat: Yes, that is wrong in m

Re: [PATCH] correct documentation of attribute ifunc (PR 81882)

2017-09-06 Thread Joseph Myers
This patch is OK with the spacing in the function prototype fixed as noted to follow normal GNU standards. -- Joseph S. Myers jos...@codesourcery.com

Re: [PATCH 1/3] improve detection of attribute conflicts (PR 81544)

2017-09-06 Thread Joseph Myers
On Thu, 17 Aug 2017, Martin Sebor wrote: > +/* Check LAST_DECL and NODE of the same symbol for attributes that are > + recorded in EXCL to be mutually exclusive with ATTRNAME, diagnose > + them, and return true if any have been found. NODE can be a DECL > + or a TYPE. */ > + > +static bool

C++ PATCH for c++/82053, ICE with default argument in lambda in template

2017-09-06 Thread Jason Merrill
When we regenerate a lambda, the resulting op() doesn't have any template information, so we can't delay instantiating default arguments like we do for a normal template function. I believe this is also the direction of the core working group for default arguments in local extern function declarat

[C++, ping] Fix PR bootstrap/81926

2017-09-06 Thread Eric Botcazou
The analysis and original patch: https://gcc.gnu.org/ml/gcc-patches/2017-09/msg00101.html and the amended patch: https://gcc.gnu.org/ml/gcc-patches/2017-09/msg00146.html Thanks in advance. -- Eric Botcazou