Re: Transform assertion into optimization hints

2018-09-17 Thread Marc Glisse
On Tue, 18 Sep 2018, François Dumont wrote: If your concern is rather that the condition got evaluated which will eventually slow down execution then I need to check generated code. Any good link explaining how to have a clear view on the generated code ? This. For a file like #include vo

Re: Transform assertion into optimization hints

2018-09-17 Thread François Dumont
On 09/17/2018 11:15 PM, Marc Glisse wrote: On Mon, 17 Sep 2018, François Dumont wrote: We talk about it a while back. I've run testsuite several times since I have this patch on my local copy. Note that when I implemented it the wrong way tests started to fail so it is clearly having an effe

Re: [PR87054] fix unaligned access

2018-09-17 Thread Richard Biener
On September 18, 2018 5:47:34 AM GMT+02:00, Alexandre Oliva wrote: >Richard, this is the patch you proposed in the PR a while ago, along >with the testcase I'd posted. Please let me know if the commit-message >paragraph below sounds good to you, and then I'll proceed to install >it, >or amend as

Re: [PR87013] check for .loc is_stmt support in the assembler

2018-09-17 Thread Richard Biener
On September 18, 2018 5:53:54 AM GMT+02:00, Alexandre Oliva wrote: >Back when we had the logic to output is_stmt but never exercised it, >it didn't matter that we didn't test for assembler support for it. >But there are still assemblers out there that do not support it, so >now that we enable the

Re: [PATCH] Cleanup strcpy/stpcpy no nul warning code

2018-09-17 Thread Jeff Law
On 9/17/18 1:18 PM, Bernd Edlinger wrote: > On 09/17/18 20:32, Jeff Law wrote: >> On 9/17/18 12:20 PM, Bernd Edlinger wrote: >>> On 09/17/18 19:33, Jeff Law wrote: On 9/16/18 1:58 PM, Bernd Edlinger wrote: > Hi, > > this is a cleanup of the recently added strlen/strcpy/stpcpy >

[PR87013] check for .loc is_stmt support in the assembler

2018-09-17 Thread Alexandre Oliva
Back when we had the logic to output is_stmt but never exercised it, it didn't matter that we didn't test for assembler support for it. But there are still assemblers out there that do not support it, so now that we enable the formerly latent is_stmt logic, we'd better make sure the assembler can d

[PR87054] fix unaligned access

2018-09-17 Thread Alexandre Oliva
Richard, this is the patch you proposed in the PR a while ago, along with the testcase I'd posted. Please let me know if the commit-message paragraph below sounds good to you, and then I'll proceed to install it, or amend as requested. (do we really want the MEM_REF to carry stricter alignment th

Re: C++ PATCH to implement P1064R0, Virtual Function Calls in Constant Expressions

2018-09-17 Thread Jason Merrill
On Mon, Sep 17, 2018 at 5:39 PM, Marek Polacek wrote: > On Fri, Sep 14, 2018 at 04:45:22PM -0400, Marek Polacek wrote: >> On Fri, Sep 14, 2018 at 04:30:46PM -0400, Jason Merrill wrote: >> > On Fri, Sep 14, 2018 at 1:19 PM, Marek Polacek wrote: >> > > This patch implements another bit of C++20, vi

Committed, MMIX: don't expand __builtin_ffs to ffs

2018-09-17 Thread Hans-Peter Nilsson
I tried to update newlib (from an old copy from couple of years ago), but got curious regressions localized to tests related to ffs handling: --- regress.prev2018-09-13 18:49:04.130070398 +0200 +++ regress 2018-09-13 22:59:25.551637529 +0200 @@ -0,0 +1,5 @@ +gcc.sum gcc.c-torture/execu

Re: [PATCH] look harder for MEM_REF operand equality to avoid -Wstringop-truncation (PR 84561)

2018-09-17 Thread Martin Sebor
On 09/17/2018 05:13 PM, Jeff Law wrote: On 9/17/18 3:15 PM, Martin Sebor wrote: On 09/17/2018 11:35 AM, Richard Biener wrote: On September 17, 2018 7:24:16 PM GMT+02:00, Jeff Law wrote: On 9/15/18 2:14 AM, Bernd Edlinger wrote: On 9/14/18, Martin Sebor wrote: As I said above, this happens d

Re: [PATCH] avoid warning on constant strncpy until next statement is reachable (PR 87028)

2018-09-17 Thread Jeff Law
On 8/28/18 6:12 PM, Martin Sebor wrote: >>> Sadly, dstbase is the PARM_DECL for d.  That's where things are going >>> "wrong".  Not sure why you're getting the PARM_DECL in that case.  I'd >>> debug get_addr_base_and_unit_offset to understand what's going on. >>> Essentially you're getting differen

Re: [PATCH] S/390: Fix conditional returns

2018-09-17 Thread Jeff Law
On 9/5/18 2:34 AM, Ilya Leoshkevich wrote: > S/390 epilogue ends with (parallel [(return) (use %r14)]) instead of > the more usual (return) or (simple_return). This sequence is not > recognized by the conditional return logic in try_optimize_cfg (). > > gcc/ChangeLog: > > 2018-08-28 Ilya Leoshk

Re: [PATCH, ARM] PR85434: Prevent spilling of stack protector guard's address on ARM

2018-09-17 Thread Jeff Law
On 8/29/18 3:51 AM, Thomas Preudhomme wrote: > Resend hopefully without HTML this time. > > On Wed, 29 Aug 2018 at 10:49, Thomas Preudhomme > wrote: >> Hi, >> >> I've reworked the patch fixing PR85434 (spilling of stack protector guard's >> address on ARM) to address the testsuite regression on

