Re: [PATCH] Fix PR81921

2017-08-23 Thread Richard Biener
On Tue, 22 Aug 2017, Richard Biener wrote: > On August 22, 2017 6:38:55 PM GMT+02:00, "Richard Earnshaw (lists)" > wrote: > >On 22/08/17 13:55, Kyrill Tkachov wrote: > >> Hi Richard, > >> [roping in more aarch64 maintainers] > >> > >> On 22/08/17 13:27, Richard Biener wrote: > >>> On Tue, 22 Au

Re: Remove the frame size argument from function_prologue/epilogue

2017-08-23 Thread Richard Sandiford
Mike Stump writes: > On Aug 21, 2017, at 4:12 AM, Richard Sandiford > wrote: >> >> Later patches will add support for frame sizes that are a run-time >> invariant but not a compile-time constant. > > I'm assuming dwarf and C++ exceptions will remain working. :-) Sure :-) The vector length is

Re: [PATCH] Fix PR81921

2017-08-23 Thread Richard Biener
On Wed, 23 Aug 2017, Richard Biener wrote: > On Tue, 22 Aug 2017, Richard Biener wrote: > > > On August 22, 2017 6:38:55 PM GMT+02:00, "Richard Earnshaw (lists)" > > wrote: > > >On 22/08/17 13:55, Kyrill Tkachov wrote: > > >> Hi Richard, > > >> [roping in more aarch64 maintainers] > > >> > > >

Re: [PATCH] Fix PR81921

2017-08-23 Thread Uros Bizjak
On Wed, Aug 23, 2017 at 10:04 AM, Richard Biener wrote: > On Wed, 23 Aug 2017, Richard Biener wrote: > >> On Tue, 22 Aug 2017, Richard Biener wrote: >> >> > On August 22, 2017 6:38:55 PM GMT+02:00, "Richard Earnshaw (lists)" >> > wrote: >> > >On 22/08/17 13:55, Kyrill Tkachov wrote: >> > >> Hi R

Re: [PATCH][RFA/RFC] Stack clash mitigation patch 01/08 - V3

2017-08-23 Thread Richard Biener
On Tue, Aug 22, 2017 at 5:52 PM, Jeff Law wrote: > On 08/18/2017 08:01 AM, Richard Biener wrote: >> On Mon, Jul 31, 2017 at 7:35 AM, Jeff Law wrote: >>> This patch introduces the stack clash protection options >>> >>> Changes since V2: >>> >>> Adds two new params. The first controls the size of

Re: [libcc1] Improve detection of triplet on compiler names

2017-08-23 Thread Pedro Alves
On 08/23/2017 05:17 AM, Sergio Durigan Junior wrote: > The GCC patch improves the libcc1::compiler_triplet_regexp::find and > libcp1::compiler_triplet_regexp::find methods by first trying to match > the triplet in the compiler name and correctly discarding the triplet > part of the regexp if the ma

Re: [PATCH] Fix PR81921

2017-08-23 Thread Richard Biener
On Wed, 23 Aug 2017, Uros Bizjak wrote: > On Wed, Aug 23, 2017 at 10:04 AM, Richard Biener wrote: > > On Wed, 23 Aug 2017, Richard Biener wrote: > > > >> On Tue, 22 Aug 2017, Richard Biener wrote: > >> > >> > On August 22, 2017 6:38:55 PM GMT+02:00, "Richard Earnshaw (lists)" > >> > wrote: > >>

[PATCH, GCC, RFC] Fix broken MinGW build

2017-08-23 Thread Thomas Preudhomme
Hi, Commit r251104 introduced uses of SIGKILL and SIGQUIT which broke MinGW build due to those not being defined. This proposed patch check for the macros availability. ChangeLog entry is as follows: *** gcc/ChangeLog *** 2017-08-23 Thomas Preud'homme * gcc.c (execute): Only test f

Re: [PATCH] Fix PR81921

