[PATCH] RFC: machine-readable diagnostic output (PR other/19165)

2018-11-12 Thread David Malcolm
This patch implements a -fdiagnostics-format=json option which converts the diagnostics to be output to stderr in a JSON format; see the documentation in invoke.texi. Logically-related diagnostics are nested at the JSON level, using the auto_diagnostic_group mechanism. gcc/ChangeLog: PR o

Re: [PATCH] Improve -fprofile-report.

2018-11-12 Thread Martin Liška
PING^1 On 11/6/18 3:05 PM, Martin Liška wrote: > Hi. > > The patch is based on what was discussed on IRC and in the PR. > Apart from that the reported layout is improved. > > Patch survives regression tests on x86_64-linux-gnu. > > Ready for trunk? > Martin > > gcc/ChangeLog: > > 2018-11-06

Re: [PATCH] Come up with --param asan-stack-small-redzone (PR sanitizer/81715).

2018-11-12 Thread Martin Liška
PING^3 On 10/23/18 11:02 AM, Martin Liška wrote: > PING^2 > > On 10/9/18 10:29 AM, Martin Liška wrote: >> PING^1 >> >> On 9/26/18 11:33 AM, Martin Liška wrote: >>> On 9/25/18 5:53 PM, Jakub Jelinek wrote: On Tue, Sep 25, 2018 at 05:26:44PM +0200, Martin Liška wrote: > The only missing pi

Re: [PATCH] More value_range API cleanup

2018-11-12 Thread Richard Biener
On Tue, 13 Nov 2018, Richard Biener wrote: > On Mon, 12 Nov 2018, Aldy Hernandez wrote: > > > On 11/12/18 7:12 AM, Richard Biener wrote: > > > > > > This mainly tries to rectify the workaround I put in place for ipa-cp.c > > > needing to build value_range instead of value_range_base for calling

Re: [PATCH] More value_range API cleanup

2018-11-12 Thread Richard Biener
On Mon, 12 Nov 2018, Aldy Hernandez wrote: > On 11/12/18 7:12 AM, Richard Biener wrote: > > > > This mainly tries to rectify the workaround I put in place for ipa-cp.c > > needing to build value_range instead of value_range_base for calling > > extract_range_from_unary_expr. > > > > To make this

GCC 9 Status report (2018-11-13), Stage 3 in effect now

2018-11-12 Thread Richard Biener
Status == GCC trunk is open for general bugfixing (Stage 3) now until the end of Jan 6th after which only regression and documentation fixes will be possible. This means we have now started the stablilization phase of GCC 9 and you should see to start testing the compiler, report and fix bu

Re: [PATCH AutoFDO/2]Treat ZERO as common profile probability/count

2018-11-12 Thread Bin.Cheng
On Mon, Nov 5, 2018 at 10:40 PM Jan Hubicka wrote: > > diff --git a/gcc/profile-count.h b/gcc/profile-count.h > index 4289bc5a004..2b5e3269250 100644 > --- a/gcc/profile-count.h > +++ b/gcc/profile-count.h > @@ -218,6 +218,11 @@ public: > } > > > + /* Return true if value is zero. */ > + b

Bug 52869 - [DR 1207] "this" not being allowed in noexcept clauses

