Re: [PATCH] Fix x86_64 fix_debug_reg_uses (PR rtl-optimization/78575)

2016-12-01 Thread Uros Bizjak
On Tue, Nov 29, 2016 at 8:41 PM, Jakub Jelinek wrote: > Hi! > > The x86_64 stv pass uses PUT_MODE to change REGs and MEMs in place to affect > all setters and users, but that is undesirable in debug insns which are > intentionally ignored during the analysis and we should keep

Re: [PATCH] Another debug info stv fix (PR rtl-optimization/78547)

2016-12-01 Thread Uros Bizjak
On Thu, Dec 1, 2016 at 11:58 PM, Jeff Law wrote: > On 11/30/2016 11:59 AM, Jakub Jelinek wrote: >> >> On Wed, Nov 30, 2016 at 08:01:11AM +0100, Uros Bizjak wrote: >>> >>> On Tue, Nov 29, 2016 at 8:44 PM, Jakub Jelinek wrote: Hi! The

Avoid alloca(0) when temporarily propagating operands during threading

2016-12-01 Thread Jeff Law
Martin's alloca work flagged this code as problematical. Essentially if we had a statement with no operands and the statement was not in the hash table, then we could end up performing alloca (0), which is inadvisable. We can safely just avoid the whole block of code if there are no

Re: [tree-tailcall] Check if function returns it's argument

2016-12-01 Thread Prathamesh Kulkarni
On 2 December 2016 at 03:57, Jeff Law wrote: > On 12/01/2016 06:22 AM, Richard Biener wrote: >>> >>> Well after removing DECL_BY_REFERENCE, verify_gimple still fails but >>> differently: >>> >>> tail-padding1.C:13:1: error: RESULT_DECL should be read only when >>>

[PATCH] fix PR71721

2016-12-01 Thread Waldemar Brodkorb
Hi, it would be nice if uclinux targets are allowed to enable posix threads. Together with uClibc-ng/uClibc you can build m68k-nommu toolchain and enable old Linuxthreads instead of NPTL/TLS. With following change it is possible to build boost, which checks if gcc is build with threads enabled.

Re: [PATCH] handle integer overflow/wrapping in printf directives (PR 78622)

2016-12-01 Thread Martin Sebor
On 12/01/2016 02:15 AM, Jakub Jelinek wrote: On Thu, Dec 01, 2016 at 08:26:47AM +0100, Jakub Jelinek wrote: Isn't this too simplistic? I mean, if you have say dirtype of signed char and argmin say 4096 + 32 and argmax say 4096 + 64, (signed char) arg has range 32, 64, while I think your

Re: [PATCH 1/9] print_rtx: implement support for reuse IDs (v2)

2016-12-01 Thread David Malcolm
On Thu, 2016-12-01 at 16:05 -0700, Jeff Law wrote: > On 11/11/2016 02:15 PM, David Malcolm wrote: > > Posted earlier here: > > https://gcc.gnu.org/ml/gcc-patches/2016-11/msg00651.html > > Link to earlier discussion: > > https://gcc.gnu.org/ml/gcc-patches/2016-10/msg01801.html > > > > This

[PATCH] PR fortran/78618 -- RANK() should not ICE

2016-12-01 Thread Steve Kargl
The attached patch fixes an ICE, a nearby whitespace issue, and removed the ATTRIBUTE_UNUSED tag. THe change has passed regression testing on x86_64-*-freebsd. Ok to commit? 2016-12-01 Steven G. Kargl PR fortran/78618 * check.c (gfc_check_rank): Remove

[PATCH 9/9] Add "__RTL" to cc1 (v6)

2016-12-01 Thread David Malcolm
Changed in v6: - Handle EOF in c_parser_parse_rtl_body - Various fixups from review Changed in v5: - rebased from r242065 to r242392. In particular, this brings in the gimple FE; rewrote the "startwith" pass-skipping mechanism to work with both __GIMPLE and __RTL. - rewrote the "__RTL"

[PATCH 8a/9] Introduce class function_reader (v6)

2016-12-01 Thread David Malcolm
Changed in v6: - split out dump-reading selftests into followup patches (target-independent, and target-specific) - removes unneeded headers from read-rtl-function.c - numerous other cleanups identified in review Changed in v5: - updated for change to emit_status::ensure_regno_capacity Changed

[PATCH 8d/9] Add x86_64-specific selftests for RTL function reader

2016-12-01 Thread David Malcolm
This patch adds more selftests for class function_reader, where the dumps to be read contain x86_64-specific features. In an earlier version of the patch kit, these were handled using This version instead runs them via a target hook for running target-specific selftests, thus putting them within

[PATCH 8c/9] Add aarch64-specific selftests for RTL function reader

2016-12-01 Thread David Malcolm
This patch adds more selftests for class function_reader, where the dumps to be read contain aarch64-specific features. In an earlier version of the patch kit, these were handled using #ifndef GCC_AARCH64_H to conditionalize running them. This version instead runs them via a target hook for

[PATCH 8b/9] Add target-independent selftests of RTL function reader

2016-12-01 Thread David Malcolm
gcc/ChangeLog: * function-tests.c (selftest::verify_three_block_rtl_cfg): Remove "static". * read-rtl-function.c (selftest::assert_edge_at): New function. (ASSERT_EDGE): New macro. (selftest::test_loading_dump_fragment_1): New function.

