Re: [PATCH] Use cxx_printable_name for __PRETTY_FUNCTION__ in cp_fname_init.

2019-08-29 Thread Martin Liška
On 8/28/19 10:19 PM, Jason Merrill wrote: > On 8/28/19 12:29 PM, Martin Liška wrote: >> The patch restores behavior before r265711 where we used >> cxx_printable_name for __PRETTY_FUNCTION__. >> >> Patch can bootstrap on x86_64-linux-gnu and survives regression tests. >> >> Ready to be installed? >

Re: [PATCH, i386]: Improve STV conversion of shifts

2019-08-29 Thread Uros Bizjak
On Wed, Aug 28, 2019 at 5:12 PM Uros Bizjak wrote: > > Attached patch improves costing for STV shifts and corrects reject > condition for out of range shift count operands. > > 2019-08-28 Uroš Bizjak > > * config/i386/i386-features.c > (general_scalar_chain::compute_convert_gain): >

Re: [Preprocessor] small cleanups

2019-08-29 Thread Bernhard Reutner-Fischer
On Wed, 28 Aug 2019 14:42:57 -0400 Nathan Sidwell wrote: >/* If opened with #import or contains #pragma once. */ > - bool once_only; > + bool once_only : 1; I'm curious why you have them as bool and not unsigned? thanks,

Re: [PATCH] Fix PR91568

2019-08-29 Thread Richard Biener
On Wed, 28 Aug 2019, Richard Sandiford wrote: > Richard Biener writes: > > When making the SLP tree a graph I messed up and in some cases we can > > fail to propagate a higher max_nunits upwards when re-using a subtree. > > For the testcase, but only on the gcc-9-branch, this causes us to > > mis

[PATCH] Improve -mavx -mno-avx2 32-byte vector permutations (PR target/91560)

2019-08-29 Thread Jakub Jelinek
Hi! The following patch improves especially V8SFmode permutations for AVX (non-AVX2) ISA, where we punted way too often, even when we can handle it. On the typedef float __v8sf __attribute__((vector_size (32))); typedef double __v4df __attribute__((vector_size (32))); typedef int __v8si __attribut

[PATCH] Fix up switchconv for strict enum types (PR tree-optimization/91351)

2019-08-29 Thread Jakub Jelinek
Hi! switchconv uses unsigned_type_for to get unsigned type to perform computations in, which is fine if you just do a comparison in that type or similar, but not when actually constructing range-like checks or doing further arithmetics on the type. The reassoc and fold-const range test optimizatio

Re: [PATCH V5 05/11] bpf: new GCC port

2019-08-29 Thread Richard Sandiford
jema...@gnu.org (Jose E. Marchesi) writes: > +/* Return true if an argument at the position indicated by CUM should > + be passed by reference. If the hook returns true, a copy of that > + argument is made in memory and a pointer to the argument is passed > + instead of the argument itself.

Re: [PATCH] Sanitizing the middle-end interface to the back-end for strict alignment

2019-08-29 Thread Kyrill Tkachov
Hi Bernd, On 8/28/19 10:36 PM, Bernd Edlinger wrote: On 8/28/19 2:07 PM, Christophe Lyon wrote: Hi, This patch causes an ICE when building libgcc's unwind-arm.o when configuring GCC: --target arm-none-linux-gnueabihf --with-mode thumb --with-cpu cortex-a15 --with-fpu neon-vfpv4: The build wo

Re: [PATCH] Fix up switchconv for strict enum types (PR tree-optimization/91351)

2019-08-29 Thread Richard Biener
On Thu, 29 Aug 2019, Jakub Jelinek wrote: > Hi! > > switchconv uses unsigned_type_for to get unsigned type to perform > computations in, which is fine if you just do a comparison in that type or > similar, but not when actually constructing range-like checks or doing > further arithmetics on the

[PR 91579] Avoid creating redundant PHI nodes in tail-call pass

2019-08-29 Thread Martin Jambor
Hi, when turning a tail-recursive call into a loop, the tail-call pass creates a phi node for each gimple_reg function parameter that has any use at all, even when the value passed to the original call is the same as the received one, when it is the parameter's default definition. This results in

Re: [PATCH/RFC] Simplify wrapped RTL op

2019-08-29 Thread Robin Dapp
>> PR37451. Not clear what target that regressed on, btw. > > And PR55190 and PR67288 and probably more. Thanks for finding those. So the hope is to get this fixed or rather move towards a fix with the patch series that's currently reviewed which injects some doloop knowledge into ivopts? As s

Re: [PATCH] Sanitizing the middle-end interface to the back-end for strict alignment

2019-08-29 Thread Christophe Lyon
On Thu, 29 Aug 2019 at 10:58, Kyrill Tkachov wrote: > > Hi Bernd, > > On 8/28/19 10:36 PM, Bernd Edlinger wrote: > > On 8/28/19 2:07 PM, Christophe Lyon wrote: > >> Hi, > >> > >> This patch causes an ICE when building libgcc's unwind-arm.o > >> when configuring GCC: > >> --target arm-none-linux-g

Re: [PATCH] Improve -mavx -mno-avx2 32-byte vector permutations (PR target/91560)

2019-08-29 Thread Uros Bizjak
On Thu, Aug 29, 2019 at 10:41 AM Jakub Jelinek wrote: > > Hi! > > The following patch improves especially V8SFmode permutations for > AVX (non-AVX2) ISA, where we punted way too often, even when we can handle > it. > On the > typedef float __v8sf __attribute__((vector_size (32))); > typedef double

Re: [PATCH V5 05/11] bpf: new GCC port

2019-08-29 Thread Jose E. Marchesi
> +/* Return true if an argument at the position indicated by CUM should > + be passed by reference. If the hook returns true, a copy of that > + argument is made in memory and a pointer to the argument is passed > + instead of the argument itself. */ > + > +static

