Re: [PATCH 21/41] analyzer: new files: constraint-manager.{cc|h}

2020-01-10 Thread Jeff Law
On Wed, 2020-01-08 at 04:02 -0500, David Malcolm wrote: > Needs review. > > Changed in v5: > - update ChangeLog path > - updated copyright years to include 2020 > > Changed in v4: > - Remove include of gcc-plugin.h, reworking includes accordingly. > - Wrap everything in #if ENABLE_ANALYZER > - Re

[PATCH] libstdc++/91223 Improve unordered containers == operator

2020-01-10 Thread François Dumont
Hi     Here is my attempt to improve == operator.     There is a small optimization for the std::unordered_mutiXXX containers but the main enhancement rely on some partial template specialization of the _Equality type. I limit it to usage of unordered containers with std::equal_to to be sure

Re: [PATCH 37/41] analyzer: new files: engine.{cc|h}

2020-01-10 Thread Jeff Law
On Wed, 2020-01-08 at 04:02 -0500, David Malcolm wrote: > Needs review. > > Changed in v5: > - update ChangeLog path > - updated copyright years to include 2020 > > Changed in v4: > - Remove include of gcc-plugin.h, reworking includes accordingly. > - Wrap everything in #if ENABLE_ANALYZER > - Re

Add rough documentation of using git with GCC

2020-01-10 Thread Joseph Myers
I've applied this patch to add very preliminary documentation based on the corresponding SVN documentation. It is deliberately not linked to from anywhere, and does not yet include the list of branches from svn.html (which is very out of date regarding what branches are actually active). I adv

[RFC c-common PATCH] PR c++/40752 - useless -Wconversion with short +=.

2020-01-10 Thread Jason Merrill
Back in 2009 Manuel sent a patch to avoid useless -Wconversion warnings on compound assignment of types that get promoted to int: https://gcc.gnu.org/ml/gcc-patches/2009-08/msg00582.html Joseph argued that those warnings are sometimes useful, and that they should be controlled by a separate fl

Re: Add rough documentation of using git with GCC

2020-01-10 Thread Joseph Myers
On Fri, 10 Jan 2020, Joseph Myers wrote: > In gitwrite.html: the various custom setup of checkouts for which scripts > have been posted, including usage of branches not fetched by default; an > actual example commit session should be included like the one in > svnwrite.html; more examples shoul

[PATCH] PR c++/93173 - incorrect tree sharing.

2020-01-10 Thread Jason Merrill
My patch for 93033 wasn't sufficient to handle all the possible sharing introduced by split_nonconstant_init, and it occurred to me that it would make sense to use the same unsharing technique as unshare_body, namely copy_if_shared. Tested x86_64-pc-linux-gnu, applying to trunk. PR c++/93

[AArch64] Make -msve-vector-bits=128 generate VL-specific code

2020-01-10 Thread Richard Sandiford
related_vector_mode and compatible_vector_types_p make it possible to generate 128-bit SVE code while still maintaining the distinction between SVE vectors and Advanced SIMD vectors. We can therefore generate VL-specific code for -msve-vector-bits=128 on little-endian targets. In theory we could d

[C++ PATCH] PR c++/93143 - incorrect tree sharing with constexpr.

2020-01-10 Thread Jason Merrill
We don't unshare CONSTRUCTORs as often during constexpr evaluation, so we need to unshare them here. Many thanks to bin cheng for the analysis and initial patch. Tested x86_64-pc-linux-gnu, applying to trunk. * constexpr.c (cxx_eval_outermost_constant_expr): Don't assume CONSTRUC

[GCC][PATCH][ARM] Add Bfloat16_t scalar type, vector types and machine modes to ARM back-end [1/2]

2020-01-10 Thread Stam Markianos-Wright
Hi all, This is a respin of patch: https://gcc.gnu.org/ml/gcc-patches/2019-12/msg01448.html which has now been split into two (similar to the Aarch64 version). This is patch 1 of 2 and adds Bfloat type support to the ARM back-end. It also adds a new machine_mode (BFmode) for this type and accom