Re: [PATCH 5/9] Introduce selftest::locate_file (v4)

2016-12-01 Thread David Malcolm
On Thu, 2016-12-01 at 14:29 +0100, Bernd Schmidt wrote: > On 11/11/2016 10:15 PM, David Malcolm wrote: > > + /* Makefile.in has -fself-test=$(srcdir)/testsuite/selftests, so > > that > > + flag_self_test contains the path to the selftest subdirectory > > of the > > + source tree (without

[PATCH] PR target/78639, Fix code generation on Power9

2016-12-01 Thread Michael Meissner
I discovered that my change in subversion id 242679, used a 'Y' constraint for movdi, when it should be using a 'wY'. 'Y' is for gpr load/stores, and it allows register+register address, while 'wY' is for the new register+offset instructions added in ISA 3.0, which does not include

Re: Pretty printers for versioned namespace

2016-12-01 Thread Jonathan Wakely
On 01/12/16 22:51 +0100, François Dumont wrote: On 29/11/2016 21:17, Jonathan Wakely wrote: On 28/11/16 22:19 +0100, François Dumont wrote: I am not fully happy with the replication in printers.py of StdRbtreeIteratorPrinter and StdExpAnyPrinter(SingleObjContainerPrinter in respectively

Re: [PATCH] Fix minor nits in gimple-ssa-sprintf.c (PR tree-optimization/78586)

2016-12-01 Thread Martin Sebor
On 12/01/2016 09:24 AM, Martin Sebor wrote: So, let's use another testcase, -O2 -W -Wall -fno-tree-vrp -fno-tree-ccp and again UB in it: volatile bool e; volatile int x; int main () { x = 123; *(char *) = x; bool f = e; x = __builtin_snprintf (0, 0, "%d", f); } This will store 1 into

Re: [PATCH] Do not simplify "(and (reg) (const bit))" to if_then_else.

2016-12-01 Thread Jeff Law
On 11/21/2016 05:36 AM, Dominik Vogt wrote: On Fri, Nov 11, 2016 at 12:10:28PM +0100, Dominik Vogt wrote: > On Mon, Nov 07, 2016 at 09:29:26PM +0100, Bernd Schmidt wrote: > > On 10/31/2016 08:56 PM, Dominik Vogt wrote: > > > > >combine_simplify_rtx() tries to replace rtx expressions with just

Re: [PATCH] Unset used bit in simplify_replace_* on newly copied rtxs (PR target/78614)

2016-12-01 Thread Jakub Jelinek
On Thu, Dec 01, 2016 at 11:48:03PM +0100, Bernd Schmidt wrote: > On 12/01/2016 11:43 PM, Jakub Jelinek wrote: > > > >so we'd need to slow shallow_copy_rtx down by adding switch (code) > >in there or something similar. > > Is there reason to assume it's time-critical? IMO eliminating the potential

Re: [PATCH] PR fortran/77505 -- Treat negative character length as LEN=0

2016-12-01 Thread Steve Kargl
On Wed, Nov 30, 2016 at 05:13:28AM +, Punnoose, Elizebeth wrote: > Please excuse the messy formatting in my initial mail. Resending > with proper formatting. > > This patch checks for negative character length in the array > constructor, and treats it as LEN=0. > > A warning message is

Re: [PATCH] Fix x86_64 fix_debug_reg_uses (PR rtl-optimization/78575)

2016-12-01 Thread Jakub Jelinek
On Thu, Dec 01, 2016 at 03:55:58PM -0700, Jeff Law wrote: > On 11/30/2016 11:57 AM, Jakub Jelinek wrote: > >On Tue, Nov 29, 2016 at 03:20:08PM -0700, Jeff Law wrote: > >>On 11/29/2016 12:41 PM, Jakub Jelinek wrote: > >>>Hi! > >>> > >>>The x86_64 stv pass uses PUT_MODE to change REGs and MEMs in

Re: [PATCH] Fix minor nits in gimple-ssa-sprintf.c (PR tree-optimization/78586)

2016-12-01 Thread Jeff Law
On 11/30/2016 12:01 PM, Jakub Jelinek wrote: Hi! This patch fixes some minor nits I've raised in the PR, more severe issues left unresolved there. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2016-11-30 Jakub Jelinek PR

Re: [PATCH 1/9] print_rtx: implement support for reuse IDs (v2)

2016-12-01 Thread Jeff Law
On 11/11/2016 02:15 PM, David Malcolm wrote: Posted earlier here: https://gcc.gnu.org/ml/gcc-patches/2016-11/msg00651.html Link to earlier discussion: https://gcc.gnu.org/ml/gcc-patches/2016-10/msg01801.html This version: - eliminates the rtx_reuse_manager singleton - eliminates

Re: [PATCH] remove invalid "tail +16c"

2016-12-01 Thread Jeff Law
On 11/22/2016 11:22 PM, ma.ji...@zte.com.cn wrote: Hi all, In "config/acx.m4", there are still some "tail +16c" which are invalid on POSIX systems. In my opinion, all "tail +16c" should be changed to "tail -c +16" directly, as most systems has accept the latter. And, to skip first 16

Re: [PATCH] Another debug info stv fix (PR rtl-optimization/78547)

2016-12-01 Thread Jeff Law
On 11/30/2016 11:59 AM, Jakub Jelinek wrote: On Wed, Nov 30, 2016 at 08:01:11AM +0100, Uros Bizjak wrote: On Tue, Nov 29, 2016 at 8:44 PM, Jakub Jelinek wrote: Hi! The following testcase ICEs because DECL_RTL/DECL_INCOMING_RTL are adjusted by the stv pass through the

Re: [PATCH] Fix x86_64 fix_debug_reg_uses (PR rtl-optimization/78575)

2016-12-01 Thread Jeff Law
On 11/30/2016 11:57 AM, Jakub Jelinek wrote: On Tue, Nov 29, 2016 at 03:20:08PM -0700, Jeff Law wrote: On 11/29/2016 12:41 PM, Jakub Jelinek wrote: Hi! The x86_64 stv pass uses PUT_MODE to change REGs and MEMs in place to affect all setters and users, but that is undesirable in debug insns

Re: [PATCH v2] improve folding of expressions that move a single bit around

2016-12-01 Thread Jeff Law
On 12/01/2016 04:21 AM, Paolo Bonzini wrote: In code like the following from KVM: /* it is a read fault? */ error_code = (exit_qualification << 2) & PFERR_FETCH_MASK; it would be nicer to write /* it is a read fault? */ error_code = (exit_qualification &

Re: [PATCH] Unset used bit in simplify_replace_* on newly copied rtxs (PR target/78614)

2016-12-01 Thread Bernd Schmidt
On 12/01/2016 11:43 PM, Jakub Jelinek wrote: so we'd need to slow shallow_copy_rtx down by adding switch (code) in there or something similar. Is there reason to assume it's time-critical? IMO eliminating the potential for error by not having callers need to do this outweighs that concern.

Re: [PATCH] Unset used bit in simplify_replace_* on newly copied rtxs (PR target/78614)

2016-12-01 Thread Jakub Jelinek
On Thu, Dec 01, 2016 at 01:19:16PM +0100, Bernd Schmidt wrote: > On 11/30/2016 11:11 PM, Jakub Jelinek wrote: > >I run into the problem that while simplify_replace_rtx if it actually does > >copy_rtx (for y) or if it simplifies something through > >simplify_gen_{unary,binary,relational,ternary},

Re: [PATCH] Fix runtime error: left shift of negative value (PR, ipa/78555).

2016-12-01 Thread Jeff Law
On 12/01/2016 02:54 AM, Martin Liška wrote: As described in the PR, we do couple of shifts of a negative value. Fixed in the patch and couple of new unit tests are added. Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. Ready to be installed? Martin

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

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

Re: [tree-tailcall] Check if function returns it's argument

2016-12-01 Thread Jeff Law
On 12/01/2016 06:22 AM, Richard Biener wrote: Well after removing DECL_BY_REFERENCE, verify_gimple still fails but differently: tail-padding1.C:13:1: error: RESULT_DECL should be read only when DECL_BY_REFERENCE is set } ^ while verifying SSA_NAME nrvo_4 in statement # .MEM_3 = VDEF