Re: [PR 91579] Avoid creating redundant PHI nodes in tail-call pass

2019-08-29 Thread Richard Biener
On Thu, Aug 29, 2019 at 11:04 AM Martin Jambor wrote: > > Hi, > > when turning a tail-recursive call into a loop, the tail-call pass > creates a phi node for each gimple_reg function parameter that has any > use at all, even when the value passed to the original call is the same > as the received

[PATCH, i386]: Fix secondary_reload_needed (was: Re: [PATCH, i386]: Improve STV conversion of shifts)

2019-08-29 Thread Uros Bizjak
As usual with costing changes, the patch exposes latent problem. The patched compiler tries to generate non-existing DImode move from mask register to XMM register, and ICEs during reload [1]. Attached patch tightens secondary_reload_needed condition and fixes the issue. I'm bootstrapping and regr

Re: [PATCH, i386]: Fix secondary_reload_needed (was: Re: [PATCH, i386]: Improve STV conversion of shifts)

2019-08-29 Thread Uros Bizjak
And the patch... On Thu, Aug 29, 2019 at 12:00 PM Uros Bizjak wrote: > > As usual with costing changes, the patch exposes latent problem. The > patched compiler tries to generate non-existing DImode move from mask > register to XMM register, and ICEs during reload [1]. Attached patch > tightens s

[PATCH] Fix bootstrap miscompare by STV (PR91580)

2019-08-29 Thread Richard Biener
The following fixes the bootstrap-debug miscompare caused by STV where we ended up with chain-to-scalar copies just because of debug uses. Instead we have to avoid that, eventually substituting into debug uses or resetting debug stmts when there are reaching defs from both inside and outside of

Re: [PATCH] Fix bootstrap miscompare by STV (PR91580)

2019-08-29 Thread Uros Bizjak
On Thu, Aug 29, 2019 at 12:04 PM Richard Biener wrote: > > > The following fixes the bootstrap-debug miscompare caused by STV > where we ended up with chain-to-scalar copies just because of > debug uses. Instead we have to avoid that, eventually substituting > into debug uses or resetting debug s

Re: [PATCH] Fix bootstrap miscompare by STV (PR91580)

2019-08-29 Thread Jakub Jelinek
On Thu, Aug 29, 2019 at 12:04:53PM +0200, Richard Biener wrote: > + else Perhaps use else if (MAY_HAVE_DEBUG_BIND_INSNS) instead so that you don't walk it once again if there can't be DEBUG_INSNs? Jakub

Re: [PATCH] Update ABI baselines for x86 and powerpc GNU targets

2019-08-29 Thread Jakub Jelinek
On Wed, Aug 28, 2019 at 10:14:35PM +0100, Jonathan Wakely wrote: > * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update. > * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update. > * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update. > * config/a

Re: [PATCH] Update ABI baselines for x86 and powerpc GNU targets

2019-08-29 Thread Jonathan Wakely
On 29/08/19 12:17 +0200, Jakub Jelinek wrote: On Wed, Aug 28, 2019 at 10:14:35PM +0100, Jonathan Wakely wrote: * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update. * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update. * config/abi/post/powerpc-linux-gnu

Re: [PATCH] Fix bootstrap miscompare by STV (PR91580)

2019-08-29 Thread Richard Biener
On Thu, 29 Aug 2019, Jakub Jelinek wrote: > On Thu, Aug 29, 2019 at 12:04:53PM +0200, Richard Biener wrote: > > + else > > Perhaps use > else if (MAY_HAVE_DEBUG_BIND_INSNS) > instead so that you don't walk it once again if there can't be DEBUG_INSNs? Sure - will do as followup to unbreak