[GCC][PATCH][ARM] Add Bfloat16_t scalar type, vector types and machine modes to ARM back-end [2/2]

2020-01-10 Thread Stam Markianos-Wright
Hi all, This patch is part 2 of Bfloat16_t enablement in the ARM back-end. This new type is constrained using target hooks TARGET_INVALID_CONVERSION, TARGET_INVALID_UNARY_OP, TARGET_INVALID_BINARY_OP so that it may only be used through ACLE intrinsics (will be provided in later patches). Regress

Re: [Ping][GCC][PATCH][ARM]Add ACLE intrinsics for dot product (vusdot - vector, vdot - by element) for AArch32 AdvSIMD ARMv8.6 Extension

2020-01-10 Thread Stam Markianos-Wright
On 12/18/19 1:25 PM, Stam Markianos-Wright wrote: > > > On 12/13/19 10:22 AM, Stam Markianos-Wright wrote: >> Hi all, >> >> This patch adds the ARMv8.6 Extension ACLE intrinsics for dot product >> operations (vector/by element) to the ARM back-end. >> >> These are: >> usdot (vector), dot (by el

Re: [GCC][PATCH][Aarch64] Add Bfloat16_t scalar type, vector types and machine modes to Aarch64 back-end [1/2]

2020-01-10 Thread Stam Markianos-Wright
On 1/9/20 3:42 PM, Richard Sandiford wrote: > Thanks for the update, looks great. > > Stam Markianos-Wright writes: >> diff --git a/gcc/config/aarch64/arm_bf16.h b/gcc/config/aarch64/arm_bf16.h >> new file mode 100644 >> index >> ..884b6f3bc7a28c516e54c2

Re: [GCC][PATCH][Aarch64] Add Bfloat16_t scalar type, vector types and machine modes to Aarch64 back-end [2/2]

2020-01-10 Thread Stam Markianos-Wright
On 1/10/20 4:29 PM, Richard Sandiford wrote: > Stam Markianos-Wright writes: >> On 1/9/20 4:13 PM, Stam Markianos-Wright wrote: >>> On 1/9/20 4:07 PM, Richard Sandiford wrote: Stam Markianos-Wright writes: > diff --git a/gcc/testsuite/g++.target/aarch64/bfloat_cpp_typecheck.C > b/g

patch to fix PR93207

2020-01-10 Thread Vladimir Makarov
The following patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93027 The patch was successfully tested bootstrapped on x86-64. Committed as r280133 Index: ChangeLog === --- ChangeLog (revision 280132) +++ ChangeLog (workin

[C++ PATCH] Fix deprecated attribute handling on templates (PR c++/93228)

2020-01-10 Thread Jakub Jelinek
Hi! As the following testcase shows, when deprecated attribute is on a template, we'd never print the message if any, because the attribute is not present on the TEMPLATE_DECL with which warn_deprecated_use is called, but on its DECL_TEMPLATE_RESULT or its type. Fixed thusly, bootstrapped/regtest

[committed] Fix libgomp build with -D_FORTIFY_SOURCE on older glibcs (PR libgomp/93219)

2020-01-10 Thread Jakub Jelinek
Hi! Older glibcs used to declare fwrite with -D_FORTIFY_SOURCE{,=2} as warn_unused_result. The following is just an workaround against that, not really using it in the end, but just letting the compiler think we are. Bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk. 2020

Re: [PATCH] Optimize reads from multiple elts in fold_ctor_reference (PR tree-optimization/93210)

2020-01-10 Thread Richard Biener
On January 10, 2020 3:04:07 PM GMT+01:00, Jakub Jelinek wrote: >Hi! > >The C++ testcase shows we aren't able to determine constant when >loading >from >const union U { struct V { int a, b; } c; long long d; } u = { { 1, 2 } >}; >u.d, but since your patch in the summer can handle >const union V {

one more patch for PR93027

2020-01-10 Thread Vladimir Makarov
Sorry, I found that the test will not work on x86 for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93027 So I committed additionally the following patch https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=280135 Also I did a typo in PR # in ChangeLogs and the test name so I fixed this too.

[committed] Unbreak bootstrap on most targets (was Re: [PATCH] PR90838: Support ctz idioms)

2020-01-10 Thread Jakub Jelinek
On Thu, Jan 09, 2020 at 02:26:10PM +0100, Richard Biener wrote: > > 2019-12-11 Wilco Dijkstra > > > > PR tree-optimization/90838 > > * tree-ssa-forwprop.c (check_ctz_array): Add new function. > > (check_ctz_string): Likewise. > > (optimize_count_trailing_zeroes):

Re: [PATCH] PR90838: Support ctz idioms

2020-01-10 Thread Jakub Jelinek
On Thu, Jan 09, 2020 at 02:26:10PM +0100, Richard Biener wrote: > > >> + tree lhs = gimple_assign_lhs (stmt); > > >> + bool zero_ok = CTZ_DEFINED_VALUE_AT_ZERO (TYPE_MODE (type), val); > > > > > > since we're using the optab entry shouldn't you check for == 2 here? > > > > Yes, that looks

Re: [PATCH 06/41] Add diagnostic paths

2020-01-10 Thread David Malcolm
On Fri, 2020-01-10 at 08:38 -0700, Jeff Law wrote: > On Wed, 2020-01-08 at 04:02 -0500, David Malcolm wrote: > > I believe I can self-approve this with my "diagnostic messages" > > maintainer hat on. It has dependencies on the auto_delete_vec > > and the -fdiagnostics-nn-line-numbers patches. > >

Re: [PATCH] libstdc++/91223 Improve unordered containers == operator

2020-01-10 Thread Jonathan Wakely
On 10/01/20 18:54 +0100, François Dumont wrote: Hi     Here is my attempt to improve == operator.     There is a small optimization for the std::unordered_mutiXXX containers but the main enhancement rely on some partial template specialization of the _Equality type. I limit it to usage of uno

[PATCH] libstdc++: Improve comment about testsuite utilities

2020-01-10 Thread Jonathan Wakely
This fixes a typo and also explains why test_container is not a range when used with output_iterator_wrapper or input_iterator_wrapper. * testsuite/util/testsuite_iterators.h: Improve comment. Committed to trunk. commit 6fe8c46fff330747f1a5995f99af898c0e582c01 Author: Jonathan Wakely Da

Re: [PATCH] libstdc++/91223 Improve unordered containers == operator

2020-01-10 Thread Jonathan Wakely
On 10/01/20 22:01 +, Jonathan Wakely wrote: On 10/01/20 18:54 +0100, François Dumont wrote: Hi     Here is my attempt to improve == operator.     There is a small optimization for the std::unordered_mutiXXX containers but the main enhancement rely on some partial template specialization

Re: [PATCH 24/41] analyzer: new files: sm.{cc|h}

2020-01-10 Thread David Malcolm
On Fri, 2020-01-10 at 09:46 -0700, Jeff Law wrote: > On Wed, 2020-01-08 at 04:02 -0500, David Malcolm wrote: > > The v1 version of this patch was reviewed by Jeff here: > > https://gcc.gnu.org/ml/gcc-patches/2019-12/msg00805.html > > TODO: looks like I still need to act on some of his comments th

Re: [Patch] OpenACC – support "if" + "if_present" clauses with "host_data"

2020-01-10 Thread Thomas Schwinge
Hi! On 2020-01-09T22:00:09+0100, I wrote: > On 2019-12-24T15:23:56+0100, Tobias Burnus wrote: >> PS: History: [...] >> A minor fix was committed to OG8?/OG9 as Rev. >> 995f9680a46c3a7246fe465faa847f8009e47ed8. > > That patch by Julian is on og9 only, and -- as far as I can tell -- has > never be

Re: [PATCH] Add OpenACC 2.6 `acc_get_property' support

2020-01-10 Thread Thomas Schwinge
Hi! On 2019-12-21T23:02:38+0100, I wrote: > On 2019-12-20T17:46:57+0100, "Harwath, Frederik" > wrote: >>> > --- a/include/gomp-constants.h >>> > +++ b/include/gomp-constants.h >>> > +#define GOMP_DEVICE_CURRENT -3 >>> Should this actually get value '-1' instead of '-3'? Or, is th

[PATCH] Add initial octeontx2 support.

2020-01-10 Thread apinski
From: Andrew Pinski This adds octeontx2 naming. It currently uses the cortexa57 cost model and schedule model until I submit this. This is more a place holder to get the naming of the cores in GCC 10. I will submit the cost model in the next couple of days. OK? Bootstrapped and tested on aarc

[PATCH] libstdc++: Value-initialize std::atomic for C++20 (P0883R2)

2020-01-10 Thread Jonathan Wakely
This implements the new requirements for C++20 that std::atomic should initialize the atomic variable in its default constructor. This patch does not add the deprecated attribute to atomic_init, but that should be done at some point as it's deprecated in C++20. The paper also deprecates the ATOMI

[PATCH] libstdc++/88812 C++20 LWG 2499/P0487R1 - Fixing operator>>(basic_istream&, CharT*)

2020-01-10 Thread Jonathan Wakely
Here's a patch to replace the unsafe, unbounded operator>> with the new one that only allows reading into a fixed-size array. I think I'll sit on this until stage1 though. The other options are to bump the libstdc++.so version and add it now, or not bump the version and also add the new symbol o

Re: [PATCH] hash-table.h: support non-zero empty values in empty_slow

2020-01-10 Thread David Malcolm
On Wed, 2019-12-11 at 17:00 +0100, Jakub Jelinek wrote: > On Wed, Dec 11, 2019 at 10:44:58AM -0500, David Malcolm wrote: > > Is it OK for a hash_map key to have a "empty" value that isn't > > all-zeroes (and thus the same for a hash_table entry)? > > > > Is the following patch OK for trunk? > > I

[C++ PATCH RFC] PR c++/80265 - constexpr __builtin_mem*.

2020-01-10 Thread Jason Merrill
The library has already worked around this issue, but I was curious about why it wasn't working. The answer: because we were passing &var to fold, which doesn't know about the constexpr values hash table. Fixed by passing &"str" instead. Tested x86_64-pc-linux-gnu. Does this seem useful even th

[RFA (gimplify) PATCH] PR c++/33799 - destroy return value if local cleanup throws.

2020-01-10 Thread Jason Merrill
This is a pretty rare situation since the C++11 change to make all destructors default to noexcept, but it is still possible to define throwing destructors, and if a destructor for a local variable throws during the return, we've already constructed the return value, so now we need to destroy it.

Re: Document --with-build-config=bootstrap-asan option.

2020-01-10 Thread Gerald Pfeifer
On Thu, 12 Dec 2019, Matthew Malcomson wrote: > gcc/ChangeLog: > > 2019-12-12 Matthew Malcomson > > * doc/install.texi: Document bootstrap-asan configuration option. I see this introduces a new table. > +Some examples of build configurations designed for developers of GCC are: @samp{b

Re: [wwwdocs] Document -fcommon default change

2020-01-10 Thread Gerald Pfeifer
On Tue, 7 Jan 2020, Wilco Dijkstra wrote: > Thanks for the suggestions, I've reworded it as: > + GCC now defaults to -fno-common. As a result, global > + variable accesses are more efficient on various targets. In C, global > + variables with multiple tentative definitions now result

<    1   2