Re: [PATCH] PR 66149 & PR78235 dbxout_type_fields

2016-12-01 Thread Jakub Jelinek
On Thu, Dec 01, 2016 at 01:41:30PM -0500, David Edelsohn wrote: > TEMPLATE_DECL is defined in cp/cp-tree.def, which is included in > all-tree.def, which is included in tree-core.h, which is included in > tree.h, which is included in dbxout.c. That is clearly a bug, if TEMPLATE_DECL is used in the

[committed] dwarf2out.c: fix jit issue with early_dwarf_finished

2016-12-01 Thread David Malcolm
All of the jit testcases that generate debuginfo appear to have been failing since r240228 on their 2nd in-process iteration on this assertion in set_early_dwarf's ctor: gcc_assert (! early_dwarf_finished); Root cause is that the global is never reset at the end of compilation, which this

Re: Pretty printers for versioned namespace

2016-12-01 Thread François Dumont
On 29/11/2016 21:17, Jonathan Wakely wrote: On 28/11/16 22:19 +0100, François Dumont wrote: Hi Here is a patch to fix pretty printers when versioned namespace is activated. You will see that I have hesitated in making the fix independant of the version being used. In source files you

Re: [PATCH 8/9] Introduce class function_reader (v4)

2016-12-01 Thread David Malcolm
On Thu, 2016-12-01 at 15:40 +0100, Bernd Schmidt wrote: Thanks for looking at this. > On 11/11/2016 10:15 PM, David Malcolm wrote: > > #include "gt-aarch64.h" > > diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c > > index 6c608e0..0dda786 100644 > > --- a/gcc/config/i386/i386.c > >

[SPARC] Preparatory work for switch to LRA

2016-12-01 Thread Eric Botcazou
The switch will very likely not happen for GCC 7, but an experimental support can probably be introduced. The attached patch adds the famous -mlra option and rescues straightforward changes by DaveM. Tested on SPARC/Solaris, applied on the mainline. 2016-12-01 Eric Botcazou

Re: [PATCH] Dump probability for edges a frequency for BBs