Re: [PATCH] Fix bootstrap miscompare by STV (PR91580)

2019-08-29 Thread Richard Biener
On Thu, 29 Aug 2019, Uros Bizjak wrote: > On Thu, Aug 29, 2019 at 12:04 PM Richard Biener wrote: > > > > > > The following fixes the bootstrap-debug miscompare caused by STV > > where we ended up with chain-to-scalar copies just because of > > debug uses. Instead we have to avoid that, eventuall

Re: [Preprocessor] small cleanups

2019-08-29 Thread Nathan Sidwell
On 8/29/19 3:57 AM, Bernhard Reutner-Fischer wrote: On Wed, 28 Aug 2019 14:42:57 -0400 Nathan Sidwell wrote: /* If opened with #import or contains #pragma once. */ - bool once_only; + bool once_only : 1; I'm curious why you have them as bool and not unsigned? because they're true/fa

Re: [PATCH] Fix bootstrap miscompare by STV (PR91580)

2019-08-29 Thread Richard Biener
On Thu, 29 Aug 2019, Richard Biener wrote: > On Thu, 29 Aug 2019, Jakub Jelinek wrote: > > > On Thu, Aug 29, 2019 at 12:04:53PM +0200, Richard Biener wrote: > > > + else > > > > Perhaps use > > else if (MAY_HAVE_DEBUG_BIND_INSNS) > > instead so that you don't walk it once again if there can'

Re: [PATCH/RFC] Simplify wrapped RTL op

2019-08-29 Thread Segher Boessenkool
Hi Robin, On Thu, Aug 29, 2019 at 11:08:11AM +0200, Robin Dapp wrote: > >> PR37451. Not clear what target that regressed on, btw. > > > > And PR55190 and PR67288 and probably more. > > Thanks for finding those. So the hope is to get this fixed or rather > move towards a fix with the patch seri

[PATCH] PR libstdc++/91067 add more missing exports for directory iterators

2019-08-29 Thread Jonathan Wakely
PR libstdc++/91067 * acinclude.m4 (libtool_VERSION): Bump to 6:28:0. * configure: Regenerate. * config/abi/pre/gnu.ver (GLIBCXX_3.4.28): Add new version. Export missing symbols. * testsuite/27_io/filesystem/iterators/91067.cc: Test move const

[PATCH][AArch64] Vectorize MULH(R)S patterns with SVE2 instructions

2019-08-29 Thread Yuliang Wang
This patch allows for more efficient SVE2 vectorization of Multiply High with Round and Scale (MULHRS) patterns. The example snippet: uint16_t a[N], b[N], c[N]; void foo_round (void) { for (int i = 0; i < N; i++) a[i] = int32_t)b[i] * (int32_t)c[i]) >> 14) +

Re: [PR 91579] Avoid creating redundant PHI nodes in tail-call pass

2019-08-29 Thread Martin Jambor
Hi, On Thu, Aug 29 2019, Richard Biener wrote: > On Thu, Aug 29, 2019 at 11:04 AM Martin Jambor wrote: >> >> Hi, >> >> when turning a tail-recursive call into a loop, the tail-call pass >> creates a phi node for each gimple_reg function parameter that has any >> use at all, even when the value pa

Re: [ARM/FDPIC v5 00/21] FDPIC ABI for ARM

2019-08-29 Thread Christophe Lyon
Hi, On 15/05/2019 14:39, Christophe Lyon wrote: Hello, This patch series implements the GCC contribution of the FDPIC ABI for ARM targets. This ABI enables to run Linux on ARM MMU-less cores and supports shared libraries to reduce the memory footprint. Without MMU, text and data segments rela

[preprocessor] Include stacking

2019-08-29 Thread Nathan Sidwell
This patch refactors pieces of the include stacking routines. Again from the modules branch, so these happen to provide the right slots to make that work, but I think they're good in their own right. _cpp_find_file excitingly hid an if as the loop-invariant conditional of a for. Refactored t

Re: [PATCH] correct an ILP32/LP64 bug in sprintf warning (PR 91567)

2019-08-29 Thread Rainer Orth
Hi Martin, > The recent sprintf+strlen integration doesn't handle unbounded > string lengths entirely correctly for ILP32 targets and causes > -Wformat-overflow false positives in some common cases, including > during GCC bootstrap targeting such systems The attached patch > fixes that mistake.

Re: [ARM/FDPIC v5 01/21] [ARM] FDPIC: Add -mfdpic option support

