RE: [committed][PATCH][GCC][testsuite][Arm] fix testism, add required option after require.

2019-01-14 Thread Tamar Christina
Hi Christoph, Thanks for the report, It seems we're really inconsistent with lane index endianness on arm, patch is going through Final bootstrap and regtesting to send out. With the AArch64 patch this should take care of all big-endian issues. I'm hoping to fix the endianness stuff for Arm in

Re: ISO_Fortran_binding patch

2019-01-14 Thread Richard Biener
On January 15, 2019 12:07:53 AM GMT+01:00, Jakub Jelinek wrote: >On Sat, Jan 12, 2019 at 06:35:20PM +, Paul Richard Thomas wrote: >> Done as revision 267884. > >The other tests FAILs too: >FAIL: gfortran.dg/ISO_Fortran_binding_1.f90 -O0 (test for excess >errors) >UNRESOLVED:

Re: [PATCH] match.pd (uintptr_t) ptr1 [=!]= (uintptr_t) ptr2 improvements (PR tree-optimization/88775)

2019-01-14 Thread Richard Biener
On January 15, 2019 12:17:49 AM GMT+01:00, Jakub Jelinek wrote: >Hi! > >The following patch (except for the else if (!INTEGRAL_TYPE_P ) part is >(improved) code to fix up the ptr1 != ptr2 comparison handling. >Unfortunately it looks like we don't really want to lower pointer >equality

PR88788 - Infinite loop in malloc_candidate_p_1

2019-01-14 Thread Prathamesh Kulkarni
Hi Richard, I tested your fix and it passes bootstrap+test on x86_64-unknown-linux-gnu and cross-tested on following arm and aarch64 sub-targets: http://people.linaro.org/~christophe.lyon/cross-validation/gcc-test-patches/267917-pr88788-3/report-build-info.html Is it OK to commit ? Thanks,

Re: [REVISED PATCH 2/9]: C++ P0482R5 char8_t: Core language support

2019-01-14 Thread Christophe Lyon
On Mon, 14 Jan 2019 at 20:59, Jason Merrill wrote: > > On 12/23/18 9:27 PM, Tom Honermann wrote: > > Attached is a revised patch that addresses changes in P0482R6 as well as > > feedback provided by Jason. Changes from the prior patch include: > > - Updated the value of the __cpp_char8_t feature

Re: [WIP] Reimplementation of IPA-SRA

2019-01-14 Thread Martin Liška
On 1/2/19 2:20 PM, Martin Liška wrote: On 12/30/18 12:41 AM, Martin Jambor wrote: Any comments welcome, Hi Martin. I'll run smoke test for OBS Factory with -flto flags enabled for the patch. So far I've noticed that current trunk can't profilebootstrap with following configuration: $

Re: [REVISED PATCH 1/9]: C++ P0482R5 char8_t: Documentation updates

2019-01-14 Thread Tom Honermann
On 1/4/19 7:40 PM, Martin Sebor wrote: On 12/23/18 7:27 PM, Tom Honermann wrote: Attached is a revised patch that addresses feedback provided by Jason and Sandra.  Changes from the prior patch include: - Updates to the -fchar8_t option documentation as requested by Jason. - Corrections for

Re: PATCH: Updated error messages for ill-formed cases of array initialization by string literal

2019-01-14 Thread Tom Honermann
On 1/4/19 7:25 PM, Martin Sebor wrote: On 12/27/18 1:49 PM, Tom Honermann wrote: As requested by Jason in the review of the P0482 (char8_t) core language changes, this patch includes updates to the error messages emitted for ill-formed cases of array initialization with a string literal. 

Re: [REVISED PATCH 2/9]: C++ P0482R5 char8_t: Core language support

2019-01-14 Thread Tom Honermann
On 1/14/19 2:58 PM, Jason Merrill wrote: On 12/23/18 9:27 PM, Tom Honermann wrote: Attached is a revised patch that addresses changes in P0482R6 as well as feedback provided by Jason. Changes from the prior patch include: - Updated the value of the __cpp_char8_t feature test macro to 201811   

Re: ISO_Fortran_binding patch

2019-01-14 Thread Steve Kargl
On Tue, Jan 15, 2019 at 12:07:53AM +0100, Jakub Jelinek wrote: > On Sat, Jan 12, 2019 at 06:35:20PM +, Paul Richard Thomas wrote: > > Done as revision 267884. > > Where is that header installed BTW? > Would be best if it got installed in directories like: >

[PATCH] avoid issuing -Warray-bounds during folding (PR 88800)

2019-01-14 Thread Martin Sebor
The gimple_fold_builtin_memory_op() function folds calls to memcpy and similar to MEM_REF when the size of the copy is a small power of 2, but it does so without considering whether the copy might write (or read) past the end of one of the objects. To detect these kinds of errors (and help

Re: [PATCH] c-family: Update unaligned adress of packed member check

2019-01-14 Thread H.J. Lu
On Mon, Jan 14, 2019 at 10:00 AM H.J. Lu wrote: > > On Mon, Jan 14, 2019 at 6:22 AM Jakub Jelinek wrote: > > > > On Sun, Jan 13, 2019 at 06:54:05AM -0800, H.J. Lu wrote: > > > > What always matters is whether we take address of a packed structure > > > > field/non-static data member or whether

[PATCH] match.pd (uintptr_t) ptr1 [=!]= (uintptr_t) ptr2 improvements (PR tree-optimization/88775)

2019-01-14 Thread Jakub Jelinek
Hi! The following patch (except for the else if (!INTEGRAL_TYPE_P ) part is (improved) code to fix up the ptr1 != ptr2 comparison handling. Unfortunately it looks like we don't really want to lower pointer equality comparisons performed in integral type to normal pointer equality comparisons for

Re: ISO_Fortran_binding patch

2019-01-14 Thread Jakub Jelinek
On Sat, Jan 12, 2019 at 06:35:20PM +, Paul Richard Thomas wrote: > Done as revision 267884. The other tests FAILs too: FAIL: gfortran.dg/ISO_Fortran_binding_1.f90 -O0 (test for excess errors) UNRESOLVED: gfortran.dg/ISO_Fortran_binding_1.f90 -O0 compilation failed to produce executable

Re: [Patch 2/4][Aarch64] v2: Implement Aarch64 SIMD ABI

2019-01-14 Thread Richard Sandiford
Steve Ellcey writes: > On Fri, 2019-01-11 at 14:45 +, Richard Sandiford wrote: >> >> > + >> > +/* Return true for types that could be supported as SIMD return or >> > + argument types. */ >> > + >> > +static bool supported_simd_type (tree t) >> > +{ >> > + return (FLOAT_TYPE_P (t) ||

Re: C++ PATCH for c++/88825 - ICE with bogus function return type deduction

2019-01-14 Thread Jason Merrill
On 1/14/19 3:15 PM, Marek Polacek wrote: On Mon, Jan 14, 2019 at 03:06:33PM -0500, Jason Merrill wrote: On 1/13/19 9:11 PM, Marek Polacek wrote: In this (invalid) testcase the return type deduction failed so FUNCTYPE was error_mark_node and can_do_nrvo_p crashed. One way to fix this would be

Re: warnings about unused shared_ptr/unique_ptr comparisons

2019-01-14 Thread Jonathan Wakely
On 14/01/19 16:53 +0100, Ulrich Drepper wrote: This is a conservative implementation of a patch to make shared/unique_ptrs behave more like plain old pointers. More about this in bug #88738 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88738 The summary is - using clang, which enables a

Re: Fix random_sample_n and random_shuffle when RAND_MAX is small

2019-01-14 Thread Jonathan Wakely
On 12/12/18 22:31 +0100, Giovanni Bajo wrote: Hello, we hit a bug today while cross-compiling a C++ program with mingw32: if random_shuffle or random_sample_n are called with a sequence of elements whose length is higher than RAND_MAX, the functions don't behave as expected because they ignore

Re: [PING] [PATCH v5][C][ADA] use function descriptors instead of trampolines in C

2019-01-14 Thread Jeff Law
On 1/13/19 2:18 PM, Uecker, Martin wrote: > > Does this patch have a change? This version seems risk-free and > is a clear improvement from simply doing nothing for  > '-fno-trampolines'. Also it is useful in situations where > one cannot have an executable stack. > > > I am currently thinking

Re: C++ PATCH for c++/88825 - ICE with bogus function return type deduction

2019-01-14 Thread Marek Polacek
On Mon, Jan 14, 2019 at 03:06:33PM -0500, Jason Merrill wrote: > On 1/13/19 9:11 PM, Marek Polacek wrote: > > In this (invalid) testcase the return type deduction failed so FUNCTYPE was > > error_mark_node and can_do_nrvo_p crashed. One way to fix this would be to > > check error_operand_p as

Re: [C++ Patch] Fix locations of two "typedef is initialized" errors

2019-01-14 Thread Jason Merrill
On 1/13/19 6:33 PM, Paolo Carlini wrote: Hi, I think we need this patch too in order to have consistent locations for the set of error messages about invalid initializers - most of which I changed in patch 23 of this series - and also in order to have consistent locations for the two cases -

Re: [C++ Patch] Improve grokbitfield location

2019-01-14 Thread Jason Merrill
On 1/13/19 6:21 PM, Paolo Carlini wrote: Hi, today I realized that if we move further up the "famous" location_t loc declaration in grokdeclarator we can often pass a precise location when building TYPE_DECLs for typedef names too, thus, in particular, profitably use DECL_SOURCE_LOCATION in

Re: [C++ PATCH] Add __cpp_guaranteed_copy_elision and __cpp_nontype_template_parameter_auto

2019-01-14 Thread Jason Merrill
On 1/12/19 8:36 AM, Jakub Jelinek wrote: Hi! So, from what I can understand, __cpp_guaranteed_copy_elision is a C++17 P0135R1 feature test macro for a feature we claim to support, and __cpp_nontype_template_parameter_auto is a new name for the __cpp_template_auto macro (which doesn't appear

Re: C++ PATCH for c++/88825 - ICE with bogus function return type deduction

2019-01-14 Thread Jason Merrill
On 1/13/19 9:11 PM, Marek Polacek wrote: In this (invalid) testcase the return type deduction failed so FUNCTYPE was error_mark_node and can_do_nrvo_p crashed. One way to fix this would be to check error_operand_p as below. Bootstrapped/regtested on x86_64-linux, ok for trunk? 2019-01-13

Re: C++ PATCH for c++/88830 - ICE with abstract class

2019-01-14 Thread Jason Merrill
On 1/14/19 10:41 AM, Marek Polacek wrote: On Mon, Jan 14, 2019 at 12:10:14PM +0100, Jakub Jelinek wrote: On Sun, Jan 13, 2019 at 09:07:00PM -0500, Marek Polacek wrote: diff --git gcc/cp/decl2.c gcc/cp/decl2.c index e4cf4e0a361..7b656712471 100644 --- gcc/cp/decl2.c +++ gcc/cp/decl2.c @@

Re: [REVISED PATCH 2/9]: C++ P0482R5 char8_t: Core language support

2019-01-14 Thread Jason Merrill
On 12/23/18 9:27 PM, Tom Honermann wrote: Attached is a revised patch that addresses changes in P0482R6 as well as feedback provided by Jason.  Changes from the prior patch include: - Updated the value of the __cpp_char8_t feature test macro to 201811   per P0482R6. - Enable char8_t support

Re: [PATCH] restore CFString handling in attribute format (PR 88638)

2019-01-14 Thread Martin Sebor
On 1/5/19 2:41 PM, Dominique d'Humières wrote: Hi Martin, The patch on top of r267591 fixes pr88638 without regression. Note FAIL: c-c++-common/attributes-4.c -std=gnu++14 (test for excess errors) FAIL: c-c++-common/attributes-4.c -std=gnu++17 (test for excess errors) FAIL:

Re: [PATCH][rs6000] avoid using unaligned vsx or lxvd2x/stxvd2x for memcpy/memmove inline expansion

2019-01-14 Thread Aaron Sawdey
The patch for this was committed to trunk as 267562 (see below). Is this also ok for backport to 8? Thanks, Aaron On 12/20/18 5:44 PM, Segher Boessenkool wrote: > On Thu, Dec 20, 2018 at 05:34:54PM -0600, Aaron Sawdey wrote: >> On 12/20/18 3:51 AM, Segher Boessenkool wrote: >>> On Wed, Dec

[PATCH] c-family: Update unaligned adress of packed member check

2019-01-14 Thread H.J. Lu
On Mon, Jan 14, 2019 at 6:22 AM Jakub Jelinek wrote: > > On Sun, Jan 13, 2019 at 06:54:05AM -0800, H.J. Lu wrote: > > > What always matters is whether we take address of a packed structure > > > field/non-static data member or whether we just read that field. > > > The former should be warned

Re: [PATCH AutoFDO]Restoring indirect call value profile transformation

2019-01-14 Thread Andi Kleen
On Mon, Jan 14, 2019 at 04:15:20PM +0800, Bin.Cheng wrote: > On Mon, Jan 14, 2019 at 4:07 PM Andi Kleen wrote: > > > > Bin Cheng, > > > > I did some testing on this now. The attached patch automatically increases > > the iterations > > for autofdo profiles. > Hi Andi, thanks very much for tuning

Re: Set inline-unit-growth to 40

2019-01-14 Thread Qing Zhao
Hi, Honza, in addition to the code size problems, there are several runtime regression for the SPEC: (If I read the table correctly, if not, let me know) SPEC/SPEC2006/INT/483.xalancbmk 146.131 4.89%

Re: Set inline-unit-growth to 40

2019-01-14 Thread Jan Hubicka
Hello, > > Index: params.def > > === > > --- params.def (revision 267882) > > +++ params.def (working copy) > > @@ -227,7 +227,7 @@ DEFPARAM(PARAM_LARGE_UNIT_INSNS, > > DEFPARAM(PARAM_INLINE_UNIT_GROWTH, > >

Re: Set inline-unit-growth to 40

2019-01-14 Thread Christophe Lyon
Hi Honza, On Sat, 12 Jan 2019 at 19:32, Jan Hubicka wrote: > > Hello, > this patch sets inline-unit-growth to 40. The performance changes are > - Firefox, LTO > >

Re: [PATCH] Fix location of tls_wrapper_fn (PR gcov-profile/88263).

2019-01-14 Thread Jason Merrill
On 1/14/19 10:43 AM, Martin Liška wrote: Hi. This is another fix for the PR where I updated location of tls_wrapper. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? OK. Jason

Re: warnings about unused shared_ptr/unique_ptr comparisons

2019-01-14 Thread Kyrill Tkachov
On 14/01/19 15:53, Ulrich Drepper wrote: This is a conservative implementation of a patch to make shared/unique_ptrs behave more like plain old pointers. More about this in bug #88738 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88738 The summary is - using clang, which enables a warning for

warnings about unused shared_ptr/unique_ptr comparisons

2019-01-14 Thread Ulrich Drepper
This is a conservative implementation of a patch to make shared/unique_ptrs behave more like plain old pointers. More about this in bug #88738 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88738 The summary is - using clang, which enables a warning for unused results of all comparison

[PATCH] Fix location of tls_wrapper_fn (PR gcov-profile/88263).

2019-01-14 Thread Martin Liška
Hi. This is another fix for the PR where I updated location of tls_wrapper. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin >From 07811d1057196abad898c9aeda08cd9113aedf70 Mon Sep 17 00:00:00 2001 From: marxin Date: Mon, 14 Jan 2019

Re: C++ PATCH for c++/88830 - ICE with abstract class

2019-01-14 Thread Marek Polacek
On Mon, Jan 14, 2019 at 12:10:14PM +0100, Jakub Jelinek wrote: > On Sun, Jan 13, 2019 at 09:07:00PM -0500, Marek Polacek wrote: > > diff --git gcc/cp/decl2.c gcc/cp/decl2.c > > index e4cf4e0a361..7b656712471 100644 > > --- gcc/cp/decl2.c > > +++ gcc/cp/decl2.c > > @@ -2229,7 +2229,8 @@

Re: add tsv110 pipeline scheduling

2019-01-14 Thread Kyrill Tkachov
Hi Wuyuan, On 14/01/19 14:02, wuyuan (E) wrote: Hi Kyrill: The gcc 7.3.0 does not discard the store1 and load1 command; I did not expect the community's latest gcc changes so large . now I downloaded the latest GCC code, put the patch into GCC source code, the compiler

[PATCH]: Mention -Waddress-of-packed-member change in GCC 9

2019-01-14 Thread H.J. Lu
OK to install? H.J. --- Index: changes.html === RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-9/changes.html,v retrieving revision 1.34 diff -u -p -r1.34 changes.html --- changes.html13 Jan 2019 17:40:11 - 1.34 +++

Re: [PATCH] C-family: Only check the non-pointer data member

2019-01-14 Thread Jakub Jelinek
On Sun, Jan 13, 2019 at 06:54:05AM -0800, H.J. Lu wrote: > > What always matters is whether we take address of a packed structure > > field/non-static data member or whether we just read that field. > > The former should be warned about, the latter not. > > > > How about this patch? It checks if

Re: PATCH: Add -Waddress-of-packed-member to GCC 9 porting guide

2019-01-14 Thread H.J. Lu
On Mon, Jan 14, 2019 at 5:53 AM Richard Biener wrote: > > On Mon, Jan 14, 2019 at 2:46 PM H.J. Lu wrote: > > > > This patch adds -Waddress-of-packed-member to GCC 9 porting guide. > > > > OK to install? > > The docs fail to mention what to do when the unaligned pointer is _not_ > safe to use.

Re: [PATCH][RFC] Extend locations where to seach for Fortran pre-include.

2019-01-14 Thread Martin Liška
On 1/11/19 7:06 PM, Joseph Myers wrote: > On Fri, 11 Jan 2019, Martin Liška wrote: > >> +/* Same as add_prefix, but prepending target_sysroot_hdrs_suffix to prefix. >> */ > > Actually, it should be prepending target_system_root, but followed by > target_sysroot_hdrs_suffix rather than

Re: add tsv110 pipeline scheduling

2019-01-14 Thread wuyuan (E)
Hi Kyrill: The gcc 7.3.0 does not discard the store1 and load1 command; I did not expect the community's latest gcc changes so large . now I downloaded the latest GCC code, put the patch into GCC source code, the compiler can pass, thank you very much for your work!

[PATCH][GCC][AArch64] Fix big-endian neon-intrinsics ICEs

2019-01-14 Thread Tamar Christina
Hi All, This patch fixes some ICEs when the fcmla_lane intrinsics are used on big endian by correcting the lane indices and removing the hardcoded byte offset from subreg calls and instead use subreg_lowpart_offset. Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. Cross compiled

Re: [PATCH, OpenACC] Properly handle wait clause with no arguments

2019-01-14 Thread Chung-Lin Tang
Hi Thomas, this version of the wait-clause-with-no-args patch revises the following: (1) The way the Fortran FE parts are implemented, which essentially is your code. (I'll reflect that in the final ChangeLog) (2) Instead of trying to encode ACC_ASYNC_NOVAL into num_waits, I've followed your

Re: [PATCH v3 00/10] AMD GCN Port v3

2019-01-14 Thread Andrew Stubbs
On 11/01/2019 23:19, Jeff Law wrote: And I think the V3 patch is reasonable enough to go in now. There's some concerns that have been raised with the implementation, but I'm comfortable with Andrew faulting in fixes if those concerns turn into real issues. Andrew, you're green-lighted for the

Re: PATCH: Add -Waddress-of-packed-member to GCC 9 porting guide

2019-01-14 Thread Richard Biener
On Mon, Jan 14, 2019 at 2:46 PM H.J. Lu wrote: > > This patch adds -Waddress-of-packed-member to GCC 9 porting guide. > > OK to install? The docs fail to mention what to do when the unaligned pointer is _not_ safe to use. That is, how do I fix struct { char c; int i[4]; } s

PATCH: Add -Waddress-of-packed-member to GCC 9 porting guide

2019-01-14 Thread H.J. Lu
This patch adds -Waddress-of-packed-member to GCC 9 porting guide. OK to install? Thanks. H.J. --- Index: gcc-9/porting_to.html === RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-9/porting_to.html,v retrieving revision 1.1 diff -u -r1.1

Re: [committed][PATCH][GCC][testsuite][Arm] fix testism, add required option after require.

2019-01-14 Thread Christophe Lyon
Hi Tamar, On Fri, 11 Jan 2019 at 15:22, Tamar Christina wrote: > > Hi All, > > The test declared the fp16 requirement, but didn't add the options causing it > to > fail when the target doesn't have it on by default. > > Bootstrapped Regtested on arm-none-Linux-gnueabihf and no issues. > >

[PATCH] Improve match.pd dumping

2019-01-14 Thread Richard Biener
This distinguishes (match ...) from (simplify ...) where the former doesn't really mean we apply some pattern but rather we have matched some expression. Committed as obvious. Richard. 2019-01-14 Richard Biener * genmatch.c (dt_simplify::gen_1): Change dumping dependent on

Re: [PATCH, testsuite] Skip new charset tests on Darwin8-10.

2019-01-14 Thread Jonathan Wakely
On 12/01/19 16:46 +, Iain Sandoe wrote: Hi, These earlier Darwin versions have “FP_≈” inside a comment in architecture/{ppc,i386}/math.h, which is included by math.h which causes the tests to fail. The intent of the tests (i.e. to ensure that the library itself does not emit non-ascii)

Re: [PATCH] Improve RTL DSE with -fstack-protector* (PR rtl-optimization/88796)

2019-01-14 Thread Richard Biener
On Fri, 11 Jan 2019, Jakub Jelinek wrote: > On Fri, Jan 11, 2019 at 01:53:21PM +0100, Richard Biener wrote: > > >The canary slot in the stack frame is written in the prologue using > > >MEM_VOLATILE_P store, so we never consider those to be DSEd and is only > > >read > > >in the epilogue, so it

Re: C++ PATCH for c++/88830 - ICE with abstract class

2019-01-14 Thread Jakub Jelinek
On Sun, Jan 13, 2019 at 09:07:00PM -0500, Marek Polacek wrote: > diff --git gcc/cp/decl2.c gcc/cp/decl2.c > index e4cf4e0a361..7b656712471 100644 > --- gcc/cp/decl2.c > +++ gcc/cp/decl2.c > @@ -2229,7 +2229,8 @@ maybe_emit_vtables (tree ctype) > never get generated. */ >if

Re: [PATCH 10/10] libiberty: Correct an invalid assumption

2019-01-14 Thread Iain Buclaw
On Fri, 11 Jan 2019 at 01:20, Ben L wrote: > > Hi all, > > First time emailing gcc-patches, so I'm sorry if I get any of this wrong or if > there's obvious errors repeated in my patches. AFAICT I should be sending each > change individually rather than as one bulk patch, so I'm sorry about the

Re: [PATCH 3/3][GCC][AARCH64] Add support for pointer authentication B key

2019-01-14 Thread Kyrill Tkachov
On 08/01/19 11:38, Sam Tebbs wrote: On 1/7/19 6:28 PM, James Greenhalgh wrote: > On Fri, Dec 21, 2018 at 09:00:10AM -0600, Sam Tebbs wrote: >> On 11/9/18 11:04 AM, Sam Tebbs wrote: > > > >> Attached is an improved patch with "hint" removed from the test scans, >> pauth_hint_num_a and

Re: [PATCH] Use __builtin_is_constant_evaluated in std::less etc. (PR tree-optimization/88775)

2019-01-14 Thread Richard Biener
On Mon, Jan 14, 2019 at 10:21 AM Jonathan Wakely wrote: > > On Mon, 14 Jan 2019 at 09:17, Richard Biener > wrote: > > > > On Mon, Jan 14, 2019 at 9:42 AM Jakub Jelinek wrote: > > > > > > On Mon, Jan 14, 2019 at 09:29:03AM +0100, Richard Biener wrote: > > > > So why is this not just > > > > > >

[PATCH, d] Committed merge with upstream dmd

2019-01-14 Thread Iain Buclaw
Hi, This patch merges the D front-end implementation with dmd upstream cd2034cd7. One fix in the asm statement parser to stop parsing if the end of the statement has been reached, and moves all inline asm tests to gdc.dg. These being adjusted where necessary to test the GCC style instead.

Re: add tsv110 pipeline scheduling

2019-01-14 Thread Kyrill Tkachov
Hi Wuyuan, On 13/01/19 09:36, wuyuan (E) wrote: Hi Kyrill: Thank you very much for your to review my patch. I have modified the code accordingly to your opinion. first, mul64 was renamed to widen_mul64, and use load_4, load_8 to loading 4 and 8 bytes in the latest version of GCC.

Re: [PATCH] Use __builtin_is_constant_evaluated in std::less etc. (PR tree-optimization/88775)

2019-01-14 Thread Jonathan Wakely
On Mon, 14 Jan 2019 at 09:17, Richard Biener wrote: > > On Mon, Jan 14, 2019 at 9:42 AM Jakub Jelinek wrote: > > > > On Mon, Jan 14, 2019 at 09:29:03AM +0100, Richard Biener wrote: > > > So why is this not just > > > > > > return (__UINTPTR_TYPE__)__x > (__UINTPTR_TYPE__)__y; > > > > > > or

Re: [PATCH] Use __builtin_is_constant_evaluated in std::less etc. (PR tree-optimization/88775)

2019-01-14 Thread Jonathan Wakely
On Mon, 14 Jan 2019 at 09:17, Richard Biener wrote: > > On Mon, Jan 14, 2019 at 9:42 AM Jakub Jelinek wrote: > > > > On Mon, Jan 14, 2019 at 09:29:03AM +0100, Richard Biener wrote: > > > So why is this not just > > > > > > return (__UINTPTR_TYPE__)__x > (__UINTPTR_TYPE__)__y; > > > > > > or

Re: [PATCH] Use __builtin_is_constant_evaluated in std::less etc. (PR tree-optimization/88775)

2019-01-14 Thread Jonathan Wakely
On Mon, 14 Jan 2019 at 08:29, Richard Biener wrote: > > On Thu, Jan 10, 2019 at 10:02 AM Jakub Jelinek wrote: > > > > Hi! > > > > In Marc's testcase, we generate terrible code for std::string assignment, > > because the __builtin_constant_p is kept in the IL for way too long and the > >

Re: [PATCH] Use __builtin_is_constant_evaluated in std::less etc. (PR tree-optimization/88775)

2019-01-14 Thread Richard Biener
On Mon, Jan 14, 2019 at 9:42 AM Jakub Jelinek wrote: > > On Mon, Jan 14, 2019 at 09:29:03AM +0100, Richard Biener wrote: > > So why is this not just > > > > return (__UINTPTR_TYPE__)__x > (__UINTPTR_TYPE__)__y; > > > > or with the casts elided? Does the C++ standard say pointers are > > to be

Re: [PATCH 2/3] Fix autoprofiledbootstrap

2019-01-14 Thread Bin.Cheng
On Mon, Jan 14, 2019 at 4:20 PM Andi Kleen wrote: > > From: Andi Kleen > > autoprofiledbootstrap fails currently with > > In file included from ../../gcc/gcc/hash-table.h:236, > from ../../gcc/gcc/coretypes.h:440, > from ../../gcc/gcc/ipa-devirt.c:110: > In

Re: [PATCH 3/3] Increase iterations for autofdo tests

2019-01-14 Thread Richard Biener
On Mon, Jan 14, 2019 at 9:20 AM Andi Kleen wrote: > > From: Andi Kleen > > Bin cheng pointed out that the autofdo tests are unstable because they > don't have enough iterations for the perf sampling to get enough data. > > Increase the iterations, but only for autofdo. This avoids any impact >

Re: [PATCH 1/3] Lower sampling rate for autofdo bootstrap

2019-01-14 Thread Richard Biener
On Mon, Jan 14, 2019 at 9:20 AM Andi Kleen wrote: > > From: Andi Kleen > > autofdo create_gcov uses a lot of memory for large sample files. > Since gcc runs quite long the sample files generated during > the bootstrap are fairly ig. > > Currently I can't even build make autoprofiledbootstrap on

Re: [PATCH 2/3] Fix autoprofiledbootstrap

2019-01-14 Thread Richard Biener
On Mon, Jan 14, 2019 at 9:20 AM Andi Kleen wrote: > > From: Andi Kleen > > autoprofiledbootstrap fails currently with > > In file included from ../../gcc/gcc/hash-table.h:236, > from ../../gcc/gcc/coretypes.h:440, > from ../../gcc/gcc/ipa-devirt.c:110: > In

Re: [PATCH] Use __builtin_is_constant_evaluated in std::less etc. (PR tree-optimization/88775)

2019-01-14 Thread Jakub Jelinek
On Mon, Jan 14, 2019 at 09:29:03AM +0100, Richard Biener wrote: > So why is this not just > > return (__UINTPTR_TYPE__)__x > (__UINTPTR_TYPE__)__y; > > or with the casts elided? Does the C++ standard say pointers are > to be compared unsigned here? Or do all targets GCC support > lay out the

Re: [PATCH] Use __builtin_is_constant_evaluated in std::less etc. (PR tree-optimization/88775)

2019-01-14 Thread Ville Voutilainen
On Mon, 14 Jan 2019 at 10:29, Richard Biener wrote: > >_GLIBCXX14_CONSTEXPR bool > >operator()(_Tp* __x, _Tp* __y) const _GLIBCXX_NOTHROW > >{ > > +#if __cplusplus >= 201402L > > +#ifdef _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED > > + if

Re: [PATCH] Use __builtin_is_constant_evaluated in std::less etc. (PR tree-optimization/88775)

2019-01-14 Thread Richard Biener
On Thu, Jan 10, 2019 at 10:02 AM Jakub Jelinek wrote: > > Hi! > > In Marc's testcase, we generate terrible code for std::string assignment, > because the __builtin_constant_p is kept in the IL for way too long and the > optimizers (jump threading?) create way too many copies of the >

[PATCH 1/3] Lower sampling rate for autofdo bootstrap

2019-01-14 Thread Andi Kleen
From: Andi Kleen autofdo create_gcov uses a lot of memory for large sample files. Since gcc runs quite long the sample files generated during the bootstrap are fairly ig. Currently I can't even build make autoprofiledbootstrap on my system at home because create_gcov needs more than 12GB and

[PATCH 3/3] Increase iterations for autofdo tests

2019-01-14 Thread Andi Kleen
From: Andi Kleen Bin cheng pointed out that the autofdo tests are unstable because they don't have enough iterations for the perf sampling to get enough data. Increase the iterations, but only for autofdo. This avoids any impact on targets that use a slow emulator, which will never run the host

[PATCH 2/3] Fix autoprofiledbootstrap

2019-01-14 Thread Andi Kleen
From: Andi Kleen autoprofiledbootstrap fails currently with In file included from ../../gcc/gcc/hash-table.h:236, from ../../gcc/gcc/coretypes.h:440, from ../../gcc/gcc/ipa-devirt.c:110: In static member function 'static void va_heap::release(vec*&) [with T =

Re: [PATCH AutoFDO]Restoring indirect call value profile transformation

2019-01-14 Thread Bin.Cheng
On Mon, Jan 14, 2019 at 4:07 PM Andi Kleen wrote: > > Bin Cheng, > > I did some testing on this now. The attached patch automatically increases > the iterations > for autofdo profiles. Hi Andi, thanks very much for tuning these. > > But even with even more iterations I still have stable failures

Re: [PATCH AutoFDO]Restoring indirect call value profile transformation

2019-01-14 Thread Andi Kleen
Bin Cheng, I did some testing on this now. The attached patch automatically increases the iterations for autofdo profiles. But even with even more iterations I still have stable failures in FAIL: gcc.dg/tree-prof/cold_partition_label.c scan-assembler foo[._]+cold FAIL: