Re: [AARCH64] Add support of ARMv8.4 in saphira for Qualcomm server part

2018-05-29 Thread Sameera Deshpande
On Tue 29 May, 2018, 9:19 PM Siddhesh Poyarekar, < siddhesh.poyare...@linaro.org> wrote: > On 29 May 2018 at 21:17, James Greenhalgh > wrote: > > On Tue, May 29, 2018 at 05:01:42AM -0500, Sameera Deshpande wrote: > >> Hi! > >> > >> Please find attached the patch to add support of ARMv8.4 in

[PATCH] relax -Wsizeof-pointer-memaccess for strncpy with size of source (PR 85931)

2018-05-29 Thread Martin Sebor
Warning for a strncpy call whose bound is the same as the size of the source and suggesting to use the size of the source is less than helpful when both sizes are the same, as in: char a[4], b[4]; strncpy (a, b, sizeof b); The attached patch suppresses the -Wsizeof-pointer-memaccess warning

libgo patch committed: make vet tool work with gccgo

2018-05-29 Thread Ian Lance Taylor
Update libgo so that the vet tool works with gccgo. This is a backport of https://golang.org/cl/113715 and https://golang.org/cl/113716: cmd/go: don't pass -compiler flag to vet Without this running go vet -compiler=gccgo causes vet to fail. The vet tool does need to know the compiler, but it

libgo patch committed: add path to AIX certificate file

2018-05-29 Thread Ian Lance Taylor
This libgo patch by Tony Reix adds a patch to the AIX certificate file. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE === --- gcc/go/gofrontend/MERGE

Re: [PATCH][Middle-end][version 3]2nd patch of PR78809 and PR83026

2018-05-29 Thread Qing Zhao
Hi, Jeff, Thanks a lot for your review and comments. I have updated my patch based on your suggestion, and retested this whole patch on both X86 and aarch64. please take a look at the patch again. thanks. Qing > On May 25, 2018, at 3:38 PM, Jeff Law wrote: > So I originally thought you

[PATCH] PR fortran/85981 -- Check kind of errmsg variable.

2018-05-29 Thread Steve Kargl
The new comment in the patch explains the patch. This was developed and tested on 8-branch, but will be applied to trunk prior to committing to branches. Built and regression tested on x86_64-*-freebsd. OK to commit? 2018-05-29 Steven G. Kargl PR fortran/85981 * resolve.c

Re: [PATCH] [MSP430] Allow interrupt handers to be static and fix __interrupt__ attribute causing an ICE

2018-05-29 Thread DJ Delorie
Jozef Lawrynowicz writes: > If an argument is passed to the interrupt attribute, GCC will create a section > for the interrupt vector when outputting the assembly. This, combined with the > code to ensure the interrupt function doesn't get optimized out, ensures the > symbol for the interrupt

Re: C++ PATCH for c++/85889, reject capturing a structured binding

2018-05-29 Thread Ville Voutilainen
On 30 May 2018 at 01:23, Jason Merrill wrote: > On Tue, May 29, 2018 at 4:44 PM, Marek Polacek wrote: >> [expr.prim.lambda.capture] p8 says "If a lambda-expression explicitly >> captures >> an entity that is not odr-usable or captures a structured binding (explicitly >> or implicitly), the

Re: [PATCH] RISC-V: Add interrupt attribute support.

2018-05-29 Thread Jim Wilson
On Tue, May 29, 2018 at 7:32 AM, Nathan Sidwell wrote: > On 05/25/2018 06:30 PM, Jim Wilson wrote: > >> -/* Return true if func is a naked function. */ >> +/* Return true if funcion TYPE is an interrupt function. */ > > .^^^ >> >> +static bool >> +riscv_interrupt_type_p

Re: C++ PATCH for c++/85889, reject capturing a structured binding

2018-05-29 Thread Jason Merrill
On Tue, May 29, 2018 at 4:44 PM, Marek Polacek wrote: > [expr.prim.lambda.capture] p8 says "If a lambda-expression explicitly captures > an entity that is not odr-usable or captures a structured binding (explicitly > or implicitly), the program is ill-formed." That's a pretty recent change, and

Re: [PATCH] [MSP430] Allow interrupt handers to be static and fix __interrupt__ attribute causing an ICE

2018-05-29 Thread Jozef Lawrynowicz
On 29/05/18 19:45, DJ Delorie wrote: The reason I required interrupt handlers to be non-static is because the linker builds the interrupt handler table using weak references. If the handler is static, it won't be added to the table, and never called. So you'd need a test to ensure that the

C++ PATCH for c++/85889, reject capturing a structured binding

2018-05-29 Thread Marek Polacek
[expr.prim.lambda.capture] p8 says "If a lambda-expression explicitly captures an entity that is not odr-usable or captures a structured binding (explicitly or implicitly), the program is ill-formed." but we weren't respecting that and the attached testcase compiled. I think we can reject such

Re: [C++ PATCH] Do not warn about zero-as-null when NULL is used.