2019-08-29 Thread Christophe Lyon
On 16/07/2019 12:11, Richard Sandiford wrote: [This isn't really something that should be reviewed under global reviewership, but if it's either that or nothing, I'll do it anyway...] Christophe Lyon writes: 2019-XX-XX Christophe Lyon Mickaël Guêné gcc/ * config/a

Re: [ARM/FDPIC v5 02/21] [ARM] FDPIC: Handle arm*-*-uclinuxfdpiceabi in configure scripts

2019-08-29 Thread Christophe Lyon
On 12/07/2019 08:49, Richard Sandiford wrote: Christophe Lyon writes: The new arm-uclinuxfdpiceabi target behaves pretty much like arm-linux-gnueabi. In order the enable the same set of features, we have to update several configure scripts that generally match targets like *-*-linux*: in most p

Re: [PATCH] Setup predicate for switch default case in IPA (PR ipa/91089)

2019-08-29 Thread Martin Jambor
Hi, On Fri, Jul 12 2019, Feng Xue OS wrote: > IPA does not construct executability predicate for default case of switch > statement. > So execution cost of default case is not properly evaluated in IPA-cp, this > might > prevent function clone for function containing switch statement, if certain

Re: [ARM/FDPIC v5 03/21] [ARM] FDPIC: Force FDPIC related options unless -mno-fdpic is provided

2019-08-29 Thread Christophe Lyon
On 16/07/2019 12:34, Richard Sandiford wrote: Christophe Lyon writes: On 22/05/2019 10:45, Christophe Lyon wrote: On Wed, 22 May 2019 at 10:39, Szabolcs Nagy wrote: On 21/05/2019 16:28, Christophe Lyon wrote: --- a/gcc/config/arm/linux-eabi.h +++ b/gcc/config/arm/linux-eabi.h @@ -89,7 +89,

Backports to 8.4

2019-08-29 Thread Jakub Jelinek
Hi! I've backported following 12 commits from trunk to 8.4, bootstrapped/regtested on x86_64-linux and i686-linux and committed to gcc-8-branch. Jakub 2019-08-29 Jakub Jelinek Backported from mainline 2019-04-19 Jakub Jelinek PR middle-end/90139 * t

[PATCH V6 03/11] testsuite: annotate c-torture/compile tests with dg-require-stack-size

2019-08-29 Thread Jose E. Marchesi
This patch annotates tests that make use of a significant a mount of stack space. Embedded and other restricted targets may have problems compiling and running these tests. Note that the annotations are in many cases not exact. testsuite/ChangeLog: * gcc.c-torture/compile/2609-1.c:

[PATCH V6 07/11] bpf: gcc.target eBPF testsuite

2019-08-29 Thread Jose E. Marchesi
This patch adds a new testsuite to gcc.target, with eBPF specific tests. Tests are included for: - Target specific diagnostics. - All built-in functions. testsuite/ChangeLog: * gcc.target/bpf/bpf.exp: New file. * gcc.target/bpf/builtin-load.c: Likewise. * cc.target/bpf/co

[PATCH V6 04/11] testsuite: new require effective target indirect_calls

2019-08-29 Thread Jose E. Marchesi
This patch adds a new dg_require_effective_target procedure to the testsuite infrastructure: indirect_calls. This new function tells whether a target supports calls to non-constant call targets. This patch also annotates the tests in the gcc.c-torture testuite that require support for indirect ca

[PATCH V6 08/11] bpf: make target-supports.exp aware of eBPF

2019-08-29 Thread Jose E. Marchesi
This patch makes the several effective target checks in target-supports.exp to be aware of eBPF targets. gcc/testsuite/ChangeLog: * lib/target-supports.exp (check_effective_target_trampolines): Adapt to eBPF. (check_effective_target_stack_size): Likewise. (dg-effec

[PATCH V6 11/11] bpf: add myself as the maintainer for the eBPF port

2019-08-29 Thread Jose E. Marchesi
ChangeLog: * MAINTAINERS: Add myself as the maintainer of the eBPF port. Remove myself from Write After Approval section. --- ChangeLog | 5 + MAINTAINERS | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 5d8402949bc..5d69d

[PATCH V6 10/11] bpf: manual updates for eBPF

2019-08-29 Thread Jose E. Marchesi
gcc/ChangeLog: * doc/invoke.texi (Option Summary): Cover eBPF. (eBPF Options): New section. * doc/extend.texi (BPF Built-in Functions): Likewise. (BPF Kernel Helpers): Likewise. --- gcc/ChangeLog | 7 +++ gcc/doc/extend.texi | 171 ++

[PATCH V6 01/11] Update config.sub and config.guess.

2019-08-29 Thread Jose E. Marchesi
* config.sub: Import upstream version 2019-06-30. * config.guess: Import upstream version 2019-07-24. --- ChangeLog| 5 ++ config.guess | 264 +++ config.sub | 50 +-- 3 files changed, 240 insertions(+), 79 de

[PATCH V6 09/11] bpf: adjust GCC testsuite to eBPF limitations

2019-08-29 Thread Jose E. Marchesi
This patch makes many tests in gcc.dg and gcc.c-torture to be skipped in bpf-*-* targets. This is due to the many limitations imposed by eBPF to what would be perfectly valid C code: no support for more than 5 arguments to function calls, no support for indirect jumps, a very limited range for dir

[PATCH V6 06/11] bpf: new libgcc port

2019-08-29 Thread Jose E. Marchesi
This patch adds an eBPF port to libgcc. As of today, compiled eBPF programs do not support a single-entry point schema. Instead, a BPF "executable" is a relocatable ELF object file containing multiple entry points, in certain named sections. Also, the BPF loaders in the kernel do not execute .in

[PATCH V6 00/11] eBPF support for GCC

2019-08-29 Thread Jose E. Marchesi
[Differences from V5: . Use TARGET_BIG_ENDIAN instead of TARGET_LITTLE_ENDIAN, and make sure ASM_SPEC always passes an endianness selector argument to the assembler. . De-obfuscate the usage of arg.type_size_in_bytes and arg_aggregate-type_p. . Increase the cummulative argument unconditionall

[PATCH V6 02/11] opt-functions.awk: fix comparison of limit, begin and end

2019-08-29 Thread Jose E. Marchesi
The function integer_range_info makes sure that, if provided, the initial value fills in the especified range. However, it is necessary to convert the values to a numerical context before comparing, to make sure awk is using arithmetical order and not lexicographical order. gcc/ChangeLog:

[PATCH][GCC] Complex division improvements in GCC

2019-08-29 Thread Elen Kalda
Hi all, Advice and help needed! This patch makes changes to the the complex division in GCC. The algorithm used is same as in https://gcc.gnu.org/ml/gcc-patches/2019-08/msg01629.html - same problems, same improvement in robustness, same loss in accuracy. Since Baudin adds another underflow c

[PATCH V6 05/11] bpf: new GCC port

2019-08-29 Thread Jose E. Marchesi
This patch adds a port for the Linux kernel eBPF architecture to GCC. ChangeLog: * configure.ac: Support for bpf-*-* targets. * configure: Regenerate. contrib/ChangeLog: * config-list.mk (LIST): Disable go in bpf-*-* targets. gcc/ChangeLog: * config.gcc: Support for bpf-*-* targets.

Re: [ARM/FDPIC v5 13/21] [ARM] FDPIC: Force LSB bit for PC in Cortex-M architecture

2019-08-29 Thread Kyrill Tkachov
Hi Christophe, On 5/15/19 1:39 PM, Christophe Lyon wrote: Without this, when we are unwinding across a signal frame we can jump to an even address which leads to an exception. This is needed in __gnu_persnality_sigframe_fdpic() when restoring the PC from the signal frame since the PC saved by t

Re: [ARM/FDPIC v5 04/21] [ARM] FDPIC: Add support for FDPIC for arm architecture

2019-08-29 Thread Christophe Lyon
On 16/07/2019 13:58, Richard Sandiford wrote: Christophe Lyon writes: The FDPIC register is hard-coded to r9, as defined in the ABI. We have to disable tailcall optimizations if we don't know if the target function is in the same module. If not, we have to set r9 to the value associated with t

Re: [ARM/FDPIC v5 05/21] [ARM] FDPIC: Fix __do_global_dtors_aux and frame_dummy generation

2019-08-29 Thread Christophe Lyon
On 12/07/2019 08:06, Richard Sandiford wrote: Christophe Lyon writes: In FDPIC, we need to make sure __do_global_dtors_aux and frame_dummy are referenced by their address, not by pointers to the function descriptors. 2019-XX-XX Christophe Lyon Mickaël Guêné * libgcc/crtstu

Re: [ARM/FDPIC v5 09/21] [ARM] FDPIC: Add support for taking address of nested function

2019-08-29 Thread Christophe Lyon
On 31/07/2019 16:44, Christophe Lyon wrote: On Tue, 16 Jul 2019 at 14:42, Kyrill Tkachov wrote: On 7/16/19 12:18 PM, Kyrill Tkachov wrote: Hi Christophe On 5/15/19 1:39 PM, Christophe Lyon wrote: In FDPIC mode, the trampoline generated to support pointers to nested functions looks like:

Re: [ARM/FDPIC v5 12/21] [ARM] FDPIC: Restore r9 after we call __aeabi_read_tp

2019-08-29 Thread Christophe Lyon
Here is an updated version that makes use of the helper gen_restore_pic_register_after_call Christophe On 15/05/2019 14:39, Christophe Lyon wrote: We call __aeabi_read_tp() to get the thread pointer. Since this is a function call, we have to restore the FDPIC register afterwards. 2019-XX-XX

Re: [ARM/FDPIC v5 12/21] [ARM] FDPIC: Restore r9 after we call __aeabi_read_tp

2019-08-29 Thread Kyrill Tkachov
Hi Christophe, On 5/15/19 1:39 PM, Christophe Lyon wrote: We call __aeabi_read_tp() to get the thread pointer. Since this is a function call, we have to restore the FDPIC register afterwards. 2019-XX-XX  Christophe Lyon      Mickaël Guêné     gcc/     * config/arm/arm.c (arm_load

Re: [PATCH v2 0/9] S/390: Use signaling FP comparison instructions

2019-08-29 Thread Ilya Leoshkevich
> Am 22.08.2019 um 15:45 schrieb Ilya Leoshkevich : > > Bootstrap and regtest running on x86_64-redhat-linux and > s390x-redhat-linux. > > This patch series adds signaling FP comparison support (both scalar and > vector) to s390 backend. I'm running into a problem on ppc64 with this patch, and i

Re: [ARM/FDPIC v5 00/21] FDPIC ABI for ARM

2019-08-29 Thread Christophe Lyon
On 29/08/2019 15:57, Christophe Lyon wrote: Hi, On 15/05/2019 14:39, Christophe Lyon wrote: Hello, This patch series implements the GCC contribution of the FDPIC ABI for ARM targets. This ABI enables to run Linux on ARM MMU-less cores and supports shared libraries to reduce the memory footpri

[PR91598] Improve autoprefetcher heuristic in haifa-sched.c

2019-08-29 Thread Maxim Kuvyrkov
Hi, This patch tweaks autoprefetcher heuristic in scheduler to better group memory loads and stores together. From https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91598: There are two separate changes, both related to instruction scheduler, that cause the regression. The first change in r253235

[PATCH] Couple of debug dump improvements to scheduler (no code-gen changes)

2019-08-29 Thread Maxim Kuvyrkov
Hi, The first patch adds ranking statistics for autoprefetcher heuristic. The second one makes it easier to diff scheduler debug dumps by adding more context lines for diff at clock increments. OK to commit? -- Maxim Kuvyrkov www.linaro.org 0002-Add-missing-entry-for-rank_for_schedule-stat

Re: [PATCH] Generalized predicate/condition for parameter reference in IPA (PR ipa/91088)

2019-08-29 Thread Martin Jambor
Hi, On Fri, Jul 12 2019, Feng Xue OS wrote: > Current IPA-cp only generates cost-evaluating predicate for conditional > statement like > "if (param cmp const_val)", it is too simple and conservative. This patch > generalizes the > process to handle the form as T(param), a mathematical transforma

Re: [PR91598] Improve autoprefetcher heuristic in haifa-sched.c

2019-08-29 Thread Richard Biener
On August 29, 2019 5:40:47 PM GMT+02:00, Maxim Kuvyrkov wrote: >Hi, > >This patch tweaks autoprefetcher heuristic in scheduler to better group >memory loads and stores together. > >From https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91598: > >There are two separate changes, both related to instruct

Re: [PR91598] Improve autoprefetcher heuristic in haifa-sched.c

2019-08-29 Thread Maxim Kuvyrkov
> On Aug 29, 2019, at 7:29 PM, Richard Biener > wrote: > > On August 29, 2019 5:40:47 PM GMT+02:00, Maxim Kuvyrkov > wrote: >> Hi, >> >> This patch tweaks autoprefetcher heuristic in scheduler to better group >> memory loads and stores together. >> >> From https://gcc.gnu.org/bugzilla/show_b

Re: [PATCH], Fix V1TI in Altivec regs on old systems

2019-08-29 Thread Segher Boessenkool
Hi! On Tue, Aug 20, 2019 at 02:00:31PM -0400, Michael Meissner wrote: > I > noticed on power5 that the V1TImode mode is allowed in Altivec registers, even > though power5 doesn't have Altivec registers. > > While it doesn't seem to effect anything (I couldn't create a test case that > failed), it

[PATCH][ARM] Add logical DImode expanders

2019-08-29 Thread Wilco Dijkstra
We currently use default mid-end expanders for logical DImode operations. These split operations without first splitting off complex immediates or memory operands. The resulting expansions are non-optimal and allow for fewer LDRD/STRD opportunities. So add back explicit expanders which ensure mem

Re: [PR91598] Improve autoprefetcher heuristic in haifa-sched.c

2019-08-29 Thread Wilco Dijkstra
Hi Maxim, >  It appears that cores with autoprefetcher hardware prefer loads and stores >bundled together, not interspersed with > other instructions to occupy the >rest of CPU units.   I don't believe it is as simple as that - modern cores have multiple prefetchers but won't prefer bund

Re: [PR91598] Improve autoprefetcher heuristic in haifa-sched.c

2019-08-29 Thread Alexander Monakov
On Thu, 29 Aug 2019, Maxim Kuvyrkov wrote: > >> r1 = [rb + 0] > >> > >> r2 = [rb + 8] > >> > >> r3 = [rb + 16] > >> > >> > >> which, apparently, cortex-a53 autoprefetcher doesn't recognize. This > >> schedule happens because r2= load gets lower priority than the > >> "irrelevant" due to the

C++ PATCH for c++/91129 - wrong error with binary op in template argument

2019-08-29 Thread Marek Polacek
We reject this test with errors like nontype1.C:22:14: error: taking address of rvalue [-fpermissive] 22 | A{}> a2; | ^~~ that happens because for converting "C{}" to int we generate "C::operator int (&TARGET_EXPR )". The second template argument is a binary opera

[PATCH, i386]: Do not limit the cost of moves to/from XMM register to minimum 8.

2019-08-29 Thread Uros Bizjak
2019-08-28 Uroš Bizjak * config/i386/i386.c (ix86_register_move_cost): Do not limit the cost of moves to/from XMM register to minimum 8. Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}. Actually committed as r274994 with the wrong ChangeLog. Uros. diff --git a/gcc/conf

Re: [PR91598] Improve autoprefetcher heuristic in haifa-sched.c

2019-08-29 Thread Wilco Dijkstra
Hi Alexander, > So essentially the main issue is not a hardware peculiarity, but rather the > bad schedule being totally wrong (it could only make sense if loads had > 1-cycle > latency, which they do not). The scheduling is only bad because the specific intrinsics used are mapped onto asm stat

[PATCH, i386]: Tighten inline_secondary_memory_needed to reject moves between (SSE,mask) and non-general regs

2019-08-29 Thread Uros Bizjak
2019-08-29 Uroš Bizjak * config/i386/i386.c (inline_secondary_memory_needed): Return true for moves between SSE and non-general registers and between mask and non-general registers. (ix86_register_move_cost): Remove stalled comment. Bootstrapped and regression tested on x86_64-

[PATCH] Fix unused malloc return value warning

2019-08-29 Thread François Dumont
Hi     I am having this warning: /home/fdt/dev/gcc/git/libstdc++-v3/testsuite/util/testsuite_performance.h:170: attention: ignoring return value of « void* malloc(size_t) » declared with attribute « warn_unused_result » [-Wunused-result]   170 |   malloc(0); // Needed for some implementat

Re: Go patch committed: Provide index information on bounds check failure

2019-08-29 Thread Rainer Orth
Hi Ian, > This patch to the Go frontend and libgo changes the panic message > reported for an out of bounds index or slice operation to include the > invalid values. This makes it easier for the user to see what the > problem is. This implements https://golang.org/cl/161477 in the > gofrontend,

Re: [PATCH] Adding _Dependent_ptr type qualifier in C part 1/3

2019-08-29 Thread Akshat Garg
Hi Joseph, Many thanks for giving us your feedback. On Tue, Aug 20, 2019 at 3:57 AM Joseph Myers wrote: > On Tue, 30 Jul 2019, Martin Sebor wrote: > > > On 7/30/19 1:13 AM, Akshat Garg wrote: > > > Hi, > > > This patch includes C front-end code for a type qualifier > _Dependent_ptr. > > > > Just

Re: [PATCH] Adding _Dependent_ptr type qualifier in C part 1/3

2019-08-29 Thread Joseph Myers
On Fri, 30 Aug 2019, Akshat Garg wrote: > > The first question for any new thing that is syntactically a qualifier is: > > is it intended generally to be counted as a qualifier where the standard > > refers to qualified type, the unqualified version of a type, etc.? Or is > > it, like _Atomic, a

Re: Go patch committed: Provide index information on bounds check failure

2019-08-29 Thread Andreas Schwab
og: /usr/aarch64-suse-linux/bin/ld: _gotest_.o: in function `archive..z2ftar.Reader.next': /opt/gcc/gcc-20190829/Build/aarch64-suse-linux/ilp32/libgo/gotest1086/test/reader.go:72: undefined reference to `runtime.goPanicExtendSliceAlen' Andreas. -- Andreas Schwab, sch...@lin

Re: C++ PATCH for P1152R4: Deprecating some uses of volatile (PR c++/91361)

2019-08-29 Thread Martin Sebor
On 8/28/19 5:56 PM, Marek Polacek wrote: --- gcc/doc/invoke.texi +++ gcc/doc/invoke.texi @@ -3516,6 +3516,19 @@ result in a call to @code{terminate}. Disable the warning about the case when a conversion function converts an object to the same type, to a base class of that type, or to void; su

Re: [PATCH] Sanitizing the middle-end interface to the back-end for strict alignment

2019-08-29 Thread Bernd Edlinger
On 8/29/19 11:08 AM, Christophe Lyon wrote: > On Thu, 29 Aug 2019 at 10:58, Kyrill Tkachov > wrote: >> >> Hi Bernd, >> >> On 8/28/19 10:36 PM, Bernd Edlinger wrote: >>> On 8/28/19 2:07 PM, Christophe Lyon wrote: Hi, This patch causes an ICE when building libgcc's unwind-arm.o w

Re: [PATCH V3, #1 of 10], Add basic pc-relative support

2019-08-29 Thread Segher Boessenkool
On Wed, Aug 28, 2019 at 05:26:55PM -0400, Michael Meissner wrote: > On Wed, Aug 28, 2019 at 12:14:58PM -0500, Segher Boessenkool wrote: > > > +/* Enumeration giving the type of traditional addressing that would be > > > used to > > > + decide whether an instruction uses prefixed memory or not.

[PATCH] correct MEM_REF bounds checking of arrays (PR 91584)

2019-08-29 Thread Martin Sebor
The -Warray-bounds enhancement I added to GCC 9 causes false positives in languages like Fortran whose first array element is at a non-zero index. The attached patch has the function responsible for the warning normalize the array bounds to always start at zero to avoid these false positives. Te

Re: [PATCH, V3, #3 of 10], Add prefixed RTL insn attribute

2019-08-29 Thread Segher Boessenkool
Hi Mike, On Mon, Aug 26, 2019 at 04:31:02PM -0400, Michael Meissner wrote: > (rs6000_asm_output_opcode): New function for prifixed memory. Typo. Just say "New." or "New function." please. > --- gcc/config/rs6000/rs6000.c(revision 274871) > +++ gcc/config/rs6000/rs6000.c(wo

Re: [PATCH] Couple of debug dump improvements to scheduler (no code-gen changes)

2019-08-29 Thread Jeff Law
On 8/29/19 9:44 AM, Maxim Kuvyrkov wrote: > Hi, > > The first patch adds ranking statistics for autoprefetcher heuristic. > > The second one makes it easier to diff scheduler debug dumps by adding more > context lines for diff at clock increments. > > OK to commit? OK for both. jeff

Re: [PATCH, i386]: Do not limit the cost of moves to/from XMM register to minimum 8.

2019-08-29 Thread Hongtao Liu
On Fri, Aug 30, 2019 at 2:09 AM Uros Bizjak wrote: > > 2019-08-28 Uroš Bizjak > > * config/i386/i386.c (ix86_register_move_cost): Do not > limit the cost of moves to/from XMM register to minimum 8. > > Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}. > > Actually committe

Re: [PATCH, i386]: Do not limit the cost of moves to/from XMM register to minimum 8.

2019-08-29 Thread Hongtao Liu
On Fri, Aug 30, 2019 at 8:10 AM Hongtao Liu wrote: > > On Fri, Aug 30, 2019 at 2:09 AM Uros Bizjak wrote: > > > > 2019-08-28 Uroš Bizjak > > > > * config/i386/i386.c (ix86_register_move_cost): Do not > > limit the cost of moves to/from XMM register to minimum 8. > > > > Bootstrapped an

[PATCH] use fallback location for warning (PR 91599)

2019-08-29 Thread Martin Sebor
warning_at() calls with the %G directive rely on the gimple statement for both their location and the inlining context. When the statement is not associated with a location, the warning doesn't point at any line even if the location argument passed to the call was valid. The attached patch change

Re: [PATCH, i386]: Do not limit the cost of moves to/from XMM register to minimum 8.

2019-08-29 Thread Uros Bizjak
On Fri, Aug 30, 2019 at 2:08 AM Hongtao Liu wrote: > > On Fri, Aug 30, 2019 at 2:09 AM Uros Bizjak wrote: > > > > 2019-08-28 Uroš Bizjak > > > > * config/i386/i386.c (ix86_register_move_cost): Do not > > limit the cost of moves to/from XMM register to minimum 8. > > > > Bootstrapped an