Re: [PATCH] combine: Allow combining two insns to two insns

2018-08-01 Thread Toon Moene
On 07/24/2018 07:18 PM, Segher Boessenkool wrote: This patch allows combine to combine two insns into two. This helps in many cases, by reducing instruction path length, and also allowing further combinations to happen. PR85160 is a typical example of code that it can improve. I cannot

PING [PATCH] treat -Wxxx-larger-than=HWI_MAX special (PR 86631)

2018-08-01 Thread Martin Sebor
Richard, do you have any further comments or suggestions or is the patch acceptable? I realize it's not ideal but I don't see how to achieve the ideal (understanding PTRDIFF_MAX) without deferring the processing of these options until the back end has been initialized. It would still mean

Re: [PATCH] Make strlen range computations more conservative

2018-08-01 Thread Martin Sebor
On 08/01/2018 01:19 AM, Richard Biener wrote: On Tue, 31 Jul 2018, Martin Sebor wrote: On 07/31/2018 09:48 AM, Jakub Jelinek wrote: On Tue, Jul 31, 2018 at 09:17:52AM -0600, Martin Sebor wrote: On 07/31/2018 12:38 AM, Jakub Jelinek wrote: On Mon, Jul 30, 2018 at 09:45:49PM -0600, Martin

PING [PATCH] warn for strlen of arrays with missing nul (PR 86552, 86711, 86714) )

2018-08-01 Thread Martin Sebor
Since the foundation of the patch is detecting and avoiding the overly aggressive folding of unterminated char arrays, besides issuing a warning for such arguments to strlen, the patch also fixes pr86711 - wrong folding of memchr, and pr86714 - tree-ssa-forwprop.c confused by too long

Re: [14/46] Make STMT_VINFO_VEC_STMT a stmt_vec_info

2018-08-01 Thread H.J. Lu
On Tue, Jul 24, 2018 at 2:58 AM, Richard Sandiford wrote: > This patch changes STMT_VINFO_VEC_STMT from a gimple stmt to a > stmt_vec_info and makes the vectorizable_* routines pass back > a stmt_vec_info to vect_transform_stmt. > > > 2018-07-24 Richard Sandiford > > gcc/ > *

Re: [PATCH] change %G argument from gcall* to gimple*

2018-08-01 Thread David Malcolm
On Wed, 2018-08-01 at 17:39 -0600, Martin Sebor wrote: > > Please can you mail me when you commit, so I can rebase and retest > > my > > patch accordingly. > > > > Thanks! > > I've committed the patch in r263239. Thanks! Dave

Re: [PATCH] change %G argument from gcall* to gimple*

2018-08-01 Thread Martin Sebor
Please can you mail me when you commit, so I can rebase and retest my patch accordingly. Thanks! I've committed the patch in r263239. Thanks Martin

Re: [PATCHv3 0/6] std::future::wait_* improvements