2017-08-23 Thread Uros Bizjak
On Wed, Aug 23, 2017 at 11:22 AM, Richard Biener wrote: >> > /* If the machine does not have a case insn that compares the bounds, >> > Index: gcc/config/i386/i386.c >> > === >> > --- gcc/config/i386/i386.c (revision 251275) >>

Re: [PATCH] Fix PR81921

2017-08-23 Thread Richard Biener
On Wed, 23 Aug 2017, Uros Bizjak wrote: > On Wed, Aug 23, 2017 at 11:22 AM, Richard Biener wrote: > >> > /* If the machine does not have a case insn that compares the bounds, > >> > Index: gcc/config/i386/i386.c > >> > === > >> > --

Re: [PATCH] Fix PR81921

2017-08-23 Thread Uros Bizjak
On Wed, Aug 23, 2017 at 11:40 AM, Uros Bizjak wrote: > On Wed, Aug 23, 2017 at 11:22 AM, Richard Biener wrote: >>> > /* If the machine does not have a case insn that compares the bounds, >>> > Index: gcc/config/i386/i386.c >>> > ===

Re: [PATCH] Fix PR81921

2017-08-23 Thread Richard Biener
On Wed, 23 Aug 2017, Uros Bizjak wrote: > On Wed, Aug 23, 2017 at 11:40 AM, Uros Bizjak wrote: > > On Wed, Aug 23, 2017 at 11:22 AM, Richard Biener wrote: > >>> > /* If the machine does not have a case insn that compares the bounds, > >>> > Index: gcc/config/i386/i386.c > >>> >

Re: [PATCH] Fix PR81921

2017-08-23 Thread Uros Bizjak
On Wed, Aug 23, 2017 at 11:55 AM, Richard Biener wrote: > On Wed, 23 Aug 2017, Uros Bizjak wrote: > >> On Wed, Aug 23, 2017 at 11:40 AM, Uros Bizjak wrote: >> > On Wed, Aug 23, 2017 at 11:22 AM, Richard Biener wrote: >> >>> > /* If the machine does not have a case insn that compares the bounds,

Re: [PATCH] Fix PR81921

2017-08-23 Thread Richard Biener
On Wed, 23 Aug 2017, Uros Bizjak wrote: > On Wed, Aug 23, 2017 at 11:55 AM, Richard Biener wrote: > > On Wed, 23 Aug 2017, Uros Bizjak wrote: > > > >> On Wed, Aug 23, 2017 at 11:40 AM, Uros Bizjak wrote: > >> > On Wed, Aug 23, 2017 at 11:22 AM, Richard Biener > >> > wrote: > >> >>> > /* If th

Re: [PATCH, GCC, RFC] Fix broken MinGW build

2017-08-23 Thread Richard Biener
On Wed, 23 Aug 2017, Thomas Preudhomme wrote: > Hi, > > Commit r251104 introduced uses of SIGKILL and SIGQUIT which broke MinGW > build due to those not being defined. This proposed patch check for the > macros availability. > > ChangeLog entry is as follows: > > *** gcc/ChangeLog *** > > 2017

Re: [PATCH][PR tree-optimization/81741] Throttle recording conditional equivalences

2017-08-23 Thread Richard Biener
On Tue, Aug 22, 2017 at 5:13 PM, Jeff Law wrote: > This patch addresses some issues with conditional equivalences. > > First, it stops recording blindly recording conditional equivalences. > Which leads to regressions... > > So for certain binary expressions (for example x - y), if we lookup the >

Re: [PATCH][GCC][mid-end] Fix single use requirement for xorsign (x * copysign (1, y))

2017-08-23 Thread Richard Biener
On Tue, 22 Aug 2017, Tamar Christina wrote: > Sorry, forgot to add some maintainers :) > > From: gcc-patches-ow...@gcc.gnu.org on behalf > of Tamar Christina > Sent: Tuesday, August 22, 2017 5:27:23 PM > To: gcc-patches@gcc.gnu.org > Cc: nd; l...@redhat.

Re: [PATCH][GCC][mid-end] Add generic test for xorsign (x * copysign (1, y))

2017-08-23 Thread Richard Biener
On Tue, 22 Aug 2017, Tamar Christina wrote: > Hi All, > > Since XORSIGN is a mid-end transformation I'm adding a generic test > to check for targets that support it if the transformation has been > carried out or not in tree. > > Regtested on aarch64-none-linux-gnu, arm-none-eabi > and x86_64-pc

Make more use of HWI_COMPUTABLE_MODE_P

2017-08-23 Thread Richard Sandiford
This patch uses HWI_COMPUTABLE_MODE_P (X) instead of GET_MODE_PRECISION (X) <= HOST_BITS_PER_WIDE_INT in cases where X also needs to be a scalar integer. Tested on aarch64-linux-gnu and x86_64-linux-gnu, and by making sure that there were no differences in testsuite assembly output for one target

Re: [PATCH] Fix PR81921

2017-08-23 Thread Uros Bizjak
On Wed, Aug 23, 2017 at 12:18 PM, Richard Biener wrote: > On Wed, 23 Aug 2017, Uros Bizjak wrote: > >> On Wed, Aug 23, 2017 at 11:55 AM, Richard Biener wrote: >> > On Wed, 23 Aug 2017, Uros Bizjak wrote: >> > >> >> On Wed, Aug 23, 2017 at 11:40 AM, Uros Bizjak wrote: >> >> > On Wed, Aug 23, 2017

Make more use of df_read_modify_subreg_p

2017-08-23 Thread Richard Sandiford
This patch uses df_read_modify_subreg_p to check whether writing to a subreg would preserve some of the existing contents. This has the effect of putting more emphasis on the REGMODE_NATURAL_SIZE-based definition of whether something can be partially modified, instead of using UNITS_PER_WORD uncon

Make more use of subreg_offset_from_lsb

2017-08-23 Thread Richard Sandiford
This patch makes use of the subreg_offset_from_lsb function added by an earlier patch in the SVE series. Tested on aarch64-linux-gnu and x86_64-linux-gnu, and by making sure that there were no differences in testsuite assembly output for one target per CPU. OK to install? Richard 2017-08-23 R

Make more use of subreg_lowpart_offset

2017-08-23 Thread Richard Sandiford
This patch uses subreg_lowpart_offset in places that open-coded the calculation. It also uses it in regcprop.c to test whether, after a mode change, the first register in a multi-register group is still the right one. Tested on aarch64-linux-gnu and x86_64-linux-gnu, and by making sure that there

Make more use of subreg_size_lowpart_offset

2017-08-23 Thread Richard Sandiford
This patch uses subreg_size_lowpart_offset in places that open-coded the calculation. The reload use (and the LRA one that was based on it) seemed to ignore the BYTES_BIG_ENDIAN != WORDS_BIG_ENDIAN case; it's not obvious whether that was deliberate or an oversight. Tested on aarch64-linux-gnu and

Make more use of byte_lowpart_offset

2017-08-23 Thread Richard Sandiford
This patch uses byte_lowpart_offset in places that open-coded the calculation. Tested on aarch64-linux-gnu and x86_64-linux-gnu, and by making sure that there were no differences in testsuite assembly output for one target per CPU. OK to install? Richard 2017-08-23 Richard Sandiford

Make more use of GET_MODE_UNIT_SIZE

2017-08-23 Thread Richard Sandiford
This patch uses GET_MODE_UNIT_SIZE instead of GET_MODE_SIZE in cases where, for compound modes, the mode of the scalar elements is what matters. E.g. the choice between truncation and extension is really based on the modes of the consistuent scalars rather than the mode as a whole. None of the ex

Make more use of GET_MODE_UNIT_BITSIZE

2017-08-23 Thread Richard Sandiford
This patch is like the previous GET_MODE_UNIT_SIZE one, but for bit rather than byte sizes. Tested on aarch64-linux-gnu and x86_64-linux-gnu, and by making sure that there were no differences in testsuite assembly output for one target per CPU. OK to install? Richard 2017-08-23 Richard Sandif

Re: [PATCH, GCC/ARM, ping] Remove ARMv8-M code for D17-D31

2017-08-23 Thread Thomas Preudhomme
Ping? Best regards, Thomas On 17/07/17 17:25, Thomas Preudhomme wrote: My bad, found an off-by-one error in the sizing of bitmaps. Please find fixed patch in attachment. ChangeLog entry is unchanged: *** gcc/ChangeLog *** 2017-06-13 Thomas Preud'homme * config/arm/arm.c (arm_optio

Make more use of GET_MODE_UNIT_PRECISION

2017-08-23 Thread Richard Sandiford
This patch is like the earlier GET_MODE_UNIT_SIZE one, but for precisions rather than sizes. There is one behavioural change in expand_debug_expr: we shouldn't use lowpart subregs for non-scalar truncations, since that would just reinterpret some of the scalars and drop the rest. (This probably d

Re: [PATCH, GCC/testsuite/ARM, ping2] Fix coprocessor intrinsic test failures on ARMv8-A

2017-08-23 Thread Thomas Preudhomme
Ping? Best regards, Thomas On 17/07/17 09:51, Thomas Preudhomme wrote: Ping? Best regards, Thomas On 12/07/17 14:31, Thomas Preudhomme wrote: Coprocessor intrinsic tests in gcc.target/arm/acle test whether __ARM_FEATURE_COPROC has the right bit defined before calling the intrinsic. This al

Re: Statement Frontier Notes, Location Views, and Inlined Entry Point Markers

2017-08-23 Thread Richard Biener
On Tue, Aug 22, 2017 at 10:43 PM, Alexandre Oliva wrote: > On Aug 21, 2017, Richard Biener wrote: > >> On Fri, Aug 18, 2017 at 11:20 PM, Alexandre Oliva wrote: > >>> Besides implementing these new features, the patch contains multiple >>> fixes for -fcompare-debug errors detected at various opti

Re: Statement Frontier Notes, Location Views, and Inlined Entry Point Markers

2017-08-23 Thread Richard Biener
On Wed, Aug 23, 2017 at 12:29 AM, Alexandre Oliva wrote: > On Aug 21, 2017, Richard Biener wrote: > >> +gno-statement-frontiers >> +Common Driver RejectNegative Var(debug_nonbind_markers_p, 0) Init(2) >> +Don't enforce progressive recommended breakpoint locations. >> + >> +gstatement-frontiers >>

[i386] Document a dozen of IA-32 builtins

2017-08-23 Thread Eric Botcazou
Hi, it seems that there are many undocumented IA-32 builtins. This patch starts small and documents the builtins corresponding to the basic instrinsics which are declared in ia32intrin.h. Tested with 'make doc', OK for all active branches? 2017-08-23 Eric Botcazou * doc/extend.te

[PATCH] Fix PR81940

2017-08-23 Thread Richard Biener
The following fixes PR81940 by allowing the case of missing early debug due to compiling with -g0 and linking with -g when using LTO. Committed as obvious. If more intricate issues like this keep popping up another solution is to record whether -g0 was in effect at compile-time and override -g a

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

2017-08-23 Thread Tamar Christina
Ping From: Tamar Christina Sent: Thursday, August 17, 2017 11:49:51 AM To: Richard Biener; Joseph Myers Cc: Christophe Lyon; Markus Trippelsdorf; Jeff Law; GCC Patches; Wilco Dijkstra; Michael Meissner; nd Subject: RE: [PATCH][GCC][PATCHv3] Improve fpclassi

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

2017-08-23 Thread Richard Biener
On Wed, 23 Aug 2017, Tamar Christina wrote: > Ping > > From: Tamar Christina > Sent: Thursday, August 17, 2017 11:49:51 AM > To: Richard Biener; Joseph Myers > Cc: Christophe Lyon; Markus Trippelsdorf; Jeff Law; GCC Patches; Wilco > Dijkstra; Michael Meiss

Re: [libcc1] Improve detection of triplet on compiler names

2017-08-23 Thread Sergio Durigan Junior
On Wednesday, August 23 2017, Pedro Alves wrote: > On 08/23/2017 05:17 AM, Sergio Durigan Junior wrote: >> The GCC patch improves the libcc1::compiler_triplet_regexp::find and >> libcp1::compiler_triplet_regexp::find methods by first trying to match >> the triplet in the compiler name and correctl

Re: [libcc1] Improve detection of triplet on compiler names

2017-08-23 Thread Pedro Alves
On 08/23/2017 02:07 PM, Sergio Durigan Junior wrote: > On Wednesday, August 23 2017, Pedro Alves wrote: > >> On 08/23/2017 05:17 AM, Sergio Durigan Junior wrote: >>> The GCC patch improves the libcc1::compiler_triplet_regexp::find and >>> libcp1::compiler_triplet_regexp::find methods by first try

Re: [libcc1] Improve detection of triplet on compiler names

2017-08-23 Thread Sergio Durigan Junior
On Wednesday, August 23 2017, Pedro Alves wrote: > On 08/23/2017 02:07 PM, Sergio Durigan Junior wrote: >> On Wednesday, August 23 2017, Pedro Alves wrote: >> >>> On 08/23/2017 05:17 AM, Sergio Durigan Junior wrote: The GCC patch improves the libcc1::compiler_triplet_regexp::find and li

Re: [PATCH 4/4] [i386, testsuite] Add tests, fix bug in check_avx2_hw_available

2017-08-23 Thread Uros Bizjak
On Wed, Aug 23, 2017 at 12:50 AM, Daniel Santos wrote: > Changes to lib/target-supports.exp and documentation: > * Add effective-targets avx512f and avx512f_runtime (needed for new > tests). > * Corrects bug in check_avx2_hw_available. > * Adds documentation for effective-targets avx2, avx2_runt

Re: [PATCH] Fix PR81921

2017-08-23 Thread Richard Biener
On Wed, 23 Aug 2017, Uros Bizjak wrote: > On Wed, Aug 23, 2017 at 12:18 PM, Richard Biener wrote: > > On Wed, 23 Aug 2017, Uros Bizjak wrote: > > > >> On Wed, Aug 23, 2017 at 11:55 AM, Richard Biener wrote: > >> > On Wed, 23 Aug 2017, Uros Bizjak wrote: > >> > > >> >> On Wed, Aug 23, 2017 at 11:

Re: [PATCH v4 0/4] [i386] PR80969 Fix ICE with -mabi=ms -mavx512f

2017-08-23 Thread Uros Bizjak
On Wed, Aug 23, 2017 at 12:34 AM, Daniel Santos wrote: > I had to fix a few things for x32 compatibility and I this is ready > now. H.J. tested on machine with avx512 (including x32) and I've tested > both native x32 and normal x86_64 with m64, m32 and mx32 and all is > well. I've made more chan

[PATCH] Adjust function name dumping

2017-08-23 Thread Richard Biener
When enabling free-lang-data the lang_hooks.decl_printable_name hook gets reset. The following patch reduces the noise from that by using verbosity 1 (do not print arguments) from the places where we dump the function name and then follow by arguments manually. This makes dumping consistent with

Re: [PATCH] Adjust function name dumping

2017-08-23 Thread Arnaud Charlet
Richard, > When enabling free-lang-data the lang_hooks.decl_printable_name hook > gets reset. The following patch reduces the noise from that by > using verbosity 1 (do not print arguments) from the places where > we dump the function name and then follow by arguments manually. > > This makes du

Re: [PATCH] Adjust function name dumping

2017-08-23 Thread Richard Biener
On Wed, 23 Aug 2017, Arnaud Charlet wrote: > Richard, > > > When enabling free-lang-data the lang_hooks.decl_printable_name hook > > gets reset. The following patch reduces the noise from that by > > using verbosity 1 (do not print arguments) from the places where > > we dump the function name a

Re: [PATCH] Adjust function name dumping

2017-08-23 Thread Arnaud Charlet
> > You have typos in the a bove changelog BTW, the "b" and "s" should be > > part of the filenames (e.g. gnat.dg/noinline2.adb: Likewise.) > > Ooops. Will fix. > > > I do not understand the changes in the ada testsuite: cana you explain why > > you renames some variables? > > Because the scan

Re: [PATCH] Adjust function name dumping

2017-08-23 Thread Richard Biener
On Wed, 23 Aug 2017, Richard Biener wrote: > On Wed, 23 Aug 2017, Arnaud Charlet wrote: > > > Richard, > > > > > When enabling free-lang-data the lang_hooks.decl_printable_name hook > > > gets reset. The following patch reduces the noise from that by > > > using verbosity 1 (do not print argume

Re: [AArch64, PATCH] Improve Neon store of zero

2017-08-23 Thread Richard Sandiford
Jackson Woodruff writes: > diff --git a/gcc/config/aarch64/aarch64-simd.md > b/gcc/config/aarch64/aarch64-simd.md > index > 74de9b8c89dd5e4e3d87504594c969de0e0128ce..ce1b981fc005edf48a401a456def2a37cf9d9022 > 100644 > --- a/gcc/config/aarch64/aarch64-simd.md > +++ b/gcc/config/aarch64/aarch64-s

Re: [PATCH][PR tree-optimization/81741] Throttle recording conditional equivalences

2017-08-23 Thread Jeff Law
On 08/23/2017 04:37 AM, Richard Biener wrote: > On Tue, Aug 22, 2017 at 5:13 PM, Jeff Law wrote: >> However, there are still cases where we have a conditional equivalence >> and the names have the same cost to compute. A greatly simplified >> example can be found in gcc.dg/tree-ssa/20030922-2.c.

Re: [AArch64, PATCH] Improve Neon store of zero

2017-08-23 Thread Wilco Dijkstra
Richard Sandiford wrote: > > Sorry for only noticing now, but the call to aarch64_legitimate_address_p > is asking whether the MEM itself is a legitimate LDP/STP address. Also, > it might be better to pass false for strict_p, since this can be called > before RA. So maybe: > >if (GET_CODE (op

Re: [PATCH 5/3] C++ bits to improve detection of attribute conflicts (PR 81544)

2017-08-23 Thread Martin Sebor
On 08/22/2017 09:51 PM, Jason Merrill wrote: The C and C++ front ends already have a diagnose_mismatched_attributes function, which seems like the natural place to add more conflict checking. There are a few major problems with handling attribute conflicts in diagnose_mismatched_attributes. Th

[PATCH, i386]: Cleanup option handling a little bit

2017-08-23 Thread Uros Bizjak
2017-08-23 Uros Bizjak * config/i386/i386.opt: Remove unneeded Init(0) initializations. (mstackrealign): Do not init to -1. * config/i386/i386.c (ix86_option_override_internal): Check opts_set, not opts when setting default value of opts->x_ix86_force_align_arg_pointer. Boo

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

2017-08-23 Thread Tamar Christina
Hi Richard, Thanks for the feedback, > > I think you should split up your work a bit. The pieces from > fold_builtin_* you remove and move to lowering that require no control flow > like __builtin_isnan (x) -> x UNORD x should move to match.pd patterns (aka > foldings that will then be applied

Re: [PATCH, rs6000] Fix PR target/80210: ICE in extract_insn

2017-08-23 Thread Peter Bergner
On 8/18/17 9:19 PM, Peter Bergner wrote: > On 8/18/17 6:27 PM, Segher Boessenkool wrote: >> On Thu, Aug 17, 2017 at 07:02:14PM -0500, Peter Bergner wrote: >>> This is also broken in GCC 7, GCC 6 and GCC 5. Ok for those after this >>> has been on trunk for a little while and assuming testing passes

Re: [PATCH 2/2] C: use full locations within c_parser_expr_list's vec

2017-08-23 Thread David Malcolm
On Tue, 2017-08-22 at 13:01 +0200, Andreas Schwab wrote: > On Aug 18 2017, David Malcolm wrote: > > > gcc/c/ChangeLog: > > * c-parser.c (c_parser_expr_list): Use c_expr::get_location () > > rather than peeking the location of the first token. > > * c-tree.h (c_expr::get_location): New

[PATCH]: Increase MAX_ARTIFICIAL_LABEL_BYTES to 40

2017-08-23 Thread Uros Bizjak
Hello! Recent changes caused bootstrap on alpha with: /space/homedirs/uros/gcc-svn/trunk/gcc/dwarf2out.c: In function ‘void init_sections_and_labels(bool)’: /space/homedirs/uros/gcc-svn/trunk/gcc/dwarf2out.c:27181:1: error: ‘%ld’ directive writing between 1 and 10 bytes into a region of size 8 [-

Re: Make more use of df_read_modify_subreg_p

2017-08-23 Thread Segher Boessenkool
On Wed, Aug 23, 2017 at 11:49:03AM +0100, Richard Sandiford wrote: > This patch uses df_read_modify_subreg_p to check whether writing > to a subreg would preserve some of the existing contents. combine does not keep the DF info up-to-date -- but that is no problem here, df_read_modify_subreg_p use

[committed] testsuite: add param-type-mismatch.c/C testcases as a baseline

2017-08-23 Thread David Malcolm
I have various patch kits under development that improve how the C and C++ frontends handle mismatched types of params at callsites. For example, given: extern int callee_1 (int one, const char *two, float three); int test_1 (int first, int second, float third) { return callee_1 (first

Re: Make more use of subreg_offset_from_lsb

2017-08-23 Thread Segher Boessenkool
On Wed, Aug 23, 2017 at 11:50:13AM +0100, Richard Sandiford wrote: > This patch makes use of the subreg_offset_from_lsb function > added by an earlier patch in the SVE series. > > Tested on aarch64-linux-gnu and x86_64-linux-gnu, and by making sure > that there were no differences in testsuite ass

Re: [PATCH]: Increase MAX_ARTIFICIAL_LABEL_BYTES to 40

2017-08-23 Thread Richard Biener
On August 23, 2017 5:49:56 PM GMT+02:00, Uros Bizjak wrote: >Hello! > >Recent changes caused bootstrap on alpha with: > >/space/homedirs/uros/gcc-svn/trunk/gcc/dwarf2out.c: In function ‘void >init_sections_and_labels(bool)’: >/space/homedirs/uros/gcc-svn/trunk/gcc/dwarf2out.c:27181:1: error: >‘%ld

Re: [PATCH][RFA/RFC] Stack clash mitigation patch 01/08 - V3

2017-08-23 Thread Jeff Law
On 08/23/2017 03:07 AM, Richard Biener wrote: >>> Both -fstack-clash-protection and -fstack-check cannot be turned >>> off per function. This means they would need merging in lto-wrapper. >>> The alternative is to mark them with 'Optimization' and allow per-function >>> specification (like we do

Re: [PATCH][RFA/RFC] Stack clash mitigation patch 01/08 - V3

2017-08-23 Thread Richard Biener
On August 23, 2017 6:36:32 PM GMT+02:00, Jeff Law wrote: >On 08/23/2017 03:07 AM, Richard Biener wrote: > Both -fstack-clash-protection and -fstack-check cannot be turned off per function. This means they would need merging in >lto-wrapper. The alternative is to mark them with 'Opt

Re: [PATCH PING] Write dependency information (-M*) even if there are errors

2017-08-23 Thread Boris Kolpackov
Ping. On 13 Aug 2017 Boris Kolpackov writes: Hi, I've been instructed to resend this patch from the gcc mailing list: Currently GCC does not write extracted header dependency information if there are errors. However, this can be useful when dealing with outdated generated headers that trigger

Re: RFC: Explicit move preference hints

2017-08-23 Thread Segher Boessenkool
Hi! On Tue, Aug 22, 2017 at 10:48:17AM +, Wilco Dijkstra wrote: > The register allocator inserts move preferences when an instruction has > one or more dead sources in add_insn_allocno_copies. If an instruction > doesn't have a matching constraint (eg. "0"), then any dead source is treated > a

Re: RFC: Explicit move preference hints

2017-08-23 Thread Wilco Dijkstra
Segher Boessenkool wrote: > On Tue, Aug 22, 2017 at 10:48:17AM +, Wilco Dijkstra wrote: > > The register allocator inserts move preferences when an instruction has > > one or more dead sources in add_insn_allocno_copies. If an instruction > > doesn't have a matching constraint (eg. "0"), then a

Re: Ping [PATCH] libquadmath/81848, allow PowerPC to enable libquadmath

2017-08-23 Thread Michael Meissner
Ping: 2017-08-15 Michael Meissner PR libquadmath/81848 * configure.ac (powerpc*-linux*): Use attribute mode KC to create complex __float128 on PowerPC instead of attribute mode TC. * quadmth.h (__complex128): Likewise. * configure: Regenerate. *

[PATCH] C: fix logic within c_expr::get_location

2017-08-23 Thread David Malcolm
In r251239 I added a c_expr::get_location method for use by c_parser_expr_list for building the vec for an expression list, rather than using the location of the first token. When determining whether to use the location within the tree node, or fall back to the range in the c_expr, I used EXPR_CAN

[PATCH] PowerPC cleanup, remove -mpower9-dform{,-scalar,-vector} options

2017-08-23 Thread Michael Meissner
This patch eliminates the undocumented debugging options -mpower9-dform, -mpower9-dform-scalar, and -mpower9-dform-vector. These switches were added when I added the support for the ISA 3.0 (power9) d-form (register+offset) vector addressing. I have built and bootstrapped compilers on a little en

Re: [libcc1] Improve detection of triplet on compiler names

2017-08-23 Thread Pedro Alves
On 08/23/2017 05:17 AM, Sergio Durigan Junior wrote: > Hi there, > > This is a series of two patches, one for GDB and one for GCC, which aims > to improve the detection and handling of triplets present on compiler > names. The motivation for this series was mostly the fact that GDB's > "compile"

Re: [libcc1] Improve detection of triplet on compiler names

2017-08-23 Thread Sergio Durigan Junior
On Wednesday, August 23 2017, Pedro Alves wrote: > On 08/23/2017 05:17 AM, Sergio Durigan Junior wrote: >> Hi there, >> >> This is a series of two patches, one for GDB and one for GCC, which aims >> to improve the detection and handling of triplets present on compiler >> names. The motivation fo

[C++ PATCH] excise search stats

2017-08-23 Thread Nathan Sidwell
Here's a patch from the name-lookup branch. Search stats had somewhat bit rotted, with several of the counters never being incremented. Most of the remaining counters won't make sense once I've completed class-member reorganization. This patch simply excises the search stats. We can always

[PATCH] C++: use an optional vec for callsites

2017-08-23 Thread David Malcolm
This patch extends various call-handling locations within the C++ frontend so that they can accept a possibly NULL vec *, using the location information if available in various diagnostics. It updates the C++ frontend's parser for this production: postfix-expression: postfix-expression (

[C++ PATCH] Commonize function-version checking

2017-08-23 Thread Nathan Sidwell
Here's another cleanup, applied to trunk. Both decls_match and add_method had similar code to check for function version declarations. The add_method one was particularly confused as it checked for extern "C" methods -- which are not a thing. Anyway, this does the obvious breaking out of a c

[PATCH] handle pathological anti-ranges in gimple_fold_builtin_memory_op (PR 81908)

2017-08-23 Thread Martin Sebor
Bug 81908 is about a -Wstringop-overflow warning for a Fortran test triggered by a recent VRP improvement. A simple test case that approximates the warning is: void f (char *d, const char *s, size_t n) { if (n > 0 && n <= SIZE_MAX / 2) n = 0; memcpy (d, s, n); // n in ~[1, S

[PING] [PATCH 3/4] enhance overflow and truncation detection in strncpy and strncat (PR 81117)

2017-08-23 Thread Martin Sebor
Ping: https://gcc.gnu.org/ml/gcc-patches/2017-08/msg00912.html Jeff, is this version good to commit or are there any other changes you'd like to see? Martin On 08/14/2017 04:40 PM, Martin Sebor wrote: On 08/10/2017 01:29 PM, Martin Sebor wrote: diff --git a/gcc/builtins.c b/gcc/builtins.c ind

[C++ PATCH] finish-member-decl cleanups

2017-08-23 Thread Nathan Sidwell
And here's one for finish-member-declaration. I move inhibiting of a USING_DECL's debug info out of a non-fn member-specific block, and unconditionally set C++ linkage. Now that Java linkage is no longer a thing, we were effectively doing: if (bool_thing == false) bool_thing = true; Af

Re: Heads-Up: early LTO debug to land, breaking Mach-O / [X]COFF

2017-08-23 Thread Rainer Orth
Hi Richard, > On Fri, 12 May 2017, Richard Biener wrote: > >> >> This is a heads-up that I am in the process of implementing the last >> of Jasons review comments on the dwarf2out parts of early LTO debug >> support. I hope to post final patches early next week after thoroughly >> re-testing eve

Re: [PATCH 4/4] [i386, testsuite] Add tests, fix bug in check_avx2_hw_available

2017-08-23 Thread Daniel Santos
On 08/23/2017 08:26 AM, Uros Bizjak wrote: >> @@ -1822,6 +1845,7 @@ proc check_avx2_hw_available { } { >> expr 0 >> } else { >> check_runtime_nocache avx2_hw_available { >> + #include > Why is the above include needed? It is only needed to #define N

[C++ PATCH] move class lookup fns

2017-08-23 Thread Nathan Sidwell
this patch moves the direct class member lookup functions from search.c to name-lookup.c. I'll be morphing them into a saner data representation. These are the functions that look only in a specified class. The hierarchy searching functions remain in search.c This is a direct transplant wit

Re: RFC: Explicit move preference hints

2017-08-23 Thread Segher Boessenkool
On Wed, Aug 23, 2017 at 05:15:03PM +, Wilco Dijkstra wrote: > Segher Boessenkool wrote: > > On Tue, Aug 22, 2017 at 10:48:17AM +, Wilco Dijkstra wrote: > > > The register allocator inserts move preferences when an instruction has > > > one or more dead sources in add_insn_allocno_copies. If

Re: [PATCH] [i386] PR 81850 Don't ignore -mabi=sysv on Cygwin/MinGW

2017-08-23 Thread Daniel Santos
On 08/23/2017 01:12 AM, Uros Bizjak wrote: > On Wed, Aug 23, 2017 at 7:23 AM, Daniel Santos > wrote: >> On 08/22/2017 03:00 PM, Uros Bizjak wrote: >>> On Tue, Aug 22, 2017 at 9:47 PM, Daniel Santos >>> wrote: > Please add UNKNOWN_ABI to the enum and initialize -mabi in i386.opt to > UNK

Re: RFC: Explicit move preference hints

2017-08-23 Thread Vladimir Makarov
On 08/22/2017 06:48 AM, Wilco Dijkstra wrote: Hi, The register allocator inserts move preferences when an instruction has one or more dead sources in add_insn_allocno_copies. If an instruction doesn't have a matching constraint (eg. "0"), then any dead source is treated as a copy with all dest

Re: RFC: Explicit move preference hints

2017-08-23 Thread Peter Bergner
On 8/23/17 5:22 PM, Segher Boessenkool wrote: > On Wed, Aug 23, 2017 at 05:15:03PM +, Wilco Dijkstra wrote: >> What is a preferred alternative? The current register allocator simply >> ignores >> any combination of "0r", "r0", ("r", "0") and ("0", "r") and just picks the >> most >> generic al

Re: [43/77] Use scalar_int_mode in simplify_comparison

2017-08-23 Thread Jeff Law
On 07/13/2017 02:53 AM, Richard Sandiford wrote: > The main loop of simplify_comparison starts with: > > if (GET_MODE_CLASS (mode) != MODE_INT > && ! (mode == VOIDmode > && (GET_CODE (op0) == COMPARE || COMPARISON_P (op0 > break; > > So VOIDmode is only

Re: [44/77] Make simplify_and_const_int take a scalar_int_mode

2017-08-23 Thread Jeff Law
On 07/13/2017 02:54 AM, Richard Sandiford wrote: > After previous patches, top-level calls to simplify_and_const_int > always pass a scalar_int_mode. The only call site that needs to > be updated is the recursive one in simplify_and_const_int_1, > at which point we know "varop" has a scalar intege

Re: [45/77] Make extract_left_shift take a scalar_int_mode

2017-08-23 Thread Jeff Law
On 07/13/2017 02:54 AM, Richard Sandiford wrote: > This patch passes the mode of the shifted value to extract_left_shift > and updates the only caller so that the mode is a scalar_int_mode. > > 2017-07-13 Richard Sandiford > Alan Hayward > David Sherwood > > gcc/ >

Re: [46/77] Make widest_int_mode_for_size return a scalar_int_mode

2017-08-23 Thread Jeff Law
On 07/13/2017 02:54 AM, Richard Sandiford wrote: > The comment for widest_int_mode said that it returns "the widest integer > mode no wider than SIZE", but it actually returns the widest integer > mode that is narrower than SIZE. In practice SIZE is always greater > than 1, so it can always pick Q

Re: [50/77] Add helper routines for SUBREG_PROMOTED_VAR_P subregs

2017-08-23 Thread Jeff Law
On 07/13/2017 02:56 AM, Richard Sandiford wrote: > When subregs contain promoted values, as indicated by > SUBREG_PROMOTED_VAR_P, both the unpromoted (outer) and > promoted (inner) values are known to be scalar integers. > This patch adds helper routines that get the modes as > scalar_int_modes. >

Re: [53/77] Pass a mode to const_scalar_mask_from_tree

2017-08-23 Thread Jeff Law
On 07/13/2017 02:57 AM, Richard Sandiford wrote: > The caller of const_scalar_mask_from_tree has proven that > the mode is a MODE_INT, so this patch passes it down as a > scalar_int_mode. It also expands the comment a little. > > 2017-07-13 Richard Sandiford > Alan Hayward >

Re: [56/77] Use the more specific type when two modes are known to be equal

2017-08-23 Thread Jeff Law
On 07/13/2017 02:58 AM, Richard Sandiford wrote: > This patch adjusts a couple of cases in which we had established > that two modes were equal and happened to be using the one with the > more general type instead of the one with the more specific type. > > 2017-07-13 Richard Sandiford >

Re: [PATCH 6/6] qsort comparator consistency checking

2017-08-23 Thread Jeff Law
On 08/10/2017 05:24 AM, Alexander Monakov wrote: > On Wed, 9 Aug 2017, Jeff Law wrote: The _5th macro isn't that bad either, appart from using reserved namespace identifiers (it really should be something like qsort_5th and the arguments shouldn't start with underscores). >>> >>> I d

Re: [47/77] Make subroutines of nonzero_bits operate on scalar_int_mode

2017-08-23 Thread Jeff Law
On 07/13/2017 02:55 AM, Richard Sandiford wrote: > nonzero_bits1 assumed that all bits of a floating-point or vector mode > were needed. It seems likely that fixed-point modes should have been > handled in the same way. After excluding those, the only remaining > modes that are likely to be usefu

Re: [48/77] Make subroutines of num_sign_bit_copies operate on scalar_int_mode

2017-08-23 Thread Jeff Law
On 07/13/2017 02:55 AM, Richard Sandiford wrote: > Similarly to the nonzero_bits patch, this one moves the mode > class check and VOIDmode handling from num_sign_bit_copies1 > to num_sign_bit_copies itself, then changes the subroutines > to operate on scalar_int_modes. > > gcc/ > 2017-07-13 Richa

Re: [49/77] Simplify nonzero/num_sign_bits hooks

2017-08-23 Thread Jeff Law
On 07/13/2017 02:55 AM, Richard Sandiford wrote: > The two implementations of the reg_nonzero_bits and reg_num_sign_bits > hooks ignored the "known_x", "known_mode" and "known_ret" arguments, > so this patch removes them. It adds a new scalar_int_mode parameter > that specifies the mode of "x". (

[PR middle-end/81931] do not pass 0 precision in get_nonzero_bits

2017-08-23 Thread Aldy Hernandez
As discussed in the PR... CCP is passing a precision of 0 to get_nonzero_bits for complex numbers. With my last wide_int sign extension patch, the sign extension of -1 with a precision of 0 returns 0, whereas it previously was preturning all ones. The attached patch calls element_precision, to a