Re: [PATCH] Instrument only selected files (PR gcov-profile/87442).

2018-11-11 Thread Martin Liška
On 11/9/18 11:00 PM, Jeff Law wrote: > On 11/8/18 6:42 AM, Martin Liška wrote: >> Hi. >> >> The patch is about possibility to filter which files are instrumented. The >> usage >> is explained in the PR. >> >> Patch can bootstrap and survives regression tests on x86_64-linux-gnu. >> >> Ready for

Fix __gnu_cxx::throw_allocator 2 * O(log(N)) complexity

2018-11-11 Thread François Dumont
When doing some debugging session I noticed that the __gnu_cxx::throw_allocator doubles all lookup on both insert and erase. Using map::insert result and erasing the found iterator avoids this double lookup.     * include/ext/throw_allocator.h     (annotate_base::insert(void*, size_t)): Use

[doc, committed] fix documentation of align type attribute

2018-11-11 Thread Sandra Loosemore
PR69502 notes that the documentation of the align type attribute had gotten out of sync with the corresponding variable attribute with respect to whether decreasing the alignment of a type was permitted. I've checked in this patch to replace the incorrect paragraph with a copy of the correct

Re: [RFC][PR87528][PR86677] Disable builtin popcount detection when back-end does not define it

2018-11-11 Thread Kugan Vivekanandarajah
Hi Richard, Thanks for the review. On Thu, 8 Nov 2018 at 00:03, Richard Biener wrote: > > On Fri, Nov 2, 2018 at 10:02 AM Kugan Vivekanandarajah > wrote: > > > > Hi Richard, > > Thanks for the review. > > On Tue, 30 Oct 2018 at 01:25, Richard Biener > > wrote: > > > > > > On Mon, Oct 29, 2018

[PATCH][LRA] Fix PR87899: r264897 cause mis-compiled native arm-linux-gnueabihf toolchain

