[PATCH 2/4 v3][PR 67328] Analyze some bit tests in VRP

2017-05-28 Thread Yuri Gribov
This improve VRP handling for bitfield comparisons added by previous patch. -I 0002-Analyze-some-bit-tests-in-VRP.patch Description: Binary data

[PATCH 1/4 v3][PR 67328] Generate bittests in range checks if possible

2017-05-28 Thread Yuri Gribov
Added special case to build_range_check. Fixed couple of existing tests where it changed codegen. -I 0001-Generate-bittests-in-range-checks-if-possible.patch Description: Binary data

[PATCH 0/4 v3][PR 67328] Improve bitfield range tests

2017-05-28 Thread Yuri Gribov
Hi all, This is a follow up for my previous fix for PR 67328. My original simple addition to match.pd no longer worked with GCC 7 codebase so I instead added a special case to build_range_check. I kept match.pd pattern as it still works in some other useful cases as illustrated by fold-masked-cmp

Re: Optimisation of std::binary_search of the header

2017-05-28 Thread Tim Song
This is not a patch. Nor is it an implementation of std::binary_search, which is a function template that accepts arbitrary forward iterators and optionally arbitrary comparator objects, rather than just pointers. If you want to find someone to review your code, consider something like https://cod

Re: [PATCH] Introduce 4-stages profiledbootstrap to get a better profile.

2017-05-28 Thread Markus Trippelsdorf
On 2017.05.25 at 11:55 +0200, Martin Liška wrote: > Hi. > > As I spoke about the PGO with Honza and Richi, current 3-stage is not ideal > for following > 2 reasons: > > 1) stageprofile compiler is train just on libraries that are built during > stage2 > 2) apart from that, as the compiler is al

Re: [PATCH 1/5][GIMPLE FE] PR testsuite/80580. Handle missing labels in goto statements

2017-05-28 Thread Mikhail Maltsev
Hi. Sorry for a long delay. On 02.05.2017 17:16, Richard Biener wrote: > Certainly an improvement. I suppose we can do better error recovery > for cases like > > if (1) >goto > else >goto bar; > > but I guess this is better than nothing. I think it's worth spending a bit more time to

Optimisation of std::binary_search of the header

2017-05-28 Thread jay pokarna
Hey, I am Jay. I have written code for an optimised version of the binary_search algorithm of the algorithm header file of the standard template library. I have implemented it for the integer data type, but it can be implemented for any other data type without any changes in the algorithm as suc

[patch, libgfortran] PR53029 missed optimization in internal read (without implied-do-loop)

2017-05-28 Thread Jerry DeLisle
Hi all, The problem here is that we never set the err return to LIBERROR_END in all cases. For the example case we are detecting the EOF condition inside the read_integer procedure and it gets acted on correctly at higher levels in the code. Consequently in the big loop over the array where we

Re: [patch, fortran] Create some temporary variables for matmul arguments

2017-05-28 Thread Jerry DeLisle
On 05/28/2017 02:40 PM, Thomas Koenig wrote: Hello world, the attached patch generates some more opportunities for matmul inlining by creating temporaries if arguments overlap, if the return is from a function or something similar. With this, we are pretty much coming to the end of the matmul o

Re: builtin fenv functions

