Go patch committed: Fix quoting in error message

2019-09-16 Thread Ian Lance Taylor
This patch to the Go frontend fixes the quoting of //go:linkname in an error message. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE === --- gcc/go/gofrontend/MERG

[PATCH] Improve _Safe_iterator _M_distance_to

2019-09-16 Thread François Dumont
    Here is the patch to improve _Safe_iterator<>::_M_get_distance_to implementation. I introduced a new _Distance_precision  __sp_sign_max_size for occasions where we can't find out the exact size of a range but still get the max size of it. Thanks to this the performance tests are much bette

[PATCH] lexicographical_comparison enhancements

2019-09-16 Thread François Dumont
Hi This is the next part of: https://gcc.gnu.org/ml/libstdc++/2019-09/msg00048.html This time it is to improve behavior of std::lexicographical_compare for deque or safe iterators. To do so I had to make lc internal implementation return int rather than bool otherwise it is impossible to ha

[PATCH, i386]: Fix PR91719, emit XCHG for seq_cst store on big cores

2019-09-16 Thread Uros Bizjak
Attached patch emits XCHG instead of store+MFENCE on big cores and generic tuning m_CORE_ALL | m_BDVER | m_ZNVER | m_GENERIC (The tune can be added for other targets, too.) 2019-09-16 Uroš Bizjak PR target/91719 * config/i386/i386.h (TARGET_USE_XCHG_FOR_ATOMIC_STORE): New macro.

Re: C++ PATCH for c++/91678 - wrong error with decltype and location wrapper

2019-09-16 Thread Marek Polacek
On Sun, Sep 15, 2019 at 10:18:29AM -0400, Jason Merrill wrote: > On 9/5/19 9:24 PM, Marek Polacek wrote: > > They use > > non_lvalue_loc, but that won't create a NON_LVALUE_EXPR wrapper around a > > location > > wrapper. > > That seems like the bug. maybe_lvalue_p should be true for > VIEW_CONVER

Re: [PATCH][PR91749][arm] FDPIC: Handle -mflip-thumb

2019-09-16 Thread Ramana Radhakrishnan
On Mon, Sep 16, 2019 at 2:40 PM Christophe Lyon wrote: > > [Re-sending in plain text-mode, sorry for the duplicates] > > Hi, > > In PR91749, we have ICEs because -mflip-thumb switches to Thumb-1 (the > default target cpu does not support Thumb-2). > > Although we already filter this in arm_configu

-O2 inliner returning 1/n: reduce EARLY_INLINING_INSNS for O1 and O2

2019-09-16 Thread Jan Hubicka
Hi, as discussed on Cauldron this week I plan to push out changes enabling -finline-functions at -O2 with limited parameters aiming to overal better performance without large code size increases. Currently we do inline agressively functions declared inline, we inline when function size is expected

[PATCH] * Makefile.in (build/genmatch.o): Depend on $(CPPLIB_H).

2019-09-16 Thread Jason Merrill
So that rebuilding my tree with or without the operator<=> patches properly rebuilds genmatch. Tested x86_64-pc-linux-gnu, applying to trunk as obvious. --- gcc/Makefile.in | 2 +- gcc/ChangeLog | 4 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/Makefile.in b/gcc/Makef

Re: [SVE] PR86753

2019-09-16 Thread Prathamesh Kulkarni
On Mon, 9 Sep 2019 at 09:36, Prathamesh Kulkarni wrote: > > On Mon, 9 Sep 2019 at 16:45, Richard Sandiford > wrote: > > > > Prathamesh Kulkarni writes: > > > With patch, the only following FAIL remains for aarch64-sve.exp: > > > FAIL: gcc.target/aarch64/sve/cond_unary_2.c -march=armv8.2-a+sve >

Re: [C++ Patch] Another bunch of location fixes