2018-05-29 Thread Ville Voutilainen
Another round. The other occurrence of maybe_warn_zero_as_null_pointer_constant in typeck.c seems superfluous. The one in cvt.c seems necessary for cpp0x/Wzero-as-null* tests. It seems like cp_build_binary_op is far more suited to check the EQ_EXPR/NE_EXPR cases than conversion_null_warnings is.

Re: [PATCH] add udivhi3, umodhi3 functions to libgcc

2018-05-29 Thread Paul Koning
> On May 29, 2018, at 4:17 PM, Jakub Jelinek wrote: > > On Tue, May 29, 2018 at 03:01:20PM -0400, Paul Koning wrote: >> +short udivmodhi4 (); > > We do want real prototypes, not K declarations. Fixed. I had copied that from the SImode file. > >> Added: svn:eol-style >> ## -0,0 +1 ## >>

[PATCH 03/10] Add optinfo, remarks and optimization records

2018-05-29 Thread David Malcolm
This patch adds a way to create optimization information or "optinfo" instances, referring to source code locations (based on statements, loops, or basic blocks), populate them with messages and data (trees, statements, symtab nodes), and to send them to up to three "sinks"/destinations: * via

[PATCH 10/10] Experiment with optinfo in tree-ssa-loop-im.c

2018-05-29 Thread David Malcolm
--- gcc/tree-ssa-loop-im.c | 13 + 1 file changed, 13 insertions(+) diff --git a/gcc/tree-ssa-loop-im.c b/gcc/tree-ssa-loop-im.c index 030aac0..fcf5d24 100644 --- a/gcc/tree-ssa-loop-im.c +++ b/gcc/tree-ssa-loop-im.c @@ -45,6 +45,7 @@ along with GCC; see the file COPYING3. If not

[PATCH 08/10] Experiment with using optinfo for devirtualization

2018-05-29 Thread David Malcolm
gcc/ChangeLog: * gimple-fold.c: Include "optinfo.h". (fold_gimple_assign): Port to optinfo. (gimple_fold_call): Likewise. * ipa-devirt.c: Include "optinfo.h". (ipa_devirt): Port to optinfo. * ipa.c: Include "optinfo.h".

[PATCH 07/10] Experiment with using optinfo for loop-handling

2018-05-29 Thread David Malcolm
gcc/ChangeLog: * tree-ssa-loop-ivcanon.c: Include "optinfo.h". (try_unroll_loop_completely): Port to optinfo. (canonicalize_loop_induction_variables): Use OPTINFO_NOTE. * tree-ssa-loop-niter.c: Include "optinfo.h". (number_of_iterations_exit): Port to

[PATCH 04/10] Use indentation to show nesting for -fopt-info

2018-05-29 Thread David Malcolm
This converts e.g. from: test.c:8:3: note: === analyzing loop === test.c:8:3: note: === analyze_loop_nest === test.c:8:3: note: === vect_analyze_loop_form === test.c:8:3: note: === get_loop_niters === test.c:8:3: note: symbolic number of iterations is (unsigned int) n_9(D) test.c:8:3: note: not

[PATCH 09/10] Experiment with using optinfo in gimple-loop-interchange.cc

2018-05-29 Thread David Malcolm
This was an experiment to try to capture information on a loop optimization. gcc/ChangeLog: * gimple-loop-interchange.cc (should_interchange_loops): Add optinfo note when interchange gives better data locality behavior. (tree_loop_interchange::interchange): Add

[PATCH 02/10] Add JSON implementation

2018-05-29 Thread David Malcolm
This patch is the JSON patch I posted last year; it adds support to gcc for reading and writing JSON, based on DOM-like trees of json::value instances. This is overkill for what's needed by the rest of the patch kit (which just needs to be able to write JSON), but this code already existed, so

[PATCH 06/10] Experiments with using optinfo for inlining

2018-05-29 Thread David Malcolm
gcc/ChangeLog: * ipa-inline.c: Include "optinfo.h". (report_inline_failed_reason): Use OPTINFO_FAILURE. (flatten_function): Use OPTINFO_SUCCESS. (early_inline_small_functions): Likewise. * tree-inline.c: Include "optinfo.h". (expand_call_inline): Use

[PATCH 00/10] RFC: Prototype of compiler-assisted performance analysis

2018-05-29 Thread David Malcolm
I want to provide more "actionable" information on how GCC optimizes code, both for us (GCC developers), and for advanced end-users. For us, I want to make it easier to get a sense of how an optimization can be improved (bug-fixing). For end-users, I want to make it easier to figure out which

[PATCH 01/10] Convert dump and optgroup flags to enums

2018-05-29 Thread David Malcolm
The dump machinery uses "int" in a few places, for two different sets of bitmasks. This patch makes things more self-documenting and type-safe by using a new pair of enums: one for the dump_flags_t and another for the optgroup_flags. This requires adding some overloaded bit operations to the

Re: [PATCH][AArch64] Fix aarch64_ira_change_pseudo_allocno_class