2016-12-01 Thread Martin Liška
On 12/01/2016 05:49 PM, Martin Sebor wrote: Okay, thanks for the clarification. One other question though. Why would the probability be near zero? In the absence of any hints the expression 2 != sprintf(d, "%i", 12) should have a very high probability of being true, near 100% in fact. I ask

Re: [Patch 1/2 PR78561] Rename get_pool_size to get_pool_size_upper_bound

2016-12-01 Thread Jeff Law
On 12/01/2016 08:29 AM, James Greenhalgh wrote: Hi, There's no functional change in this patch, just a rename. The size recorded in "offset" is only ever incremented as we add new items to the constant pool. But this information can become stale where those constant pool entries would not get

[Committed] PR fortran/78279 -- convert gcc_assert to internal error

2016-12-01 Thread Steve Kargl
I've committed the attached patch, which converts a gcc_assert() to a conditional express tha may call gfc_internal_error().o 2016-12-01 Steven G. Kargl PR fortran/78279 * dependency.c (identical_array_ref): Convert gcc_assert to conditional and

Go patch committed: add slice initializers to the GC root list

2016-12-01 Thread Ian Lance Taylor
As of https://golang.org/cl/32917 we can put slice initializers in the .data section. The program can still change the values in those slices. That means that if the slice elements can contain pointers, we need to register the entire initializer as a GC root. This would be straightforward

Re: [Fortran, Patch, PR{43366, 57117, 61337, 61376}, v1] Assign to polymorphic objects.

2016-12-01 Thread David Edelsohn
Dump sent privately. Yes, I meant "x". AIX defaults to 32 bit. - David On Thu, Dec 1, 2016 at 1:31 PM, Andre Vehreschild wrote: > Hi all, > > I am sorry, but the initial mail as well as Dominique answer puzzles me: > > David: I do expect to > > write (*,*) any > > not

Re: [PATCH] PR 66149 & PR78235 dbxout_type_fields

2016-12-01 Thread Jeff Law
On 12/01/2016 11:41 AM, David Edelsohn wrote: On Thu, Dec 1, 2016 at 1:25 PM, Jeff Law wrote: On 12/01/2016 09:15 AM, David Edelsohn wrote: A number of the "variant" testcases fail to build on AIX and targets that use stabs. The failure looks like:

Re: [PATCH] PR 66149 & PR78235 dbxout_type_fields

2016-12-01 Thread David Edelsohn
On Thu, Dec 1, 2016 at 1:25 PM, Jeff Law wrote: > On 12/01/2016 09:15 AM, David Edelsohn wrote: >> >> A number of the "variant" testcases fail to build on AIX and targets >> that use stabs. The failure looks like: >> >>

Re: [PATCH] avoid calling alloca(0)

2016-12-01 Thread Jeff Law
On 11/30/2016 09:09 PM, Martin Sebor wrote: What I think this tells us is that we're not at a place where we're clean. But we can incrementally get there. The warning is only catching a fairly small subset of the cases AFAICT. That's not unusual and analyzing why it didn't trigger on those

Re: [Fortran, Patch, PR{43366, 57117, 61337, 61376}, v1] Assign to polymorphic objects.

2016-12-01 Thread Andre Vehreschild
Hi all, I am sorry, but the initial mail as well as Dominique answer puzzles me: David: I do expect to write (*,*) any not being compilable at all, because "any" is an intrinsic function and I suppose that gfortran is not able to print it. At best it gives an address. So am I right

Re: [PATCH] PR 66149 & PR78235 dbxout_type_fields

2016-12-01 Thread Jeff Law
On 12/01/2016 09:15 AM, David Edelsohn wrote: A number of the "variant" testcases fail to build on AIX and targets that use stabs. The failure looks like: /tmp/GCC/powerpc-ibm-aix7.2.0.0/libstdc++-v3/include/variant:956: internal compiler error: tree check: expected field_decl, have

Re: [PATCH] have __builtin_object_size handle POINTER_PLUS with non-const offset (pr 77608)

2016-12-01 Thread Martin Sebor
Sure - but then you maybe instead want to check for op being in range [0, max-of-signed-type-of-op] instead? So similar to expr_not_equal_to add a expr_in_range helper? Your function returns true for sizetype vars even if it might be effectively signed, like for sizetype i_1 = -4; i_2 = i_1

Re: [Patch 0/2 PR78561] Recalculate constant pool size before emitting it

2016-12-01 Thread David Edelsohn
> James Greenhalgh writes: > The patch set has been bootstrapped and tested on aarch64-none-linux-gnu and > x86-64-none-linux-gnu without any issues. I've also cross-tested it for > aarch64-none-elf and build-tested it for rs6000 (though I couldn't run the > testsuite as I don't have a test

Re: [PATCH] Fix minor nits in gimple-ssa-sprintf.c (PR tree-optimization/78586)

2016-12-01 Thread Jeff Law
On 12/01/2016 12:51 AM, Jakub Jelinek wrote: On Wed, Nov 30, 2016 at 06:14:14PM -0700, Martin Sebor wrote: On 11/30/2016 12:01 PM, Jakub Jelinek wrote: Hi! This patch fixes some minor nits I've raised in the PR, more severe issues left unresolved there. Bootstrapped/regtested on x86_64-linux

[PATCH, GCC/LRA] Fix PR78617: Fix conflict detection in rematerialization