2018-11-11 Thread Peter Bergner
Renlin, Jeff and Vlad: requests and questions for you below... PR87899 shows another latent LRA bug exposed by my r264897 commit. In the bugzilla report, we have the following rtl in LRA: (insn 1 (set (reg:SI 1 r1) (reg/f:SI 2040))) ... (insn 2 (set (mem/f/c:SI (pre_modify:SI (reg:SI 1 r1)

Re: [PATCH 2/3] Add a pass to automatically add ptwrite instrumentation

2018-11-11 Thread Andi Kleen
On Sun, Nov 11, 2018 at 10:06:21AM +0100, Richard Biener wrote: > That is, usually debuggers look for a location list of a variable > and find, say, %rax. But for ptwrite the debugger needs to > examine all active location lists for, say, %rax and figure out > that it contains the value for

[PATCH][lower-subreg] Fix PR87507

2018-11-11 Thread Peter Bergner
PR87507 shows a problem where IRA assigns a non-volatile TImode reg pair to a pseudo when there is a volatile reg pair available to use. This then causes us to emit save/restore code for the non-volatile reg usage. My first attempt at solving this was to adjust the costs used by non-volatile

Re: [PATCH 2/3] Add a pass to automatically add ptwrite instrumentation

2018-11-11 Thread Andi Kleen
On Sun, Nov 11, 2018 at 11:37:57AM -0700, Martin Sebor wrote: > One other high-level comment: a more powerful interface to > variable tracing than annotating declarations in the source > would be to provide either the names of the symbols to trace > on the command line or in an external file.

[PATCH, csky] Handle -frounding-math.

2018-11-11 Thread 瞿仙淼
Hi, I have submitted a patch to handle -frounding-math for C-SKY Index: gcc/ChangeLog === --- gcc/ChangeLog (revision 266023) +++ gcc/ChangeLog (working copy) @@ -1,3 +1,8 @@ +2018-11-11 Xianmiao Qu + +

Re: [PATCH][RFC] Come up with -flive-patching master option.

2018-11-11 Thread Qing Zhao
Hi, > On Nov 10, 2018, at 2:51 AM, Martin Liška wrote: > > On 11/9/18 6:43 PM, Qing Zhao wrote: >> Hi, Martin, >> >> thanks a lot for the previous two new options for live-patching. >> >> >> I have two more questions below: > > Hello. > >> >> 1. do we still need new options to disable

[PATCH] C++: fix-it hint for missing parentheses

2018-11-11 Thread David Malcolm
Consider: class t1 { public: double length () const { return m_length; } private: double m_length; }; missing-parens-fixit.C: In function 'bool test_1(const t1&)': missing-parens-fixit.C:14:15: error: invalid use of member function 'double t1::length() const' (did you forget

Re: [PATCH PR84648]Adjust loop exit conditions for loop-until-wrap cases.

2018-11-11 Thread Bin.Cheng
On Sun, Nov 11, 2018 at 7:20 PM Bernhard Reutner-Fischer wrote: > > On Sun, 11 Nov 2018 16:02:33 +0800 > "bin.cheng" wrote: > > Quick observation unrelated to the real patch. > > I think the coding style mandates to use the type itself and not the > underlying structure. > > I know there are

[PATCH] RFC: elide repeated source locations (PR other/84889)

2018-11-11 Thread David Malcolm
We often emit more than one diagnostic at the same source location. For example, the C++ frontend can emit many diagnostics at the same source location when suggesting overload candidates. For example: ../../src/gcc/testsuite/g++.dg/diagnostic/bad-binary-ops.C: In function 'int test_3(s, t)':

[PATCH] pretty-print.c: add selftest::test_prefixes_and_wrapping

2018-11-11 Thread David Malcolm
gcc/ChangeLog: * pretty-print.c (class selftest::test_pretty_printer): New subclass of pretty_printer. (selftest::test_prefixes_and_wrapping): New test. (selftest::pretty_print_c_tests): Call it. --- gcc/pretty-print.c | 96

Re: [PATCH 2/2] asm inline

2018-11-11 Thread Segher Boessenkool
On Sun, Nov 11, 2018 at 04:41:19PM -0700, Martin Sebor wrote: > On 11/11/2018 03:00 PM, Segher Boessenkool wrote: > >On Sun, Nov 11, 2018 at 02:33:34PM -0700, Martin Sebor wrote: > >>On 10/30/2018 11:30 AM, Segher Boessenkool wrote: > >>>The Linux kernel people want a feature that makes GCC

Re: [PATCH 2/2] asm inline

2018-11-11 Thread Martin Sebor
On 11/11/2018 03:00 PM, Segher Boessenkool wrote: On Sun, Nov 11, 2018 at 02:33:34PM -0700, Martin Sebor wrote: On 10/30/2018 11:30 AM, Segher Boessenkool wrote: The Linux kernel people want a feature that makes GCC pretend some inline assembler code is tiny (while it would think it is huge),

Re: [GCC][AArch64] [middle-end][docs] Document the xorsign optab

2018-11-11 Thread Sandra Loosemore
On 11/11/18 3:14 AM, Tamar Christina wrote: Hi All, This patch just adds documentation for the xorsign optab that was added a while ago. Ok for trunk? +@cindex @code{xorsign@var{m}3} instruction pattern +@item @samp{xorsign@var{m}3} +Target suppports an efficient expansion of x * copysign

[RFC PATCH] rs6000: Early remat for CR fields

2018-11-11 Thread Segher Boessenkool
This implements early remat for condition codes, for rs6000. Saving and restoring the CR register is pretty expensive, so we want to avoid doing it. It is an RFC for two reasons. Firstly, I needed to delete the NUM_POLY_INT_COEFFS > 1 check from generic code, since that has nothing to do with

[PATCH] C++: improvements to diagnostics that use %P (more PR c++/85110)

2018-11-11 Thread David Malcolm
This patch is based on grepping the C++ frontend for %P and %qP i.e. diagnostics that refer to a parameter number. It fixes up these diagnostics to highlight the pertinent param, where appropriate (and possible), along with various other tweaks, as described in the ChangeLog. OK for trunk if it

[doc, committed] document restrictions on mixing -fno-rtti and -frtti

2018-11-11 Thread Sandra Loosemore
I've checked in this patch to fix another old but easy doc issue from bugzilla, PR43105. -Sandra 2018-11-11 Sandra Loosemore PR c++/43105 gcc/ * doc/invoke.texi (C++ Dialect Options): Add warning about mixing -frtti and -fno-rtti code. Index: gcc/doc/invoke.texi

[PATCH] RFC: C/C++: print help when a header can't be found

2018-11-11 Thread David Malcolm
When gcc can't find a header file, it's a hard error that stops the build, typically requiring the user to mess around with compile flags, Makefiles, dependencies, and so forth. Often the exact search paths aren't obvious to the user. Consider the case where the include paths are injected via a

libstdc++ PR54005M is_lock_free; consistently avoid referring to object

2018-11-11 Thread Hans-Peter Nilsson
This patch should have no visible effect. It was approved in the BZ and is what remains of PR54005. _M_i is declared "alignas(_S_alignment) _Tp _M_i;" and is_lock_free is supposed to refer to the *type* not the specific *object*. (Note how the actual address of the object is not used in the

Re: [PATCH 2/2] asm inline

2018-11-11 Thread Segher Boessenkool
On Sun, Nov 11, 2018 at 02:33:34PM -0700, Martin Sebor wrote: > On 10/30/2018 11:30 AM, Segher Boessenkool wrote: > >The Linux kernel people want a feature that makes GCC pretend some > >inline assembler code is tiny (while it would think it is huge), so > >that such code will be inlined

Re: [PATCH] Ensure that dump calls are guarded with dump_enabled_p

2018-11-11 Thread Segher Boessenkool
On Sun, Nov 11, 2018 at 04:01:42PM -0500, David Malcolm wrote: > On Sun, 2018-11-11 at 12:10 -0700, Martin Sebor wrote: > > > +#define VERIFY_DUMP_ENABLED_P \ > > > + do { \ > > > +gcc_assert (dump_enabled_p ()); \ > > > +if (!dump_enabled_p ())

Re: [PATCH 2/2] asm inline

2018-11-11 Thread Martin Sebor
On 10/30/2018 11:30 AM, Segher Boessenkool wrote: The Linux kernel people want a feature that makes GCC pretend some inline assembler code is tiny (while it would think it is huge), so that such code will be inlined essentially always instead of essentially never. This patch lets you say "asm

Re: [PATCH] C/C++: add fix-it hints for missing '&' and '*' (PR c++/87850)

2018-11-11 Thread David Malcolm
On Sun, 2018-11-11 at 11:01 -0700, Martin Sebor wrote: > On 11/10/2018 12:01 AM, Eric Gallager wrote: > > On 11/9/18, David Malcolm wrote: > > > This patch adds a fix-it hint to various pointer-vs-non-pointer > > > diagnostics, suggesting the addition of a leading '&' or '*'. > > > > > > For

Re: [PATCH] Ensure that dump calls are guarded with dump_enabled_p

2018-11-11 Thread David Malcolm
On Sun, 2018-11-11 at 12:10 -0700, Martin Sebor wrote: > On 11/10/2018 07:57 PM, David Malcolm wrote: > > On Mon, 2018-10-22 at 16:08 +0200, Richard Biener wrote: > > > On Mon, 22 Oct 2018, David Malcolm wrote: > > > > > > > On Mon, 2018-10-22 at 15:56 +0200, Richard Biener wrote: > > > >

Re: [RFT PATCH, i386]: Fix PR87928, ICE in ix86_compute_frame_layout

2018-11-11 Thread Uros Bizjak
On Fri, Nov 9, 2018 at 7:37 PM Iain Sandoe wrote: > Bootstrap succeeds and the new test passes for Darwin. > > This does not alter that Darwin has breakage in this area > (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78444) > see : https://gcc.gnu.org/ml/gcc-patches/2018-08/msg00884.html and

Re: [PATCH] Ensure that dump calls are guarded with dump_enabled_p

2018-11-11 Thread Martin Sebor
On 11/10/2018 07:57 PM, David Malcolm wrote: On Mon, 2018-10-22 at 16:08 +0200, Richard Biener wrote: On Mon, 22 Oct 2018, David Malcolm wrote: On Mon, 2018-10-22 at 15:56 +0200, Richard Biener wrote: [...snip...] This is what I finally applied for the original patch after fixing the above

[doc, committed] document probability associated with __builtin_expect

2018-11-11 Thread Sandra Loosemore
I've checked in this patch to fix PR26366, another small but ancient documentation bug. -Sandra 2018-11-11 Sandra Loosemore PR c/26366 gcc/ * doc/extend.texi (Other Builtins): Document probability associated with __builtin_expect. Index: gcc/doc/extend.texi

Re: [PATCH 2/3] Add a pass to automatically add ptwrite instrumentation

2018-11-11 Thread Martin Sebor
One other high-level comment: a more powerful interface to variable tracing than annotating declarations in the source would be to provide either the names of the symbols to trace on the command line or in an external file. That way tracing could be enabled for objects and types declared in

Re: [PATCH] C/C++: add fix-it hints for missing '&' and '*' (PR c++/87850)

2018-11-11 Thread Martin Sebor
On 11/10/2018 12:01 AM, Eric Gallager wrote: On 11/9/18, David Malcolm wrote: This patch adds a fix-it hint to various pointer-vs-non-pointer diagnostics, suggesting the addition of a leading '&' or '*'. For example, note the ampersand fix-it hint in the following: demo.c:5:22: error:

Re: [PATCH 3/3] OpenACC 2.6 manual deep copy support (attach/detach)

2018-11-11 Thread Bernhard Reutner-Fischer
On Sat, 10 Nov 2018 09:11:20 -0800 Julian Brown wrote: Two nits. > diff --git a/gcc/fortran/openmp.c b/gcc/fortran/openmp.c > index 6430e61..ebba7ca 100644 > --- a/gcc/fortran/openmp.c > +++ b/gcc/fortran/openmp.c > @@ -3781,9 +3805,6 @@ check_array_not_assumed (gfc_symbol *sym, locus loc, >

Simplify enumerate and array types

2018-11-11 Thread Jan Hubicka
Hi, this patch should be last patch for type simplification (modulo possible bits that needs clearing I still notice). It does the following 1) enables the patch to simplify aggregates also for enums. While this does not affect C++, in C we want pointers to incomplete and complete

[patch, fortran] Fix PR 70260, ICE on invalid

2018-11-11 Thread Thomas Koenig
Hello world, the attached patch fixes both ICEs in the PR by adding some tests. It was necessary to shuffle around a bit of code, plus to make sure that double error reporting did not become too bad. Regression-tested. OK for trunk? Regards Thomas 2018-11-11 Thomas Koenig

[PATCH, csky] Support -profile

2018-11-11 Thread 瞿仙淼
Hi, I have submitted a patch to support ‘-profile' for C-SKY Index: gcc/ChangeLog === --- gcc/ChangeLog (revision 266012) +++ gcc/ChangeLog (working copy) @@ -1,5 +1,9 @@ 2018-11-11 Xianmiao Qu + *

[PATCH, csky] Define ASM_PREFERRED_EH_DATA_FORMAT

2018-11-11 Thread 瞿仙淼
Hi, I have submitted a patch to Define ASM_PREFERRED_EH_DATA_FORMAT for C-SKY Index: gcc/ChangeLog === --- gcc/ChangeLog (revision 266011) +++ gcc/ChangeLog (working copy) @@ -1,3 +1,7 @@ +2018-11-11 Xianmiao

Re: [PATCH] MIPS: Add `-mfix-r5900' option for the R5900 short loop erratum

2018-11-11 Thread Fredrik Noring
Hi Matthew, > [ As mentioned in the commit message, the test was done with GCC 8.2.0 > since there was an unrelated problem compiling some sanitizer component > at the time. I will try to test a current GCC version during the weekend. ] The compilation problem, more specifically, is In file

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

2018-11-11 Thread Richard Henderson
Ping. On 11/1/18 10:46 PM, Richard Henderson wrote: > From: Richard Henderson > > Changes since v2: > * Committed half of the patch set. > * Split inline TImode support from out-of-line patches. > * Removed the ST out-of-line functions, to match inline. > * Moved the out-of-line

Re: [PATCH PR84648]Adjust loop exit conditions for loop-until-wrap cases.

2018-11-11 Thread Bernhard Reutner-Fischer
On Sun, 11 Nov 2018 16:02:33 +0800 "bin.cheng" wrote: Quick observation unrelated to the real patch. I think the coding style mandates to use the type itself and not the underlying structure. I know there are alot of places from before our switch to C++ that still use enum tree_code or enum

[PATCH 7/9][GCC][Arm] Enable autovectorization of Half float values

2018-11-11 Thread Tamar Christina
Hi All, The AArch32 backend is currently not able to support autovectorization of half-float values on ARM. This is because we never told the vectorizer what the vector modes are for Half floats. This enables autovectorization by definiting V4HF and V8HF as the vector modes. Bootstrap and

[PATCH 8/9][GCC][Arm] Add autovectorization support for complex multiplication and addition

2018-11-11 Thread Tamar Christina
Hi All, This patch adds the expander support for supporting autovectorization of complex number operations such as Complex addition with a rotation along the Argand plane. This also adds support for complex FMA. The instructions are described in the ArmARM [1] and are available from

[PATCH 4/9][GCC][AArch64/Arm] Add new testsuite directives to check complex instructions.

2018-11-11 Thread Tamar Christina
Hi All, This patch adds new testsuite directive for both Arm and AArch64 to support testing of the Complex Arithmetic operations form Armv8.3-a. Bootstrap and Regtest on aarch64-none-linux-gnu, arm-none-gnueabihf and x86_64-pc-linux-gnu and no regressions. The instructions have also been

[PATCH 5/9][GCC][AArch64/Arm] Add auto-vectorization tests.

2018-11-11 Thread Tamar Christina
Hi All, This patch adds tests for AArch64 and Arm to test the autovectorization of complex numbers using the Armv8.3-a instructions. This patch enables them only for AArch64 at this point. Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. The instructions have also been tested on

[PATCH 3/9][GCC][AArch64] Add autovectorization support for Complex instructions

2018-11-11 Thread Tamar Christina
Hi All, This patch adds the expander support for supporting autovectorization of complex number operations such as Complex addition with a rotation along the Argand plane. This also adds support for complex FMA. The instructions are described in the ArmARM [1] and are available from

[PATCH 2/9][GCC][AArch64][middle-end] Add rules to strip away unneeded type casts in expressions

2018-11-11 Thread Tamar Christina
Hi All, This patch adds a match.pd rule for stripping away the type converts when you're converting to a type that has twice the precision of the current type in the same class, doing a simple math operation on it and converting back to the smaller type. The change makes it so the operations

[PATCH 1/9][GCC][AArch64][middle-end] Implement SLP recognizer for Complex addition with rotate and complex MLA with rotation

2018-11-11 Thread Tamar Christina
Hi All, This patch adds support for SLP vectorization of Complex number arithmetic with rotations along with Argand plane. For this to work it has to recognize two statements in parallel as it needs to match against operations towards both the real and imaginary numbers. The instructions

[PATCH 0/9][GCC][AArch64/Arm][middle-end] Add support for SLP vectorization of complex number instructions.

2018-11-11 Thread Tamar Christina
Hi All, This patch series adds support for SLP vectorization of complex instructions [1]. These instructions exist only in their vector forms and require you to recognize two statements in parallel. Complex operations usually require a permute due to the fact that the real and imaginary

[GCC][AArch64] [middle-end][docs] Document the xorsign optab

2018-11-11 Thread Tamar Christina
Hi All, This patch just adds documentation for the xorsign optab that was added a while ago. Ok for trunk? Thanks, Tamar gcc/ChangeLog: 2018-11-11 Tamar Christina * doc/md.texi (xorsign): Document it. -- diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi index

Re: [PATCH 2/3] Add a pass to automatically add ptwrite instrumentation

2018-11-11 Thread Richard Biener
On Fri, Nov 9, 2018 at 7:18 PM Andi Kleen wrote: > > Hi Richard, > > On Fri, Nov 09, 2018 at 04:27:22PM +0100, Richard Biener wrote: > > > Passes bootstrap and test suite on x86_64-linux, also > > > bootstrapped and tested gcc itself with full -fvartrace > > > and -fvartrace-locals

Re: [PATCH] Add value_range_base (w/o equivs)

2018-11-11 Thread Richard Biener
On Fri, 9 Nov 2018, Aldy Hernandez wrote: > On 11/9/18 9:19 AM, Richard Biener wrote: > > > > This adds value_range_base, a base class of class value_range > > with all members but the m_equiv one. > > First of all, thanks so much for doing this! > > > > > I have looked into the sole GC user,

RFA: Fix add_predicate_code to acknowledge ZERO_EXTRACT as an lvalue.

2018-11-11 Thread Joern Wolfgang Rennecke
With a configurable vector size, it is not really feasible to represent every vector register inside GCC as a collection of lots of imaginary BITS_PER_WORD registers. So you got your general purpose registers that are BITS_PER_WORD, and vector registers that are a bit or a lot larger. To void

RFA: vectorizer patches 2/2: reduction splitting

2018-11-11 Thread Joern Wolfgang Rennecke
It's nice to use the processors vector arithmetic to good effect, but it's all for naught when there are too many moves from/to general registers cluttering up the loop. With a double-vector reduction variable, the standard final reduction code got so awkward that the register allocator

[PATCH PR84648]Adjust loop exit conditions for loop-until-wrap cases.

2018-11-11 Thread bin.cheng
Hi, This patch fixes PR84648 by adjusting exit conditions for loop-until-wrap cases. It only handles simple cases in which IV.base are constants because we rely on current niter analyzer which doesn't handle parameterized bound in wrapped case. It could be relaxed in the future. Bootstrap and