2018-05-29 Thread Richard Sandiford
Wilco Dijkstra writes: > James Greenhalgh wrote: > >> > Add a missing ? to aarch64_get_lane to fix a failure in the testsuite. >> >> > I'd prefer more detail than this for a workaround; which test, why did it >> > start to fail, why is this the right solution, etc. > > It was

Re: [PATCH] add udivhi3, umodhi3 functions to libgcc

2018-05-29 Thread Jakub Jelinek
On Tue, May 29, 2018 at 03:01:20PM -0400, Paul Koning wrote: > +short udivmodhi4 (); We do want real prototypes, not K declarations. > Added: svn:eol-style > ## -0,0 +1 ## > +native Why? Jakub

C++ PATCH to add -Winit-list-lifetime (47445, 67711, 48562, 85873)

2018-05-29 Thread Jason Merrill
There have been several bug reports either being surprised that the backing array for an initializer_list went away unexpectedly, or asking for a warning about such situations. This patch adds a new warning flag -Winit-list-lifetime, on by default, to warn about * returning an automatic

[PING] [PATCH] refine -Wstringop-truncation and -Wsizeof-pointer-memaccess for strncat of nonstrings (PR 85602)

2018-05-29 Thread Martin Sebor
To make review and testing easier (thank you, Franz), attached is an updated patch rebased on top of today's trunk. (Note that the patch intentionally doesn't suppress the warning for the submitted test case without adding the nonstring attribute.) On 05/25/2018 02:59 PM, Martin Sebor wrote:

[PATCH] add udivhi3, umodhi3 functions to libgcc

2018-05-29 Thread Paul Koning
This patch adds two files which implement HImode unsigned divide and mod for GCC on platforms where that is needed and not provided in hardware. The code is lifted from the corresponding SImode functions, with the obvious tweaks. I'm not sure if I can commit this. paul 2018-05-29

Re: [PATCH] [MSP430] Allow interrupt handers to be static and fix __interrupt__ attribute causing an ICE

2018-05-29 Thread DJ Delorie
The reason I required interrupt handlers to be non-static is because the linker builds the interrupt handler table using weak references. If the handler is static, it won't be added to the table, and never called. So you'd need a test to ensure that the handler was properly entered into the

[PATCH, i386]: Fix PR85950, Unsafe-math-optimizations regresses optimization using SSE4.1 roundss

2018-05-29 Thread Uros Bizjak
Hello! Attached patch enables l2 for TARGET_SSE4.1, and while there, also corrects operand 1 predicate of rounds{s,d} instruction. 2018-05-29 Uros Bizjak PR target/85950 * config/i386/i386.md (l2): Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}

Re: [PATCH] consider MIN_EXPR in get_size_range() (PR 85888)

2018-05-29 Thread Martin Sebor
I do want to follow up on the optimization you referred to above. After thinking about it some more I don't see what benefit it could provide. The value of the bound expression (LEN) ends up computed at the call site and stored in a register that the library strncmp has to read. I can't think

Re: [PATCH] PR target/85358 patch v2: Add target hook to prevent default widening

2018-05-29 Thread Michael Meissner
On Sat, May 26, 2018 at 08:13:04AM +0200, Richard Biener wrote: > On May 25, 2018 8:49:47 PM GMT+02:00, Michael Meissner > wrote: > >I redid the patch to make the target hook only apply for scalar float > >points, > >and I removed all of the integer only subcases. > > > >I have checked this on a

Re: [PATCH][AArch64] Fix aarch64_ira_change_pseudo_allocno_class

2018-05-29 Thread Wilco Dijkstra
James Greenhalgh wrote: > > Add a missing ? to aarch64_get_lane to fix a failure in the testsuite. > > > I'd prefer more detail than this for a workaround; which test, why did it > > start to fail, why is this the right solution, etc. It was gcc.target/aarch64/vect_copy_lane_1.c generating:

Re: [PATCH GCC][6/6]Restrict predcom using register pressure information

2018-05-29 Thread Bin.Cheng
On Tue, May 29, 2018 at 6:18 PM, David Malcolm wrote: > On Tue, 2018-05-29 at 17:04 +0100, Bin.Cheng wrote: >> On Fri, May 4, 2018 at 5:24 PM, Bin Cheng wrote: >> > Hi, >> > This patch restricts predcom pass using register pressure >> > information. >> > In case of high register pressure, we now

[PATCH] Qualify another call in

2018-05-29 Thread Jonathan Wakely
* include/std/variant (__erased_dtor): Qualify call to __get. Tested powerpc64le-linux, committed to trunk. Backports to follow. commit a79e92a05636a5fee047fb6dfa8c839ab93ee35f Author: Jonathan Wakely Date: Tue May 29 18:04:57 2018 +0100 Qualify another call in

Re: [PATCH GCC][6/6]Restrict predcom using register pressure information

2018-05-29 Thread David Malcolm
On Tue, 2018-05-29 at 17:04 +0100, Bin.Cheng wrote: > On Fri, May 4, 2018 at 5:24 PM, Bin Cheng wrote: > > Hi, > > This patch restricts predcom pass using register pressure > > information. > > In case of high register pressure, we now prune additional chains > > as well > > as disable unrolling