2018-11-12 Thread Umesh Kalappa
Hi All, the following patch fix the subjected issue Index: gcc/cp/parser.c === --- gcc/cp/parser.c (revision 266026) +++ gcc/cp/parser.c (working copy) @@ -24615,6 +24615,8 @@ { tree expr; cp_lexer_consume_

Re: Fix __gnu_cxx::throw_allocator 2 * O(log(N)) complexity

2018-11-12 Thread François Dumont
Oops, it was not the tested patch. Here it is. On 11/12/18 7:43 AM, François Dumont wrote: When doing some debugging session I noticed that the __gnu_cxx::throw_allocator doubles all lookup on both insert and erase. Using map::insert result and erasing the found iterator avoids this double lo

Re: [RS6000] Remove unnecessary rtx_equal_p

2018-11-12 Thread Alan Modra
On Tue, Nov 13, 2018 at 02:16:09PM +1030, Alan Modra wrote: > REGs are unique. This patch recognizes that fact, speeding up rs6000 > gcc infinitesimally. Bootstrapped etc. powerpc64le-linux. OK? Ugh, looking over this old patch again, I don't see how I can claim that regs in pre_inc/pre_dec/pre

[C++ PATCH] Implement P0315R4, Lambdas in unevaluated contexts.

2018-11-12 Thread Jason Merrill
When lambdas were added in C++11 they were banned from unevaluated contexts as a way to avoid needing to deal with them in mangling or SFINAE. This proposal avoids that with a more narrow proposal: lambdas never compare as equivalent (so we don't need to mangle them), and substitution failures wit

[C++ PATCH] Avoid double substitution with complete explicit template arguments.

2018-11-12 Thread Jason Merrill
Previously, when we got a function template with explicit arguments for all of the template parameters, we still did "deduction", which of course couldn't deduce anything, but did other deduction-time checking of non-dependent conversions and such. This broke down with the unevaluated lambdas patc

[C++ PATCH] * decl2.c (min_vis_expr_r, expr_visibility): New.

2018-11-12 Thread Jason Merrill
We weren't properly constraining visibility based on names that appear in the mangled representation of expressions. This was made more obvious by the upcoming unevaluated lambdas patch. Tested x86_64-pc-linux-gnu, applying to trunk. (min_vis_r): Call expr_visibility. (constrain_

RFC (branch prediction): PATCH to implement P0479R5, [[likely]] and [[unlikely]].

2018-11-12 Thread Jason Merrill
[[likely]] and [[unlikely]] are equivalent to the GNU hot/cold attributes, except that they can be applied to arbitrary statements as well as labels; this is most likely to be useful for marking if/else branches as likely or unlikely. Conveniently, PREDICT_EXPR fits the bill nicely as a representa

[C++ PATCH] Implement P0722R3, destroying operator delete.

2018-11-12 Thread Jason Merrill
A destroying operator delete takes responsibility for calling the destructor for the object it is deleting; this is intended to be useful for sized delete of a class allocated with a trailing buffer, where the compiler can't know the size of the allocation, and so would pass the wrong size to the n

[C++ PATCH] Implement P0780R2, pack expansion in lambda init-capture.

2018-11-12 Thread Jason Merrill
Mostly this was straightforward; the tricky bit was finding, in the instantiation, the set of capture proxies built when instantiating the init-capture. The comment in lookup_init_capture_pack goes into detail. Tested x86_64-pc-linux-gnu, applying to trunk. * parser.c (cp_parser_lambda_i

[C++ PATCH] * cp-tree.h (struct cp_evaluated): New.

2018-11-12 Thread Jason Merrill
This patch simplifies the saving/clearing/restoring of cp_unevaluated_operand and c_inhibit_evaluation_warnings in the presence of mid-block returns. This cleanup was motivated by the forthcoming unevaluated lambdas patch. Tested x86_64-pc-linux-gnu, applying to trunk. * init.c (get_nsdm

[C++ PATCH] Change __cpp_explicit_bool to __cpp_conditional_explicit.

2018-11-12 Thread Jason Merrill
People objected to the old macro name as unclear, so it was changed at the San Diego meeting. Tested x86_64-pc-linux-gnu, applying to trunk. * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to __cpp_conditional_explicit. --- gcc/c-family/c-cppbuiltin.c |

[RS6000] secondary_reload and find_replacement

2018-11-12 Thread Alan Modra
This patch removes a call only necessary when using reload. It also corrects a PRE_DEC address offset. Segher preapproved the find_replacement change a few days ago, and the other change is an obvious bug fix. Committed rev 266049. * config/rs6000/rs6000.c (rs6000_secondary_reload_inner

[RS6000] Remove unnecessary rtx_equal_p

2018-11-12 Thread Alan Modra
REGs are unique. This patch recognizes that fact, speeding up rs6000 gcc infinitesimally. Bootstrapped etc. powerpc64le-linux. OK? * gcc/config/rs6000/rs6000.c (rs6000_legitimate_address_p): Replace rtx_equal_p call for known REGs with pointer comparison. (rs6000_seconda

[doc, committed] clarify documentation of cache parameters

2018-11-12 Thread Sandra Loosemore
Continuing to whack at trivial doc issues in bugzilla This patch is for PR 59634, which is to clarify that some cache-related parameters control attributes of the data cache and not the instruction cache. -Sandra 2018-11-13 Sandra Loosemore PR middle-end/59634 gcc/ * doc/invoke.te

[RS6000] Comment fix

2018-11-12 Thread Alan Modra
Committed as obvious, rev 266047. * config/rs6000/rs6000.c (rs6000_emit_prologue): Comment fix. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 1c5c7861552..d3355710d91 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -26997,7 +26997,7

[RS6000] Don't put large integer constants in TOC for -mcmodel=medium

2018-11-12 Thread Alan Modra
For -mcmodel=medium we can use toc-relative addressing to access constants placed in read-only data, which is better since they can be merged when in .rodata.cst8. Bootstrapped etc. powerpc64le-linux. OK? * config/rs6000/linux64.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Exclude intege

[RS6000] Rotate testcase

2018-11-12 Thread Alan Modra
The testcase exercises one of the rotate patterns. Segher okayed the testcase a long time ago, and the comments are obvious. Committed rev 266046. gcc/ * config/rs6000/predicates.md (logical_const_operand), (logical_operand): Correct comment. gcc/testsuite/ * gcc.target/po

[RS6000] Hide insn not needing to be public

2018-11-12 Thread Alan Modra
Another obvious patch. Committed rev 266045. * config/rs6000/rs6000.md (addsi3_high): Prefix with '*'. diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index 02e6e084785..02f194c7d33 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -1691

[RS6000] Ignore "c", "l" and "h" for register preference

2018-11-12 Thread Alan Modra
This catches a few places where move insn patterns don't slightly disparage CTR, LR and VRSAVE regs. Also fixes the doc for the rs6000 h constraint, and removes an r->cl alternative covered by r->h. Segher okayed a patch adding "*" like this patch a long time ago. Somehow I never committed it. T

[doc, committed] make #pragma once documentation easier to find

2018-11-12 Thread Sandra Loosemore
This patch is for PR 47823, which was about the documentation for "#pragma once" being buried in a strange location in the CPP manual. I've put the primary documentation for it with the other preprocessor pragmas in the CPP manual, and added a blurb to the pragmas chapter in the GCC manual expl

Re: [RS6000] Don't pass -many to the assembler

2018-11-12 Thread Alan Modra
On Mon, Nov 12, 2018 at 04:34:34PM -0800, Mike Stump wrote: > On Nov 12, 2018, at 3:13 PM, Alan Modra wrote: > > > > For people developing new code, it's the right way to go, and > > especially so for people working on gcc itself. For people just > > wanting stuff to compile, not so much. I ful

Re: [PATCH] MIPS: Add `-mfix-r5900' option for the R5900 short loop erratum

2018-11-12 Thread Maciej W. Rozycki
On Sun, 11 Nov 2018, Fredrik Noring wrote: > ../../../../libsanitizer/sanitizer_common/sanitizer_platform_limits_linux.cc:71:1: > note: in expansion of macro ‘COMPILER_CHECK’ >71 | COMPILER_CHECK(struct_kernel_stat_sz == sizeof(struct stat)); > | ^~ I guess `struct_kernel_

Re: [PATCH v3 3/3] PR preprocessor/83173: Enhance -fdump-internal-locations output

2018-11-12 Thread David Malcolm
On Mon, 2018-11-12 at 21:13 +, Mike Gulick wrote: > On 11/2/18 5:04 PM, David Malcolm wrote: > > On Thu, 2018-11-01 at 11:56 -0400, Mike Gulick wrote: > > > 2017-10-31 Mike Gulick > > > > > > PR preprocessor/83173 > > > * gcc/input.c (dump_location_info): Dump reason and > > > include

Re: [PATCH 2/9][GCC][AArch64][middle-end] Add rules to strip away unneeded type casts in expressions

2018-11-12 Thread Joseph Myers
On Sun, 11 Nov 2018, Tamar Christina wrote: > This patch adds a match.pd rule for stripping away the type converts > when you're converting to a type that has twice the precision of the > current type in the same class, doing a simple math operation on it and > converting back to the smaller ty

Re: [RS6000] Don't pass -many to the assembler

2018-11-12 Thread Iain Sandoe
> On 13 Nov 2018, at 00:34, Mike Stump wrote: > > On Nov 12, 2018, at 3:13 PM, Alan Modra wrote: >> >> For people developing new code, it's the right way to go, and >> especially so for people working on gcc itself. For people just >> wanting stuff to compile, not so much. I fully expect a

Re: [RS6000] Don't pass -many to the assembler

2018-11-12 Thread Mike Stump
On Nov 12, 2018, at 3:13 PM, Alan Modra wrote: > > For people developing new code, it's the right way to go, and > especially so for people working on gcc itself. For people just > wanting stuff to compile, not so much. I fully expect a chorus of > *MORON* or worse to come from the likes of the

Re: [PATCH 2/6] [RS6000] rs6000_output_indirect_call

2018-11-12 Thread Alan Modra
On Mon, Nov 12, 2018 at 01:44:08PM -0600, Bill Schmidt wrote: > On 11/6/18 11:37 PM, Alan Modra wrote: > > +fun, "l" + sibcall); > > It's not at all clear to me what {"l" + sibcall} is doing here. It's an ancient C programmer's trick, from the days when most compilers didn't optimize

Re: [PATCH] More value_range API cleanup

2018-11-12 Thread Aldy Hernandez
On 11/12/18 7:12 AM, Richard Biener wrote: This mainly tries to rectify the workaround I put in place for ipa-cp.c needing to build value_range instead of value_range_base for calling extract_range_from_unary_expr. To make this easier I moved more set_* functions to methods. Then for some reas

Re: [PATCH] Fortran include line fixes and -fdec-include support

2018-11-12 Thread Fritz Reese
On Mon, Nov 12, 2018 at 9:51 AM Jakub Jelinek wrote: > > In fortran97.pdf I read: > "Except in a character context, blanks are insignificant and may be used > freely throughout the program." > and while we handle that in most cases, we don't allow spaces in INCLUDE > lines in fixed form, while e.

RE: [PATCH v2] MIPS: Default to --with-llsc for the R5900 Linux target as well

2018-11-12 Thread Maciej W. Rozycki
On Fri, 9 Nov 2018, mfort...@gmail.com wrote: > Maciej: I'm not able to commit this for Fredrik at the moment, would > you mind doing that for him? Sure, I have applied the change now, using your proposed ChangeLog entry. Maciej

Re: [RS6000] Don't pass -many to the assembler

2018-11-12 Thread Alan Modra
On Mon, Nov 12, 2018 at 04:17:51PM +, Michael Matz wrote: > Hi, > > On Mon, 12 Nov 2018, Segher Boessenkool wrote: > > > > > Wouldn't this also break compiling code that contains power9 > > > > instructions but guarded by runtime tests to only be executed on > > > > power9 machines? That s

[wwwdocs] Add D language to news, frontends, release notes, and readings.

2018-11-12 Thread Iain Buclaw
Hi, As suggested, this adds an announcement of the D front end addition to the news items on the GCC home page, and from what I can tell, the relevant pages where the language should get a mention. Kept the release notes brief for now, will expand later. Is this OK? Thanks, Iain --- Index: htdo

Re: [PATCH][RFC] Come up with -flive-patching master option.

2018-11-12 Thread Qing Zhao
> On Nov 12, 2018, at 2:53 AM, Martin Liška wrote: > >> >> Okay, I see. >> >> I am also working on a similar option as yours, but make the -flive-patching >> as two level control: >> >> +flive-patching >> +Common RejectNegative Alias(flive-patching=,inline-clone) >> + >> +flive-patching= >>

Re: [PATCH] C/C++: add fix-it hints for missing '&' and '*' (PR c++/87850)

2018-11-12 Thread Martin Sebor
On 11/11/2018 02:02 PM, David Malcolm wrote: On Sun, 2018-11-11 at 11:01 -0700, Martin Sebor wrote: On 11/10/2018 12:01 AM, Eric Gallager wrote: On 11/9/18, David Malcolm wrote: This patch adds a fix-it hint to various pointer-vs-non-pointer diagnostics, suggesting the addition of a leading '

Re: [PATCH v3 3/3] PR preprocessor/83173: Enhance -fdump-internal-locations output

2018-11-12 Thread Mike Gulick
On 11/2/18 5:04 PM, David Malcolm wrote: > On Thu, 2018-11-01 at 11:56 -0400, Mike Gulick wrote: >> 2017-10-31 Mike Gulick >> >> PR preprocessor/83173 >> * gcc/input.c (dump_location_info): Dump reason and >> included_from fields from line_map_ordinary struct. Fix >> indenta

Re: [PATCH] RFC: C/C++: print help when a header can't be found

2018-11-12 Thread Martin Sebor
On 11/11/2018 04:33 PM, David Malcolm wrote: When gcc can't find a header file, it's a hard error that stops the build, typically requiring the user to mess around with compile flags, Makefiles, dependencies, and so forth. Often the exact search paths aren't obvious to the user. Consider the ca

Re: PR fortran/87919 patch for -fno-dec-structure

2018-11-12 Thread Fritz Reese
On Mon, Nov 12, 2018 at 3:42 PM Jakub Jelinek wrote: > Ok, so I'll ack it for trunk now, but please give the other Fortran > maintainers one day to disagree before committing. > For the release branches, I'd wait two weeks or so before backporting it. > Roger that. I'll happily give it some time.

Re: PR fortran/87919 patch for -fno-dec-structure

2018-11-12 Thread Jakub Jelinek
On Mon, Nov 12, 2018 at 03:28:47PM -0500, Fritz Reese wrote: > Actually, the gcc frontend appears to move -std= before the > language-specific options before f951 is even executed regardless of > its location compared to the -fdec flags. I don't know if this is a That is because: #define F951_OPTI

[PATCH, fortran] PR fortran/85982 -- Fix ICE on invalid attributes inside DEC structures

2018-11-12 Thread Fritz Reese
All, The simple patch below (and attached) fixes PR 85982. The issue is an omission of the macro gfc_comp_struct() which would include DEC structures in certain attribute checks that are performed for derived-TYPE declarations in decl.c. In the case described in the PR (https://gcc.gnu.org/bugzill

Re: [PATCH] RFC: elide repeated source locations (PR other/84889)

2018-11-12 Thread Martin Sebor
On 11/11/2018 07:43 PM, David Malcolm wrote: We often emit more than one diagnostic at the same source location. For example, the C++ frontend can emit many diagnostics at the same source location when suggesting overload candidates. For example: ../../src/gcc/testsuite/g++.dg/diagnostic/bad-bi

Re: PR fortran/87919 patch for -fno-dec-structure

2018-11-12 Thread Fritz Reese
On Thu, Nov 8, 2018 at 12:54 PM Jakub Jelinek wrote: > > On Thu, Nov 08, 2018 at 12:09:33PM -0500, Fritz Reese wrote: > > > What about the > > > /* Allow legacy code without warnings. */ > > > gfc_option.allow_std |= GFC_STD_F95_OBS | GFC_STD_F95_DEL > > > | GFC_STD_GNU | GFC_

Re: [PATCH][LRA] Fix PR87899: r264897 cause mis-compiled native arm-linux-gnueabihf toolchain

2018-11-12 Thread Peter Bergner
On 11/12/18 6:25 AM, Renlin Li wrote: > I tried to build a native arm-linuxeabihf toolchain with the patch. > But I got the following ICE: Ok, the issue was a problem in handling the src reg from a register copy. I thought I could just remove it from the dead_set, but forgot that the updating of t

Re: [PATCH 2/6] [RS6000] rs6000_output_indirect_call

2018-11-12 Thread Bill Schmidt
On 11/6/18 11:37 PM, Alan Modra wrote: > Like the last patch for external calls, now handle most assembly code > for indirect calls in one place. The patch also merges some insns, > correcting some !rs6000_speculate_indirect_jumps cases branching to > LR, which don't require a speculation barrier.

[PATCH 1/4] [aarch64/arm] Updating the cost table for xgene1.

2018-11-12 Thread Christoph Muellner
*** gcc/ChangeLog *** 2018-xx-xx Christoph Muellner * config/arm/aarch-cost-tables.h (xgene1_extra_costs): Update the cost table for Xgene1. --- gcc/config/arm/aarch-cost-tables.h | 88 +++--- 1 file changed, 44 insertions(+), 44 deletions(-)

[PATCH 4/4] [aarch64] Update xgene1 tuning struct.

2018-11-12 Thread Christoph Muellner
*** gcc/ChangeLog *** 2018-xx-xx Christoph Muellner * config/aarch64/aarch64.c (xgene1_tunings): Optimize Xgene1 tunings for GCC 9. --- gcc/config/aarch64/aarch64.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/config/aarch64/aarch64.c b/gcc/confi

[PATCH 2/4] [aarch64] Update xgene1_addrcost_table.

2018-11-12 Thread Christoph Muellner
*** gcc/ChangeLog *** 2018-xx-xx Christoph Muellner * config/aarch64/aarch64.c (xgene1_addrcost_table): Correct the post modify costs. --- gcc/config/aarch64/aarch64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/aarch64/aarch64.c b/gcc/confi

[PATCH 3/4] [aarch64] Add xgene1 prefetch tunings.

2018-11-12 Thread Christoph Muellner
*** gcc/ChangeLog *** 2018-xx-xx Christoph Muellner * config/aarch64/aarch64.c (xgene1_tunings): Add Xgene1 specific prefetch tunings. --- gcc/config/aarch64/aarch64.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/gcc/config/aarch64/aarch64.

[doc, committed] clarify rtl docs about mode of high and lo_sum

2018-11-12 Thread Sandra Loosemore
I've checked in this patch for PR 21110. As noted in the issue, RTL high and lo_sum expressions don't have to be Pmode and are not restricted to address operands. -Sandra 2018-11-12 Sandra Loosemore PR middle-end/21110 gcc/ * doc/rtl.texi (Constants): Clarify that mode of "high" doesn'

RE: PING [PATCH] RX new builtin function

2018-11-12 Thread Sebastian Perta
PING > -Original Message- > From: Sebastian Perta > Sent: 24 October 2018 18:19 > To: 'gcc-patches@gcc.gnu.org' > Cc: 'Nick Clifton' > Subject: [PATCH] RX new builtin function > > Hi, > > The following patch adds a new builtin function for rx ( __builtin_rx_bset) to > make it possible

Re: [PATCH 21/25] GCN Back-end (part 2/2).

2018-11-12 Thread Jeff Law
On 11/12/18 10:52 AM, Andrew Stubbs wrote: > On 12/11/2018 17:20, Segher Boessenkool wrote: >> If you don't want useless USEs deleted, use UNSPEC_VOLATILE instead? >> Or actually use the register, i.e. as input to an actually needed >> instruction. > > They're not useless. If we want to do scalar

Re: [PATCH] detect attribute mismatches in alias declarations (PR 81824)

2018-11-12 Thread Martin Sebor
On 11/12/2018 11:29 AM, Matthew Malcomson wrote: Hello Martin, The new testcase Wattribute-alias.c fails on targets without ifunc support (e.g. aarch64-none-elf cross-build). It seems that just adding a directive `{ dg-require-ifunc "" }` to the test file changes the test to unsupported instead

Re: [PATCH 21/25] GCN Back-end (part 2/2).

2018-11-12 Thread Segher Boessenkool
On Mon, Nov 12, 2018 at 05:52:25PM +, Andrew Stubbs wrote: > On 12/11/2018 17:20, Segher Boessenkool wrote: > >If you don't want useless USEs deleted, use UNSPEC_VOLATILE instead? > >Or actually use the register, i.e. as input to an actually needed > >instruction. > > They're not useless. > >

Re: [PATCH] detect attribute mismatches in alias declarations (PR 81824)

2018-11-12 Thread Matthew Malcomson
Hello Martin, The new testcase Wattribute-alias.c fails on targets without ifunc support (e.g. aarch64-none-elf cross-build). It seems that just adding a directive `{ dg-require-ifunc "" }` to the test file changes the test to unsupported instead of having a fail. I don't know much about this

Re: [PATCH 2/3][GCC][AARCH64] Add new -mbranch-protection option to combine pointer signing and BTI

2018-11-12 Thread Sudakshina Das
Hi Sam On 02/11/18 17:31, Sam Tebbs wrote: > Hi all, > > The -mbranch-protection option combines the functionality of > -msign-return-address and the BTI features new in Armv8.5 to better reflect > their relationship. This new option therefore supersedes and deprecates the > existing -msign-retur

Re: [PATCH][cunroll] Add unroll-known-loop-iterations-only param and use it in aarch64

2018-11-12 Thread Kyrill Tkachov
On 12/11/18 14:10, Richard Biener wrote: On Fri, Nov 9, 2018 at 6:57 PM Kyrill Tkachov wrote: On 09/11/18 12:18, Richard Biener wrote: On Fri, Nov 9, 2018 at 11:47 AM Kyrill Tkachov wrote: Hi all, In this testcase the codegen for VLA SVE is worse than it could be due to unrolling: fully

Re: [PATCH 21/25] GCN Back-end (part 2/2).

2018-11-12 Thread Andrew Stubbs
On 12/11/2018 17:20, Segher Boessenkool wrote: If you don't want useless USEs deleted, use UNSPEC_VOLATILE instead? Or actually use the register, i.e. as input to an actually needed instruction. They're not useless. If we want to do scalar operations in vector registers (and we often do, on th

Re: [RS6000] Don't pass -many to the assembler

2018-11-12 Thread Peter Bergner
On 11/12/18 5:49 AM, Alan Modra wrote: > I'd like to remove -many from the options passed by default to the > assembler, on the grounds that a gcc bug in instruction selection (eg. > emitting a power9 insn for -mcpu=power8) is better found at assembly > time than run time. > > This might annoy peo

Re: [doc PATCH] Fix weakref description.

2018-11-12 Thread Michael Ploujnikov
On 2018-11-02 1:59 p.m., Michael Ploujnikov wrote: > I came across this typo and also added a similar ld invocation for > illustration purposes as mentioned by Jakub on irc. > After talking to Jakub about it, I went with different terminology. - Michael From f14d7315e0dc9c4b6aff6137fd90e4d2595e

Re: [PATCH 21/25] GCN Back-end (part 2/2).

2018-11-12 Thread Segher Boessenkool
On Mon, Nov 12, 2018 at 12:53:26PM +, Andrew Stubbs wrote: > >>+/* Implement TARGET_LEGITIMATE_COMBINED_INSN. > >>+ > >>+ Return false if the instruction is not appropriate as a combination > >>of two > >>+ or more instructions. */ > >>+ > >>+bool > >>+gcn_legitimate_combined_insn (rtx_in

Re: [PATCH][DOCS] Fix documentation of __builtin_cpu_is and __builtin_cpu_supports for x86.

2018-11-12 Thread Sandra Loosemore
On 11/12/18 4:46 AM, Martin Liška wrote: Hi. The patch is adding missing values for aforementioned built-ins. Ready for trunk? Thanks, Martin gcc/ChangeLog: 2018-11-12 Martin Liska * doc/extend.texi: Add missing values for __builtin_cpu_is and __builtin_cpu_supports for x8

Re: [RS6000] Don't pass -many to the assembler

2018-11-12 Thread Michael Matz
Hi, On Mon, 12 Nov 2018, Segher Boessenkool wrote: > > > Wouldn't this also break compiling code that contains power9 > > > instructions but guarded by runtime tests to only be executed on > > > power9 machines? That seems a valid usecase, and it'd be bad if the > > > assembler fails to compi

Re: [GCC][AArch64] [middle-end][docs] Document the xorsign optab

2018-11-12 Thread Sandra Loosemore
On 11/12/18 5:10 AM, Tamar Christina wrote: Hi Sandra, Ok for trunk? +@cindex @code{xorsign@var{m}3} instruction pattern +@item @samp{xorsign@var{m}3} +Target suppports an efficient expansion of x * copysign (1.0, y) +as xorsign (x, y). Store a value with the magnitude of operand 1 +and the s

Re: [PATCH, GCC, AArch64] Branch Dilution Pass

2018-11-12 Thread Richard Earnshaw (lists)
On 12/11/2018 15:13, Kyrill Tkachov wrote: > Hi Richard, > > On 12/11/18 14:13, Richard Biener wrote: >> On Fri, Nov 9, 2018 at 6:23 PM Sudakshina Das wrote: >> > >> > Hi >> > >> > I am posting this patch on behalf of Carey (cc'ed). I also have some >> > review comments that I will make as a repl

Re: [RS6000] Don't pass -many to the assembler

2018-11-12 Thread Segher Boessenkool
On Mon, Nov 12, 2018 at 03:52:29PM +0100, Andreas Schwab wrote: > On Nov 12 2018, Michael Matz wrote: > > > Wouldn't this also break compiling code that contains power9 instructions > > but guarded by runtime tests to only be executed on power9 machines? That > > seems a valid usecase, and it'

Re: [PATCH] Instrument only selected files (PR gcov-profile/87442).

2018-11-12 Thread Jeff Law
On 11/12/18 12:56 AM, Martin Liška wrote: > On 11/9/18 11:00 PM, Jeff Law wrote: >> On 11/8/18 6:42 AM, Martin Liška wrote: >>> Hi. >>> >>> The patch is about possibility to filter which files are instrumented. The >>> usage >>> is explained in the PR. >>> >>> Patch can bootstrap and survives regr

Re: [PATCH][LRA] Fix PR87899: r264897 cause mis-compiled native arm-linux-gnueabihf toolchain

2018-11-12 Thread Peter Bergner
On 11/12/18 6:25 AM, Renlin Li wrote: > I tried to build a native arm-linuxeabihf toolchain with the patch. > But I got the following ICE: Why can't things ever be easy? :-) I think we're getting closer though. Anyway, can you please recompile the failing file but using -save-temps and send me t

C++ PATCH to implement C++20 P0634R3, Down with typename!

2018-11-12 Thread Marek Polacek
This patch implements C++20 P0634R3, Down with typename! which makes 'typename' optional in several contexts specified in [temp.res]. The gist of the patch is in cp_parser_simple_type_specifier, where, if the context makes type

[PATCH] PR libstdc++/87963 fix build for 64-bit mingw

2018-11-12 Thread Jonathan Wakely
PR libstdc++/87963 * src/c++17/memory_resource.cc (chunk::_M_bytes): Change type from unsigned to uint32_t. (chunk): Fix static assertion for 64-bit targets that aren't LP64. (bigblock::all_ones): Fix undefined shift. Tested x86_64-linux, committed to trunk

Re: [PATCH, GCC, AArch64] Branch Dilution Pass

2018-11-12 Thread Kyrill Tkachov
Hi Richard, On 12/11/18 14:13, Richard Biener wrote: On Fri, Nov 9, 2018 at 6:23 PM Sudakshina Das wrote: > > Hi > > I am posting this patch on behalf of Carey (cc'ed). I also have some > review comments that I will make as a reply to this later. > > > This implements a new AArch64 specific bac

Re: [PATCH, GCC, ARM] Enable armv8.5-a and add +sb and +predres for previous ARMv8-a in ARM

2018-11-12 Thread Sudakshina Das
Hi Kyrill On 09/11/18 18:21, Kyrill Tkachov wrote: > Hi Sudi, > > On 09/11/18 15:33, Sudakshina Das wrote: >> Hi >> >> This patch adds -march=armv8.5-a to the Arm backend. >> (https://developer.arm.com/products/architecture/cpu-architecture/a-profile/exploration-tools) >> >> >> Armv8.5-A also a

Re: [RS6000] Don't pass -many to the assembler

2018-11-12 Thread Andreas Schwab
On Nov 12 2018, Michael Matz wrote: > Wouldn't this also break compiling code that contains power9 instructions > but guarded by runtime tests to only be executed on power9 machines? That > seems a valid usecase, and it'd be bad if the assembler fails to compile > such. (You can't use -mcpu=

[PATCH] Fortran include line fixes and -fdec-include support

2018-11-12 Thread Jakub Jelinek
Hi! In fortran97.pdf I read: "Except in a character context, blanks are insignificant and may be used freely throughout the program." and while we handle that in most cases, we don't allow spaces in INCLUDE lines in fixed form, while e.g. ifort does. Another thing, which I haven't touched in the

Re: [RFC][PR87528][PR86677] Disable builtin popcount detection when back-end does not define it

2018-11-12 Thread Richard Biener
On Mon, Nov 12, 2018 at 6:21 AM Kugan Vivekanandarajah wrote: > > Hi Richard, > > Thanks for the review. > On Thu, 8 Nov 2018 at 00:03, Richard Biener > wrote: > > > > On Fri, Nov 2, 2018 at 10:02 AM Kugan Vivekanandarajah > > wrote: > > > > > > Hi Richard, > > > Thanks for the review. > > > On

Re: [RS6000] Don't pass -many to the assembler

2018-11-12 Thread Michael Matz
Hi, On Mon, 12 Nov 2018, Alan Modra wrote: > I'd like to remove -many from the options passed by default to the > assembler, on the grounds that a gcc bug in instruction selection (eg. > emitting a power9 insn for -mcpu=power8) is better found at assembly > time than run time. > > This might

Re: RFA: vectorizer patches 2/2: reduction splitting

2018-11-12 Thread Richard Biener
On Sun, Nov 11, 2018 at 9:16 AM Joern Wolfgang Rennecke wrote: > > It's nice to use the processors vector arithmetic to good effect, but > it's all for naught when > there are too many moves from/to general registers cluttering up the > loop. With a > double-vector reduction variable, the standar

Re: RFA: vectorizer patches 1/2 : WIDEN_MULT_PLUS support

2018-11-12 Thread Richard Biener
On Sun, Nov 11, 2018 at 8:21 AM Joern Wolfgang Rennecke wrote: > > Our target (eSi-RISC) doesn't have DOT_PROD_EXPR or WIDEN_SUM_EXPR > operations in > the standard vector modes; however, it has a vectorized WIDEN_MULT_PLUS_EXPR > implementation with a double-vector output, which works just as wel

Re: [PATCH] Fix ICE with -fopt-info-inline (PR ipa/87955)

2018-11-12 Thread Richard Biener
On Sun, Nov 11, 2018 at 2:33 AM David Malcolm wrote: > > PR ipa/87955 reports a problem I introduced in r265920, where I converted > the guard in report_inline_failed_reason from using: > if (dump_file) > to using > if (dump_enabled_p ()). > without updating the calls to cl_target_option_print

Re: [PATCH] Add sinh(tanh(x)) and cosh(tanh(x)) rules

2018-11-12 Thread Richard Biener
On Sat, Nov 10, 2018 at 6:36 AM Segher Boessenkool wrote: > > On Fri, Nov 09, 2018 at 01:03:55PM -0700, Jeff Law wrote: > > >> And signed zeroes. Yeah. I think it would have to be > > >> flag_unsafe_math_optimizations + some more. > > > > > > Indeed. > > So we need to give Giuliano some clear gu

Re: [PATCH, GCC, AArch64] Branch Dilution Pass

2018-11-12 Thread Richard Biener
On Fri, Nov 9, 2018 at 6:23 PM Sudakshina Das wrote: > > Hi > > I am posting this patch on behalf of Carey (cc'ed). I also have some > review comments that I will make as a reply to this later. > > > This implements a new AArch64 specific back-end pass that helps optimize > branch-dense code, whic

Re: [PATCH][cunroll] Add unroll-known-loop-iterations-only param and use it in aarch64

2018-11-12 Thread Richard Biener
On Fri, Nov 9, 2018 at 6:57 PM Kyrill Tkachov wrote: > > On 09/11/18 12:18, Richard Biener wrote: > > On Fri, Nov 9, 2018 at 11:47 AM Kyrill Tkachov > > wrote: > >> > >> Hi all, > >> > >> In this testcase the codegen for VLA SVE is worse than it could be due to > >> unrolling: > >> > >> fully_pe

[PATCH] Replace sync builtins with atomic builtins

2018-11-12 Thread Janne Blomqvist
The old __sync builtins have been deprecated for a long time now in favor of the __atomic builtins following the C++11/C11 memory model. This patch converts libgfortran to use the modern __atomic builtins. At the same time I weakened the consistency to relaxed for incrementing and decrementing the

Re: [PATCH] Simplify floating point comparisons

2018-11-12 Thread Richard Biener
On Fri, Nov 9, 2018 at 6:05 PM Wilco Dijkstra wrote: > > Richard Biener wrote: > >Marc Glisse wrote: > >> Let's try with C = DBL_MIN and x = 婊BL_MAX. I don't believe it involves > >> signed zeros or infinities, just an underflow. First, the result depends on > >> the rounding mode. And in the defa

Re: [PATCH][GCC] Make DR_TARGET_ALIGNMENT compile time variable

2018-11-12 Thread Richard Biener
On Fri, Nov 9, 2018 at 5:08 PM Andre Vieira (lists) wrote: > > On 05/11/18 12:41, Richard Biener wrote: > > On Mon, Nov 5, 2018 at 1:07 PM Andre Vieira (lists) > > wrote: > >> > >> > >> Hi, > >> > Hi, > > Thank you for the quick response! See inline responses below. > > >> This patch enables targ

Re: [PATCH] Change set_value_range_to_[non]null to not preserve equivs

2018-11-12 Thread Jeff Law
On 11/12/18 4:11 AM, Richard Biener wrote: > > This is a semantic change but AFAICS it shouldn't result in any > pessimization. The behavior of the API is non-obvious. > > Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. > > Richard. > > 2018-11-12 Richard Biener > > *

[PATCH] Fix PR87985

2018-11-12 Thread Richard Biener
The following fixes split_constant_offset unbound un-CSEing of expressions when following SSA def stmts. Simply limiting it to single-uses isn't good for consumers so the following instead limits analysis by implementing a cache. Note this may still end up un-CSEing stuff but I didn't want to t

Re: [PATCH] Come up with htab_hash_string_vptr and use string-specific if possible.

2018-11-12 Thread Michael Matz
Hi, On Mon, 12 Nov 2018, Martin Liška wrote: > > There's no fundamental reason why we can't poison identifiers in other > > headers. Indeed we do in vec.h. So move the whole thing including > > poisoning to hash-table.h? > > That's not feasible as gcc/gcc/genhooks.c files use the function an

Re: [RS6000] Don't pass -many to the assembler

2018-11-12 Thread Alan Modra
On Mon, Nov 12, 2018 at 10:19:04PM +1030, Alan Modra wrote: > I'd like to remove -many from the options passed by default to the > assembler, on the grounds that a gcc bug in instruction selection (eg. > emitting a power9 insn for -mcpu=power8) is better found at assembly > time than run time. > >

Re: [PATCH] combine: Do not combine moves from hard registers

2018-11-12 Thread Segher Boessenkool
On Mon, Nov 12, 2018 at 11:54:37AM +, Sam Tebbs wrote: > On 11/08/2018 08:34 PM, Segher Boessenkool wrote: > > > On Thu, Nov 08, 2018 at 03:44:44PM +, Sam Tebbs wrote: > >> Does your patch fix the incorrect generation of "scvtf s1, s1"? I was > >> looking at the issue as well and don't wan

Re: [PATCH 21/25] GCN Back-end (part 2/2).

2018-11-12 Thread Andrew Stubbs
On 09/11/2018 19:39, Jeff Law wrote: + +/* Generate epilogue. Called from gen_epilogue during pro_and_epilogue pass. + + See gcn_expand_prologue for stack details. */ + +void +gcn_expand_epilogue (void) You probably need a barrier in here to ensure that the scheduler doesn't move an aliased

Re: [PATCH 3/9][GCC][AArch64] Add autovectorization support for Complex instructions

2018-11-12 Thread Tamar Christina
Hi Kyrill, > Hi Tamar, > > On 11/11/18 10:26, Tamar Christina wrote: > > Hi All, > > > > This patch adds the expander support for supporting autovectorization of > > complex number operations > > such as Complex addition with a rotation along the Argand plane. This also > > adds support for co

Re: [PATCH][LRA] Fix PR87899: r264897 cause mis-compiled native arm-linux-gnueabihf toolchain

2018-11-12 Thread Renlin Li
Hi Peter, Thanks for the patch! It makes much more sense to me to split those functions, and use them separately. I tried to build a native arm-linuxeabihf toolchain with the patch. But I got the following ICE: /home/renlin/try-new/./gcc/xgcc -B/home/renlin/try-new/./gcc/ -B/usr/local/arm-non

Re: [PATCH 3/9][GCC][AArch64] Add autovectorization support for Complex instructions

2018-11-12 Thread Kyrill Tkachov
Hi Tamar, On 11/11/18 10:26, Tamar Christina wrote: Hi All, This patch adds the expander support for supporting autovectorization of complex number operations such as Complex addition with a rotation along the Argand plane. This also adds support for complex FMA. The instructions are descri

Re: [PATCH][DOCS] Fix documentation of __builtin_cpu_is and __builtin_cpu_supports for x86.

2018-11-12 Thread Uros Bizjak
> The patch is adding missing values for aforementioned built-ins. > > Ready for trunk? > Thanks, > Martin > > gcc/ChangeLog: > > 2018-11-12 Martin Liska > > * doc/extend.texi: Add missing values for __builtin_cpu_is and > __builtin_cpu_supports for x86 target. OK. Thanks, Uros.

  1   2   >