2018-08-01 Thread Jonathan Wakely
On 01/08/18 20:49 +0100, Jonathan Wakely wrote: On 01/08/18 14:19 +0100, Mike Crowe wrote: v2 of this series was originally posted back in January (see https://gcc.gnu.org/ml/libstdc++/2018-01/msg00035.html ) Apart from minor log message tweaks, the changes since that version are: * [1/6]

Re: [PATCH] Handle overlength strings in the C FE

2018-08-01 Thread Joseph Myers
On Wed, 1 Aug 2018, Eric Gallager wrote: > While modifying -Woverlength-strings, I think a good way to test it The -Woverlength-strings option (warn about string constants longer than the minimum guaranteed by the C standard to be supported) has nothing whatever to do with the present patch

Re: [PATCH,AIX] Optimize the time required for loading XCOFF data

2018-08-01 Thread Ian Lance Taylor
On Tue, Jul 31, 2018 at 8:12 AM, REIX, Tony wrote: > > Description: > * This patch optimizes the time required for loading XCOFF data. > > Tests: > * AIX: Build: SUCCESS >- build made by means of gmake on AIX. > > ChangeLog: > * xcoff.c: Optimize loading of XCOFF data. Thanks, committed

Re: Move all wide_int_range* functions into wide-int-range.[ch]

2018-08-01 Thread David Malcolm
On Wed, 2018-08-01 at 15:39 -0400, Aldy Hernandez wrote: > This is actually an obvious patch, but I'm not committing it just in > case you'd prefer another name for the files. BTW, is it our policy that new gcc C++ source files should have a .cc extension? > OK pending bootstrap? > > Aldy

Re: [PATCH] change %G argument from gcall* to gimple*

2018-08-01 Thread David Malcolm
On Wed, 2018-08-01 at 13:53 -0600, Martin Sebor wrote: > On 08/01/2018 08:33 AM, David Malcolm wrote: > > On Tue, 2018-07-31 at 13:06 -0600, Martin Sebor wrote: > > > The GCC internal %G directive takes a gcall* argument and prints > > > the call's inlining stack in diagnostics. The argument type

Re: [PATCH] Handle overlength strings in the C FE

2018-08-01 Thread Eric Gallager
On 8/1/18, Martin Sebor wrote: > On 08/01/2018 05:20 AM, Bernd Edlinger wrote: >> On 07/30/18 17:49, Joseph Myers wrote: >>> On Mon, 30 Jul 2018, Bernd Edlinger wrote: >>> Hi, this is how I would like to handle the over length strings issue in the C FE. If the string

Re: [PATCH] Handle overlength strings in the C FE

2018-08-01 Thread Joseph Myers
On Wed, 1 Aug 2018, Marek Polacek wrote: > I guess you want XALLOCAVAR or XNEWVAR. Not XALLOCAVAR; GCC supports string constants up to 2 GB (minus one byte), which is far too much to put on the stack. -- Joseph S. Myers jos...@codesourcery.com

Re: PING [PATCH] warn for strlen of arrays with missing nul (PR 86552)

2018-08-01 Thread Martin Sebor
On 08/01/2018 10:34 AM, Martin Sebor wrote: If you care about detecting bugs I would expect you to be supportive rather than dismissive of this work, and helpful in bringing it to fruition rather that putting it down or questioning my priorities. Especially since the work was prompted by your

Re: [PATCH] Handle overlength strings in the C FE

2018-08-01 Thread Marek Polacek
On Wed, Aug 01, 2018 at 08:06:53PM +, Bernd Edlinger wrote: > On 08/01/18 18:04, Joseph Myers wrote: > > On Wed, 1 Aug 2018, Bernd Edlinger wrote: > > > >> On 07/30/18 17:49, Joseph Myers wrote: > >>> On Mon, 30 Jul 2018, Bernd Edlinger wrote: > >>> > Hi, > > this is how I

Re: [PATCH] Handle overlength strings in the C FE

2018-08-01 Thread Bernd Edlinger
On 08/01/18 18:04, Joseph Myers wrote: > On Wed, 1 Aug 2018, Bernd Edlinger wrote: > >> On 07/30/18 17:49, Joseph Myers wrote: >>> On Mon, 30 Jul 2018, Bernd Edlinger wrote: >>> Hi, this is how I would like to handle the over length strings issue in the C FE. If the

Re: [PATCHv3 2/6] libstdc++ futex: Use FUTEX_CLOCK_REALTIME for wait

2018-08-01 Thread Jonathan Wakely
On 01/08/18 14:19 +0100, Mike Crowe wrote: The futex system call supports waiting for an absolute time if FUTEX_WAIT_BITSET is used rather than FUTEX_WAIT. Doing so provides two benefits: 1. The call to gettimeofday is not required in order to calculate a relative timeout. 2. If someone

[PATCH, rs6000] Correct descriptions of __builtin_bcdadd* and _builtin_bcdsub* functions

2018-08-01 Thread Kelvin Nilsen
Several errors were discovered in the descriptions of the __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq, __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub, __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt, and __builtin_bcdsub_ov functions. This

Re: [PATCH] change %G argument from gcall* to gimple*

2018-08-01 Thread Martin Sebor
On 08/01/2018 08:33 AM, David Malcolm wrote: On Tue, 2018-07-31 at 13:06 -0600, Martin Sebor wrote: The GCC internal %G directive takes a gcall* argument and prints the call's inlining stack in diagnostics. The argument type makes it unsuitable for gimple expressions such as those diagnosed by

[PATCH] Add -D_GLIBCXX_ASSERTIONS to DEBUG_FLAGS

2018-08-01 Thread Jonathan Wakely
Enable assertions in the extra debug library built when --enable-libstdcxx-debug is used. Replace some Debug Mode assertions in src/c++11/futex.cc with __glibcxx_assert, because the library will never be built with Debug Mode. * configure: Regenerate. * configure.ac: Add

Re: [PATCHv3 0/6] std::future::wait_* improvements

2018-08-01 Thread Jonathan Wakely
On 01/08/18 14:19 +0100, Mike Crowe wrote: v2 of this series was originally posted back in January (see https://gcc.gnu.org/ml/libstdc++/2018-01/msg00035.html ) Apart from minor log message tweaks, the changes since that version are: * [1/6] Improve libstdc++-v3 async test Speed up the tests

Move all wide_int_range* functions into wide-int-range.[ch]

2018-08-01 Thread Aldy Hernandez
This is actually an obvious patch, but I'm not committing it just in case you'd prefer another name for the files. OK pending bootstrap? Aldy gcc/ * Makefile.in (wide-int-range.o): New. * tree-vrp.c: Move all the wide_int_* functions to... * wide-int-range.c: ...here. * tree-vrp.h: Move

Re: [PATCHv3 3/6] libstdc++ futex: Support waiting on std::chrono::steady_clock directly

2018-08-01 Thread Jonathan Wakely
On 01/08/18 14:19 +0100, Mike Crowe wrote: The user-visible effect of this change is for std::future::wait_until to use CLOCK_MONOTONIC when passed a timeout of std::chrono::steady_clock type. This makes it immune to any changes made to the system clock CLOCK_REALTIME. Add an overload of

Re: [PATCH,nvptx] Use CUDA driver API to select default runtime launch, geometry

2018-08-01 Thread Cesar Philippidis
On 08/01/2018 07:12 AM, Tom de Vries wrote: +gangs = grids * (blocks / warp_size); >>> >>> So, we launch with gangs == grids * workers ? Is that intentional? >> >> Yes. At least that's what I've been using in og8. Setting num_gangs = >> grids alone caused significant slow downs. >> >

Re: [PATCH] Backport gettext fixes to get rid of warnings on macOS

2018-08-01 Thread Simon Marchi
On 2018-08-01 10:58, Simon Marchi wrote: This patch was tested to build binutils-gdb on GNU/Linux and macOS. It can be applied to the gcc repo too, after fixing some trivial merge conflicts (someone else will need to do it, as I don't have push access to gcc). Although I think it is

Re: [PATCH][3/4] Use RPO VN from unrolling

2018-08-01 Thread Richard Biener
On August 1, 2018 4:58:09 PM GMT+02:00, Richard Sandiford wrote: >Richard Biener writes: >> This should be 4/4 but I have the main patch on top, so... >> >> This uses the region-based VN from GIMPLE unrolling which means >> we better approximate the effects optimizations on unrolled inner >>

[gomp5] depend/depobj adjustments

2018-08-01 Thread Jakub Jelinek
Hi! A change is being voted into OpenMP 5.0, where the depend clause modifiers are separated from dependence type with a comma rather than colon (mostly for consistency with other clauses), and more importantly, dependence type is no longer optional, the clauses previously without dependence type

Re: [PATCH] Handle overlength strings in the C FE

2018-08-01 Thread Bernd Edlinger
On 08/01/18 19:07, Martin Sebor wrote: > On 08/01/2018 05:20 AM, Bernd Edlinger wrote: >> On 07/30/18 17:49, Joseph Myers wrote: >>> On Mon, 30 Jul 2018, Bernd Edlinger wrote: >>> Hi, this is how I would like to handle the over length strings issue in the C FE. If the

Re: [PATCH][AArch64] Implement new intrinsics vabsd_s64 and vnegd_s64

2018-08-01 Thread James Greenhalgh
On Wed, Aug 01, 2018 at 07:13:53AM -0500, Vlad Lazar wrote: > On 31/07/18 22:48, James Greenhalgh wrote: > > On Fri, Jul 20, 2018 at 04:37:34AM -0500, Vlad Lazar wrote: > >> Hi, > >> > >> The patch adds implementations for the NEON intrinsics vabsd_s64 and > >> vnegd_s64. > >>

Re: [PATCH,nvptx] Truncate config/nvptx/oacc-parallel.c

2018-08-01 Thread Jakub Jelinek
On Wed, Aug 01, 2018 at 10:13:06AM -0700, Nathan Sidwell wrote: > On 08/01/2018 04:55 AM, Jakub Jelinek wrote: > > > The ABI compatibility is mainly for libgomp.so which hasn't (ever) bumped > > the soname and I don't plan to do that any time soon, but even for the > > offloaded libgomp.a I guess

Re: [PATCH, testsuite]: Fix PR 86153, test case g++.dg/pr83239.C fails

2018-08-01 Thread Martin Sebor
On 08/01/2018 04:34 AM, Uros Bizjak wrote: Hello! The testcase fails with: FAIL: g++.dg/pr83239.C -std=gnu++11 scan-tree-dump-not optimized "_ZNSt6vectorIiSaIiEE17_M_default_appendEm" FAIL: g++.dg/pr83239.C -std=gnu++14 scan-tree-dump-not optimized

Re: PING [PATCH] warn for strlen of arrays with missing nul (PR 86552)

2018-08-01 Thread Bernd Edlinger
On 08/01/18 18:34, Martin Sebor wrote: >>> If you care about detecting bugs I would expect you to be >>> supportive rather than dismissive of this work, and helpful >>> in bringing it to fruition rather that putting it down or >>> questioning my priorities.  Especially since the work was >>>

Re: [PATCH,nvptx] Truncate config/nvptx/oacc-parallel.c

2018-08-01 Thread Nathan Sidwell
On 08/01/2018 04:55 AM, Jakub Jelinek wrote: The ABI compatibility is mainly for libgomp.so which hasn't (ever) bumped the soname and I don't plan to do that any time soon, but even for the offloaded libgomp.a I guess one might compile with GCC 5 and link with GCC 9 and expect things not to

Re: [Patch][GCC] Document and fix -r (partial linking)

2018-08-01 Thread Allan Sandfeld Jensen
On Mittwoch, 1. August 2018 18:32:30 CEST Joseph Myers wrote: > On Wed, 1 Aug 2018, Allan Sandfeld Jensen wrote: > > gcc/ > > > > * gcc.c: Correct default specs for -r > > I don't follow why your changes (which would need describing for each > individual spec changed) are corrections. > > >

Re: [PATCH] Handle overlength strings in the C FE

2018-08-01 Thread Martin Sebor
On 08/01/2018 05:20 AM, Bernd Edlinger wrote: On 07/30/18 17:49, Joseph Myers wrote: On Mon, 30 Jul 2018, Bernd Edlinger wrote: Hi, this is how I would like to handle the over length strings issue in the C FE. If the string constant is exactly the right length and ends in one explicit NUL

[PATCH] Fix TSan on ppc64le (PR libsanitizer/86759)

2018-08-01 Thread Marek Polacek
Cherry-pick compiler-rt revision 318044 and 319180. [PowerPC][tsan] Update tsan to handle changed memory layouts in newer kernels In more recent Linux kernels with 47 bit VMAs the layout of virtual memory for powerpc64 changed causing the thread sanitizer to not work properly.

Re: [PATCH][x86] Match movss and movsd "blend" instructions

2018-08-01 Thread Marc Glisse
On Wed, 1 Aug 2018, Allan Sandfeld Jensen wrote: extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_move_sd (__m128d __A, __m128d __B) { - return (__m128d) __builtin_ia32_movsd ((__v2df)__A, (__v2df)__B); + return __extension__

Re: [Patch][GCC] Document and fix -r (partial linking)

2018-08-01 Thread Rainer Orth
Hi Allan, > The option has existed and been working for years, > make sure it implies the right extra options, and list > it in the documentation. this is way incomplete: you are only fixing the default versions of the various specs in gcc.c, while there are many others that also need fixing in

Re: [PATCHv3 1/6] Improve libstdc++-v3 async test

2018-08-01 Thread Jonathan Wakely
On 01/08/18 14:19 +0100, Mike Crowe wrote: Add tests for waiting for the future using both std::chrono::steady_clock and std::chrono::system_clock in preparation for dealing with those clocks properly in futex.cc. --- libstdc++-v3/testsuite/30_threads/async/async.cc | 33

Re: PING [PATCH] warn for strlen of arrays with missing nul (PR 86552)

2018-08-01 Thread Martin Sebor
If you care about detecting bugs I would expect you to be supportive rather than dismissive of this work, and helpful in bringing it to fruition rather that putting it down or questioning my priorities. Especially since the work was prompted by your own (valid) complaint that GCC doesn't

Re: [Patch][GCC] Document and fix -r (partial linking)

2018-08-01 Thread Joseph Myers
On Wed, 1 Aug 2018, Allan Sandfeld Jensen wrote: > gcc/ > * gcc.c: Correct default specs for -r I don't follow why your changes (which would need describing for each individual spec changed) are corrections. > /* config.h can define LIB_SPEC to override the default libraries. */ >

[Patch][GCC] Document and fix -r (partial linking)

2018-08-01 Thread Allan Sandfeld Jensen
The option has existed and been working for years, make sure it implies the right extra options, and list it in the documentation. 2018-08-01 Allan Sandfeld Jensen gcc/doc * invoke.texi: Document -r gcc/ * gcc.c: Correct default specs for -r --- gcc/doc/invoke.texi | 7 ++-

Re: [PATCH] Handle overlength strings in the C FE

2018-08-01 Thread Joseph Myers
On Wed, 1 Aug 2018, Bernd Edlinger wrote: > On 07/30/18 17:49, Joseph Myers wrote: > > On Mon, 30 Jul 2018, Bernd Edlinger wrote: > > > >> Hi, > >> > >> this is how I would like to handle the over length strings issue in the C > >> FE. > >> If the string constant is exactly the right length and

[committed, AArch64] Update expected output for sve/var_stride_[24].c

2018-08-01 Thread Richard Sandiford
After Segher's recent combine change, these tests now use a single instruction to do the "and" and "lsl 10". This is a good thing, so the patch updates the expected output accordingly. Tested on aarch64-linux-gnu and applied. Richard 2018-08-01 Richard Sandiford gcc/testsuite/ *

[committed, AArch64] XFAIL sve/vcond_[45].c tests

2018-08-01 Thread Richard Sandiford
See PR 86753 for details. Tested on aarch64-linux-gnu and applied. Richard 2018-08-01 Richard Sandiford gcc/testsuite/ PR target/86753 * gcc.target/aarch64/sve/vcond_4.c: XFAIL positive tests. * gcc.target/aarch64/sve/vcond_5.c: Likewise. Index:

[PATCH][x86] Match movss and movsd "blend" instructions

2018-08-01 Thread Allan Sandfeld Jensen
Adds the ability to match movss and movsd as blend patterns, implemented in a new method to be able to match these before shuffles, while keeping other blends after. 2018-07-29 Allan Sandfeld Jensen gcc/config/i386 * i386.cc (expand_vec_perm_movs): New method matching movs patterns.

Re: [PATCH 2/2] condition_variable: Use steady_clock to implement wait_for

2018-08-01 Thread Jonathan Wakely
On 20/07/18 17:49 +0100, Mike Crowe wrote: I believe[1][2] that the C++ standard says that std::condition_variable::wait_for should be implemented to be equivalent to: return wait_until(lock, chrono::steady_clock::now() + rel_time); But the existing implementation uses chrono::system_clock.

Re: [PATCH 1/2] condition_variable: Report early wakeup of wait_until as no_timeout

2018-08-01 Thread Jonathan Wakely
On 20/07/18 17:49 +0100, Mike Crowe wrote: As currently implemented, condition_variable always ultimately waits against std::chrono::system_clock. This clock can be changed in arbitrary ways by the user which may result in us waking up too early or too late when measured against the

Re: [PATCH] Add malloc predictor (PR middle-end/83023).

2018-08-01 Thread Nathan Sidwell
On 08/01/2018 05:25 AM, Marc Glisse wrote: Throwing new is returns_nonnull (errors are reported with exceptions) so that's fine, but non-throwing new is not: int* p1 = new(std::nothrow) int; Here errors are reported by returning 0, so it is common to test if p1 is 0 and this is precisely

[GCC][PATCH v2][Aarch64] Exploiting BFXIL when OR-ing two AND-operations with appropriate bitmasks

2018-08-01 Thread Sam Tebbs
Hi all, This patch adds an optimisation that exploits the AArch64 BFXIL instruction when or-ing the result of two bitwise and operations with non-overlapping bitmasks (e.g. (a & 0x) | (b & 0x)). Example: unsigned long long combine(unsigned long long a, unsigned long long b) {  

Re: [AArch64] Generate load-pairs when the last load clobbers the address register [2/2]

2018-08-01 Thread Richard Earnshaw (lists)
On 19/07/18 11:03, Jackson Woodruff wrote: > Hi Richard, > > > On 07/12/2018 05:35 PM, Richard Earnshaw (lists) wrote: >> On 11/07/18 17:48, Jackson Woodruff wrote: >>> Hi Sudi, >>> >>> On 07/10/2018 02:29 PM, Sudakshina Das wrote: Hi Jackson On Tuesday 10 July 2018 09:37 AM,

Re: [PATCH] Add malloc predictor (PR middle-end/83023).

2018-08-01 Thread Marc Glisse
On Wed, 1 Aug 2018, Martin Liška wrote: On 08/01/2018 02:25 PM, Marc Glisse wrote: On Wed, 1 Aug 2018, Martin Liška wrote: On 07/27/2018 02:38 PM, Marc Glisse wrote: On Fri, 27 Jul 2018, Martin Liška wrote: So answer is yes, the builtin can be then removed. Good, thanks. While looking

Re: [PATCH] Handle overlength strings in C++ FE

2018-08-01 Thread Nathan Sidwell
On 08/01/2018 04:27 AM, Bernd Edlinger wrote: Hi, this makes too long string constants shorter, and fixes one place where a string constant is created non-zero terminated. This is a cleanup in preparation of a more thorough check on the STRING_CST objects in the middle-end. Bootstrapped and

[PATCH] Backport gettext fixes to get rid of warnings on macOS

2018-08-01 Thread Simon Marchi
This patch was tested to build binutils-gdb on GNU/Linux and macOS. It can be applied to the gcc repo too, after fixing some trivial merge conflicts (someone else will need to do it, as I don't have push access to gcc). Although I think it is relatively low-risk, building gcc on macOS was not

Re: [PATCH][3/4] Use RPO VN from unrolling

2018-08-01 Thread Richard Sandiford
Richard Biener writes: > This should be 4/4 but I have the main patch on top, so... > > This uses the region-based VN from GIMPLE unrolling which means > we better approximate the effects optimizations on unrolled inner > loops when evaluating whether to unroll outer ones. Great! Sounds like it

Re: [PATCH] change %G argument from gcall* to gimple*

2018-08-01 Thread David Malcolm
On Tue, 2018-07-31 at 13:06 -0600, Martin Sebor wrote: > The GCC internal %G directive takes a gcall* argument and prints > the call's inlining stack in diagnostics. The argument type makes > it unsuitable for gimple expressions such as those diagnosed by > -Warray-bounds. > > As the first step

[PATCH][3/4] Use RPO VN from unrolling

2018-08-01 Thread Richard Biener
This should be 4/4 but I have the main patch on top, so... This uses the region-based VN from GIMPLE unrolling which means we better approximate the effects optimizations on unrolled inner loops when evaluating whether to unroll outer ones. * tree-ssa-loop-ivcanon.c: Include

[PATCH][2/4] Add rev_post_order_and_mark_dfs_back_seme

2018-08-01 Thread Richard Biener
This adds RPO finding on SEME regions, marking backedges in the region on-the-fly. RPO value-numbering uses this first and foremost in region mode but also for whole-function since it has a way to visit non-loop-exit edges first leading to a more local iteration order. 2018-07-04 Richard

Re: [0/5] C-SKY port

2018-08-01 Thread 瞿仙淼
>>> We expect that >>> C-SKY will also be providing a public link to the processor and ABI >>> documentation at some point. >> >> The ABI manual has been posted, but not the ISA documentation yet. (I'd >> guess >> that when it does show up it will be in the same place, though.) >> >>

[PATCH][1/4] Add dynamic CFG flag allocation

2018-08-01 Thread Richard Biener
I've posted this previously and didn't change it, the discussion went down bikeshedding on C++. * cfg.h (struct control_flow_graph): Add edge_flags_allocated and bb_flags_allocated members. (auto_flag): New RAII class for allocating flags. (auto_edge_flag): New

[PATCH][0/4][RFC] RPO style value-numbering

2018-08-01 Thread Richard Biener
This rewrites the value-numbering algorithm used for FRE and PRE from SSA SCC based to RPO based, thus switching from an algorithm that handles SSA SCCs optimistically to one that handles CFG SCCs optimistically. The main motivation for this besides being more optimistic was that adding CFG

Re: [PATCH] Avoid infinite loop with duplicate anonymous union fields

2018-08-01 Thread Bogdan Harjoc
On Wed, Aug 1, 2018 at 1:20 AM, Joseph Myers wrote: > On Wed, 1 Aug 2018, Bogdan Harjoc wrote: > >> So array[0] < component < array[2], which loops (I removed the gdb p >> commands for field_array[1] and so on). > > Is the key thing here that you end up with DECL_NAME (field) == NULL_TREE, > but

Re: PING [PATCH] warn for strlen of arrays with missing nul (PR 86552)

2018-08-01 Thread Bernd Edlinger
On 07/31/18 05:51, Martin Sebor wrote: > On 07/30/2018 03:11 PM, Bernd Edlinger wrote: >> Hi, >> >>> @@ -621,6 +674,12 @@ c_strlen (tree src, int only_value) >>> maxelts = maxelts / eltsize - 1; >>>   } >>> >>> +  /* Unless the caller is prepared to handle it by passing in a non-null >>> + 

[gomp5] Parse task modifier of reduction clauses

2018-08-01 Thread Jakub Jelinek
Hi! This patch adds just the parsing and diagnostics of task reduction modifier. Such reductions behave then differently, like task_reduction clause on taskgroup construct when used on parallel or for/sections. Tested on x86_64-linux, committed to gomp-5_0-branch. 2018-08-01 Jakub Jelinek

Re: [PATCH,nvptx] Use CUDA driver API to select default runtime launch, geometry

2018-08-01 Thread Tom de Vries
On 08/01/2018 04:01 PM, Cesar Philippidis wrote: > On 08/01/2018 03:18 AM, Tom de Vries wrote: >> On 07/31/2018 04:58 PM, Cesar Philippidis wrote: >>> The attached patch teaches libgomp how to use the CUDA thread occupancy >>> calculator built into the CUDA driver. Despite both being based off the

Re: [ARM/FDPIC v2 00/21] FDPIC ABI for ARM

2018-08-01 Thread Christophe Lyon
Ping? On 13/07/2018 18:10, christophe.l...@st.com wrote: From: Christophe Lyon Hello, This patch series implements the GCC contribution of the FDPIC ABI for ARM targets. This ABI enables to run Linux on ARM MMU-less cores and supports shared libraries to reduce the memory footprint.

Re: [PATCH,nvptx] Use CUDA driver API to select default runtime launch, geometry

2018-08-01 Thread Cesar Philippidis
On 08/01/2018 03:18 AM, Tom de Vries wrote: > On 07/31/2018 04:58 PM, Cesar Philippidis wrote: >> The attached patch teaches libgomp how to use the CUDA thread occupancy >> calculator built into the CUDA driver. Despite both being based off the >> CUDA thread occupancy spreadsheet distributed with

[PATCH] PR libstdc++/60555 std::system_category() should recognise POSIX errno values

2018-08-01 Thread Jonathan Wakely
PR libstdc++/60555 * src/c++11/system_error.cc (system_error_category::default_error_condition): New override to check for POSIX errno values. * testsuite/19_diagnostics/error_category/generic_category.cc: New *

Re: [PATCH] Provide extension hint for aarch64 target (PR driver/83193).

2018-08-01 Thread Martin Liška
PING^1 On 07/18/2018 05:49 PM, Martin Liška wrote: > Hi. > > This patch improves aarch64 feature modifier hints. > > May I please ask ARM folks to test the patch? > Thanks, > Martin > > gcc/ChangeLog: > > 2018-07-18 Martin Liska > > PR driver/83193 > *

Re: [PATCH] Print default options selection for -march,-mcpu and -mtune for aarch64 (PR driver/83193).

2018-08-01 Thread Martin Liška
PING^1 On 07/18/2018 05:48 PM, Martin Liška wrote: > Hi. > > This is aarch64 fix for PR83193. It's about setting of default options > so that --help=target -Q prints proper numbers: > > Now this is seen on my cross-compiler: > > --- /home/marxin/Downloads/options-2-before.txt 2018-07-18

[nvptx, committed] Define TARGET_HAVE_SPECULATION_SAFE_VALUE

2018-08-01 Thread Tom de Vries
Hi, this defines new target hook TARGET_HAVE_SPECULATION_SAFE_VALUE for nvptx. Since AFAIK nvidia claims the related security issue does not exist on their video hardware, we set it to speculation_safe_value_not_needed. Build and reg-tested on x86_64 with nvptx accelerator. Committed. Thanks,

[libgomp, nvptx, committed] Add cuda-lib.def

2018-08-01 Thread Tom de Vries
Hi, This factors out the cuda library calls list into a seperate .def file. Build and reg-tested on x86_64 with nvptx accelerator. Committed. Thanks, - Tom [libgomp, nvptx] Add cuda-lib.def 2018-08-01 Tom de Vries * plugin/cuda-lib.def: New file. Factor out of ... *

Re: [PATCH,nvptx] Remove use of 'struct map' from plugin (nvptx)

2018-08-01 Thread Tom de Vries
On 08/01/2018 03:43 PM, Cesar Philippidis wrote: > On 08/01/2018 04:01 AM, Tom de Vries wrote: >> On 07/31/2018 05:12 PM, Cesar Philippidis wrote: >>> This is an old patch which removes the struct map from the nvptx plugin. >>> I believe at one point this was supposed to be used to manage async

Re: [PATCH,nvptx] Remove use of 'struct map' from plugin (nvptx)

2018-08-01 Thread Cesar Philippidis
On 08/01/2018 04:01 AM, Tom de Vries wrote: > On 07/31/2018 05:12 PM, Cesar Philippidis wrote: >> This is an old patch which removes the struct map from the nvptx plugin. >> I believe at one point this was supposed to be used to manage async data >> mappings, but in practice that never worked out.

[PATCHv3 1/6] Improve libstdc++-v3 async test

2018-08-01 Thread Mike Crowe
Add tests for waiting for the future using both std::chrono::steady_clock and std::chrono::system_clock in preparation for dealing with those clocks properly in futex.cc. --- libstdc++-v3/testsuite/30_threads/async/async.cc | 33 1 file changed, 33 insertions(+) diff

[PATCHv3 2/6] libstdc++ futex: Use FUTEX_CLOCK_REALTIME for wait

2018-08-01 Thread Mike Crowe
The futex system call supports waiting for an absolute time if FUTEX_WAIT_BITSET is used rather than FUTEX_WAIT. Doing so provides two benefits: 1. The call to gettimeofday is not required in order to calculate a relative timeout. 2. If someone changes the system clock during the wait then

[PATCHv3 3/6] libstdc++ futex: Support waiting on std::chrono::steady_clock directly

2018-08-01 Thread Mike Crowe
The user-visible effect of this change is for std::future::wait_until to use CLOCK_MONOTONIC when passed a timeout of std::chrono::steady_clock type. This makes it immune to any changes made to the system clock CLOCK_REALTIME. Add an overload of

[PATCHv3 5/6] libstdc++ futex: Loop when waiting against arbitrary clock

2018-08-01 Thread Mike Crowe
If std::future::wait_until is passed a time point measured against a clock that is neither std::chrono::steady_clock nor std::chrono::system_clock then the generic implementation of __atomic_futex_unsigned::_M_load_when_equal_until is called which calculates the timeout based on __clock_t and

[PATCHv3 6/6] Extra async tests, not for merging

2018-08-01 Thread Mike Crowe
These tests show that changing the system clock has an effect on std::future::wait_until when using std::chrono::system_clock but not when using std::chrono::steady_clock. Unfortunately these tests have a number of downsides: 1. Nothing that is attempting to keep the clock set correctly (ntpd,

[PATCHv3 4/6] libstdc++ atomic_futex: Use std::chrono::steady_clock as reference clock

2018-08-01 Thread Mike Crowe
The user-visible effect of this change is that std::future::wait_for now uses std::chrono::steady_clock to determine the timeout. This makes it immune to changes made to the system clock. It also means that anyone using their own clock types with std::future::wait_until will have the timeout

[PATCHv3 0/6] std::future::wait_* improvements

2018-08-01 Thread Mike Crowe
v2 of this series was originally posted back in January (see https://gcc.gnu.org/ml/libstdc++/2018-01/msg00035.html ) Apart from minor log message tweaks, the changes since that version are: * [1/6] Improve libstdc++-v3 async test Speed up the tests at the risk of more sporadic failures on

Re: [PATCH] Make GO string literals properly NUL terminated

2018-08-01 Thread Bernd Edlinger
On 08/01/18 11:29, Richard Biener wrote: > > Hmm. I think it would be nice if TREE_STRING_LENGTH would > match char[2] and TYPE_SIZE_UNIT even if that is inconvenient > for your check above. Because the '\0' doesn't belong to the > string. Then build_string internally appends a '\0' outside

Re: [08/11] Make hoist_defs_of_uses use vec_info::lookup_def

2018-08-01 Thread Richard Biener
On Mon, Jul 30, 2018 at 1:43 PM Richard Sandiford wrote: > > This patch makes hoist_defs_of_uses use vec_info::lookup_def instead of: > > if (!gimple_nop_p (def_stmt) > && flow_bb_inside_loop_p (loop, gimple_bb (def_stmt))) > > to test whether a feeding scalar statement needs to

Re: C++ PATCH for c++/57891, narrowing conversions in non-type template arguments

2018-08-01 Thread Marek Polacek
Ping. On Mon, Jul 23, 2018 at 04:49:12PM -0400, Marek Polacek wrote: > On Tue, Jul 03, 2018 at 04:27:33PM -0400, Jason Merrill wrote: > > On Tue, Jul 3, 2018 at 3:41 PM, Jason Merrill wrote: > > > On Tue, Jul 3, 2018 at 2:58 PM, Marek Polacek wrote: > > >> On Tue, Jul 03, 2018 at 12:40:51PM

Re: [07/11] Use single basic block array in loop_vec_info

2018-08-01 Thread Richard Biener
On Mon, Jul 30, 2018 at 1:42 PM Richard Sandiford wrote: > > _loop_vec_info::_loop_vec_info used get_loop_array to get the > order of the blocks when creating stmt_vec_infos, but then used > dfs_enumerate_from to get the order of the blocks that the rest > of the vectoriser uses. We should be

Re: [06/11] Handle VMAT_INVARIANT separately

2018-08-01 Thread Richard Biener
On Mon, Jul 30, 2018 at 1:41 PM Richard Sandiford wrote: > > Invariant loads were handled as a variation on the code for contiguous > loads. We detected whether they were invariant or not as a byproduct of > creating the vector pointer ivs: vect_create_data_ref_ptr passed back an > inv_p to say

Re: [05/11] Add a vect_stmt_to_vectorize helper function

2018-08-01 Thread Richard Biener
On Mon, Jul 30, 2018 at 1:39 PM Richard Sandiford wrote: > > This patch adds a helper that does the opposite of vect_orig_stmt: > go from the original scalar statement to the statement that should > actually be vectorised. > > The use in the last two hunks of vectorizable_reduction are because >

Re: [04/11] Add a vect_orig_stmt helper function

2018-08-01 Thread Richard Biener
On Mon, Jul 30, 2018 at 1:38 PM Richard Sandiford wrote: > > This patch just adds a helper function for going from a potential > pattern statement to the original scalar statement. OK. Richard. > > 2018-07-30 Richard Sandiford > > gcc/ > * tree-vectorizer.h (vect_orig_stmt): New

Re: [03/11] Remove vect_transform_stmt grouped_store argument

2018-08-01 Thread Richard Biener
On Mon, Jul 30, 2018 at 1:38 PM Richard Sandiford wrote: > > Nothing now uses the grouped_store value passed back by > vect_transform_stmt, so we might as well remove it. OK. > > 2018-07-30 Richard Sandiford > > gcc/ > * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store >

Re: [02/11] Remove vect_schedule_slp return value

2018-08-01 Thread Richard Biener
On Mon, Jul 30, 2018 at 1:37 PM Richard Sandiford wrote: > > Nothing now uses the vect_schedule_slp return value, so it's not worth > propagating the value through vect_schedule_slp_instance. OK. > > 2018-07-30 Richard Sandiford > > gcc/ > * tree-vectorizer.h (vect_schedule_slp):

Re: [01/11] Schedule SLP earlier

2018-08-01 Thread Richard Biener
On Mon, Jul 30, 2018 at 1:37 PM Richard Sandiford wrote: > > vect_transform_loop used to call vect_schedule_slp lazily when it > came across the first SLP statement, but it seems easier to do it > before the main loop. Indeed. OK. Richard. > > 2018-07-30 Richard Sandiford > > gcc/ >

Re: [PATCH] Add malloc predictor (PR middle-end/83023).

2018-08-01 Thread Martin Liška
On 08/01/2018 02:25 PM, Marc Glisse wrote: > On Wed, 1 Aug 2018, Martin Liška wrote: > >> On 07/27/2018 02:38 PM, Marc Glisse wrote: >>> On Fri, 27 Jul 2018, Martin Liška wrote: >>> So answer is yes, the builtin can be then removed. >>> >>> Good, thanks. While looking at how widely it is

Re: [PATCH,nvptx] Truncate config/nvptx/oacc-parallel.c

2018-08-01 Thread Tom de Vries
On 08/01/2018 01:55 PM, Jakub Jelinek wrote: > On Wed, Aug 01, 2018 at 01:33:09PM +0200, Tom de Vries wrote: >> On 07/31/2018 05:55 PM, Cesar Philippidis wrote: >>> Way back in the GCC 5 days when support for OpenACC was in its infancy, >>> we used to rely on having various GOACC_ thread functions

Re: [PATCH] Add malloc predictor (PR middle-end/83023).

2018-08-01 Thread Marc Glisse
On Wed, 1 Aug 2018, Martin Liška wrote: On 07/27/2018 02:38 PM, Marc Glisse wrote: On Fri, 27 Jul 2018, Martin Liška wrote: So answer is yes, the builtin can be then removed. Good, thanks. While looking at how widely it is going to apply, I noticed that the default, throwing operator new

Re: [PATCH] Introduce __builtin_expect_with_probability (PR target/83610).

2018-08-01 Thread Martin Liška
On 07/31/2018 11:24 AM, Jan Hubicka wrote: >> Hi. >> >> This is implementation of new built-in that can be used for more fine >> tweaking of probability. Micro benchmark is attached as part of the PR. >> >> Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. >> >> Ready to

Re: Fold pointer range checks with equal spans

2018-08-01 Thread Marc Glisse
On Wed, 1 Aug 2018, Richard Sandiford wrote: +/* For pointers @0 and @2 and nonnegative constant offset @1, look for + expressions like: + + A: (@0 + @1 < @2) | (@2 + @1 < @0) + B: (@0 + @1 <= @2) | (@2 + @1 <= @0) Once this is in, we may want to consider the opposite: (@0 + @1 > @2) &

Re: [PATCH][AArch64] Implement new intrinsics vabsd_s64 and vnegd_s64

2018-08-01 Thread Vlad Lazar
On 31/07/18 22:48, James Greenhalgh wrote: On Fri, Jul 20, 2018 at 04:37:34AM -0500, Vlad Lazar wrote: Hi, The patch adds implementations for the NEON intrinsics vabsd_s64 and vnegd_s64.

Re: [Patch][Aarch64] Implement Aarch64 SIMD ABI and aarch64_vector_pcs attribute

2018-08-01 Thread Kyrill Tkachov
Hi Steve, On 31/07/18 23:24, Steve Ellcey wrote: Here is a new version of my patch to support the Aarch64 SIMD ABI [1] in GCC. I think this is complete enought to be considered for check in. I wrote a few new tests and put them in a new gcc.target/torture directory so they would be run with

[C++ Patch, obvious] PR 86661

2018-08-01 Thread Paolo Carlini
Hi, when I lately changed a couple of permerrors to permerror + warning and accurate location for the first call, I went for the simple choice of using DECL_SOURCE_LOCATION for the first call and keeping location_of in the second call. Turns out we consistently want location_of for both,

  1   2   >