2019-09-16 Thread Jason Merrill
On Mon, Sep 16, 2019 at 5:22 AM Paolo Carlini wrote: > > On 15/09/19 16:22, Jason Merrill wrote: > > On 9/12/19 9:41 AM, Paolo Carlini wrote: > >> + if (!valid_array_size_p (dname > >> + ? declarator->id_loc : input_location, > > > > Use the id_loc local variable? > > This d

Re: Add "fast" conversions from arrays to bitmaps

2019-09-16 Thread Martin Liška
+··static·size_t·size·(const·T·(&x)[N])·{·return·N;·} Hello. This leads to a clang warning: gcc/array-traits.h:45:33: warning: unused parameter 'x' [-Wunused-parameter] Can you please fix it? Thanks, Martin

Re: [PATCH 2/2 V3] Use post-dom info to update if/switch predicate (PR ipa/91089)

2019-09-16 Thread Jan Hubicka
> This one is split from original patch. This patch is also OK (modulo the changelog entry and testing). Please wait with comitting this for bit over a day after commiting the first so the periodic benchmarks picks each change differently. Thanks, Honza > > Feng > --- > diff --git a/gcc/ipa-fnsu

Re: [PATCH 1/2 V3] Setup predicate for switch default case in IPA (PR ipa/91089)

2019-09-16 Thread Jan Hubicka
Hi, patch is OK with change below provided that you add a ChangeLog entry (it is usual to write those into the emails) and that it passes bootstrap®testing (it is also usual to indicate this). Do you have rights to the svn repository and copyright assignment done? > > +DEFPARAM (PARAM_IPA_MAX_S

Re: [PATCH 5/5] Rewrite second part of or_comparisons_1 into match.pd.

2019-09-16 Thread Martin Liška
On 9/16/19 5:07 AM, Richard Biener wrote: the :c on both code1 and code2 are not necessary since the constant is always second via canonicalization. Fine, fixed. Btw. I've just installed the whole patchset. Martin

Re: [PATCH 3/5] Rewrite part of and_comparisons_1 into match.pd.

2019-09-16 Thread Martin Liška
On 9/16/19 5:04 AM, Richard Biener wrote: On Wed, 11 Sep 2019, Martin Liška wrote: On 9/11/19 3:19 PM, Martin Liška wrote: On 9/11/19 2:43 PM, Richard Biener wrote: Any particular reason you needed to swap the calls in maybe_fold_and/or_comparisons? You didn't answer this, besides that the

[PATCH][PR91749][arm] FDPIC: Handle -mflip-thumb

2019-09-16 Thread Christophe Lyon
[Re-sending in plain text-mode, sorry for the duplicates] Hi, In PR91749, we have ICEs because -mflip-thumb switches to Thumb-1 (the default target cpu does not support Thumb-2). Although we already filter this in arm_configure_build_target, we forgot to handle cases when the mode is changed via

Re: [PATCH][ARM] Enable code hoisting with -Os (PR80155)

2019-09-16 Thread Richard Biener
On Mon, Sep 16, 2019 at 2:59 PM Wilco Dijkstra wrote: > > Hi Prathamesh, > > > My only concern with the patch is that the issue isn't specific to > > code-hoisting. > > For this particular case (reproducible with pr77445-2.c), disabling > > jump threading > > doesn't cause the register spill with

Re: [PATCH][ARM] Enable code hoisting with -Os (PR80155)

2019-09-16 Thread Wilco Dijkstra
Hi Prathamesh, > My only concern with the patch is that the issue isn't specific to > code-hoisting. > For this particular case (reproducible with pr77445-2.c), disabling > jump threading > doesn't cause the register spill with hoisting enabled. > Likewise disabling forwprop3 and forwprop4 prevent

Re: [ARM/FDPIC v6 20/24] [ARM][testsuite] FDPIC: Skip tests using architectures unsupported by FDPIC

2019-09-16 Thread Christophe Lyon
Hi Kyrill, I didn't commit this patch yet: are you OK with it? Thanks, Christophe On Mon, 9 Sep 2019 at 17:52, Christophe Lyon wrote: > From: Christophe Lyon > > Since FDPIC currently supports arm and thumb-2 modes only, these tests > fail because they enforce an architecture version that do

Re: [PATCH, AArch64, v3 0/6] LSE atomics out-of-line

2019-09-16 Thread Wilco Dijkstra
Hi Richard, >> So what is the behaviour when you explicitly select a specific CPU? > > Selecting a specific cpu selects the specific architecture that the cpu > supports, does it not?  Thus the architecture example above still applies. > > Unless I don't understand what distinction that you're mak

[PATCH] Fix PR91756

2019-09-16 Thread Richard Biener
The following makes the fix for PR87132 less constrained so we can use the recently added facility for VN disambiguation agains the original ref tree. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk. Richard. 2019-09-16 Richard Biener PR tree-optimization/9175

[PATCH 2/2 V3] Use post-dom info to update if/switch predicate (PR ipa/91089)

2019-09-16 Thread Feng Xue OS
This one is split from original patch. Feng --- diff --git a/gcc/ipa-fnsummary.c b/gcc/ipa-fnsummary.c index 1bf1806eaf8..5423756d275 100644 --- a/gcc/ipa-fnsummary.c +++ b/gcc/ipa-fnsummary.c @@ -1197,8 +1197,14 @@ set_cond_stmt_execution_predicate (struct ipa_func_body_info *fbi,

[PATCH 1/2 V3] Setup predicate for switch default case in IPA (PR ipa/91089)

2019-09-16 Thread Feng Xue OS
>> + if (this_code != ERROR_MARK >> + && !dominated_by_p (CDI_POST_DOMINATORS, bb, e->dest)) >> { >> predicate p >> = add_condition (summary, index, size, &aggpos, this_code, > So this change is handling the diamond conditional you describe above

Re: [C++ Patch] Another bunch of location fixes

2019-09-16 Thread Paolo Carlini
Hi, On 15/09/19 16:22, Jason Merrill wrote: On 9/12/19 9:41 AM, Paolo Carlini wrote: +  if (!valid_array_size_p (dname +   ? declarator->id_loc : input_location, Use the id_loc local variable? This diagnostic is inside the loop over declarator->declarator. Eventually, o

Re: [RFA] [tree-optimization/80576] Handle non-constant sizes in DSE

2019-09-16 Thread Richard Biener
On Mon, Sep 16, 2019 at 11:12 AM Richard Biener wrote: > > On Mon, Sep 9, 2019 at 10:10 PM Jeff Law wrote: > > > > On 8/26/19 3:00 AM, Richard Biener wrote: > > > On Fri, Aug 23, 2019 at 9:19 PM Jeff Law wrote: > > >> > > >> On 8/22/19 4:46 AM, Richard Biener wrote: > > > Also you seem to us

Re: [PING^2][PATCH 0/3] GNAT test suite fixes for build sysroot

2019-09-16 Thread Arnaud Charlet
> > In the course of setting up GCC regression testing for the RISC-V target > > I have discovered that the GNAT test suite does not correctly respond to > > the test environment settings passed from the test harness in my setup and > > consequently no test case works correctly. > > Ping for:

Re: [RFA] [tree-optimization/80576] Handle non-constant sizes in DSE

2019-09-16 Thread Richard Biener
On Mon, Sep 9, 2019 at 10:10 PM Jeff Law wrote: > > On 8/26/19 3:00 AM, Richard Biener wrote: > > On Fri, Aug 23, 2019 at 9:19 PM Jeff Law wrote: > >> > >> On 8/22/19 4:46 AM, Richard Biener wrote: > > Also you seem to use this info to constrain optimization when you > > might remember th

Re: [PATCH 5/5] Rewrite second part of or_comparisons_1 into match.pd.

2019-09-16 Thread Richard Biener
On Wed, 11 Sep 2019, Martin Liška wrote: > Hi. > > Updated version of the patch that drops GENERIC > support in TREE codes. + (bit_ior (code1:c@3 @0 INTEGER_CST@1) (code2:c@4 @0 INTEGER_CST@2)) the :c on both code1 and code2 are not necessary since the constant is always second via canonicaliz

Re: [PATCH 3/5] Rewrite part of and_comparisons_1 into match.pd.

2019-09-16 Thread Richard Biener
On Wed, 11 Sep 2019, Martin Liška wrote: > On 9/11/19 3:19 PM, Martin Liška wrote: > > On 9/11/19 2:43 PM, Richard Biener wrote: > >> Any particular reason you needed to swap the calls in > >> maybe_fold_and/or_comparisons? You didn't answer this, besides that the patch is OK. Thanks, Richard.

Re: [PATCH 4/5] Rewrite first part of or_comparisons_1 into match.pd.

2019-09-16 Thread Richard Biener
On Wed, 11 Sep 2019, Martin Liška wrote: > Hi. > > Updated version of the patch that drops GENERIC > support in TREE codes. OK. Thanks, Richard.