2016-12-01 Thread Thomas Preudhomme
Hi, When considering a candidate for rematerialization, LRA verifies if the candidate clobbers a live register before going forward with the rematerialization (see code starting with comment "Check clobbers do not kill something living."). To do this check, the set of live registers at any

Re: [PATCH] Dump probability for edges a frequency for BBs

2016-12-01 Thread Jeff Law
On 12/01/2016 09:49 AM, Martin Sebor wrote: Okay, thanks for the clarification. One other question though. Why would the probability be near zero? In the absence of any hints the expression 2 != sprintf(d, "%i", 12) should have a very high probability of being true, near 100% in fact. I ask

Re: [RFA] Handle target with no length attributes sanely in bb-reorder.c

2016-12-01 Thread Jeff Law
On 12/01/2016 05:04 AM, Segher Boessenkool wrote: On Thu, Dec 01, 2016 at 10:19:42AM +0100, Richard Biener wrote: Thinking about this again maybe targets w/o insn-length should simply always use the 'simple' algorithm instead of the STV one? At least that might be what your change effectively

Re: [PATCH 2/6][ARM] Move CRC builtins to refactored framework

2016-12-01 Thread Andre Vieira (lists)
On 09/11/16 10:11, Andre Vieira (lists) wrote: > Hi, > > This patch refactors the implementation of the ARM ACLE CRC builtins to > use the builtin framework. > > Is this OK for trunk? > > Regards, > Andre > > gcc/ChangeLog > 2016-11-09 Andre Vieira > > *

Re: [PATCH 1/6][ARM] Refactor NEON builtin framework to work for other builtins

2016-12-01 Thread Andre Vieira (lists)
On 17/11/16 10:42, Kyrill Tkachov wrote: > Hi Andre, > > On 09/11/16 10:11, Andre Vieira (lists) wrote: >> Hi, >> >> Refactor NEON builtin framework such that it can be used to implement >> other builtins. >> >> Is this OK for trunk? >> >> Regards, >> Andre >> >> gcc/ChangeLog >> 2016-11-09

Re: [patch,avr] Clean up n_flash field from MCU information.

2016-12-01 Thread Denis Chertykov
2016-12-01 12:26 GMT+03:00 Georg-Johann Lay : > The introduction of the flash_size field in avr_mcu_t rendered the n_flash > field redundant. This patch computes the value of n_flash as needed from > flash_size and cleans up n_flash. > > Ok for trunk? > > Johann > > gcc/ >

Re: [PATCH] Dump probability for edges a frequency for BBs

2016-12-01 Thread Martin Sebor
Okay, thanks for the clarification. One other question though. Why would the probability be near zero? In the absence of any hints the expression 2 != sprintf(d, "%i", 12) should have a very high probability of being true, near 100% in fact. I ask because the test I referenced tries to verify

Re: [patch,avr] Document how to avoid progmem on AVR_TINY.

2016-12-01 Thread Denis Chertykov
2016-12-01 17:28 GMT+03:00 Georg-Johann Lay : > This adds to the documentation a hint how to set up a linker description > file that avoids progmem altogether any without the usual overhead of > locating read-only data in RAM. The proposed linker description file is > completely

Re: [patch,testsuite,avr]: Filter-out -mmcu= from options for tests that set -mmcu=

2016-12-01 Thread Mike Stump
On Dec 1, 2016, at 3:54 AM, Georg-Johann Lay wrote: > > This patch moves the compile tests that have a hard coded -mmcu=MCU in their > dg-options to a new folder. > > The exp driver filters out -mmcu= from the command line options that are > provided by, say, board description

Re: [PATCH] Dump probability for edges a frequency for BBs

2016-12-01 Thread Martin Sebor
On 12/01/2016 02:48 AM, Martin Liška wrote: On 11/30/2016 11:46 PM, Martin Sebor wrote: On 11/24/2016 05:59 AM, Martin Liška wrote: On 11/24/2016 09:29 AM, Richard Biener wrote: Please guard with ! TDF_GIMPLE, otherwise the output will not be parseable with the GIMPLE FE. RIchard. Done and

Re: [RFC][PATCH] Speed-up use-after-scope (re-writing to SSA)

2016-12-01 Thread Martin Liška
On 11/23/2016 03:13 PM, Jakub Jelinek wrote: > On Wed, Nov 23, 2016 at 02:57:07PM +0100, Martin Liška wrote: >> I started review process in libsanitizer: https://reviews.llvm.org/D26965 >> And I have a question that was asked in the review: can we distinguish >> between load and store >> in case

Re: [PATCH 0/2] S/390: New patterns for extzv, risbg and r[ox]sbg.

2016-12-01 Thread Dominik Vogt
On Thu, Dec 01, 2016 at 05:26:16PM +0100, Dominik Vogt wrote: > The following patch series adds some patterns for enhanced use of > the r[ixo]sbg instructions on S/390. > > - 0001-* fixes some test regressions with the existing risbg >patterns that are broken because of recent trunkt

Re: [PATCH 1/2] S/390: New patterns for extzv, risbg and r[ox]sbg.

2016-12-01 Thread Dominik Vogt
On Thu, Dec 01, 2016 at 05:26:16PM +0100, Dominik Vogt wrote: > The following patch series adds some patterns for enhanced use of > the r[ixo]sbg instructions on S/390. > > - 0001-* fixes some test regressions with the existing risbg >patterns that are broken because of recent trunkt