[PATCH 14/14] Add D Phobos config, makefiles, and testsuite.

2018-09-17 Thread Iain Buclaw
This patch adds the configure and make files used for building D runtime and Phobos. As well as running all unittests and the testsuite. ftp://ftp.gdcproject.org/patches/v4/14-v4-d-phobos-misc.patch --- libphobos/Makefile.am |69 + libphobos/Makefile.in

[PATCH 12/14] Add GDC/GCC builtins and runtime support (part of D runtime)

2018-09-17 Thread Iain Buclaw
This patch adds GCC builtins and runtime support for GDC compiled code. - module __entrypoint defines the C main function. Its contents are parsed and compiled in during compilation, but only if needed. - module gcc.attribute exposes GDC-specific attributes. - module gcc.backtrace implement

[PATCH 13/14] Add D Phobos standard library and license.

2018-09-17 Thread Iain Buclaw
This patch add the Phobos runtime library and license (Boost) files. Phobos is the standard runtime library that comes with the D language compiler. The bulk of which is comprised mostly of generic algorithms and high level primitives for D applications. ftp://ftp.gdcproject.org/patches/v4/13-v4-

[PATCH 10/14] Add GDC Testsuite files.

2018-09-17 Thread Iain Buclaw
This patch adds a further number of tests, but were added as part of fixing gdc-specific bugs. --- gcc/testsuite/gdc.dg/asan/asan.exp| 32 + gcc/testsuite/gdc.dg/asan/gdc272.d| 16 + gcc/testsuite/gdc.dg/compilable.d | 463 + gcc/testsuite/gdc.dg/dg.ex

[PATCH 09/14] Add D2 Testsuite Dejagnu files.

2018-09-17 Thread Iain Buclaw
This patch adds D language support to the GCC testsuite. As well as generating the DejaGNU options for compile and link tests, handles the conversion from DMD-style compiler options to GDC. --- gcc/testsuite/gdc.test/d_do_test.exp | 404 +++ gcc/testsuite/lib/gdc-dg.exp

[PATCH 11/14] D runtime library and license.

2018-09-17 Thread Iain Buclaw
This patch adds the D runtime library and license (Boost) files. D runtime is a low level that implements the building blocks of the runtime environment, as well as C and C++ platform bindings. Many high level operations are lowered to generate calls to various functions defined in this library.

[PATCH 08/14] Add D2 Testsuite files.

2018-09-17 Thread Iain Buclaw
This patch adds part of the D2 testsuite, which includes D source code files that are considered compilable; files that are considered uncompilable, but should not ICE; and files that should execute on targets with crash or assertion failures. ftp://ftp.gdcproject.org/patches/v4/08-v4-d-testsuite.

[PATCH 07/14] Add patches for D language support in GCC targets.

2018-09-17 Thread Iain Buclaw
This patch add D language support to targets of GCC itself. These are mostly used to declare pre-defined version identifiers in the D language that describe something about the target that the front-end itself is unable to obtain. Version conditions in D can be thought of as being like the targe

[PATCH 06/14] Add patches for D language support in GCC proper.

2018-09-17 Thread Iain Buclaw
This patch adds D language support to GCC itself. --- gcc/ChangeLog * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue): Support GNU D by using 0 as the language type. * config/rs6000/rs6000.c (rs6000_output_function_epilogue): Support GNU D by using 0 as the language type. *

[PATCH 05/14] Add GCC configuration file changes and documentation.

2018-09-17 Thread Iain Buclaw
This patch adds the D language front-end to GCC documentation and configuration files, as described on the anatomy of a language front-end. --- ChangeLog: * Makefile.def (target_modules): Add libphobos. (flags_to_pass): Add GDC_FOR_TARGET. (dependencies): Add dependency from configure-target-

[PATCH 04/14] Add D front-end (GDC) config, Makefile, and manpages.

2018-09-17 Thread Iain Buclaw
This patch adds the D frontend language configure make files, as described on the anatomy of a language front-end. --- gcc/d/Make-lang.in | 335 +++ gcc/d/config-lang.in | 33 ++ gcc/d/gdc.texi | 749 +++ 3 files changed, 1117 inse

[PATCH 02/14] Add D frontend (GDC) implementation.

2018-09-17 Thread Iain Buclaw
This patch adds the D front-end implementation, the only part of the compiler that interacts with GCC directly, and being the parts that I maintain, is something that I can talk about more directly. For the actual code generation pass, that converts the front-end AST to GCC trees, most parts use a

[PATCH 03/14] Add D frontend (GDC) changelogs.

2018-09-17 Thread Iain Buclaw
This patch just includes all changelogs for the D front-end (GDC), going back to the dawn of time itself. --- gcc/d/ChangeLog | 332 ++ gcc/d/ChangeLog-2006 | 954 +++ gcc/d/ChangeLog-2007 | 1340 ++ gcc/d/ChangeLog-2008 |

[PATCH 01/14] Add D front-end (DMD) language implementation and license.

2018-09-17 Thread Iain Buclaw
This patch adds the DMD front-end proper and license (Boost) files, comprised of a lexer, parser, and semantic analyzer. ftp://ftp.gdcproject.org/patches/v4/01-v4-d-frontend-dmd.patch --- gcc/d/dmd/access.c | 670 +++ gcc/d/dmd/aggregate.h| 335 ++ gcc/d/dmd/aliasthis.c

