[PATCH] SCCVN Datastructure TLC, part 2

2018-07-20 Thread Richard Biener
This removes the two-level hashtables we keep for the SCCVN iteration in favor of removing elements inserted during optimistic iteration. To be able to track those hashtable elements are now linked in a list. While it would be nice to elide the hashtable lookup to find the slot for a specific

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

2018-07-20 Thread Sam Tebbs
Hi all, Here is an updated patch that does the following: * Adds a new constraint in config/aarch64/constraints.md to check for a constant integer that is left consecutive. This addresses Richard Henderson's suggestion about combining the aarch64_is_left_consecutive call and the const_int

Re: [PATCH] Prototype of hook for possible list of option values.

2018-07-20 Thread Martin Liška
On 07/20/2018 11:48 AM, Richard Earnshaw (lists) wrote: > On 20/07/18 09:04, Martin Liška wrote: >> Hi. >> >> I'm sending patch candidate with suggested target common hook. It allows a >> target >> to list all possible values for an option. Using the API, I implemented >> -march and >> -mtune

[PATCH][AAarch64][v2] Add support for TARGET_COMPUTE_FRAME_LAYOUT

2018-07-20 Thread Vlad Lazar
On 09/07/18 12:58, Vlad Lazar wrote: Hi all, The patch adds support for the TARGET_COMPUTE_FRAME_LAYOUT hook on AArch64 and removes unneeded frame layout recalculation. Bootstrapped and regtested on aarch64-none-linux-gnu and there are no regressions. Thanks, Vlad gcc/ 2018-07-02 Vlad

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