2017-05-28 Thread Marc Glisse
On Fri, 26 May 2017, Richard Biener wrote: Similarly, I don't see div as a builtin in that file, only FILE* has special code, but that doesn't seem worth the trouble here. So I am only declaring the 5 "simple" functions, with minimal properties: leaf, nothrow, and for fegetround pure (glibc alre

Re: [Patch, fortran] PR35339 Optimize implied do loops in io statements

2017-05-28 Thread Jerry DeLisle
On 05/27/2017 12:49 PM, Nicolas Koenig wrote: Hello everyone, attached is a patch to simplify implied do loops in io statements by replacing them with their respective array slices. For example "WRITE (*,*) (a(i), i=1,4,2)" becomes "WRITE (*,*) a(1:4:2)". Ok for trunk? Thanks for patch. C

New Spanish PO file for 'gcc' (version 7.1.0)

2017-05-28 Thread Translation Project Robot
Hello, gentle maintainer. This is a message from the Translation Project robot. A revised PO file for textual domain 'gcc' has been submitted by the Spanish team of translators. The file is available at: http://translationproject.org/latest/gcc/es.po (This file, 'gcc-7.1.0.es.po', has just

Re: [PATCH 0/13] D: Submission of D Front End

2017-05-28 Thread Iain Buclaw
On 28 May 2017 at 22:31, Iain Buclaw wrote: > On 28 May 2017 at 15:30, Iain Buclaw wrote: >> >> --- >> >> Iain Buclaw (13): >> 001 - The front-end (DMD) language implementation and license. >> 002 - The front-end (GDC) implementation. >> 003 - The front-end (GDC) changelogs (here be dragons

[PATCH 12/13] D: The Phobos runtime library and license.

2017-05-28 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. I've uploaded the patch to my ftp, sorry a

[PATCH 8/13] D: D2 Testsuite compilable tests.

2017-05-28 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. I've uploaded the patch to my ftp, sorry about the imp

[PATCH 10/13] D: The D runtime library and license.

2017-05-28 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, fortran] Create some temporary variables for matmul arguments

2017-05-28 Thread Thomas Koenig
Hello world, the attached patch generates some more opportunities for matmul inlining by creating temporaries if arguments overlap, if the return is from a function or something similar. With this, we are pretty much coming to the end of the matmul optimization saga. After this, on to new shore

Re: [Patch] SFINAE on is_same first in variant's _Tp&& constructor

2017-05-28 Thread Tim Shen via gcc-patches
On Tue, May 23, 2017 at 3:24 AM, Jonathan Wakely wrote: > On 22/05/17 16:14 -0400, Tim Song wrote: > Ah I see. > >> The original patch does that (assuming core issue 1227's resolution), >> but the __and_ version doesn't; __and_ only short circuits the >> immediate parameter, not things used in form

[PATCH 11/13] D: GCC builtins and runtime support.

2017-05-28 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.atomic is a deprecated module that defines templated __sync builtins. It's o

[PATCH 9/13] D: D2 Testsuite Dejagnu files.

2017-05-28 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. --- [PATCH 9/13] D: D2 Testsuite Dejagnu files. This patch adds D language support to the GCC testsuite.

[PATCH 7/13] D: Add D language support to GCC targets.

2017-05-28 Thread Iain Buclaw
This patch add D language support to targets of GCC itself. These are 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 target macros

[PATCH 5/13] D: GCC configuration file changes and documentation.

2017-05-28 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-l

[PATCH 6/13] D: Add D language support to GCC proper.

2017-05-28 Thread Iain Buclaw
This patch adds D language support to GCC itself. --- gcc/ChangeLog * config/rs6000/rs6000.c (rs6000_output_function_epilogue): Support GNU D by using 0 as the language type. * dwarf2out.c (is_dlang): New function. (gen_compile_unit_die): Use DW_LANG_D for D. (declare_in_namespace): Return m

[PATCH 4/13] D: The front-end (GDC) config, makefile, and manpages.

2017-05-28 Thread Iain Buclaw
This patch adds the D frontend language configure make files, as described on the anatomy of a language front-end. --- diff --git a/gcc/d/Make-lang.in b/gcc/d/Make-lang.in new file mode 100644 index 000..9618f5da8c0 --- /dev/null +++ b/gcc/d/Make-lang.in @@ -0,0 +1,274 @@ +# Make-lang.in -

[PATCH 3/13] D: The front-end (GDC) changelogs.

2017-05-28 Thread Iain Buclaw
This patch just includes all changelogs for the D front-end (GDC), going back to the dawn of time itself. Change logs for the DMD front-end and libraries are kept on the dlang site. Regards Iain --- 03-d-frontend-changelogs.patch.xz Description: application/xz

Re: [PATCH 1/13] D: The front-end (DMD) language implementation and license.

2017-05-28 Thread Iain Buclaw
Split 4/4 Gzipped because of size limitations. I feel like I should probably put off submitting the libraries, as they are be far, far, far bigger. Instead only submitting the GDC parts for now, and looking at the others when I get back. ---

Re: [PATCH] Add header implementation of std::to_string for integers (PR libstdc++/71108)

2017-05-28 Thread Ville Voutilainen
On 28 May 2017 at 23:29, Tim Song wrote: > libstdc++ has a to_chars implementation already. Assuming that the > locale issue isn't a problem, can that be reused? Maybe, but that implementation hasn't landed yet. The patch has been circulated but I don't see it having been committed.

Re: [PATCH 0/13] D: Submission of D Front End

2017-05-28 Thread Iain Buclaw
On 28 May 2017 at 15:30, Iain Buclaw wrote: > > --- > > Iain Buclaw (13): > 001 - The front-end (DMD) language implementation and license. > 002 - The front-end (GDC) implementation. > 003 - The front-end (GDC) changelogs (here be dragons). > 004 - The front-end (GDC) config, makefile, and

Re: [PATCH] Add header implementation of std::to_string for integers (PR libstdc++/71108)

2017-05-28 Thread Tim Song
libstdc++ has a to_chars implementation already. Assuming that the locale issue isn't a problem, can that be reused?

Re: Default std::vector default and move constructor

2017-05-28 Thread François Dumont
On 27/05/2017 13:14, Jonathan Wakely wrote: On 26/05/17 23:13 +0200, François Dumont wrote: On 25/05/2017 18:28, Jonathan Wakely wrote: On 15/05/17 19:57 +0200, François Dumont wrote: Hi Following what I have started on RbTree here is a patch to default implementation of default and move c

Re: [PATCH] Add header implementation of std::to_string for integers (PR libstdc++/71108)

2017-05-28 Thread Daniel Krügler
2017-05-28 21:38 GMT+02:00 Adrian Wielgosik : >> so a conforming program could notice the difference by either calling >> std::setlocale. > > Unless I missed or misunderstood something about locale (please let me > know if I did), I don't know of any way for locale to affect %d and > its integer f

Re: [PATCH] Add header implementation of std::to_string for integers (PR libstdc++/71108)

2017-05-28 Thread Adrian Wielgosik
> so a conforming program could notice the difference by either calling > std::setlocale. Unless I missed or misunderstood something about locale (please let me know if I did), I don't know of any way for locale to affect %d and its integer friends.

Re: Fix libgfortran FMA3/FMA4 tests

2017-05-28 Thread Thomas Koenig
Hi Rainer, It turns out that the FMA3 and FMA4 tests in acinclude.m4 don't test what they claim to: if one compiles the test program float flt_mul_add (float a, float b, float c) { return __builtin_fmaf (a, b, c); } with -O2 -mfma -mno-fma4 (FMA3) resp. -O2 -mfma4 -mno-fma (FMA4), bot

Fix libgfortran FMA3/FMA4 tests

2017-05-28 Thread Rainer Orth
The recent libgfortran AVX128 patch broke bootstrap on Solaris/x86 with the native assembler. libgfortran compilation fails like this: Assembler: matmulavx128_r8.c "/var/tmp//cc51E6lb.s", line 5811 : Illegal mnemonic Near line: "vfmaddpd%xmm0, (%edi), %xmm5, %xmm7"

Re: MinGW compilation warnings in libiberty's xstrndup.c

2017-05-28 Thread Eli Zaretskii
> From: DJ Delorie > Cc: gcc-patches@gcc.gnu.org, gdb-patc...@sourceware.org > Date: Fri, 26 May 2017 17:34:12 -0400 > > > Please try this patch: Seems to work fine, thanks.

Re: [PATCH] add more detail to -Wconversion and -Woverflow (PR 80731)

2017-05-28 Thread Andreas Schwab
tatic char16_tc9 = L'\U00064321'; /* { dg-warning > "unsigned conversion from .wchar_t. to .char16_t. changes value from .410401. > to .17185." "" { target { 4byte_wchar_t } } } */ That fails on aarch64. FAIL: g++.dg/ext/utf16-4.C -std=c++11 (tes

[patch, fortran, committed] Fix size of matmul calculation for a special case

2017-05-28 Thread Thomas Koenig
Hello world, I have just committed as obvious a patch fixing a wrong calculation for allocating the size of a return variable in inline matmul (PR 80904). I will backport to the other affected branches in the near future. Regards Thomas 2017-05-28 Thomas Koenig * frontend-

Re: [libcc1] add support for C++

2017-05-28 Thread Alexandre Oliva
On May 26, 2017, Richard Biener wrote: > On Mon, Jan 30, 2017 at 11:31 PM, Alexandre Oliva wrote: > bool oracle_looked_up; > that increased lang_identifier size by 8 bytes while there's "plenty" of free > bits in tree_base (bonus point if you can reap a lang_flag). Oh, no! I put it there te

Re: [PATCH] Add header implementation of std::to_string for integers (PR libstdc++/71108)

2017-05-28 Thread Daniel Krügler
2017-05-27 23:46 GMT+02:00 Adrian Wielgosik : > Currently std::to_string takes a fairly long trip to vs(n/w)printf. The patch > implements int-to-string formatting in header, to improve function > performance. The existing specification of std::to_string is specified in a way that would make this

[PATCH] Fix expand_builtin_atomic_fetch_op for pre-op (PR80902)

2017-05-28 Thread Segher Boessenkool
__atomic_add_fetch adds a value to some memory, and returns the result. If there is no direct support for this, expand_builtin_atomic_fetch_op is asked to implement this as __atomic_fetch_add (which returns the original value of the mem), followed by the addition. Now, the __atomic_add_fetch could

Re: [PATCH 3/3] [D] libiberty: Prefix mangled D initializer symbols

2017-05-28 Thread Iain Buclaw
On 26 May 2017 at 20:20, Ian Lance Taylor wrote: > On Fri, May 26, 2017 at 9:08 AM, Iain Buclaw wrote: >> This is instead of adding a `.init$' postfix, which gave it a >> property-style name. My rationale being that "initializer for symbol" >> is much more informative when inspecting D runtime t