Re: C++ PATCH for c++/85883, class tmpl args deduction fail with new

2018-05-29 Thread Jason Merrill
OK. On Tue, May 29, 2018 at 11:55 AM, Marek Polacek wrote: > On Fri, May 25, 2018 at 01:58:53PM -0400, Jason Merrill wrote: >> > + /* For the rest, e.g. new A(1, 2, 3), create a list. */ >> > + else if (len > 1) >> > + { >> > + unsigned int n; >> > +

Re: [PATCH] allow more strncat calls with -Wstringop-truncation (PR 85700)

2018-05-29 Thread Martin Sebor
Ping: https://gcc.gnu.org/ml/gcc-patches/2018-05/msg01189.html On 05/22/2018 07:40 PM, Martin Sebor wrote: Here's another small refinement to -Wstringop-truncation to avoid diagnosing more arguably "safe" cases of strncat() that match the expected pattern of strncat (d, s, sizeof d - strlen

backport fix for PR 85623 to GCC 8

2018-05-29 Thread Martin Sebor
As discussed at (*) I'd like to backport the following patch to GCC 8 to suppress a class of -Wstringop-truncation warnings. If there are no concerns/objections I will go ahead and commit it this week. https://gcc.gnu.org/ml/gcc-patches/2018-05/msg00509.html Thanks Martin *)

Re: [PATCH GCC][6/6]Restrict predcom using register pressure information

2018-05-29 Thread Bin.Cheng
On Fri, May 4, 2018 at 5:24 PM, Bin Cheng wrote: > Hi, > This patch restricts predcom pass using register pressure information. > In case of high register pressure, we now prune additional chains as well > as disable unrolling in predcom. In generally, I think this patch set is > useful. > >

Re: [PATCH GCC][5/6]implement live range, reg pressure computation class

2018-05-29 Thread Bin.Cheng
On Mon, May 28, 2018 at 12:22 PM, Richard Biener wrote: > On Fri, May 18, 2018 at 1:57 PM Bin.Cheng wrote: > >> On Fri, May 4, 2018 at 5:23 PM, Bin Cheng wrote: >> > Hi, >> > Based on previous patch, this one implements live range, reg pressure > computation >> > class in tree-ssa-live.c. The

Re: C++ PATCH for c++/85883, class tmpl args deduction fail with new

2018-05-29 Thread Marek Polacek
On Fri, May 25, 2018 at 01:58:53PM -0400, Jason Merrill wrote: > > + /* For the rest, e.g. new A(1, 2, 3), create a list. */ > > + else if (len > 1) > > + { > > + unsigned int n; > > + tree t; > > + FOR_EACH_VEC_ELT (**init, n, t) > >

Re: [PATCH , rs6000] Add builtin tests for vec_madds, vec_extract_fp32_from_shortl and vec_extract_fp32_from_shorth, vec_xst_be

2018-05-29 Thread Carl Love
GCC Maintainers: The patch has been updated to address Segher's comment for test file builtins-3-p9.c be qualified for le. The patch was retested on: powerpc64le-unknown-linux-gnu (Power 8 LE)    powerpc64le-unknown-linux-gnu (Power 9 LE) powerpc64-unknown-linux-gnu (Power 8 BE)

Re: [AARCH64] Add support of ARMv8.4 in saphira for Qualcomm server part

2018-05-29 Thread Siddhesh Poyarekar
On 29 May 2018 at 21:17, James Greenhalgh wrote: > On Tue, May 29, 2018 at 05:01:42AM -0500, Sameera Deshpande wrote: >> Hi! >> >> Please find attached the patch to add support of ARMv8.4 in saphira >> for Qualcomm server part. Tested on aarch64, without any regressions. >> >> Ok for trunk? > >

Re: [PATCH , rs6000] Add missing builtin test cases, fix arguments to match specifications.

2018-05-29 Thread Carl Love
GCC maintainers: The patch has been reworked again to take advantage of the le and be selectors available, the separate BE and LE test files have been combined into a single test file. The result testing is now qualified based on the le and be selectors. This reduces the difficulty of

[PATCH][AArch64] Improve LDP/STP generation that requires a base register

2018-05-29 Thread Kyrill Tkachov
[sending on behalf of Jackson Woodruff] Hi all, This patch generalizes the formation of LDP/STP that require a base register. In AArch64, LDP/STP instructions have different sized immediate offsets than normal LDR/STR instructions. This part of the backend attempts to spot groups of four

Re: [C++ PATCH] Avoid bogus -Wunused-but-set* with structured binding (PR c++/85952)

2018-05-29 Thread Jason Merrill
OK. On Tue, May 29, 2018 at 10:55 AM, Jakub Jelinek wrote: > On Tue, May 29, 2018 at 10:49:03AM -0400, Jason Merrill wrote: >> >> auto & [x,y] = a; >> >> >> >> but that should be added to the testcase. >> > >> > It is already there (in baz). >> >> Well, yes, but in baz a is an S, not an array;

Re: [PATCH] consider MIN_EXPR in get_size_range() (PR 85888)

2018-05-29 Thread Martin Sebor
On 05/28/2018 03:11 AM, Richard Biener wrote: On Fri, May 25, 2018 at 10:15 PM Martin Sebor wrote: Attached is revision 3 of the patch incorporating your determine_value_range function with the requested changes. I'm somewhat torn about removing the "basic" interface on SSA names so can you

Re: [C++ PATCH] Avoid bogus -Wunused-but-set* with structured binding (PR c++/85952)

2018-05-29 Thread Jakub Jelinek
On Tue, May 29, 2018 at 10:49:03AM -0400, Jason Merrill wrote: > >> auto & [x,y] = a; > >> > >> but that should be added to the testcase. > > > > It is already there (in baz). > > Well, yes, but in baz a is an S, not an array; I see value and > reference cases for S, but only value for int

[PATCH][RFC] Fix CFG cleanup compile-time hog, PR85964

2018-05-29 Thread Richard Biener
The following fixes the situation where the initial sweep over the CFG to remove trivially dead code regions causes excessive compile-time because of using remove_edge_and_dominated_blocks and thus iterate_fix_dominators. The good thing is that I added cleanup_control_flow_pre doing this

Re: [C++ PATCH] Avoid bogus -Wunused-but-set* with structured binding (PR c++/85952)

2018-05-29 Thread Jason Merrill
On Tue, May 29, 2018 at 10:42 AM, Jakub Jelinek wrote: > On Tue, May 29, 2018 at 10:38:09AM -0400, Jason Merrill wrote: >> > int a[2] = {1, 2}; >> > int D.2131[2] = a; >> > int x [value-expr: D.2131[0]]; >> > int y [value-expr: D.2131[1]]; >> > >> > <>; >> > int D.2131[2] = a; >> >

Re: [C++ PATCH] Avoid bogus -Wunused-but-set* with structured binding (PR c++/85952)

2018-05-29 Thread Jakub Jelinek
On Tue, May 29, 2018 at 10:38:09AM -0400, Jason Merrill wrote: > > int a[2] = {1, 2}; > > int D.2131[2] = a; > > int x [value-expr: D.2131[0]]; > > int y [value-expr: D.2131[1]]; > > > > <>; > > int D.2131[2] = a; > > return = x + y; > > > > is what original dump shows as

Re: [PATCH][AArch64] Avoid paradoxical subregs for vector initialisation

2018-05-29 Thread Kyrill Tkachov
Hi Richard, On 29/05/18 15:26, Richard Sandiford wrote: Kyrill Tkachov writes: Hi all, The recent changes to aarch64_expand_vector_init cause an ICE in the attached testcase. The register allocator "ICEs with Max. number of generated reload insns per insn is achieved (90)" That is because

Re: [C++ PATCH] Avoid bogus -Wunused-but-set* with structured binding (PR c++/85952)

2018-05-29 Thread Jason Merrill
On Tue, May 29, 2018 at 10:26 AM, Jakub Jelinek wrote: > On Tue, May 29, 2018 at 10:16:49AM -0400, Jason Merrill wrote: >> On Tue, May 29, 2018, 4:31 AM Jakub Jelinek wrote: >> > Initializing the decomposition temporary from an expression with array type >> > is a special aggregate

Re: [PATCH] RISC-V: Add interrupt attribute support.

2018-05-29 Thread Nathan Sidwell
On 05/25/2018 06:30 PM, Jim Wilson wrote: -/* Return true if func is a naked function. */ +/* Return true if funcion TYPE is an interrupt function. */ .^^^ +static bool +riscv_interrupt_type_p (tree type) funcion? -- Nathan Sidwell

Re: [PATCH][AArch64] Avoid paradoxical subregs for vector initialisation

2018-05-29 Thread Richard Sandiford
Kyrill Tkachov writes: > Hi all, > > The recent changes to aarch64_expand_vector_init cause an ICE in the > attached testcase. The register allocator "ICEs with Max. number of > generated reload insns per insn is achieved (90)" > > That is because aarch64_expand_vector_init creates a

Re: [C++ PATCH] Avoid bogus -Wunused-but-set* with structured binding (PR c++/85952)

2018-05-29 Thread Jakub Jelinek
On Tue, May 29, 2018 at 10:16:49AM -0400, Jason Merrill wrote: > On Tue, May 29, 2018, 4:31 AM Jakub Jelinek wrote: > > Initializing the decomposition temporary from an expression with array type > > is a special aggregate initialization path in which we wouldn't mark the > > expression as read

Re: [C++ PATCH] Avoid bogus -Wunused-but-set* with structured binding (PR c++/85952)

2018-05-29 Thread Jason Merrill
On Tue, May 29, 2018, 4:31 AM Jakub Jelinek wrote: > > Hi! > > Initializing the decomposition temporary from an expression with array type > is a special aggregate initialization path in which we wouldn't mark the > expression as read for the purposes of -Wunused-but-set*. > > Fixed thusly,

[PATCH][AArch64] Avoid paradoxical subregs for vector initialisation

2018-05-29 Thread Kyrill Tkachov
Hi all, The recent changes to aarch64_expand_vector_init cause an ICE in the attached testcase. The register allocator "ICEs with Max. number of generated reload insns per insn is achieved (90)" That is because aarch64_expand_vector_init creates a paradoxical subreg to move a DImode value

[PATCH] Simplify gcov_histogram as it's used only for ARCS counters.

2018-05-29 Thread Martin Liška
Hi. As we use GCOV histogram just for ARCS type of counters, I would like to simplify: /* Cumulative counter data. */ struct gcov_ctr_summary { gcov_unsigned_t num; /* number of counters. */ gcov_unsigned_t runs; /* number of program runs */ gcov_type sum_all;

Re: [PATCH] Support variables in expansion of -fprofile-generate option (PR gcov-profile/47618).

2018-05-29 Thread Martin Liška
On 05/29/2018 02:12 PM, Petr Špaček wrote: > On 29.5.2018 14:03, Martin Liška wrote: >> Hi. >> >> I'm sending V2, where I changed: >> >> - removed expansion of '%w', it's handled in: >> https://gcc.gnu.org/ml/gcc-patches/2018-05/msg00729.html >> - simplified concatenation in

PING^1: [PATCH v2] C/C++: Add -Waddress-of-packed-member

2018-05-29 Thread H.J. Lu
On Fri, May 18, 2018 at 4:36 AM, H.J. Lu wrote: > On Thu, May 17, 2018 at 10:32:56AM -0700, H.J. Lu wrote: >> On Mon, May 14, 2018 at 8:00 PM, Martin Sebor wrote: >> > On 05/14/2018 01:10 PM, H.J. Lu wrote: >> >> >> >> On Mon, May 14, 2018 at 10:40 AM, H.J. Lu wrote: >> >> >> >> $ cat c.i

Re: [PATCH] Support variables in expansion of -fprofile-generate option (PR gcov-profile/47618).

2018-05-29 Thread Petr Špaček
On 29.5.2018 14:03, Martin Liška wrote: Hi. I'm sending V2, where I changed: - removed expansion of '%w', it's handled in: https://gcc.gnu.org/ml/gcc-patches/2018-05/msg00729.html - simplified concatenation in replace_filename_variables - documentation for the expansion is added Ready for

Re: [PATCH] Support variables in expansion of -fprofile-generate option (PR gcov-profile/47618).

2018-05-29 Thread Martin Liška
Hi. I'm sending V2, where I changed: - removed expansion of '%w', it's handled in: https://gcc.gnu.org/ml/gcc-patches/2018-05/msg00729.html - simplified concatenation in replace_filename_variables - documentation for the expansion is added Ready for trunk? Martin >From

[PATCH] Fix get_earlier_stmt call

2018-05-29 Thread Richard Biener
This fixes the get_earlier_stmt call in vect_preserves_scalar_order_p to properly use non-pattern stmts. I came along this when reworking how we change DR_STMT during vectorization - this mimics the way the SLP code uses get_later_stmt. I've added asserts into get_earlier/later_stmt to make

[PATCH] Move stmt_vec_info_vec into vec_info class

2018-05-29 Thread Richard Biener
This is another baby-step towards re-using vectorizer analysis after doing many, comparing costs and then deciding on one. It should allow to "simply" re-instantiate the stmt_vec_info_vec vector before calling vect_transform_*. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied.

[PATCH] Account iterate_fix_dominators to TV_DOMINANCE

2018-05-29 Thread Richard Biener
Boostrapped on x86_64-unknown-linux-gnu, applied. Richard. 2018-05-29 Richard Biener * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE. diff --git a/gcc/dominance.c b/gcc/dominance.c index 20671983f98..5ba765c82be 100644 --- a/gcc/dominance.c +++ b/gcc/dominance.c @@

Re: [PATCH] libgcov: report about a different timestamp (PR gcov-profile/85759).

2018-05-29 Thread Nathan Sidwell
On 05/29/2018 05:32 AM, Martin Liška wrote: Hi. As showed twice in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85759 it's quite problematic when a profile data file is overwritten for a different compilation unit. I believe it's not intentional in most cases and it deserves an error message

[AARCH64] Add support of ARMv8.4 in saphira for Qualcomm server part

2018-05-29 Thread Sameera Deshpande
Hi! Please find attached the patch to add support of ARMv8.4 in saphira for Qualcomm server part. Tested on aarch64, without any regressions. Ok for trunk? -- - Thanks and regards, Sameera D. diff --git a/gcc/config/aarch64/aarch64-cores.def b/gcc/config/aarch64/aarch64-cores.def index

Re: [PATCH] Introduce VEC_UNPACK_FIX_TRUNC_{LO,HI}_EXPR and VEC_PACK_FLOAT_EXPR, use it in x86 vectorization (PR target/85918)

2018-05-29 Thread Richard Biener
On Tue, 29 May 2018, Jakub Jelinek wrote: > On Tue, May 29, 2018 at 11:15:51AM +0200, Richard Biener wrote: > > Looking at other examples the only thing we have is > > maybe_ne and friends on TYPE_VECTOR_SUBPARTS. But I think the only > > thing missing is > > > > || (maybe_ne

[Ada] Adjust documentation of -gnatn switch

2018-05-29 Thread Pierre-Marie de Rodat
This changes the wording in the documentation of the -gnatn switch to make it use "units" rather than "modules" and also adjusts the usage message. No functional changes. Tested on x86_64-pc-linux-gnu, committed on trunk 2018-05-29 Eric Botcazou gcc/ada/ *

[Ada] Wrong equality on untagged private type

2018-05-29 Thread Pierre-Marie de Rodat
When a private type declaration T1 is completed with a derivation of an untagged private type that overrides the predefined equality primitive, and the full view of T2 is a derivation of another private type T2 whose full view is a tagged type, the compiler may generate code that references the

[Ada] Improper behavior of floating-point attributes

2018-05-29 Thread Pierre-Marie de Rodat
This patch fixes an error in the handling of attributes Pred and Succ when applied to the limit values of a floating-point type. The RM mandates that such operations must raise constraint_error, but GNAT generated in most cases an infinite value, regardless of whether overflow checks were enabled.

[Ada] Tighten crtbegin files for VxWorks

2018-05-29 Thread Pierre-Marie de Rodat
Enforce a more explicit distinction of crtbegin objects holding either functions with ctor/dtor attributes or _ctors/_dtors arrays, or none of the two (no array, no attributes). Then allow/enforce different linking strategies for VxWorks 7. Tested on x86_64-pc-linux-gnu, committed on trunk

[Ada] Plug small hole in -gnatR output

2018-05-29 Thread Pierre-Marie de Rodat
The -gnatR switch outputs representation information for locally-defined types but it was skipping those defined in blocks without label, unlike those defined in named blocks. This change plugs this small hole. The following procedure: procedure P is begin declare type R is record I

[Ada] Add system-vxworks7 variants of system.ads files for Vx7

2018-05-29 Thread Pierre-Marie de Rodat
Based on the Vx6 versions, using a different link spec to accomodate VxWorks 7 specificities, in particular the ability in some configurations to rely on .ctor sections to trigger constructors in kernel modules. Tested on x86_64-pc-linux-gnu, committed on trunk 2018-05-29 Olivier Hainque

[Ada] Implement machine parsable format for -gnatR output

2018-05-29 Thread Pierre-Marie de Rodat
This adds a new variant to the -gnatR switch, namely -gnatRj, which causes the compiler to output representation information to a file in the JSON data interchange format. It can be combined with -gnatR0/1/2/3/m (but is incompatible with -gnaRe and -gnatRs). The information output in this mode

[Ada] Fix constraint error in Normalize_Pathname

2018-05-29 Thread Pierre-Marie de Rodat
Fix Normalize_Pathname to avoid a constraint error. Tested on x86_64-pc-linux-gnu, committed on trunk 2018-05-29 Pascal Obry gcc/ada/ * libgnat/s-os_lib.adb (Normalize_Pathname): Fix handling of ".." in the root directory. gcc/testsuite/ *

[Ada] Enhance output of discriminants with -gnatR in JSON mode

2018-05-29 Thread Pierre-Marie de Rodat
This arranges for the Discriminant_Number of discriminants to be output by -gnatR in JSON mode. This number is referenced in symbolic expressions present for offsets and sizes, so its definition is also required for the sake of completeness. Tested on x86_64-pc-linux-gnu, committed on trunk

[Ada] Adjustment of behavior of new -gnatRj switch

2018-05-29 Thread Pierre-Marie de Rodat
This decouples -gnatRj from the destination, either standard output or file, so that it only toggles the format of the representation information. Tested on x86_64-pc-linux-gnu, committed on trunk 2018-05-29 Eric Botcazou gcc/ada/ *

[Ada] Factor out worker procedure for -gnatR

2018-05-29 Thread Pierre-Marie de Rodat
This extracts a worker procedure for printing the layout of a single component from List_Record_Layout so as to make the next change more readable. Tested on x86_64-pc-linux-gnu, committed on trunk 2018-05-29 Eric Botcazou gcc/ada/ * repinfo.adb (List_Component_Layout): New

[Ada] Minor cleanup in repinfo unit

2018-05-29 Thread Pierre-Marie de Rodat
This factors out the various cases where a marker for an unknown value is output by the -gnatR switches. No functional changes. Tested on x86_64-pc-linux-gnu, committed on trunk 2018-05-29 Eric Botcazou gcc/ada/ * repinfo.adb (Write_Unknown_Val): New procedure.

[Ada] Fix irregular output with -gnatRm

2018-05-29 Thread Pierre-Marie de Rodat
The information displayed by -gnatRm was using slightly different naming and formatting conventions than the rest of the -gnatR information with no justification, so this adjusts it for the sake of consistency. For the following package: package P is function F (I : Integer) return Integer;

[Ada] Preliminary work to avoid full pathnames in ALI files

2018-05-29 Thread Pierre-Marie de Rodat
Normally, ALI files refer to source files using simple names. This allows files to be moved around without disturbing things (causing extra recompilations, etc). However, for configuration files, the full pathname is stored. This patch preparates the code base to store the simple name in this

Re: [PATCH] Introduce VEC_UNPACK_FIX_TRUNC_{LO,HI}_EXPR and VEC_PACK_FLOAT_EXPR, use it in x86 vectorization (PR target/85918)

2018-05-29 Thread Jakub Jelinek
On Tue, May 29, 2018 at 11:15:51AM +0200, Richard Biener wrote: > Looking at other examples the only thing we have is > maybe_ne and friends on TYPE_VECTOR_SUBPARTS. But I think the only > thing missing is > > || (maybe_ne (TYPE_VECTOR_SUBPARTS (lhs_type), > 2 *

[PATCH] libgcov: report about a different timestamp (PR gcov-profile/85759).

2018-05-29 Thread Martin Liška
Hi. As showed twice in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85759 it's quite problematic when a profile data file is overwritten for a different compilation unit. I believe it's not intentional in most cases and it deserves an error message in libgcov. Moreover, to be really sure we

Re: [PATCH] Introduce VEC_UNPACK_FIX_TRUNC_{LO,HI}_EXPR and VEC_PACK_FLOAT_EXPR, use it in x86 vectorization (PR target/85918)

2018-05-29 Thread Richard Biener
On Tue, 29 May 2018, Jakub Jelinek wrote: > On Mon, May 28, 2018 at 12:12:18PM +0200, Richard Biener wrote: > > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? > > > > Apart from > > > > --- gcc/tree-cfg.c.jj 2018-05-26 23:03:55.361873297 +0200 > > +++ gcc/tree-cfg.c

[C++ PATCH] Avoid bogus -Wunused-but-set* with structured binding (PR c++/85952)

2018-05-29 Thread Jakub Jelinek
Hi! Initializing the decomposition temporary from an expression with array type is a special aggregate initialization path in which we wouldn't mark the expression as read for the purposes of -Wunused-but-set*. Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

Re: [PATCH] Fix doc/invoke.texi ARM buglet

2018-05-29 Thread Kyrill Tkachov
On 28/05/18 11:22, Jakub Jelinek wrote: Hi! I've noticed ../../gcc/doc/invoke.texi:15971: warning: @itemx should not begin @table errors, fixed thusly, committed as obvious to trunk. Probably it needs backporting too. Thanks Jakub. That is caused by my oversight in r260362 when I removed

[PATCH] Fix lower-subreg ICE (PR target/85945)

2018-05-29 Thread Jakub Jelinek
Hi! We ICE on the following testcase, because lower-subreg sees only SFmode subregs of a multi-word pseudo (V4SFmode) and decides to decompose it. Decomposition is done through replacing the multi-word pseudo with a concat of word-sized integer pseudos; unfortunately, we don't allow SFmode

Re: [PATCH] Introduce VEC_UNPACK_FIX_TRUNC_{LO,HI}_EXPR and VEC_PACK_FLOAT_EXPR, use it in x86 vectorization (PR target/85918)

2018-05-29 Thread Jakub Jelinek
On Mon, May 28, 2018 at 12:12:18PM +0200, Richard Biener wrote: > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? > > Apart from > > --- gcc/tree-cfg.c.jj 2018-05-26 23:03:55.361873297 +0200 > +++ gcc/tree-cfg.c 2018-05-27 12:54:55.046197128 +0200 > @@ -3676,6

[testsuite, commited] Fix "too few/many" error messages in scan-*-times procs

2018-05-29 Thread Tom de Vries
Hi, consider complex-6.c, that passes as: ... PASS: gcc.dg/complex-6.c (test for excess errors) PASS: gcc.dg/complex-6.c scan-tree-dump-times cplxlower1 "unord" 1 PASS: gcc.dg/complex-6.c scan-tree-dump-times cplxlower1 "__mulsc3" 1 ... If we drop one argument from the first

[testsuite, commited] Use correct proc names in scanasm.exp

2018-05-29 Thread Tom de Vries
Hi, Consider stack-usage-1.c, which passes with: ... PASS: gcc.dg/stack-usage-1.c (test for excess errors) PASS: gcc.dg/stack-usage-1.c scan-file foo\t(256|264)\tstatic ... The dg-final directive scan-file is actually not used in the source file, instead it's scan-stack-usage: ... /* { dg-final

[testsuite, commited] Fix error message in scan-hidden/scan-not-hidden

2018-05-29 Thread Tom de Vries
Hi, consider test-case visibility-1.c: ... /* Test visibility attribute on function definition. */ /* { dg-do compile } */ /* { dg-require-visibility "" } */ /* { dg-final { scan-hidden "foo" } } */ void __attribute__((visibility ("hidden"))) foo() { } ... which passes with: ... PASS: