Re: [PATCH] PR59170 make pretty printers check for singular iterators

2016-12-15 Thread Jan Kratochvil
On Fri, 16 Dec 2016 02:07:07 +0100, Jonathan Wakely wrote: > On 15/12/16 22:19 +0100, Jan Kratochvil wrote: > > Just with the GDB 'compile' project (libcc1) which is planned to be used for > > all GDB expressions evalation the Xmethods will no longer work. > > But then *it can just get compiled,

Re: [RFA] [PR tree-optimization/33562] [PATCH 1/4] Byte tracking in DSE

2016-12-15 Thread Trevor Saunders
On Thu, Dec 15, 2016 at 06:54:43PM -0700, Jeff Law wrote: >unsigned cnt = 0; > + bitmap live_bytes = NULL; > + bitmap orig_live_bytes = NULL; > >*use_stmt = NULL; > > + /* REF is a memory write. Go ahead and get its base, size, extent > + information and encode the bytes

Re: [PATCH] fix powerpc64le bootstrap failure caused by r243661 (PR 78817)

2016-12-15 Thread Martin Sebor
On 12/14/2016 09:19 PM, Jeff Law wrote: On 12/14/2016 03:56 PM, Martin Sebor wrote: The -Wnonnull warning improvement (PR c/17308 - nonnull attribute not as useful as it could be) causes a couple of false positives in a powerpc64le bootstrap. The attached fix suppresses them. It passes

[patch,fortran] PR78622 [F03] Incorrect parsing of quotes in the char-literal-constant of the DT data descriptor

2016-12-15 Thread Jerry DeLisle
Hi all, The attached patch regression tested on x86-64-linux. This adds a static function to allocate and extract the DT format string that may contain doubled quotes. OK for trunk, test case also attched. Jerry 2016-12-16 Jerry DeLisle PR fortran/78622

[RFA] [PATCH 4/4] Ignore reads of "dead" memory locations in DSE

2016-12-15 Thread Jeff Law
This is the final patch in the kit to improve our DSE implementation. It's based on a observation by Richi. Namely that a read from bytes of memory that are dead can be ignored. By ignoring such reads we can sometimes find additional stores that allow us to either eliminate or trim an

[RFA][PR tree-optimization/61912] [PATCH 2/4] Trimming CONSTRUCTOR stores in DSE

2016-12-15 Thread Jeff Law
This is the second patch in the kit to improve our DSE implementation. This patch recognizes when a CONSTRUCTOR assignment could be trimmed at the head or tail because those bytes are dead. The first implementation of this turned the CONSTRUCTOR into a memset. This version actually rewrites

[RFA][PATCH 3/4] Trim mem* calls in DSE

2016-12-15 Thread Jeff Law
This is the 3rd patch in the kit to improve our DSE implementation. This patch supports trimming of the head or tail of a memset, memcpy or memmove call. It's conceptually similar to trimming CONSTRUCTORS (and was in fact developed first). Try as I might, I couldn't find a BZ in our

[RFA] [PR tree-optimization/33562] [PATCH 1/4] Byte tracking in DSE

2016-12-15 Thread Jeff Law
This is the first of the 4 part patchkit to address deficiencies in our DSE implementation. This patch addresses the P2 regression 33562 which has been a low priority regression since gcc-4.3. To summarize, DSE no longer has the ability to detect an aggregate store as dead if subsequent

[PATCH 0/4] Improve DSE implementation

2016-12-15 Thread Jeff Law
This is a 4 part patchkit to address various deficiencies in our DSE implementation. BZ33562 was the inspiration for this work. 33562 is a low priority regression that's been around for a long time. Patch #1 addresses 33562, "aggregate DSE disabled" and also implements trimming of complex

Re: [PATCH] PR59170 make pretty printers check for singular iterators

2016-12-15 Thread Jonathan Wakely
On 15/12/16 22:19 +0100, Jan Kratochvil wrote: On Thu, 15 Dec 2016 15:18:17 +0100, Jonathan Wakely wrote: I'm going to add Xmethods for all our iterator types so that it will always be possible to do "print *iter", so if GDB supports Xmethods then we don't need to register the iterator

Go patch committed: fix comments and field names to match current libgo sources

2016-12-15 Thread Ian Lance Taylor
This patch by Than McIntosh fixes some comments and field names in the compiler to match the current libgo sources. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE

GCC 6 RFA: Go patch: call determine_types even for constant expressions

2016-12-15 Thread Ian Lance Taylor
On Thu, Dec 15, 2016 at 2:47 PM, Ian Lance Taylor wrote: > The Go frontend needs to call determine_types even for constant > expressions, which it was not doing. The problem is that a constant > expression may include code like unsafe.Sizeof(0). Something needs to > determine

Go patch committed: Fix off-by-one error in array length for GC symbol

2016-12-15 Thread Ian Lance Taylor
This patch by Than McIntosh fixes an off-by-one error in the array length of the value we create for a GC symbol. This was not serious, it just wasted an element. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE

Go patch committed: call determine_types even for constant expressions

2016-12-15 Thread Ian Lance Taylor
The Go frontend needs to call determine_types even for constant expressions, which it was not doing. The problem is that a constant expression may include code like unsafe.Sizeof(0). Something needs to determine the type of the untyped 0, and that should be the determine_types pass.

[PATCH, i386]: Improve ffs for TARGET_BMI and macroize a couple of bitmanip patterns

2016-12-15 Thread Uros Bizjak
Hello! Attached patch improves ffs expandsion for TARGET_BMI targets. Compared to bsf, tzcnt is noticeably faster on AMD processors. However, since generic target enables TARGET_AVOID_FALSE_DEP_FOR_BMI, we always expand ffs with bsf, even when using -mbmi. Attached patch enables

Re: [2/67] Make machine_mode a class

2016-12-15 Thread Trevor Saunders
On Fri, Dec 09, 2016 at 12:52:03PM +, Richard Sandiford wrote: > This patch renames enum machine_mode to enum machine_mode_enum > and adds a machine_mode wrapper class. > > The previous patch mechanically replaced mode names in case > statements; this one updates other places that should

Re: [PATCH] PR59170 make pretty printers check for singular iterators

2016-12-15 Thread Jan Kratochvil
On Thu, 15 Dec 2016 15:18:17 +0100, Jonathan Wakely wrote: > I'm going to add Xmethods for all our iterator types so that it will > always be possible to do "print *iter", so if GDB supports Xmethods > then we don't need to register the iterator printers. Just with the GDB 'compile' project

Re: [PATCH][ARM] Merge negdi2 patterns

2016-12-15 Thread Richard Earnshaw
On 30/11/16 17:39, Wilco Dijkstra wrote: > The negdi2 patterns for ARM and Thumb-2 are duplicated because Thumb-2 > doesn't support RSC with an immediate. We can however emulate RSC with > zero using a shifted SBC. If we add this to subsi3_carryin the negdi > patterns can be merged, simplifying

Re: [Patch, Fortran, cleanup] PR 78798: some int-valued functions should be bool

2016-12-15 Thread Janus Weil
2016-12-15 21:41 GMT+01:00 Steve Kargl : > On Thu, Dec 15, 2016 at 08:38:47PM +0100, Janus Weil wrote: >> 2016-12-13 19:55 GMT+01:00 Janus Weil : >> > 2016-12-13 19:19 GMT+01:00 Janne Blomqvist : >> >> On Tue, Dec 13,

Re: [PATCH][ARM] Improve Thumb allocation order

2016-12-15 Thread Richard Earnshaw (lists)
On 30/11/16 17:32, Wilco Dijkstra wrote: > Thumb uses a special register allocation order to increase the use of low > registers. Oddly enough, LR appears before R12, which means that LR must > be saved and restored even if R12 is available. Swapping R12 and LR means > this simple example now

Re: [PATCH] Formatting and spelling fixes for ipa-cp.c

2016-12-15 Thread Bernd Schmidt
On 12/15/2016 05:51 PM, Jakub Jelinek wrote: This patch fixes what I've found quickly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? Ok. Bernd

Fix concept checks usage

2016-12-15 Thread François Dumont
Hi Here is a fix in the usage of a concept check. There are also many testsuite failures when using concept checks but this one forbids the library from being built. I know that concept checks are not really maintained so maybe the fix is to simply remove those checks. *

Re: [Patch, Fortran, cleanup] PR 78798: some int-valued functions should be bool

2016-12-15 Thread Steve Kargl
On Thu, Dec 15, 2016 at 08:38:47PM +0100, Janus Weil wrote: > 2016-12-13 19:55 GMT+01:00 Janus Weil : > > 2016-12-13 19:19 GMT+01:00 Janne Blomqvist : > >> On Tue, Dec 13, 2016 at 8:13 PM, Janus Weil wrote: > >>> Hi all, > >>> > >>>

[v3 PATCH] Implement LWG 2769, Redundant const in the return type of any_cast(const any&).

2016-12-15 Thread Ville Voutilainen
Tested on Linux-x64. 2016-12-15 Ville Voutilainen Implement LWG 2769, Redundant const in the return type of any_cast(const any&). * include/std/any (_AnyCast): New. (any_cast(const any&)): Use it and add an explicit cast for return.

Re: [PATCH] c++/pr77585 bogus this error with generic lambda

2016-12-15 Thread Jason Merrill
OK. On Thu, Dec 15, 2016 at 7:38 AM, Nathan Sidwell wrote: > 77585 concerns the instantiation of a generic lambda that contains a call to > a non-dependent non-static member function. > > auto lam = [&](auto) { return Share (); }; > r += Eat (lam); // instantation of

Re: [Patch, Fortran, cleanup] PR 78798: some int-valued functions should be bool

2016-12-15 Thread Janus Weil
2016-12-13 19:55 GMT+01:00 Janus Weil : > 2016-12-13 19:19 GMT+01:00 Janne Blomqvist : >> On Tue, Dec 13, 2016 at 8:13 PM, Janus Weil wrote: >>> Hi all, >>> >>> here is a straightforward cleanup patch that makes a few functions >>>

Re: [C++ PATCH] P0490R0 GB 20: decomposition declaration should commit to tuple interpretation early (take 2)

2016-12-15 Thread Jason Merrill
OK. On Thu, Dec 15, 2016 at 11:44 AM, Jakub Jelinek wrote: > On Thu, Dec 15, 2016 at 07:40:58AM -0500, Nathan Sidwell wrote: >> On 12/15/2016 07:26 AM, Jakub Jelinek wrote: >> >> > I don't think so. complete_type (error_mark_node) returns error_mark_node, >> > and

Re: [PATCH][GCC][PATCHv3] Improve fpclassify w.r.t IEEE like numbers in GIMPLE.

2016-12-15 Thread Joseph Myers
On Thu, 15 Dec 2016, Tamar Christina wrote: > > Note that on some systems we even disable 64bit floating point support. > > I suspect this check needs a little re-thinking as I don't think that > > checking for a specific UNITS_PER_WORD is correct, nor is checking the > > width of the type. I'm

Re: [PATCH] Add AVX512 k-mask intrinsics

2016-12-15 Thread Andrew Senkevich
2016-12-15 19:51 GMT+03:00 Uros Bizjak : > On Thu, Dec 15, 2016 at 2:31 PM, Andrew Senkevich > wrote: >> 2016-12-14 22:55 GMT+03:00 Uros Bizjak : >>> On Wed, Dec 14, 2016 at 8:04 PM, Andrew Senkevich >>>

Re: RFC: Make iterator printers fail more gracefully

2016-12-15 Thread Jonathan Wakely
On 15/12/16 13:11 -0500, David Malcolm wrote: On Thu, 2016-12-15 at 17:39 +, Jonathan Wakely wrote: This patch tries to improve the user experience when debugging container iterators, for cases where some of the typedefs used by the printers are not in the debuginfo, so gdb.lookup_type()

Re: [PATCH] Formatting and spelling fixes for ipa-cp.c

2016-12-15 Thread Martin Jambor
On Thu, Dec 15, 2016 at 05:51:25PM +0100, Jakub Jelinek wrote: > Hi! > > When looking at the noipa attribute, I've been initially changing > ipa-cp.c, and noticed some bad spellings (various functions called *accross* > rather than *across*) and tons of bad formatting, sometimes e.g. indentation

Re: RFC: Make iterator printers fail more gracefully

2016-12-15 Thread David Malcolm
On Thu, 2016-12-15 at 17:39 +, Jonathan Wakely wrote: > This patch tries to improve the user experience when debugging > container iterators, for cases where some of the typedefs used by the > printers are not in the debuginfo, so gdb.lookup_type() calls fail. > That happens if the iterator's

Re: RFC: Make iterator printers fail more gracefully

2016-12-15 Thread Ville Voutilainen
On 15 December 2016 at 19:39, Jonathan Wakely wrote: > This patch tries to improve the user experience when debugging > container iterators, for cases where some of the typedefs used by the > printers are not in the debuginfo, so gdb.lookup_type() calls fail. > That happens if

RFC: Make iterator printers fail more gracefully

2016-12-15 Thread Jonathan Wakely
This patch tries to improve the user experience when debugging container iterators, for cases where some of the typedefs used by the printers are not in the debuginfo, so gdb.lookup_type() calls fail. That happens if the iterator's operator*() and operator->() haven't been instantiated, or if

[PATCH] Formatting and spelling fixes for ipa-cp.c

2016-12-15 Thread Jakub Jelinek
Hi! When looking at the noipa attribute, I've been initially changing ipa-cp.c, and noticed some bad spellings (various functions called *accross* rather than *across*) and tons of bad formatting, sometimes e.g. indentation by 3 or -1 columns etc. This patch fixes what I've found quickly,

Re: [PATCH] Add AVX512 k-mask intrinsics

2016-12-15 Thread Uros Bizjak
On Thu, Dec 15, 2016 at 2:31 PM, Andrew Senkevich wrote: > 2016-12-14 22:55 GMT+03:00 Uros Bizjak : >> On Wed, Dec 14, 2016 at 8:04 PM, Andrew Senkevich >> wrote: >> >>> here is the second part of k-mask intrinsics,

[C++ PATCH] P0490R0 GB 20: decomposition declaration should commit to tuple interpretation early (take 2)

2016-12-15 Thread Jakub Jelinek
On Thu, Dec 15, 2016 at 07:40:58AM -0500, Nathan Sidwell wrote: > On 12/15/2016 07:26 AM, Jakub Jelinek wrote: > > > I don't think so. complete_type (error_mark_node) returns error_mark_node, > > and COMPLETE_TYPE_P (error_mark_node) is invalid (should fail TYPE_CHECK in > > checking compiler).

[PATCH] Optimiza aggregate a = b = c = {} (PR c/78408, take 2)

2016-12-15 Thread Jakub Jelinek
On Wed, Dec 14, 2016 at 01:27:56PM +0100, Richard Biener wrote: > Ah, ok. But then the size of the memset shouldn't be compared > against the get_ref_base_and_extend size from src2 but to the > size of the access of SRC/DEST (clearly looking at the "size" of > the ADDR_EXPR argument is somewhat

Re: [Patch Doc] Update documentation for __fp16 type

2016-12-15 Thread Sandra Loosemore
On 12/15/2016 03:27 AM, Jakub Jelinek wrote: On Thu, Dec 15, 2016 at 11:23:14AM +0100, Andreas Schwab wrote: On Dez 15 2016, Jakub Jelinek wrote: So, shall we change also the first 3? Yes, I'd think so. So here is it in patch form. Is this ok for trunk? 2016-12-15

Re: [PATCH][ARM] PR target/71436: Restrict *load_multiple pattern till after LRA

2016-12-15 Thread Kyrill Tkachov
On 15/12/16 09:55, Richard Earnshaw (lists) wrote: On 30/11/16 16:47, Kyrill Tkachov wrote: Hi all, In this awkward ICE we have a *load_multiple pattern that is being transformed in reload from: (insn 55 67 151 3 (parallel [ (set (reg:SI 0 r0) (mem/u/c:SI

[PATCH] builtin expansion of strncmp for rs6000

2016-12-15 Thread Aaron Sawdey
This patch adds a cmpstrnsi pattern for rs6000 target to provide builtin expansion of strncmp(). Perf tests on a power8 system show that it is 3-10x faster than the glibc strncmp on RHEL7 for lengths under 64 bytes. Bootstrap/regtest has passed on powerpc64le, in progress for powerpc64, ok for

Re: [PATCH] improve string find algorithm

2016-12-15 Thread Aditya K
Ping. From: Aditya Kumar Sent: Wednesday, December 7, 2016 11:46 AM To: libstd...@gcc.gnu.org Cc: gcc-patches@gcc.gnu.org; hiradi...@msn.com; Aditya Kumar Subject: [PATCH] improve string find algorithm   Here is an improved version of basic_string::find. The idea is

[PATCH 12/21] [arm] Eliminate vfp_reg_type

2016-12-15 Thread Richard Earnshaw (lists)
Remove the VFP_REGS field by converting its meanings into flag attributes. The new flag attributes build on each other describing increasing capabilities. This allows us to do a better job when inlining functions with differing requiremetns on the fpu environment: we can now inline A into B if

[PATCH 20/21] [arm] Remove FEATURES field from FPU descriptions.

2016-12-15 Thread Richard Earnshaw (lists)
Now that everything uses the new ISA features, we can remove the FEATURES field from the FPU descriptions, along with all the macros and definitions associated with it. * arm-fpus.def (ARM_FPU): Remove features field from all definitions. * arm.h (arm_fpu_feature_set): Delete

[PATCH 21/21] [arm] Permit 'auto' in -mfpu.

2016-12-15 Thread Richard Earnshaw (lists)
Now we finally have the infrastructure in place we can now derive details of the FPU from a CPU entry. This patch enables this for the existing cores that already have an explicit FPU in their product names. * arm-fpus.def: Add CNAME field to all FPU definitions. * genopt.sh:

[PATCH 18/21] [arm] Use cl_target_options for configuring the active target.

2016-12-15 Thread Richard Earnshaw (lists)
It now becomes apparent that it would be better to use the the cl_target_options as the basis for calling arm_configure_build_target; it already contains exactly the same fields that we need. I chose not to rewrite the earlier patches as that would make the progression of changes seem less

[PATCH 19/21] [arm] Use ISA feature sets for determining inlinability.

2016-12-15 Thread Richard Earnshaw (lists)
Now that we can construct the build target isa from the cl_target_options data we can use this to determine inlinability. This eliminates the final remaining use of the FPU features field. * arm.c (arm_can_inline_p): Use ISA features for determining inlinability. ---

[PATCH 13/21] [arm] Remove FPU rev field

2016-12-15 Thread Richard Earnshaw (lists)
Similar to the main ISA, we convert the FPU revision into a set of feature bits. This permits a more complex set of capability relationships to be expressed more easily. For now we continue to use the traditional bitmasks. * arm.h (FPU_FL_VFPv2) New feature bit. (FPU_FL_VFPv3,

[PATCH 17/21] [arm] Use arm_active_target for most FP feature tests.

2016-12-15 Thread Richard Earnshaw (lists)
Now that the isa feature bits are all available in arm_active_target we can use that for most of the feature tests that are needed. * arm.h (TARGET_VFPD32): Use arm_active_target. (TARGET_VFP3): Likewise. (TARGET_VFP5): Likewise. (TARGET_VFP_SINGLE): Likewise.

[PATCH 16/21] [arm] Eliminate TARGET_FPU_NAME.

2016-12-15 Thread Richard Earnshaw (lists)
Rather than assuming a specific fpu name has been selected, we work out the FPU from the ISA properties. This is necessary since once we have default FPUs selected by the processor, there will be no explicit entry in the table of fpus to refer to. This also fixes a bug with the code I added

[PATCH 14/21] [arm] Add isa features to FPU descriptions

2016-12-15 Thread Richard Earnshaw (lists)
Similar to the new CPU and architecture ISA feature lists, we now add similar capabilities to each FPU description. We don't use these yet, that will come in later patches. These follow the same style as the newly modified flag sets, but use slightly different defaults that more accurately

[PATCH 15/21] [arm] Initialize fpu capability bits in arm_active_target.

2016-12-15 Thread Richard Earnshaw (lists)
Now that we can describe the FPU with the standard ISA bits we need to initialize them. However, the FPU settings can be changed with target build attributes, so we also need to reset them if things change. This requires a bit of juggling about with the existing code to ensure that the active

[PATCH 09/21] [arm] Rework arm-common to use new feature bits.

2016-12-15 Thread Richard Earnshaw (lists)
This converts the recently added implicit -mthumb support code to use the new data structures. Since we have a very simple query and no initialized copies of the sbitmaps, for now we simply scan the list of features to look for the one of interest. * arm-opts.h (struct

[PATCH 10/21] [arm] Remove remaining references to arm feature sets.

2016-12-15 Thread Richard Earnshaw (lists)
Nothing uses the old feature sets now, so we can delete them entirely. * arm-cores.def: Remove FLAGS field from all core definitions. * arm-arches.def: Likewise. * arm-opts.h (enum processor_type): Remove FLAGS parameter from ARM_CORES macro.

[PATCH 08/21] [arm] Remove insn_flags.

2016-12-15 Thread Richard Earnshaw (lists)
This patch finishes the job of removing insn_flags and moves the logic over to using the new data structures. I've added a new boolean variable to detect when we have ARMv7ve-like capabilities and thus have 64-bit atomic operations since that would be a complex query and expensive to do in full.

[PATCH 11/21] [arm] Delete unused arm_fp_model.

2016-12-15 Thread Richard Earnshaw (lists)
The arm_fp_model enumeration type has only had one useful value since the FPA support was removed, and it's no-longer used anywhere. This patch just cleans that up by removing it. * arm.h (arm_fp_model): Delete. --- gcc/config/arm/arm.h | 8 1 file changed, 8 deletions(-)

[PATCH 07/21] [arm] Use arm_active_target when configuring builtins

2016-12-15 Thread Richard Earnshaw (lists)
This patch uses the new ISA data structure to determine which builtins to add. It entirely eliminates the need for insn_flags to be a global variable, but we're about to delete that in the following patches, so for now we leave it as a global. * arm-builtins.c: Include sbitmap.h.

[PATCH 06/21] [arm] Add new isa quirk bit for Cortex-M3 ldrd issue.

2016-12-15 Thread Richard Earnshaw (lists)
With the new data structures it is trivial to add a new field and we aren't (too) limited as to the number we have. This patch adds a new bit to describe the need for a particular compiler behaviour modification: in this case a quirk in the cortex-m3. * arm-isa.h (enum isa_feature): Add

[PATCH 04/21] [arm] Use arm_active_target for architecture and tune operations.

2016-12-15 Thread Richard Earnshaw (lists)
We now start to make more use of the new data structure. This allows us to eliminate two of the existing static variables, arm_selected_arch and arm_selected tune. * arm.c (arm_selected_tune): Delete static variable. (arm_selected_arch): Likewise.

[PATCH 03/21] [arm] Introduce arm_active_target.

2016-12-15 Thread Richard Earnshaw (lists)
This patch creates a new data structure for carrying around the data relating to the current compilation target. The idea behind this is that this data structure can be updated to reflect the overall compilation target as new information is gathered (from command line options) or architectural

[PATCH 05/21] [arm] Reduce usage of arm_selected_cpu.

2016-12-15 Thread Richard Earnshaw (lists)
Make more use of the new data structure for initializing existing variables. * arm.c (arm_option_override): Use arm_active_target as source of information for arm_base_arch and arm_arch_name. * (arm_file_start): Use arm_active_target for core name. ---

[PATCH 02/21] [arm] Add new isa bits method

2016-12-15 Thread Richard Earnshaw (lists)
This patch adds the new ISA data structures. The idea is to use an sbitmap for carrying these around internally. We don't make much use of this yet, but will increasingly migrate over to this in the following patches. All cores and architectures currently have both old and new encodings for

[PATCH 01/21] [arm] Separte tuning flags from architectural flags in CPU tables.

2016-12-15 Thread Richard Earnshaw (lists)
We start out by separating the 'tuning flags' in a CPU or architecture specification into a new field in the data structures. Because there aren't very many of these (and we'd like to get rid of them entirely, eventually, moving to entries in the tuning tables), we just use a simple unsigned

[PATCH 00/21] [ARM] Automatic selection of FPU

2016-12-15 Thread Richard Earnshaw (lists)
As discussed at this year's Cauldron, it has concerned me for a while now that when a user of the ARM compiler specifies a CPU they also need to specify which floating-point unit it has (even though the choice is almost invariably one). This patch implements the ability to make the selection

Re: [PATCH] combine: Replace sign_extend with zero_extend more often.

2016-12-15 Thread Segher Boessenkool
On Thu, Dec 15, 2016 at 01:57:06PM +0100, Dominik Vogt wrote: > > > The patch hasn't got a lot of testing yet as I'd like to hear your > > > opinion on the patch first. > > > > I am testing it on powerpc. Please also test on x86? > > > > > gcc/ChangeLog-signextend-1 > > > > > > * combine.c

Re: Pretty printers for versioned namespace

2016-12-15 Thread Jonathan Wakely
On 14/12/16 22:49 +0100, François Dumont wrote: On 09/12/2016 16:18, Jonathan Wakely wrote: But I don't know how to fix this so for the moment I just adapt it to correctly handle std::__7::string. But that's not correct. Please try to understand the point I'm making: The name

[PATCH, testsuite] MIPS: Relax instruction order check in msa-builtins.c.

2016-12-15 Thread Toma Tabacu
Hi, The 32-bit insert.d case in msa-builtins.c is failing with O2 and Os because the order of the emitted instructions is slightly different compared to the other optimization levels. This patch tweaks the regular expression for 32-bit insert.d to accept the alternate instruction order. Tested

Re: Pretty printers for versioned namespace

2016-12-15 Thread Jonathan Wakely
On 14/12/16 22:49 +0100, François Dumont wrote: @@ -1321,7 +1328,7 @@ def register_type_printers(obj): if not _use_type_printing: return -for pfx in ('', 'w'): +for pfx in ('', 'w', vers_nsp, vers_nsp + 'w'): add_one_type_printer(obj, 'basic_string', pfx + 'string')

[PATCH] PR59170 make pretty printers check for singular iterators

2016-12-15 Thread Jonathan Wakely
This is another partial fix for PR 59170, this time adding checks for normal mode iterators that are default-constructed, so we don't try to dereference null pointers. We still auto-dereference past-the-end iterators, and iterators that have been invalidated by container mutation. The former can

Re: [Patch, Fortran, OOP] PR 78800: ICE in compare_parameter, at fortran/interface.c:2246

2016-12-15 Thread Janus Weil
2016-12-15 14:30 GMT+01:00 Andre Vehreschild : > Looks good to me. Thanks, Andre. Committed to trunk as r243691. Cheers, Janus > On Thu, 15 Dec 2016 14:18:28 +0100 > Janus Weil wrote: > >> Hi all, >> >> the attached patch deals with error recovery only and

Re: [Patch, Fortran, OOP] PR 78800: ICE in compare_parameter, at fortran/interface.c:2246

2016-12-15 Thread Andre Vehreschild
Looks good to me. - Andre On Thu, 15 Dec 2016 14:18:28 +0100 Janus Weil wrote: > Hi all, > > the attached patch deals with error recovery only and fixes an > ICE-on-invalid problem. > > Regtests cleanly on x86_64-linux-gnu. Ok for trunk? > > Cheers, > Janus > > >

[PATCH] PR59161 make pretty printers always return strings

2016-12-15 Thread Jonathan Wakely
As discussed in the PR, when we return a gdb.Value from a printer's to_string() method GDB converts it to a string using a simplified format that omits the address part of pointer/reference fields. I think that's simply wrong, but in order to work with existing versions of GDB we need to always

[Patch, Fortran, OOP] PR 78800: ICE in compare_parameter, at fortran/interface.c:2246

2016-12-15 Thread Janus Weil
Hi all, the attached patch deals with error recovery only and fixes an ICE-on-invalid problem. Regtests cleanly on x86_64-linux-gnu. Ok for trunk? Cheers, Janus 2016-12-15 Janus Weil PR fortran/78800 * interface.c (compare_allocatable): Avoid additional errors

Re: [PATCH] combine: Replace sign_extend with zero_extend more often.

2016-12-15 Thread Dominik Vogt
On Thu, Dec 15, 2016 at 04:32:34AM -0600, Segher Boessenkool wrote: > On Wed, Dec 14, 2016 at 01:39:13PM +0100, Dominik Vogt wrote: > > There may be a slight imprecision in expand_compound_operation. > > When it encounters a SIGN_EXTEND where it's already known that the > > sign bit is zero, it

Re: [PATCH] Fix PR78515

2016-12-15 Thread David Edelsohn
On Thu, Dec 15, 2016 at 3:23 AM, Jakub Jelinek wrote: > On Wed, Dec 14, 2016 at 05:10:23PM -0700, Martin Sebor wrote: >> The regression test is failing on powerpc64le due to the warnings >> below: >> >> FAIL: gcc.dg/torture/pr78515.c -O0 (test for excess errors) >> Excess

[PATCH] Tweak formatting and docs for pretty printers

2016-12-15 Thread Jonathan Wakely
Trivial tweaks. * python/libstdcxx/v6/printers.py (UniquePointerPrinter.to_string): Remove redundant parentheses. (RbtreeIterator, StdRbtreeIteratorPrinter): Add docstrings. (StdForwardListPrinter.to_string): Remove redundant parentheses.

[PATCH] Add GDB XMethods for shared_ptr and unique_ptr<T[]>

2016-12-15 Thread Jonathan Wakely
This makes the Xmethods work for unique_ptr, including conditionally enabling operator* and operator-> only for non-arrays, and enabling operator[] only for arrays. And then adds similar Xmethods for shared_ptr. * python/libstdcxx/v6/xmethods.py (UniquePtrGetWorker.__init__): Use

Re: C++ Patch Ping

2016-12-15 Thread Nathan Sidwell
On 12/15/2016 07:26 AM, Jakub Jelinek wrote: I don't think so. complete_type (error_mark_node) returns error_mark_node, and COMPLETE_TYPE_P (error_mark_node) is invalid (should fail TYPE_CHECK in checking compiler). I can write it as inst = complete_type (inst); if (inst ==

[PATCH] c++/pr77585 bogus this error with generic lambda

2016-12-15 Thread Nathan Sidwell
77585 concerns the instantiation of a generic lambda that contains a call to a non-dependent non-static member function. auto lam = [&](auto) { return Share (); }; r += Eat (lam); // instantation of lambda::operator() here During instantiation of the call to Share, maybe_resolve_dummy

Re: C++ Patch Ping

2016-12-15 Thread Jakub Jelinek
On Thu, Dec 15, 2016 at 07:14:15AM -0500, Nathan Sidwell wrote: > On 12/15/2016 03:34 AM, Jakub Jelinek wrote: > > Hi! > > > > I'd like to ping the > > > > http://gcc.gnu.org/ml/gcc-patches/2016-12/msg00698.html > > P0490R0 GB 20: decomposition declaration should commit to tuple > >

Re: C++ Patch Ping

2016-12-15 Thread Nathan Sidwell
On 12/15/2016 03:34 AM, Jakub Jelinek wrote: Hi! I'd like to ping the http://gcc.gnu.org/ml/gcc-patches/2016-12/msg00698.html P0490R0 GB 20: decomposition declaration should commit to tuple interpretation early + if (inst == error_mark_node) +return NULL_TREE; This check is unneeded,

Re: [PATCH][AArch64] Split X-reg UBFIZ into W-reg LSL when possible

2016-12-15 Thread James Greenhalgh
On Thu, Dec 08, 2016 at 09:35:09AM +, Kyrill Tkachov wrote: > Hi all, > > Similar to the previous patch this transforms X-reg UBFIZ instructions into > W-reg LSL instructions when the UBFIZ operands add up to 32, so we can take > advantage of the implicit zero-extension to DImode > when

Re: [PATCH][AArch64] Split X-reg UBFX into W-reg LSR when possible

2016-12-15 Thread James Greenhalgh
On Thu, Dec 08, 2016 at 09:35:08AM +, Kyrill Tkachov wrote: > Hi all, > > In this patch we split X-register UBFX instructions that extract up to the > edge of a W-register into a W-register LSR instruction. So for the example in > the testcase instead of: > UBFXX0, X0, 24, 8 > > we'd

[Patch] Undermine the jump threading cost model to fix PR77445.

2016-12-15 Thread James Greenhalgh
Hi, As mentioned in PR77445, the improvements to the jump threading cost model this year have caused substantial regressions in the amount of jump threading we do and the performance of workloads which rely on that threading. This patch represents the low-bar in fixing the performance issues

Re: Fix compilation errors with libstdc++v3 for AVR target and allow --enable-libstdcxx

2016-12-15 Thread Jonathan Wakely
On 14/12/16 18:38 -0300, Felipe Magno de Almeida wrote: Hello Jonathan, Sorry for the delay, I was in mid-vacation. Comments are inline. On Tue, Dec 6, 2016 at 3:45 PM, Jonathan Wakely wrote: On 16/09/16 02:53 -0300, Felipe Magno de Almeida wrote: [snip] I've tried

Re: Pretty printers for versioned namespace

2016-12-15 Thread Jonathan Wakely
On 14/12/16 22:49 +0100, François Dumont wrote: On 09/12/2016 16:18, Jonathan Wakely wrote: But I don't know how to fix this so for the moment I just adapt it to correctly handle std::__7::string. But that's not correct. Please try to understand the point I'm making: The name

Re: [PATCH] Fill bitregion_{start,end} in store_constructor (PR, tree-optimization/78428).

2016-12-15 Thread Martin Liška
On 12/13/2016 03:35 PM, Richard Biener wrote: > OK from my POV. > > Thanks, > Richard. Hi. I prepared backport (and tested) for GCC 5 and 6 branches, may I install the patch after 6.3 will be released? Thanks, Martin

[PATCH] [Match & Simplify] Optimize some minmax patterns

2016-12-15 Thread Hurugalawadi, Naveen
Hi, Please find attached the patch that optimizes some patterns in maxmin on same variabes with constants. Bootstrapped and Regression tested on x86_64 & aarch64-thunder-linux. Please review the patch and let us know if its okay? 2016-12-15 Andrew Pinski

[PATCH] Fix optimized out volatile MEM_REF (PR, tree-optimization/78810)

2016-12-15 Thread Martin Liška
The patch adds TREE_THIS_VOLATILE check that was removed in r239778. Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. Ready to be installed? Martin >From dc8ec6815fa51b352fe5f1a02d3510022053e0ad Mon Sep 17 00:00:00 2001 From: marxin Date: Wed, 14 Dec

Re: [PATCH] combine: Replace sign_extend with zero_extend more often.

2016-12-15 Thread Segher Boessenkool
On Wed, Dec 14, 2016 at 01:39:13PM +0100, Dominik Vogt wrote: > There may be a slight imprecision in expand_compound_operation. > When it encounters a SIGN_EXTEND where it's already known that the > sign bit is zero, it may replace that with a ZERO_EXTEND (and > tries to simplify that further).

Re: [Patch Doc] Update documentation for __fp16 type

2016-12-15 Thread Jakub Jelinek
On Thu, Dec 15, 2016 at 11:23:14AM +0100, Andreas Schwab wrote: > On Dez 15 2016, Jakub Jelinek wrote: > > > So, shall we change also the first 3? > > Yes, I'd think so. So here is it in patch form. Is this ok for trunk? 2016-12-15 Jakub Jelinek

RE: [PATCH, testsuite] MIPS: Upgrade to R2 for -mmicromips.

2016-12-15 Thread Toma Tabacu
Committed as r243687. Regards, Toma > Toma Tabacu writes: > > microMIPS is not supported on pre-R2 architectures, but the testsuite allows > > it to be used on pre-R2 architectures, which results in test failures. > > > > This patch makes the testsuite upgrade to R2 if -mmicromips is used in a

Re: [Patch Doc] Update documentation for __fp16 type

2016-12-15 Thread Andreas Schwab
On Dez 15 2016, Jakub Jelinek wrote: > So, shall we change also the first 3? Yes, I'd think so. Andreas. -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."

Re: [Patch Doc] Update documentation for __fp16 type

2016-12-15 Thread Jakub Jelinek
On Thu, Dec 15, 2016 at 11:11:37AM +0100, Andreas Schwab wrote: > On Dez 15 2016, Jakub Jelinek wrote: > > > --- gcc/doc/extend.texi.jj 2016-12-14 20:28:12.0 +0100 > > +++ gcc/doc/extend.texi 2016-12-15 10:56:14.470702563 +0100 > > @@ -1057,7 +1057,7 @@ implements

Re: [PATCH][GCC][PATCHv3] Improve fpclassify w.r.t IEEE like numbers in GIMPLE.

2016-12-15 Thread Tamar Christina
> On a high level, presumably there's no real value in keeping the old > code to "fold" fpclassify. By exposing those operations as integer > logicals for the fast path, if the FP value becomes a constant during > the optimization pipeline we'll see the reinterpreted values flowing > into the

Re: [Patch Doc] Update documentation for __fp16 type

2016-12-15 Thread Andreas Schwab
On Dez 15 2016, Jakub Jelinek wrote: > --- gcc/doc/extend.texi.jj2016-12-14 20:28:12.0 +0100 > +++ gcc/doc/extend.texi 2016-12-15 10:56:14.470702563 +0100 > @@ -1057,7 +1057,7 @@ implements conversions between @code{__f > calls. > > It is recommended that

Re: [Patch Doc] Update documentation for __fp16 type

2016-12-15 Thread Jakub Jelinek
On Mon, Dec 12, 2016 at 02:19:47PM -0700, Sandra Loosemore wrote: > One small grammar nit at the end: > > > > +It is recommended that code which is intended to be portable use the > > > +@code{_Float16} type defined by ISO/IEC TS 18661-3:2015 > > > +(@xref{Floating Types}). > > Either

Re: [PATCH][ARM] PR target/71436: Restrict *load_multiple pattern till after LRA

2016-12-15 Thread Richard Earnshaw (lists)
On 15/12/16 09:55, Richard Earnshaw (lists) wrote: > On 30/11/16 16:47, Kyrill Tkachov wrote: >> Hi all, >> >> In this awkward ICE we have a *load_multiple pattern that is being >> transformed in reload from: >> (insn 55 67 151 3 (parallel [ >> (set (reg:SI 0 r0) >>

Re: [PATCH][ARM] PR target/71436: Restrict *load_multiple pattern till after LRA

2016-12-15 Thread Richard Earnshaw (lists)
On 30/11/16 16:47, Kyrill Tkachov wrote: > Hi all, > > In this awkward ICE we have a *load_multiple pattern that is being > transformed in reload from: > (insn 55 67 151 3 (parallel [ > (set (reg:SI 0 r0) > (mem/u/c:SI (reg/f:SI 147) [2 c+0 S4 A32])) > (set

Re: [PATCH][ARM] PR target/71436: Restrict *load_multiple pattern till after LRA

2016-12-15 Thread Kyrill Tkachov
Ping. Thanks, Kyrill On 08/12/16 11:55, Kyrill Tkachov wrote: Ping. https://gcc.gnu.org/ml/gcc-patches/2016-11/msg03078.html Thanks, Kyrill On 30/11/16 16:47, Kyrill Tkachov wrote: Hi all, In this awkward ICE we have a *load_multiple pattern that is being transformed in reload from: (insn

  1   2   >