[PATCH 0/2] S/390: New patterns for extzv, risbg and r[ox]sbg.

2016-12-01 Thread Dominik Vogt
The following patch series adds some patterns for enhanced use of the r[ixo]sbg instructions on S/390. - 0001-* fixes some test regressions with the existing risbg patterns that are broken because of recent trunkt changes. - 0002-* adds new patterns for the r[xo]sbg instructions and an

Re: [PATCH] Fix minor nits in gimple-ssa-sprintf.c (PR tree-optimization/78586)

2016-12-01 Thread Martin Sebor
So, let's use another testcase, -O2 -W -Wall -fno-tree-vrp -fno-tree-ccp and again UB in it: volatile bool e; volatile int x; int main () { x = 123; *(char *) = x; bool f = e; x = __builtin_snprintf (0, 0, "%d", f); } This will store 1 into x, while without -fprintf-return-value it

[PATCH] PR 66149 & PR78235 dbxout_type_fields

2016-12-01 Thread David Edelsohn
A number of the "variant" testcases fail to build on AIX and targets that use stabs. The failure looks like: /tmp/GCC/powerpc-ibm-aix7.2.0.0/libstdc++-v3/include/variant:956: internal compiler error: tree check: expected field_decl, have template_decl in int_bit_position, at tree.h:5396 which

Re: [PATCH] avoid calling alloca(0)

2016-12-01 Thread Martin Sebor
On 11/30/2016 09:09 PM, Martin Sebor wrote: What I think this tells us is that we're not at a place where we're clean. But we can incrementally get there. The warning is only catching a fairly small subset of the cases AFAICT. That's not unusual and analyzing why it didn't trigger on those

Re: [RFC] Assert DECL_ABSTRACT_ORIGIN is different from the decl itself

2016-12-01 Thread Martin Jambor
Hello, On Wed, Nov 30, 2016 at 02:09:19PM +0100, Martin Jambor wrote: > On Tue, Nov 29, 2016 at 10:17:02AM -0700, Jeff Law wrote: > > > > ... > > > > So it seems that rather than an assert that we should just not walk down a > > self-referencing DECL_ABSTRACT_ORIGIN. > > > > ... > > So I

[Patch testsuite obvious] Use setjmp, not sigsetjmp in gcc.dg/pr78582.c

2016-12-01 Thread James Greenhalgh
As subject. Newlib doesn't have sigsetjmp, so the test fails for our newlib-based testruns. Confirmed that this adjusted test would still have ICE'd without r242958. Committed as obvious as revision 243116. Thanks, James --- 2016-12-01 James Greenhalgh *

[PATCH][AARCH64]Simplify call, call_value, sibcall, sibcall_value patterns.

2016-12-01 Thread Renlin Li
Hi all, This patch refactors the code used in call, call_value, sibcall, sibcall_value expanders. Before the change, the logic is following: call expander --> call_internal --> call_reg/call_symbol call_vlaue expander--> call_value_internal-->

Re: [PATCH v3] Do not simplify "(and (reg) (const bit))" to if_then_else.