[PATCHv3][PR 81376] Remove unnecessary float casts in comparisons

2018-09-17 Thread Yuri Gribov
Hi all, This is a second iteration of patch which gets rid of float casts in comparisons when all values of casted integral type are exactly representable by the float type (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81376). The new version addresses issue spotted by Richard in previous version

Re: [PATCH] look harder for MEM_REF operand equality to avoid -Wstringop-truncation (PR 84561)

2018-09-17 Thread Jeff Law
On 9/17/18 3:15 PM, Martin Sebor wrote: > On 09/17/2018 11:35 AM, Richard Biener wrote: >> On September 17, 2018 7:24:16 PM GMT+02:00, Jeff Law >> wrote: >>> On 9/15/18 2:14 AM, Bernd Edlinger wrote: On 9/14/18, Martin Sebor wrote: > As I said above, this happens during the dom walk in th

Re: [PATCH] look harder for MEM_REF operand equality to avoid -Wstringop-truncation (PR 84561)

2018-09-17 Thread Jeff Law
On 9/14/18 4:11 PM, Martin Sebor wrote: > On 09/14/2018 03:35 PM, Jeff Law wrote: >> On 9/12/18 11:46 AM, Martin Sebor wrote: >>> On 08/31/2018 04:07 AM, Richard Biener wrote: On Thu, Aug 30, 2018 at 7:39 PM Martin Sebor wrote: > > On 08/30/2018 11:22 AM, Richard Biener wrote: >>

Re: [GCC][PATCH][Aarch64] Added pattern to match zero extended bfxil

2018-09-17 Thread Ramana Radhakrishnan
On Mon, 17 Sep 2018, 23:56 Christophe Lyon, wrote: > On Fri, 14 Sep 2018 at 12:04, Sam Tebbs wrote: > > > > > > > > On 08/28/2018 11:54 PM, James Greenhalgh wrote: > > > > > > > > > > OK once the other one is approved, with the obvious rebase over the > renamed > > > function. > > > > > > James

Re: [PATCH] Cleanup strcpy/stpcpy no nul warning code

2018-09-17 Thread Jeff Law
On 9/17/18 1:18 PM, Bernd Edlinger wrote: > > I suppose the expr.c change will likely work alone, but > it was designed to replace the stuff here. > > So I will try to split the expr.c part out, and post it > tomorrow. It does work alone. I've already verified that here :-) BUt will probably ca

Re: [GCC][PATCH][Aarch64] Added pattern to match zero extended bfxil

2018-09-17 Thread Christophe Lyon
On Fri, 14 Sep 2018 at 12:04, Sam Tebbs wrote: > > > > On 08/28/2018 11:54 PM, James Greenhalgh wrote: > > > > > > OK once the other one is approved, with the obvious rebase over the renamed > > function. > > > > James > > Here is the rebased patch. Still OK for me to commit to trunk now that > t

Re: [PATCH 04/25] SPECIAL_REGNO_P

2018-09-17 Thread Jeff Law
On 9/13/18 8:08 AM, Andrew Stubbs wrote: > On 13/09/18 11:01, Andrew Stubbs wrote: >> The assert is caused because the def-use chains indicate that SCC >> conflicts with itself. I suppose the question is why is it doing that, >> but it's probably do do with that being a special register that gets >

Re: [libgcc] Use v2 map syntax in libgcc-unwind.map if Solaris ld supports it

2018-09-17 Thread Jeff Law
On 9/16/18 5:28 AM, Rainer Orth wrote: > Currently, the libgcc-unwind.map file generated for use with Solaris ld > > http://gcc.gnu.org/ml/gcc-patches/2014-01/msg01088.html > > uses the v1 linker map file syntax because both that's supported > everywhere. However, with ld -z guidance, newe

Re: [PATCH v2] libgcc: m68k: avoid TEXTRELs in shared library (PR 86224)

2018-09-17 Thread Jeff Law
On 9/17/18 3:50 PM, Sergei Trofimovich wrote: > On Mon, 17 Sep 2018 15:29:08 -0600 > Jeff Law wrote: > >> On 9/17/18 3:18 PM, Sergei Trofimovich wrote: >>> On Sat, 28 Jul 2018 20:42:02 +0100 >>> "slyfox.inbox.ru via gcc-patches" wrote: >>> From: Sergei Trofimovich Cc: Ian Lanc

Re: [PATCH,rs6000] Add builtins for accessing the FPSCR

2018-09-17 Thread Carl Love
Segher: This is an updated patch to add the following builtins: __builtin_mffsl, __builtin_set_fpscr_rn, __builtin_set_fpscr_rn, __builtin_mtfsb0, __builtin_mtfsb1. I have addressed you comments with regards to the change log entries. I have also addressed the various comments about the code, fu

Re: [PATCH] rtlanal: Fix nonzero_bits for non-load paradoxical subregs (PR85925)