2018-07-20 Thread Vlad Lazar
Hi, The patch adds implementations for the NEON intrinsics vabsd_s64 and vnegd_s64. (https://developer.arm.com/products/architecture/cpu-architecture/a-profile/docs/ihi0073/latest/arm-neon-intrinsics-reference-architecture-specification) Bootstrapped and regtested on aarch64-none-linux-gnu and

Re: Optimization for std::to_string()

2018-07-20 Thread niXman
Jonathan Wakely 2018-07-20 13:05: On 20/07/18 12:44 +0300, niXman wrote: Thanks. How did you verify it's an optimization? Optimization is that there is no superfluous copying into string. The to_string functions always pass at least __n=16 to __to_xstring, which is larger than the SSO

Re: [PATCH] Prototype of hook for possible list of option values.

2018-07-20 Thread Richard Earnshaw (lists)
On 20/07/18 11:54, Martin Liška wrote: > On 07/20/2018 12:25 PM, Richard Earnshaw (lists) wrote: >> On 20/07/18 11:14, Martin Liška wrote: >>> On 07/20/2018 11:48 AM, Richard Earnshaw (lists) wrote: On 20/07/18 09:04, Martin Liška wrote: > Hi. > > I'm sending patch candidate with

[PATCH] Prototype of hook for possible list of option values.

2018-07-20 Thread Martin Liška
Hi. I'm sending patch candidate with suggested target common hook. It allows a target to list all possible values for an option. Using the API, I implemented -march and -mtune option listing on i386. Richard you asked about the values. Yes, target should list all possible values, mainly

[PATCH] Remove unused code.

2018-07-20 Thread Martin Liška
Hi. Following was introduced in r230331 and as David confirmed it was installed accidentally. It has never been used. Ready for trunk? Martin gcc/ChangeLog: 2018-07-20 Martin Liska * tree.h (DECL_LOCATION_RANGE): Remove unused macro. (get_decl_source_range): Remove unused

Handle SLP of call pattern statements

2018-07-20 Thread Richard Sandiford
We couldn't vectorise: for (int j = 0; j < n; ++j) { for (int i = 0; i < 16; ++i) a[i] = (b[i] + c[i]) >> 1; a += step; b += step; c += step; } at -O3 because cunrolli unrolled the inner loop and SLP couldn't handle AVG_FLOOR patterns (see also PR86504).

Re: [PATCH] Remove unused code.

2018-07-20 Thread Richard Biener
On Fri, Jul 20, 2018 at 10:52 AM Martin Liška wrote: > > Hi. > > Following was introduced in r230331 and as David confirmed > it was installed accidentally. It has never been used. > > Ready for trunk? OK > Martin > > gcc/ChangeLog: > > 2018-07-20 Martin Liska > > * tree.h

RE: [PATCH][GCC][front-end][build-machinery][opt-framework] Allow setting of stack-clash via configure options. [Patch (4/6)]

2018-07-20 Thread Tamar Christina
Hi Jeff, > -Original Message- > From: Jeff Law > Sent: Thursday, July 19, 2018 18:32 > To: Tamar Christina > Cc: gcc-patches@gcc.gnu.org; nd ; > jos...@codesourcery.com; bonz...@gnu.org; d...@redhat.com; > nero...@gcc.gnu.org; aol...@redhat.com; ralf.wildenh...@gmx.de > Subject: Re:

Re: [PATCH] fix a couple of bugs in const string folding (PR 86532)

2018-07-20 Thread Bernd Edlinger
> if (TREE_CODE (arg) == ADDR_EXPR) > { >+ tree argtype = TREE_TYPE (arg); >+ chartype = argtype; This assignment should be unnecessary here. Right? >+ > arg = TREE_OPERAND (arg, 0); > tree ref = arg; > if (TREE_CODE (arg) == ARRAY_REF) > { > tree

Re: [PATCH] When using -fprofile-generate=/some/path mangle absolute path of file (PR lto/85759).

2018-07-20 Thread Martin Liška
On 07/20/2018 06:02 AM, Bin.Cheng wrote: > On Fri, Jun 29, 2018 at 9:54 PM, Martin Liška wrote: >> On 06/22/2018 10:35 PM, Jeff Law wrote: >>> On 05/16/2018 05:53 AM, Martin Liška wrote: On 12/21/2017 10:13 AM, Martin Liška wrote: > On 12/20/2017 06:45 PM, Jakub Jelinek wrote: >>

Re: [PATCH] Prototype of hook for possible list of option values.

2018-07-20 Thread Richard Earnshaw (lists)
On 20/07/18 09:04, Martin Liška wrote: > Hi. > > I'm sending patch candidate with suggested target common hook. It allows a > target > to list all possible values for an option. Using the API, I implemented > -march and > -mtune option listing on i386. > > Richard you asked about the values.

Re: Handle SLP of call pattern statements

2018-07-20 Thread Richard Biener
On Fri, Jul 20, 2018 at 12:22 PM Richard Sandiford wrote: > > We couldn't vectorise: > > for (int j = 0; j < n; ++j) > { > for (int i = 0; i < 16; ++i) > a[i] = (b[i] + c[i]) >> 1; > a += step; > b += step; > c += step; > } > > at -O3 because cunrolli

Re: [PATCH] Prototype of hook for possible list of option values.

2018-07-20 Thread Richard Earnshaw (lists)
On 20/07/18 11:14, Martin Liška wrote: > On 07/20/2018 11:48 AM, Richard Earnshaw (lists) wrote: >> On 20/07/18 09:04, Martin Liška wrote: >>> Hi. >>> >>> I'm sending patch candidate with suggested target common hook. It allows a >>> target >>> to list all possible values for an option. Using the

Fold pointer range checks with equal spans

2018-07-20 Thread Richard Sandiford
When checking whether vectorised accesses at A and B are independent, the vectoriser falls back to tests of the form: A + size <= B || B + size <= A But in the common case that "size" is just the constant size of a vector (or a small multiple), it would be more efficient to do: ((size_t)

Re: [PATCH] Make function clone name numbering independent.

2018-07-20 Thread Richard Biener
On Fri, Jul 20, 2018 at 4:48 AM Michael Ploujnikov wrote: > > On 2018-07-17 04:25 PM, Michael Ploujnikov wrote: > > On 2018-07-17 06:02 AM, Richard Biener wrote: > >> On Tue, Jul 17, 2018 at 8:10 AM Bernhard Reutner-Fischer > >> wrote: > >>> > >>> On 16 July 2018 21:38:36 CEST, Michael

Re: Optimization for std::to_string()

2018-07-20 Thread Jonathan Wakely
On 20/07/18 12:44 +0300, niXman wrote: Hi, Patch in attachments. Thanks. How did you verify it's an optimization? The to_string functions always pass at least __n=16 to __to_xstring, which is larger than the SSO buffer in std::__cxx11::string, and so forces a memory allocation. The

Re: [PATCH] Merge Ignore and Deprecated in .opt files.

2018-07-20 Thread Martin Liška
On 07/19/2018 04:21 PM, Jakub Jelinek wrote: > On Thu, Jul 19, 2018 at 04:16:10PM +0200, Martin Liška wrote: >> I must admit that was my intention :) In my eyes it makes it more consistent >> and >> it gives consumers feedback about usage of an option that does nothing. >> For x86_64 there's list

Make the vectoriser drop to strided accesses for stores with gaps

2018-07-20 Thread Richard Sandiford
We could vectorise: for (...) { a[0] = ...; a[1] = ...; a[2] = ...; a[3] = ...; a += stride; } (including the case when stride == 8) but not: for (...) { a[0] = ...; a[1] = ...; a[2] = ...;

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

2018-07-20 Thread Sam Tebbs
Please disregard the original patch and see this updated version. On 07/20/2018 10:31 AM, Sam Tebbs wrote: Hi all, Here is an updated patch that does the following: * Adds a new constraint in config/aarch64/constraints.md to check for a constant integer that is left consecutive. This

Optimization for std::to_string()

2018-07-20 Thread niXman
Hi, Patch in attachments. Tested on x86_64-linux-gnu. -- Regards, niXman ___ C++ for Bitcoins: github.com/niXman Index: libstdc++-v3/include/ext/string_conversions.h === ---

Re: [PATCH] fix a couple of bugs in const string folding (PR 86532)

2018-07-20 Thread Richard Biener
On Thu, 19 Jul 2018, Martin Sebor wrote: > Here's one more update with tweaks addressing a couple more > of Bernd's comments: > > 1) correct the use of TREE_STRING_LENGTH() where a number of > array elements is expected and not bytes > 2) set CHARTYPE as soon as it's first determined rather than

Re: [PATCH] Prototype of hook for possible list of option values.

2018-07-20 Thread Martin Liška
On 07/20/2018 12:25 PM, Richard Earnshaw (lists) wrote: > On 20/07/18 11:14, Martin Liška wrote: >> On 07/20/2018 11:48 AM, Richard Earnshaw (lists) wrote: >>> On 20/07/18 09:04, Martin Liška wrote: Hi. I'm sending patch candidate with suggested target common hook. It allows a

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

2018-07-20 Thread Jonathan Wakely
On 10/07/18 11:09 +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] fix a couple of bugs in const string folding (PR 86532)

2018-07-20 Thread Bernd Edlinger
>@@ -605,14 +605,21 @@ c_strlen (tree src, int only_value) > > /* Set MAXELTS to sizeof (SRC) / sizeof (*SRC) - 1, the maximum possible > length of SRC. Prefer TYPE_SIZE() to TREE_STRING_LENGTH() if possible >- in case the latter is less than the size of the array. */ >-

[PATCH] PR libstdc++/86595 add missing noexcept

2018-07-20 Thread Jonathan Wakely
PR libstdc++/86595 * include/bits/fs_dir.h (directory_entry::refresh(error_code&)): Add noexcept. Tested powerpc64le-linux, committed to trunk. commit c857adf35f9849ddda1148c65813aba86acb5c6a Author: Jonathan Wakely Date: Fri Jul 20 12:35:05 2018 +0100 PR

Re: Make the vectoriser drop to strided accesses for stores with gaps

2018-07-20 Thread Richard Biener
On Fri, Jul 20, 2018 at 12:57 PM Richard Sandiford wrote: > > We could vectorise: > > for (...) >{ > a[0] = ...; > a[1] = ...; > a[2] = ...; > a[3] = ...; > a += stride; >} > > (including the case when stride == 8) but not: > >

Re: RFC: Patch to implement Aarch64 SIMD ABI

2018-07-20 Thread Wilco Dijkstra
Steve Ellcey wrote: > Yes, I see where I missed this in aarch64_push_regs > and aarch64_pop_regs.  I think that is why the second of > Wilco's two examples (f2) is wrong.  I am unclear about > exactly what is meant by writeback and why we have it and > how that and callee_adjust are used.  Any

[PATCH] PR libstdc++/86603 Move __cpp_lib_list_remove_return_type macro

2018-07-20 Thread Jonathan Wakely
This should only be defined for C++2a not C++17. PR libstdc++/86603 * include/std/version: Move __cpp_lib_list_remove_return_type macro. Tested powerpc64le-linux, committed to trunk. commit c457458395791eff165618b7bd04f6a71d99188d Author: Jonathan Wakely Date: Fri Jul 20

Re: Fold pointer range checks with equal spans

2018-07-20 Thread Marc Glisse
On Fri, 20 Jul 2018, Richard Sandiford wrote: --- gcc/match.pd2018-07-18 18:44:22.565914281 +0100 +++ gcc/match.pd2018-07-20 11:24:33.692045585 +0100 @@ -4924,3 +4924,37 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) (if (inverse_conditions_p (@0, @2) && element_precision

Re: [PATCH] restore -Warray-bounds for string literals (PR 83776)

2018-07-20 Thread Rainer Orth
Hi Martin, > On 07/19/2018 03:51 PM, Jeff Law wrote: >> On 07/13/2018 05:45 PM, Martin Sebor wrote: + offset_int ofr[] = { + wi::to_offset (fold_convert (ptrdiff_type_node, vr->min)), + wi::to_offset (fold_convert (ptrdiff_type_node, vr->max)) + };

Re: [Patch-86512]: Subnormal float support in armv7(with -msoft-float) for intrinsics

2018-07-20 Thread Umesh Kalappa
Reminder !!! ~Umesh On Wed, Jul 18, 2018 at 6:01 PM, Umesh Kalappa wrote: > Hi Nagy/Ramana, > > Please help us to review the attached patch and do let me know your comments . > > No regress in the gcc.target suite for arm target. > > Thank you > ~Umesh > > On Tue, Jul 17, 2018 at 4:01 PM,

Re: [Patch-86512]: Subnormal float support in armv7(with -msoft-float) for intrinsics

2018-07-20 Thread Szabolcs Nagy
On 18/07/18 13:31, Umesh Kalappa wrote: Hi Nagy/Ramana, Please help us to review the attached patch and do let me know your comments . No regress in the gcc.target suite for arm target. have you submitted a copyright assignment form yet? https://gcc.gnu.org/contribute.html Index:

Re: Optimization for std::to_string()

2018-07-20 Thread Jonathan Wakely
On 20/07/18 13:51 +0300, niXman wrote: Jonathan Wakely 2018-07-20 13:05: On 20/07/18 12:44 +0300, niXman wrote: Thanks. How did you verify it's an optimization? Optimization is that there is no superfluous copying into string. The to_string functions always pass at least __n=16 to

[PATCH] Fix PR86585

2018-07-20 Thread Richard Biener
I have committed the following patch to make debug refs prevail in LTO tree merging. This will fix mixing -g0 and -g units as well as cases where we fail to emit early debug for some decls in one unit but emit them for the copy in a second like for the testcase. So for the testcase a FE fix

Re: Make the vectoriser drop to strided accesses for stores with gaps

2018-07-20 Thread Richard Sandiford
Richard Biener writes: > On Fri, Jul 20, 2018 at 12:57 PM Richard Sandiford > wrote: >> >> We could vectorise: >> >> for (...) >>{ >> a[0] = ...; >> a[1] = ...; >> a[2] = ...; >> a[3] = ...; >> a += stride; >>} >> >> (including

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

2018-07-20 Thread Mike Crowe
On Friday 20 July 2018 at 11:53:38 +0100, Jonathan Wakely wrote: > On 10/07/18 11:09 +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

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

2018-07-20 Thread Jonathan Wakely
On 20/07/18 12:30 +0100, Mike Crowe wrote: On Friday 20 July 2018 at 11:53:38 +0100, Jonathan Wakely wrote: On 10/07/18 11:09 +0100, Mike Crowe wrote: > As currently implemented, condition_variable always ultimately waits > against std::chrono::system_clock. This clock can be changed in

Re: [Patch-86512]: Subnormal float support in armv7(with -msoft-float) for intrinsics

2018-07-20 Thread Wilco Dijkstra
Hi Umesh, Looking at your patch, this would break all results which need to be normalized. Index: libgcc/config/arm/ieee754-df.S === --- libgcc/config/arm/ieee754-df.S (revision 262850) +++ libgcc/config/arm/ieee754-df.S

Re: [PATCH] Explicitly mark _S_ti() as default visibility to work around clang -fvisibility-inlines-hidden bug

2018-07-20 Thread Jonathan Wakely
On 19/07/18 16:58 -0700, Fāng-ruì Sòng via libstdc++ wrote: clang (including trunk and many older versions) incorrectly marks static local variables (__tag) hidden when -fvisibility-inlines-hidden is used. % cat b.cc #include std::shared_ptr foo(int x) { return std::make_shared(x); } % g++-8

Re: [PATCH] Prototype of hook for possible list of option values.

2018-07-20 Thread Martin Liška
On 07/20/2018 12:58 PM, Richard Earnshaw (lists) wrote: > Modifiers are context dependent. The architecture implies which > modifiers can be applied (and what they mean in detail, so, for example, > +fp means enable the default floating point variant for this > architecture). Not all modifiers

[PATCH] Don't create non zero terminated string constant

2018-07-20 Thread Bernd Edlinger
Hi! This fixes a not NUL terminated STRING_CST object. Bootstrapped and reg-tested on x86_64-pc-linux-gnu. Is it OK for trunk? Thanks Bernd. 2018-07-20 Bernd Edlinger * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL terminated STRING_CST object. ---

Re: [PATCH][Middle-end][version 2]change char type to unsigned char type when expanding strcmp/strncmp

2018-07-20 Thread Qing Zhao
> On Jul 20, 2018, at 9:59 AM, Jakub Jelinek wrote: > > On Fri, Jul 20, 2018 at 09:53:24AM -0500, Qing Zhao wrote: >> +2018-07-20 Qing Zhao >> + >> + * builtins.c (expand_builtin_memcmp): Delete the last parameter for >> + call to inline_expand_builtin_string_cmp. >> +

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

2018-07-20 Thread Mike Crowe
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 caller-supplied clock. We can't (yet) do much about

Re: [PATCH][Middle-end][version 2]change char type to unsigned char type when expanding strcmp/strncmp

2018-07-20 Thread Jakub Jelinek
On Fri, Jul 20, 2018 at 09:53:24AM -0500, Qing Zhao wrote: > +2018-07-20 Qing Zhao > + > + * builtins.c (expand_builtin_memcmp): Delete the last parameter for > + call to inline_expand_builtin_string_cmp. > + (expand_builtin_strcmp): Likewise. > +

Re: [Patch-86512]: Subnormal float support in armv7(with -msoft-float) for intrinsics

2018-07-20 Thread Umesh Kalappa
Thank you all for your comments . Wilco, We tried some of the normalisation numbers and the fix works and please could you help us with the input ,where if you see that fix breaks down. Thank you again ~Umesh On Fri, Jul 20, 2018, 7:07 PM Wilco Dijkstra wrote: > Hi Umesh, > > Looking at your

Re: [Patch-86512]: Subnormal float support in armv7(with -msoft-float) for intrinsics

2018-07-20 Thread Wilco Dijkstra
Umesh Kalappa wrote: > We tried some of the normalisation numbers and the fix works and please > could you help us with the input ,where  if you see that fix breaks down. Well try any set of inputs which require normalisation. You'll find these no longer get normalised and so will get incorrect

Re: [PATCH] fix a couple of bugs in const string folding (PR 86532)

2018-07-20 Thread Bernd Edlinger
Martin, when I look at tree-ssa-forwprop.c: str1 = string_constant (src1, ); if (str1 == NULL_TREE) break; if (!tree_fits_uhwi_p (off1) || compare_tree_int (off1, TREE_STRING_LENGTH (str1) - 1) > 0

Re: RFC: Patch to implement Aarch64 SIMD ABI

2018-07-20 Thread Steve Ellcey
On Fri, 2018-07-20 at 11:11 +, Wilco Dijkstra wrote: > Steve Ellcey wrote: > > > Yes, I see where I missed this in aarch64_push_regs > > and aarch64_pop_regs.  I think that is why the second of > > Wilco's two examples (f2) is wrong.  I am unclear about > > exactly what is meant by writeback

Re: [PATCH][GCC][front-end][build-machinery][opt-framework] Allow setting of stack-clash via configure options. [Patch (4/6)]

2018-07-20 Thread Jeff Law
On 07/20/2018 05:03 AM, Tamar Christina wrote: >> Understood. Thanks for verifying. I wonder if we could just bury this >> entirely >> in the aarch64 config files and not expose the default into params.def? >> > > Burying it in config.gcc isn't ideal because if your C runtime is >

Re: [PATCH 2/2] Add "-fsave-optimization-record"

2018-07-20 Thread David Malcolm
On Thu, 2018-07-19 at 14:39 +0200, Richard Biener wrote: > On Wed, Jul 11, 2018 at 12:53 PM David Malcolm > wrote: > > > > This patch implements a -fsave-optimization-record option, which > > leads to a JSON file being written out, recording the dump_* calls > > made (via the optinfo

RE: [PATCH][GCC][front-end][build-machinery][opt-framework] Allow setting of stack-clash via configure options. [Patch (4/6)]

2018-07-20 Thread Tamar Christina
> > On 07/20/2018 05:03 AM, Tamar Christina wrote: > >> Understood. Thanks for verifying. I wonder if we could just bury > >> this entirely in the aarch64 config files and not expose the default into > params.def? > >> > > > > Burying it in config.gcc isn't ideal because if your C runtime is >

Re: [PATCH] restore -Warray-bounds for string literals (PR 83776)

2018-07-20 Thread Martin Sebor
On 07/20/2018 05:34 AM, Rainer Orth wrote: Hi Martin, On 07/19/2018 03:51 PM, Jeff Law wrote: On 07/13/2018 05:45 PM, Martin Sebor wrote: + offset_int ofr[] = { + wi::to_offset (fold_convert (ptrdiff_type_node, vr->min)), + wi::to_offset (fold_convert (ptrdiff_type_node,

[PATCH] -fsave-optimization-record: add contrib/optrecord.py

2018-07-20 Thread David Malcolm
This patch adds a Python 3 module to "contrib" for reading the output of -fsave-optimization-record. It can be imported from other Python code, or run standalone as a script, in which case it prints the saved messages in a form resembling GCC diagnostics. OK for trunk? contrib/ChangeLog:

[PATCH][Middle-end][version 2]change char type to unsigned char type when expanding strcmp/strncmp

2018-07-20 Thread Qing Zhao
Hi, this is the 2nd version of the change, mainly addressed Jakub’s comments: 1. Give up the inlining expansion for strcmp/strncmp/memcmp on a target where the type of the call has same or narrower presicion than unsigned char. 2. add conversions before expand_simple_binop to the two operands.

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

2018-07-20 Thread Mike Crowe
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. Now that wait_until has potentially-different

[PATCH] libsanitizer: Mark REAL(swapcontext) with indirect_return attribute on x86

2018-07-20 Thread H.J. Lu
Cherry-pick compiler-rt revision 337603: When shadow stack from Intel CET is enabled, the first instruction of all indirect branch targets must be a special instruction, ENDBR. lib/asan/asan_interceptors.cc has ... int res = REAL(swapcontext)(oucp, ucp); ... REAL(swapcontext) is a function

Re: [PATCH] fix a couple of bugs in const string folding (PR 86532)

2018-07-20 Thread Bernd Edlinger
I think I have found a valid test case where the latest patch does generate invalid code: $ cat part.c static const char a[3][8] = { "1234", "12345", "123456" }; int main () { volatile int i = 1; int n = __builtin_strlen (*([1]+i)); if (n != 6) __builtin_abort (); } $ gcc part.c

[committed] libcpp: remove redundant parameter from rich_location::set_range

2018-07-20 Thread David Malcolm
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Committed to trunk as r262913. gcc/c-family/ChangeLog: * c-common.c (c_cpp_error): Remove redundant "line_table" parameter from call to rich_location::set_range. (maybe_suggest_missing_token_insertion):

[PATCH] Fix PR70828 - broken array-type subarrays inside acc data, in OpenACC

2018-07-20 Thread Cesar Philippidis
Attached is an old gomp-4_0-branch that fixes PR70828. Besides for fixing the PR, it also introduces some changes which will enable the forthcoming nvptx vector length enhancements. More details on the patch can be found here I

Re: [PATCH] fix a couple of bugs in const string folding (PR 86532)

2018-07-20 Thread Martin Sebor
On 07/20/2018 08:51 AM, Bernd Edlinger wrote: Martin, when I look at tree-ssa-forwprop.c: str1 = string_constant (src1, ); if (str1 == NULL_TREE) break; if (!tree_fits_uhwi_p (off1) || compare_tree_int (off1,

Re: [PATCH] specify large command line option arguments (PR 82063)

2018-07-20 Thread Martin Sebor
On 07/19/2018 04:31 PM, Jeff Law wrote: On 06/24/2018 03:05 PM, Martin Sebor wrote: Storing integer command line option arguments in type int limits options such as -Wlarger-than= or -Walloca-larger-than to at most INT_MAX (see bug 71905). Larger values wrap around zero. The value zero is

[Patch, Fortran] PR 57160: short-circuit IF only with -ffrontend-optimize

2018-07-20 Thread Janus Weil
Hi all, here is a follow-up patch to my recent commit for PR 85599, also dealing with the short-circuiting of logical operators. In the course of the extensive discussion of that PR it became clear that the Fortran standard allows the short-circuiting of .AND. and .OR. operators, but does not

[PATCH] Enable firstprivate OpenACC reductions

2018-07-20 Thread Cesar Philippidis
At present, all reduction variables are transferred via an implicit 'copy' clause. As shown the the recent patches I've been posting, that causes a lot of problems when the reduction variables are used by multiple workers or vectors. This patch teaches the gimplifier to transfer reduction variable

[PATCH] Adjust offsets for present data clauses

2018-07-20 Thread Cesar Philippidis
This is another old gomp4 patch that corrects a bug where the runtime was passing the wrong offset for subarray data to the accelerator. The original description of this patch can be found here I bootstrapped and regtested on

committed: remove redundant -Wall from -Warray-bounds (PR 82063)

2018-07-20 Thread Martin Sebor
As the last observation in PR 82063 Jim points out that Both -Warray-bounds and -Warray-bounds= are listed in the c.opt file as being enabled by -Wall, but they are the same option, and it causes this one option to be processed twice in the C_handle_option_auto function in the generated

[PATCH] Add support for making maps 'private' inside OpenACC offloaded regions

2018-07-20 Thread Cesar Philippidis
Due to the different levels of parallelism available in OpenACC, it is useful to mark certain variables as GOMP_MAP_PRIVATE so that they can be used in reductions. This patch was introduced in openacc-gcc-7-branch here . I bootstrapped

[PATCH] Privatize independent OpenACC reductions

2018-07-20 Thread Cesar Philippidis
This is another OpenACC reduction patch to privatize reduction variables used inside inner acc loops. For some reason, I can't find the original email announcement on the gcc-patches mailing list. But according to the ChangeLog, I committed that change to og7 back on Jan 26, 2018. I bootstrapped

[PATCH] i386: Remove _Unwind_Frames_Increment

2018-07-20 Thread H.J. Lu
Tested on CET SDV using the CET kernel on cet branch at: https://github.com/yyu168/linux_cet/tree/cet OK for trunk and GCC 8 branch? Thanks. H.J. --- The CET kernel has been changed to place a restore token on shadow stack for signal handler to enhance security. It is usually transparent to

Re: [PATCH][Middle-end][version 2]change char type to unsigned char type when expanding strcmp/strncmp

2018-07-20 Thread Qing Zhao
the patch was committed as: https://gcc.gnu.org/viewcvs/gcc?view=revision=262907 thanks. Qing > On Jul 20, 2018, at 9:59 AM, Jakub Jelinek wrote: > > On Fri, Jul 20, 2018 at 09:53:24AM -0500, Qing Zhao wrote: >> +2018-07-20 Qing Zhao

Go patch committed: Fix order of evaluation of boolean expressions

2018-07-20 Thread Ian Lance Taylor
This patch by Cherry Zhang changes the Go frontend to run the order_evaluations before the remove_shortcuts pass. In remove_shortcuts, the shortcut expressions (&&, ||) are rewritten to if statements, which are lifted out before the statement containing the shortcut expression. If the containing

[PATCH,rs6000] AIX test fixes 2

2018-07-20 Thread Carl Love
GCC maintainers: The following patch fixes errors on AIX for the "vector double" tests in altivec-1-runnable.c file. The type "vector double" requires the use of the GCC command line option -mvsx. The vector double tests in altivec-1-runnable.c should be in altivec-2-runnable.c. It looks like

Re: [RFC] Induction variable candidates not sufficiently general

2018-07-20 Thread Bin.Cheng
On Tue, Jul 17, 2018 at 2:08 AM, Kelvin Nilsen wrote: > Thanks for looking at this for me. In simplifying the test case for a bug > report, I've narrowed the "problem" to integer overflow considerations. My > len variable is declared int, and the target has 64-bit pointers. I'm > gathering

Re: [PATCH] fix a couple of bugs in const string folding (PR 86532)

2018-07-20 Thread Martin Sebor
On 07/20/2018 03:11 PM, Bernd Edlinger wrote: I think I have found a valid test case where the latest patch does generate invalid code: This is due to another bug in string_constant() that's latent on trunk but that's exposed by the patch. Trunk only "works" because of a bug/limitation in