2016-12-01 Thread Dominik Vogt
On Thu, Dec 01, 2016 at 01:33:17PM +0100, Bernd Schmidt wrote: > On 11/21/2016 01:36 PM, Dominik Vogt wrote: > >diff --git a/gcc/combine.c b/gcc/combine.c > >index b22a274..457fe8a 100644 > >--- a/gcc/combine.c > >+++ b/gcc/combine.c > >@@ -5575,10 +5575,23 @@ combine_simplify_rtx (rtx x,

[Patch 2/2 PR78561] Recalculate constant pool size before emitting it

2016-12-01 Thread James Greenhalgh
Hi, In PR78561, we try to make use of stale constant pool offset data when making decisions as to whether to output an alignment directive after the AArch64 constant pool. The offset data goes stale as we only ever increment it when adding new constants to the pool (it represents an upper bound

[Patch 1/2 PR78561] Rename get_pool_size to get_pool_size_upper_bound

2016-12-01 Thread James Greenhalgh
Hi, There's no functional change in this patch, just a rename. The size recorded in "offset" is only ever incremented as we add new items to the constant pool. But this information can become stale where those constant pool entries would not get emitted. Thus, it is only ever an upper bound on

[Patch 0/2 PR78561] Recalculate constant pool size before emitting it

2016-12-01 Thread James Greenhalgh
Hi, In PR78561, we try to make use of stale constant pool offset data when making decisions as to whether to output an alignment directive after the AArch64 constant pool. The offset data goes stale as we only ever increment it when adding new constants to the pool (it represents an upper bound

Re: Import libcilkrts Build 4467 (PR target/68945)

2016-12-01 Thread Rainer Orth
Hi Jeff, >> The following patch has passed x86_64-pc-linux-gnu bootstrap without >> regressions; i386-pc-solaris2.12 and sparc-sun-solaris2.12 bootstraps >> are currently running. >> >> Ok for mainline if they pass? > Yes. Sorry for not getting back to you sooner. no worries; I've been on

[PATCH] S/390: Fix setmem-long test.

2016-12-01 Thread Dominik Vogt
The attached patch fixes the setmem_long-1.c S/390 backend test. Adding a " in the scan-assembler pattern is necessary because of a recent change in print-rtl.c. Ciao Dominik ^_^ ^_^ -- Dominik Vogt IBM Germany gcc/testsuite/ChangeLog-setmem-long-test *

Re: [PATCH, vec-tails] Support loop epilogue vectorization

2016-12-01 Thread Richard Biener
On Thu, 1 Dec 2016, Yuri Rumyantsev wrote: > Thanks Richard for your comments. > > You asked me about possible performance improvements for AVX2 machines > - we did not see any visible speed-up for spec2k with any method of Spec 2000? Can you check with SPEC 2006 or CPUv6? Did you see

Re: [PATCH 8/9] Introduce class function_reader (v4)

2016-12-01 Thread Bernd Schmidt
On 11/11/2016 10:15 PM, David Malcolm wrote: #include "gt-aarch64.h" diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 6c608e0..0dda786 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c I think we should separate out the target specific tests so as to give

Re: [PATCH] Fix PR tree-optimization/78598 - tree-ssa-loop-prefetch.c:835:16: runtime error: signed integer overflow

2016-12-01 Thread Richard Biener
On Thu, Dec 1, 2016 at 1:49 PM, Markus Trippelsdorf wrote: > Using bootstrap-ubsan gcc to build mplayer shows: > > tree-ssa-loop-prefetch.c:835:16: runtime error: signed integer overflow: > 288230376151711743 * 64 cannot be represented in type 'long int' > > Here signed

Re: [RS6000] fix rtl checking internal compiler error

2016-12-01 Thread Bill Schmidt
Good catch, Alan, this one is my fault. I'll handle the backports to the 5 and 6 branches. Bill > On Dec 1, 2016, at 12:34 AM, Alan Modra wrote: > > I'm committing this one as obvious once my powerpc64le-linux bootstrap > and regression check completes. It fixes hundreds

[patch,avr] Document how to avoid progmem on AVR_TINY.

2016-12-01 Thread Georg-Johann Lay
This adds to the documentation a hint how to set up a linker description file that avoids progmem altogether any without the usual overhead of locating read-only data in RAM. The proposed linker description file is completely transparent to the compiler, and no start-up code has to be

Re: [ARM] PR 78253 do not resolve weak ref locally

2016-12-01 Thread Christophe Lyon
Hi, On 10 November 2016 at 15:10, Christophe Lyon wrote: > On 10 November 2016 at 11:05, Richard Earnshaw > wrote: >> On 09/11/16 21:29, Christophe Lyon wrote: >>> Hi, >>> >>> PR 78253 shows that the handling of weak references has

Re: [PATCH, vec-tails] Support loop epilogue vectorization

2016-12-01 Thread Yuri Rumyantsev
Thanks Richard for your comments. You asked me about possible performance improvements for AVX2 machines - we did not see any visible speed-up for spec2k with any method of masking, including epilogue masking and combining, only on AVX512 machine aka knl. I will answer on your question later.

Re: Calling 'abort' on bounds violations in libmpx

2016-12-01 Thread Alexander Ivchenko
Should changing minor version of the library be enough? diff --git a/libmpx/mpxrt/libtool-version b/libmpx/mpxrt/libtool-version index 7d99255..736d763 100644 --- a/libmpx/mpxrt/libtool-version +++ b/libmpx/mpxrt/libtool-version @@ -3,4 +3,4 @@ # a separate file so that version updates don't

Re: [PATCH] PR rtl-optimization/78596 - combine.c:12561:14: runtime error: left shift of negative value

2016-12-01 Thread Segher Boessenkool
On Thu, Dec 01, 2016 at 01:34:29PM +0100, Markus Trippelsdorf wrote: > Hopefully one last patch for UB in combine.c: > > combine.c:12561:14: runtime error: left shift of negative value -9 > > Fixed by casting to unsigned, as usual. > > Tested on ppc64le. > OK for trunk? Sure, but please fix

Re: [PATCH 5/9] Introduce selftest::locate_file (v4)

2016-12-01 Thread Bernd Schmidt
On 11/11/2016 10:15 PM, David Malcolm wrote: + /* Makefile.in has -fself-test=$(srcdir)/testsuite/selftests, so that + flag_self_test contains the path to the selftest subdirectory of the + source tree (without a trailing slash). Copy it up to + path_to_selftest_files, to avoid

Re: PR78629

2016-12-01 Thread Richard Biener
On Thu, 1 Dec 2016, Prathamesh Kulkarni wrote: > Hi Richard, > I tested your fix for the patch with ubsan stage-1 built gcc, and it > fixes the error. > Is it OK to commit if bootstrap+test passes on x86_64-unknown-linux-gnu ? Ok. Richard.

PR78629

2016-12-01 Thread Prathamesh Kulkarni
Hi Richard, I tested your fix for the patch with ubsan stage-1 built gcc, and it fixes the error. Is it OK to commit if bootstrap+test passes on x86_64-unknown-linux-gnu ? Thanks, Prathamesh 2016-12-01 Richard Biener Prathamesh Kulkarni

Re: [tree-tailcall] Check if function returns it's argument

2016-12-01 Thread Richard Biener
On Thu, 1 Dec 2016, Prathamesh Kulkarni wrote: > On 1 December 2016 at 18:38, Richard Biener wrote: > > On Thu, 1 Dec 2016, Prathamesh Kulkarni wrote: > > > >> On 1 December 2016 at 18:26, Richard Biener wrote: > >> > On Thu, 1 Dec 2016, Prathamesh Kulkarni

Re: [tree-tailcall] Check if function returns it's argument

2016-12-01 Thread Prathamesh Kulkarni
On 1 December 2016 at 18:38, Richard Biener wrote: > On Thu, 1 Dec 2016, Prathamesh Kulkarni wrote: > >> On 1 December 2016 at 18:26, Richard Biener wrote: >> > On Thu, 1 Dec 2016, Prathamesh Kulkarni wrote: >> > >> >> On 1 December 2016 at 17:40, Richard

Re: [PATCH] ira: Don't substitute into TRAP_IF insns (PR78610)

2016-12-01 Thread Segher Boessenkool
On Thu, Dec 01, 2016 at 12:24:37PM +0100, Paolo Bonzini wrote: > > > On 30/11/2016 13:46, Segher Boessenkool wrote: > >if (JUMP_P (use_insn)) > > continue; > > > > + /* Also don't substitute into a conditional trap insn -- it can > > become > > +an unconditional trap, and

Re: [tree-tailcall] Check if function returns it's argument

2016-12-01 Thread Richard Biener
On Thu, 1 Dec 2016, Prathamesh Kulkarni wrote: > On 1 December 2016 at 18:26, Richard Biener wrote: > > On Thu, 1 Dec 2016, Prathamesh Kulkarni wrote: > > > >> On 1 December 2016 at 17:40, Richard Biener wrote: > >> > On Thu, 1 Dec 2016, Prathamesh Kulkarni

Re: [PATCH PR78559][RFC]Proposed fix

2016-12-01 Thread Segher Boessenkool
Hi! On Thu, Dec 01, 2016 at 09:47:51AM +, Bin Cheng wrote: > After investigation, I believe PR78559 is a combine issue revealed by tree > level change. Root causes is after replacing CC register use in > undobuf.other_insn, its REG_EQUAL/REG_EQUIV notes are no longer valid because >

Re: [tree-tailcall] Check if function returns it's argument

2016-12-01 Thread Prathamesh Kulkarni
On 1 December 2016 at 18:26, Richard Biener wrote: > On Thu, 1 Dec 2016, Prathamesh Kulkarni wrote: > >> On 1 December 2016 at 17:40, Richard Biener wrote: >> > On Thu, 1 Dec 2016, Prathamesh Kulkarni wrote: >> > >> >> On 25 November 2016 at 21:17, Jeff Law

Re: [tree-tailcall] Check if function returns it's argument

2016-12-01 Thread Richard Biener
On Thu, 1 Dec 2016, Prathamesh Kulkarni wrote: > On 1 December 2016 at 17:40, Richard Biener wrote: > > On Thu, 1 Dec 2016, Prathamesh Kulkarni wrote: > > > >> On 25 November 2016 at 21:17, Jeff Law wrote: > >> > On 11/25/2016 01:07 AM, Richard Biener wrote:

Re: [tree-tailcall] Check if function returns it's argument

2016-12-01 Thread Prathamesh Kulkarni
On 1 December 2016 at 17:40, Richard Biener wrote: > On Thu, 1 Dec 2016, Prathamesh Kulkarni wrote: > >> On 25 November 2016 at 21:17, Jeff Law wrote: >> > On 11/25/2016 01:07 AM, Richard Biener wrote: >> > >> >>> For the tail-call, issue should we

[PATCH] Fix PR tree-optimization/78598 - tree-ssa-loop-prefetch.c:835:16: runtime error: signed integer overflow

2016-12-01 Thread Markus Trippelsdorf
Using bootstrap-ubsan gcc to build mplayer shows: tree-ssa-loop-prefetch.c:835:16: runtime error: signed integer overflow: 288230376151711743 * 64 cannot be represented in type 'long int' Here signed und unsigned integers are mixed in a division resulting in bogus results: (-83 + 64ULL -1) /

Re: PR78599

2016-12-01 Thread Richard Biener
On Thu, Dec 1, 2016 at 11:07 AM, Prathamesh Kulkarni wrote: > Hi, > As mentioned in PR, the issue seems to be that in > propagate_bits_accross_jump_functions(), > ipa_get_type() returns record_type during WPA and hence we pass > invalid precision to >

Re: [PATCH] Minimal reimplementation of errors.c within read-md.c

2016-12-01 Thread Bernd Schmidt
On 11/30/2016 09:24 PM, David Malcolm wrote: gcc/ChangeLog: * read-md.c (have_error): New global, copied from errors.c. (fatal): New function, copied from errors.c. I would have expected the function to go into diagnostic.c, but actually there are already various functions of

[PATCH] PR rtl-optimization/78596 - combine.c:12561:14: runtime error: left shift of negative value

2016-12-01 Thread Markus Trippelsdorf
Hopefully one last patch for UB in combine.c: combine.c:12561:14: runtime error: left shift of negative value -9 Fixed by casting to unsigned, as usual. Tested on ppc64le. OK for trunk? Thanks. PR rtl-optimization/78596 * combine.c (simplify_comparison): Cast to unsigned to

  1   2   >