2018-09-17 Thread Segher Boessenkool
On Mon, Jun 04, 2018 at 10:57:05PM +0200, Eric Botcazou wrote: > > In the PR we have insns: > > > > Trying 23 -> 24: > >23: r123:SI=zero_extend(r122:HI) > > REG_DEAD r122:HI > >24: [r115:SI]=r123:SI > > REG_DEAD r123:SI > > > > which should be combined to > > > > (set (mem:SI

Re: [PATCH v2] libgcc: m68k: avoid TEXTRELs in shared library (PR 86224)

2018-09-17 Thread Sergei Trofimovich via gcc-patches
On Mon, 17 Sep 2018 15:29:08 -0600 Jeff Law wrote: > On 9/17/18 3:18 PM, Sergei Trofimovich wrote: > > On Sat, 28 Jul 2018 20:42:02 +0100 > > "slyfox.inbox.ru via gcc-patches" wrote: > > > >> From: Sergei Trofimovich > >> > >> Cc: Ian Lance Taylor > >> Cc: Jeff Law > >> Cc: Andreas Schwab

Re: C++ PATCH to implement P1064R0, Virtual Function Calls in Constant Expressions

2018-09-17 Thread Marek Polacek
On Fri, Sep 14, 2018 at 04:45:22PM -0400, Marek Polacek wrote: > On Fri, Sep 14, 2018 at 04:30:46PM -0400, Jason Merrill wrote: > > On Fri, Sep 14, 2018 at 1:19 PM, Marek Polacek wrote: > > > This patch implements another bit of C++20, virtual calls in constant > > > expression: > > >

Re: [PATCH v2] libgcc: m68k: avoid TEXTRELs in shared library (PR 86224)

2018-09-17 Thread Jeff Law
On 9/17/18 3:18 PM, Sergei Trofimovich wrote: > On Sat, 28 Jul 2018 20:42:02 +0100 > "slyfox.inbox.ru via gcc-patches" wrote: > >> From: Sergei Trofimovich >> >> Cc: Ian Lance Taylor >> Cc: Jeff Law >> Cc: Andreas Schwab >> Signed-off-by: Sergei Trofimovich >> --- >> libgcc/config/m68k/lb1s

Re: [PATCH v2] libgcc: m68k: avoid TEXTRELs in shared library (PR 86224)

2018-09-17 Thread Sergei Trofimovich via gcc-patches
On Sat, 28 Jul 2018 20:42:02 +0100 "slyfox.inbox.ru via gcc-patches" wrote: > From: Sergei Trofimovich > > Cc: Ian Lance Taylor > Cc: Jeff Law > Cc: Andreas Schwab > Signed-off-by: Sergei Trofimovich > --- > libgcc/config/m68k/lb1sf68.S | 3 +++ > 1 file changed, 3 insertions(+) > > diff

Re: [PATCH] look harder for MEM_REF operand equality to avoid -Wstringop-truncation (PR 84561)

2018-09-17 Thread Martin Sebor
On 09/17/2018 11:35 AM, Richard Biener wrote: On September 17, 2018 7:24:16 PM GMT+02:00, Jeff Law wrote: On 9/15/18 2:14 AM, Bernd Edlinger wrote: On 9/14/18, Martin Sebor wrote: As I said above, this happens during the dom walk in the ccp pass: substitute_and_fold_dom_walker walker (CDI_

Re: Transform assertion into optimization hints

2018-09-17 Thread Marc Glisse
On Mon, 17 Sep 2018, François Dumont wrote: We talk about it a while back. I've run testsuite several times since I have this patch on my local copy. Note that when I implemented it the wrong way tests started to fail so it is clearly having an effect on the generated code. * include/bits/c

Re: [PATCH 0/5] RFC: gimple-ssa-sprintf.c: a new approach (PR middle-end/77696)

2018-09-17 Thread Martin Sebor
On 09/14/2018 12:17 PM, David Malcolm wrote: Martin: on the way back from Cauldron I had a go at implementing new output formats for the warnings from gimple-ssa-sprintf.c, to try to better indicate to the end user what the problem is. My plan was to implement some of the ASCII art ideas we've b

Transform assertion into optimization hints

2018-09-17 Thread François Dumont
We talk about it a while back. I've run testsuite several times since I have this patch on my local copy. Note that when I implemented it the wrong way tests started to fail so it is clearly having an effect on the generated code. * include/bits/c++config [__OPTIMIZE__](__glibcxx_assert): Def

[PATCH, i386]: Emit fldln2 earlier in ix86_emit_i387_log1p.

2018-09-17 Thread Uros Bizjak
Eliminate common subexpression in both branches. 2018-09-17 Uros Bizjak * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier. Bootstrapped and regression tested on x86_64-linux-gnu. Committed to mainline SVN. Uros. Index: config/i386/i386.c ==

Re: [Patch, Fortran, OOP] PR 46313: OOP-ABI issue, ALLOCATE issue, CLASS renaming issue

2018-09-17 Thread Janus Weil
Am Mo., 17. Sep. 2018 um 21:21 Uhr schrieb Janus Weil : > > Instead, for the sake of gfortran, how about a macro like this? > > #define gfc_str_startswith(str, pref) \ > (strncmp ((str), (pref), strlen (pref)) == 0) > > (In fact I just noticed that something like this already exists in > trans-

[patch,nvptx] Add atomic_fetch* support for SImode arguments.

2018-09-17 Thread Cesar Philippidis
I've committed this patch extends the nvptx atomic_fetch_ pattern to accept SImode arguments regardless of the -misa argument supplied. Tom had pre-approved this patch awhile ago. As the test case demonstrates, it only works 32-bit pointers. While adding the new test case, I noticed that I named a

Re: vector _M_start and 0 offset

2018-09-17 Thread Marc Glisse
On Mon, 17 Sep 2018, Jonathan Wakely wrote: On 17/09/18 21:24 +0200, Marc Glisse wrote: On Mon, 17 Sep 2018, Marc Glisse wrote: On Mon, 17 Sep 2018, Jonathan Wakely wrote: Do other compilers besides gcc suppress the same way? No, clang doesn't: What version is that? I didn't test on thi

Re: vector _M_start and 0 offset

2018-09-17 Thread Jonathan Wakely
On 17/09/18 21:24 +0200, Marc Glisse wrote: On Mon, 17 Sep 2018, Marc Glisse wrote: On Mon, 17 Sep 2018, Jonathan Wakely wrote: Do other compilers besides gcc suppress the same way? No, clang doesn't: What version is that? I didn't test on this exact patch, but clang 6 and 7 print, for si

Re: vector _M_start and 0 offset

2018-09-17 Thread Jonathan Wakely
On 17/09/18 21:18 +0200, Marc Glisse wrote: On Mon, 17 Sep 2018, Jonathan Wakely wrote: Do other compilers besides gcc suppress the same way? No, clang doesn't: What version is that? I didn't test on this exact patch, but clang 6 and 7 print, for similar code: warning: generalized initiali

Re: [PATCH]: Allow TARGET_SCHED_ADJUST_PRIORITY hook to reduce priority

2018-09-17 Thread Jeff Law
On 9/17/18 3:08 AM, Andreas Schwab wrote: > PR rtl-optimization/85458 > * sel-sched.c (sel_target_adjust_priority): Remove wrong > assertion. Under what conditions is the new priority negative? Without digging deep into the ia64 port that just seems wrong. jeff

Re: [PATCH 13/25] Create TARGET_DISABLE_CURRENT_VECTOR_SIZE

2018-09-17 Thread Richard Sandiford
writes: > This feature probably ought to be reworked as a proper target hook, but I > would > like to know if this is the correct solution to the problem first. > > The problem is that GCN vectors have a fixed number of elements (64) and the > vector size varies with element size. E.g. V64QI is

Re: vector _M_start and 0 offset

2018-09-17 Thread Marc Glisse
On Mon, 17 Sep 2018, Marc Glisse wrote: On Mon, 17 Sep 2018, Jonathan Wakely wrote: Do other compilers besides gcc suppress the same way? No, clang doesn't: What version is that? I didn't test on this exact patch, but clang 6 and 7 print, for similar code: warning: generalized initializer

Re: [Patch, Fortran, OOP] PR 46313: OOP-ABI issue, ALLOCATE issue, CLASS renaming issue

2018-09-17 Thread Janus Weil
Am Mo., 17. Sep. 2018 um 10:59 Uhr schrieb Bernhard Reutner-Fischer : > > On Tue, 9 Nov 2010 at 11:41, Janus Weil wrote: > > > > >> Ok, so it seems to me that using two leading underscores is really the > > >> best option, since it's safe against collisions with Fortran and C > > >> user code, and

Re: vector _M_start and 0 offset

2018-09-17 Thread Marc Glisse
On Mon, 17 Sep 2018, Jonathan Wakely wrote: Do other compilers besides gcc suppress the same way? No, clang doesn't: What version is that? I didn't test on this exact patch, but clang 6 and 7 print, for similar code: warning: generalized initializer lists are a C++11 extension [-Wc++1

Re: [PATCH] Cleanup strcpy/stpcpy no nul warning code

2018-09-17 Thread Bernd Edlinger
On 09/17/18 20:32, Jeff Law wrote: > On 9/17/18 12:20 PM, Bernd Edlinger wrote: >> On 09/17/18 19:33, Jeff Law wrote: >>> On 9/16/18 1:58 PM, Bernd Edlinger wrote: Hi, this is a cleanup of the recently added strlen/strcpy/stpcpy no nul warning code. Most importantly it

Re: vector _M_start and 0 offset

2018-09-17 Thread Jonathan Wakely
On 17/09/18 20:10 +0100, Jonathan Wakely wrote: On 17/09/18 21:55 +0300, Ville Voutilainen wrote: On Mon, 17 Sep 2018 at 21:50, Jonathan Wakely wrote: "I used C++11 syntax because I find it nicer, and the compiler accepts it in C++98 mode with just a warning, suppressed in a standard header."

Re: vector _M_start and 0 offset

2018-09-17 Thread Jonathan Wakely
On 17/09/18 21:55 +0300, Ville Voutilainen wrote: On Mon, 17 Sep 2018 at 21:50, Jonathan Wakely wrote: >"I used C++11 syntax because I find it nicer, and the compiler accepts >it in C++98 mode with just a warning, suppressed in a standard >header." Oh sorry, I just looked at the patch and repl

Re: vector _M_start and 0 offset

2018-09-17 Thread Ville Voutilainen
On Mon, 17 Sep 2018 at 21:50, Jonathan Wakely wrote: >"I used C++11 syntax because I find it nicer, and the compiler accepts > >it in C++98 mode with just a warning, suppressed in a standard > >header." > > Oh sorry, I just looked at the patch and replied without reading the > top bit. > > >Even

Re: [PATCH 12/25] Make default_static_chain return NULL in non-static functions

2018-09-17 Thread Richard Sandiford
writes: > This patch allows default_static_chain to be called from the back-end without > it knowing if the function is static or not. Or, to put it another way, > without duplicating the check everywhere it's used. > > 2018-09-05 Tom de Vries > > gcc/ > * targhooks.c (default_stat

Re: vector _M_start and 0 offset

2018-09-17 Thread Jonathan Wakely
On 17/09/18 19:57 +0200, Marc Glisse wrote: On Mon, 17 Sep 2018, Jonathan Wakely wrote: On 15/09/18 14:27 +0200, Marc Glisse wrote: Hello, as explained in the PR, the implementation of vector is weirdly wasteful. Preserving the ABI prevents from changing much for now, but this small tweak c

Re: [PATCH] gcov: emit hotness colors to easily find hot code.

2018-09-17 Thread David Malcolm
On Wed, 2018-09-12 at 14:36 +0200, Martin Liška wrote: > Hi. > > This is follow-up of: > https://gcc.gnu.org/ml/gcc/2018-08/msg00162.html > > I'm suggesting to introduce using colors in order to indicate hotness > of lines. Legend is printed at the very beginning of the output file. > Example: ht

Re: [PATCH] look harder for MEM_REF operand equality to avoid -Wstringop-truncation (PR 84561)

2018-09-17 Thread Bernd Edlinger
On 09/17/18 19:35, Richard Biener wrote: > On September 17, 2018 7:24:16 PM GMT+02:00, Jeff Law wrote: >> On 9/15/18 2:14 AM, Bernd Edlinger wrote: >>> On 9/14/18, Martin Sebor wrote: As I said above, this happens during the dom walk in the ccp pass: substitute_and_fold_dom_

Re: [PATCH] Cleanup strcpy/stpcpy no nul warning code

2018-09-17 Thread Jeff Law
On 9/17/18 12:20 PM, Bernd Edlinger wrote: > On 09/17/18 19:33, Jeff Law wrote: >> On 9/16/18 1:58 PM, Bernd Edlinger wrote: >>> Hi, >>> >>> this is a cleanup of the recently added strlen/strcpy/stpcpy >>> no nul warning code. >>> >>> Most importantly it moves the SSA_NAME handling from >>> untermi

Re: [PATCH] Cleanup strcpy/stpcpy no nul warning code

2018-09-17 Thread Bernd Edlinger
On 09/17/18 19:33, Jeff Law wrote: > On 9/16/18 1:58 PM, Bernd Edlinger wrote: >> Hi, >> >> this is a cleanup of the recently added strlen/strcpy/stpcpy >> no nul warning code. >> >> Most importantly it moves the SSA_NAME handling from >> unterminated_array to string_constant, thereby fixing >> ano

Re: vector _M_start and 0 offset

2018-09-17 Thread Marc Glisse
On Mon, 17 Sep 2018, Jonathan Wakely wrote: On 15/09/18 14:27 +0200, Marc Glisse wrote: Hello, as explained in the PR, the implementation of vector is weirdly wasteful. Preserving the ABI prevents from changing much for now, but this small tweak can help the compiler remove quite a bit of de

[C++ Patch PING] [C++ Patch] PR 85065 ("[concepts] ICE with invalid use of a concept")

2018-09-17 Thread Paolo Carlini
Hi again, On 9/3/18 10:59 PM, Paolo Carlini wrote: in this error-recovery ICE, upon the error make_constrained_auto assigns error_mark_node to PLACEHOLDER_TYPE_CONSTRAINTS (type) which then causes a crash later when hash_placeholder_constraint is called on it. I think we should cope with this

Re: [PATCH 22/25] Add dg-require-effective-target exceptions

2018-09-17 Thread Mike Stump
On Sep 5, 2018, at 4:52 AM, a...@codesourcery.com wrote: > There are a number of tests that fail because they assume that exceptions are > available, but GCN does not support them, yet. So, generally we don't goop up the testsuite with the day to day port stuff when it is being developed. If the

Re: [PATCH] Maybe fix PR87134

2018-09-17 Thread Rainer Orth
Hi Iain, > Hi Rainer, > >> On 6 Sep 2018, at 21:21, Rainer Orth wrote: >> > >>> I can confirm the same, repeatable, fail on i686-darwin10 (and it >>> reproduces with -save-temps) >>> (and the vNULL change does not fix it there either) - don’t have access to >>> the machine now until >>> later in

Re: [PATCH] look harder for MEM_REF operand equality to avoid -Wstringop-truncation (PR 84561)

2018-09-17 Thread Richard Biener
On September 17, 2018 7:24:16 PM GMT+02:00, Jeff Law wrote: >On 9/15/18 2:14 AM, Bernd Edlinger wrote: >> On 9/14/18, Martin Sebor wrote: >>> As I said above, this happens during the dom walk in the ccp >>> pass: >>> >>> substitute_and_fold_dom_walker walker (CDI_DOMINATORS, this); >>> walker.

Re: [PATCH] Cleanup strcpy/stpcpy no nul warning code

2018-09-17 Thread Jeff Law
On 9/16/18 1:58 PM, Bernd Edlinger wrote: > Hi, > > this is a cleanup of the recently added strlen/strcpy/stpcpy > no nul warning code. > > Most importantly it moves the SSA_NAME handling from > unterminated_array to string_constant, thereby fixing > another round of xfails in the strlen and stpc

Re: [PATCH] look harder for MEM_REF operand equality to avoid -Wstringop-truncation (PR 84561)

2018-09-17 Thread Jeff Law
On 9/15/18 2:14 AM, Bernd Edlinger wrote: > On 9/14/18, Martin Sebor wrote: >> As I said above, this happens during the dom walk in the ccp >> pass: >> >> substitute_and_fold_dom_walker walker (CDI_DOMINATORS, this); >> walker.walk (ENTRY_BLOCK_PTR_FOR_FN (cfun)); >> >> The warning is issued du

Re: [PATCH v3] combine: perform jump threading at the end

2018-09-17 Thread Segher Boessenkool
On Mon, Sep 17, 2018 at 10:50:58AM +0200, Ilya Leoshkevich wrote: > > Am 14.09.2018 um 23:35 schrieb Segher Boessenkool > > : > > Could you please show generated code before and after this patch? > > I mean generated assembler code. What -S gives you. > > Before: > > foo4: > .LFB0: > .cfi

Re: [committed] hppa: Fix canonicalize of method and void pointers in comparison operations

2018-09-17 Thread John David Anglin
On 2018-09-17 11:02 AM, Jeff Law wrote: On 9/14/18 5:44 PM, John David Anglin wrote: The attached change fixes the canonicalization of method and void pointers in comparisons against another method or function pointer on 32-bit hppa targets.  As far as I know, 32-bit hppa is the only architectur

Re: vector _M_start and 0 offset

2018-09-17 Thread Jonathan Wakely
On 15/09/18 14:27 +0200, Marc Glisse wrote: Hello, as explained in the PR, the implementation of vector is weirdly wasteful. Preserving the ABI prevents from changing much for now, but this small tweak can help the compiler remove quite a bit of dead code. I think most other direct uses of

Re: [PATCH] Maybe fix PR87134

2018-09-17 Thread Iain Sandoe
Hi Rainer, > On 6 Sep 2018, at 21:21, Rainer Orth wrote: > >> I can confirm the same, repeatable, fail on i686-darwin10 (and it >> reproduces with -save-temps) >> (and the vNULL change does not fix it there either) - don’t have access to >> the machine now until >> later in the month tho. > >

[PATCH, i386]: Remove some x87 rounding patterns ...

2018-09-17 Thread Uros Bizjak
... and extend operands to XFmode instead. 2018-09-17 Uros Bizjak * config/i386/i386.md (truncxf2_i387_noop_unspec): Change operand 0 predicate to nonimmediate operand. (rint2_frndint): Remove insn pattern. (rint2): Change operand 1 predicate to general_operand. Extend oper

Re: [committed] hppa: Fix canonicalize of method and void pointers in comparison operations

2018-09-17 Thread Jeff Law
On 9/14/18 5:44 PM, John David Anglin wrote: > The attached change fixes the canonicalization of method and void > pointers in comparisons against > another method or function pointer on 32-bit hppa targets.  As far as I > know, 32-bit hppa is the only > architecture that requires function pointer

[RFA] Minor cleanup to VRP/EVRP handling of deferred edge/switch optimization

2018-09-17 Thread Jeff Law
This is a relatively minor cleanup that I should have caught last cycle, but somehow missed. We have two structures TO_REMOVE_EDGES and TO_UPDATE_SWITCH_STMTS which are used by the VRP/EVRP code to record edges to remove and switch statements that need updating. They are currently implemented as

Re: [PATCH][Middle-end][Version 2]Add a new option to control inlining only on static functions

2018-09-17 Thread Qing Zhao
> On Sep 14, 2018, at 3:45 PM, Andrew Pinski wrote: > > On Fri, Sep 14, 2018 at 1:42 PM Andrew Pinski > wrote: >> >> On Fri, Sep 14, 2018 at 1:34 PM Qing Zhao wrote: >>> >>> Hi, >>> >>> this is the 2nd version of the patch to add a new first-class option >>> >>>

Re: [PATCH]: Allow TARGET_SCHED_ADJUST_PRIORITY hook to reduce priority

2018-09-17 Thread Andreas Schwab
On Sep 17 2018, John David Anglin wrote: > On 2018-09-17 5:08 AM, Andreas Schwab wrote: >> PR rtl-optimization/85458 >> * sel-sched.c (sel_target_adjust_priority): Remove wrong >> assertion. >> >> diff --git a/gcc/sel-sched.c b/gcc/sel-sched.c >> index 824f1ec340..1be977d70b 100644

[PATCH] Fix PR63155

2018-09-17 Thread Richard Biener
The following fixes the memory use at -O0 from out-of-SSA coalescing (conflict computation in particular) with lots of abnormals (setjmp calls). After reviewing I found no reason to not use compute_optimized_partition_bases since we populate the coalesce lists and used_in_copy pieces correctly a

Re: [PATCH]: Allow TARGET_SCHED_ADJUST_PRIORITY hook to reduce priority

2018-09-17 Thread John David Anglin
On 2018-09-17 5:08 AM, Andreas Schwab wrote: PR rtl-optimization/85458 * sel-sched.c (sel_target_adjust_priority): Remove wrong assertion. diff --git a/gcc/sel-sched.c b/gcc/sel-sched.c index 824f1ec340..1be977d70b 100644 --- a/gcc/sel-sched.c +++ b/gcc/sel-sched.c @@ -33

[PATCH] Fix PR87328

2018-09-17 Thread Richard Biener
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2018-09-17 Richard Biener PR tree-optimization/87328 * tree-ssa-sccvn.c (process_bb): Remove assertion about not visiting unexecutable backedges when not iterating. (do_rpo_vn): Mark all e

Re: [PATCH, rs6000, committed] Use correct ABI type in mmintrin.h and xmmintrin.h

2018-09-17 Thread Bill Schmidt
On 9/15/18 4:21 PM, Segher Boessenkool wrote: > On Sat, Sep 15, 2018 at 03:28:17PM -0500, Bill Schmidt wrote: >> Jinsong Ji reported that these header files are using the non-ABI type >> __int128_t rather than __int128. This patch from Jinsong corrects this. >> Bootstrapped and tested on powerpc64

Re: [ARM] Fix ICE during thunk generation with -mlong-calls

2018-09-17 Thread Richard Earnshaw (lists)
On 17/09/18 12:19, Eric Botcazou wrote: > Hi, > > this is a regression present on mainline, 8 and 7 branches. The new, RTL > implementation of arm32_output_mi_thunk breaks during the libstdc++ build if > you configure the compiler with -mlong-calls by default: > > 0xdb57eb gen_reg_rtx(machine_

[PATCH 2/2] [ARC] Avoid specific constants to end in limm field.

2018-09-17 Thread Claudiu Zissulescu
The 3-operand instructions accepts to place an immediate into the second operand. However, this immediate will end up in the long immediate field. This patch avoids constants to end up in the limm field for particular instructions when compiling for size. gcc/ -xx-xx Claudiu Zissulescu

[PATCH 0/2] [ARC] Bug fix, improve size figures.

2018-09-17 Thread Claudiu Zissulescu
Hi Andrew, Please find two patches, one is fixing the dmac issue with non odd-even register pairs (test added). The second patch tries to improve the size figures by managing the long immediate field. Thanks, Claudiu Claudiu Zissulescu (2): [ARC] Check for odd-even register when emitting do

[PATCH 1/2] [ARC] Check for odd-even register when emitting double mac ops.

2018-09-17 Thread Claudiu Zissulescu
Avoid generate dmac instructions when the register is not odd-even, use instead the equivalent mac instruction. gcc/ Claudiu Zissulescu * config/arc/arc.md (maddsidi4_split): Don't use dmac if the destination register is not odd-even. (umaddsidi4_split): Likewise

Re: [PATCH] Optimize sin(atan(x)), take 2

2018-09-17 Thread Giuliano Augusto Faulin Belinassi
Ping. On Mon, Sep 3, 2018 at 4:11 PM, Giuliano Augusto Faulin Belinassi wrote: > Fixed the issues pointed by the previous discussions. Closes PR86829. > > Adds substitution rules for sin(atan(x)) and cos(atan(x)), being > careful with overflow issues by constructing a assumed convergence > consta

Re: [PATCH 14/25] Disable inefficient vectorization of elementwise loads/stores.

2018-09-17 Thread Andrew Stubbs
On 17/09/18 12:43, Richard Sandiford wrote: OK, sounds like the cost of vec_construct is too low then. But looking at the port, I see you have: /* Implement TARGET_VECTORIZE_BUILTIN_VECTORIZATION_COST. */ int gcn_vectorization_cost (enum vect_cost_for_stmt ARG_UNUSED (type_of_cost),

Re: [PATCH 14/25] Disable inefficient vectorization of elementwise loads/stores.

2018-09-17 Thread Richard Sandiford
Andrew Stubbs writes: > On 17/09/18 10:14, Richard Sandiford wrote: >> writes: >>> If the autovectorizer tries to load a GCN 64-lane vector elementwise then it >>> blows away the register file and produces horrible code. >> >> Do all the registers really need to be live at once, or is it "just"

Re: [PATCH] Introduce libgcov.so run-time library (PR gcov-profile/84107).

2018-09-17 Thread Martin Liška
On 9/12/18 5:02 PM, Alexander Monakov wrote: > On Wed, 12 Sep 2018, Martin Liška wrote: >> I see, I'm attaching patch that does that. I can confirm your test-case works >> fine w/o -Wl,--dynamic-list-data. >> >> I'm wondering if it will work as well with dlopen/dlsym machinery? Or now >> the linker

Re: [PATCH] Introduce libgcov.so run-time library (PR gcov-profile/84107).

2018-09-17 Thread Martin Liška
On 9/12/18 4:48 PM, Richard Biener wrote: > On Wed, Sep 12, 2018 at 11:27 AM Martin Liška wrote: >> >> On 9/11/18 5:08 PM, Alexander Monakov wrote: >>> On Tue, 11 Sep 2018, Martin Liška wrote: I've discussed the topic with Alexander on the Cauldron and we hoped that the issue with unique

[PATCH c++/pr87295] -fdebug-types-section ICE

2018-09-17 Thread Nathan Sidwell
Richard, this patch makes the ICE go away, but I really don't know if it's correct. When cloning the type die I copy die_id, so it is found during the (currently ICEing) hash lookup. In this particular testcase we clone the die twice. Once from break_out_comdat_types and once from copy_decl

Re: [Patch, fortran] PR64120 - [F03] Wrong handling of allocatable character string

2018-09-17 Thread Paul Richard Thomas
Hi Janne, Thanks. Committed as revision 264365. Paul On 17 September 2018 at 11:34, Janne Blomqvist wrote: > On Mon, Sep 17, 2018 at 1:10 PM Paul Richard Thomas > wrote: >> >> This patch is relatively trivial. This initialization of the string >> length was not being done. >> >> Bootstraps an

[ARM] Fix ICE during thunk generation with -mlong-calls

2018-09-17 Thread Eric Botcazou
Hi, this is a regression present on mainline, 8 and 7 branches. The new, RTL implementation of arm32_output_mi_thunk breaks during the libstdc++ build if you configure the compiler with -mlong-calls by default: 0xdb57eb gen_reg_rtx(machine_mode) /home/eric/svn/gcc/gcc/emit-rtl.c:1155 0

Re: [PATCH] PR86957

2018-09-17 Thread Jan Hubicka
> On 9/16/18 12:58 AM, Indu Bhagat wrote: > > Thanks for the reviews. I have incorporated them in this patch except the > > one > > (changes in common.opt) below. > > > > In this patch, > > > > 1. -Wmissing-profile is a warning by default and is ON by default with > >-fprofile-use > > 2. A

  1   2   >