Re: Avoid calls to realloc for nvptx

2014-10-22 Thread FX
Hi Bernd, I’m afraid I don’t understand the reasoning here: > Since malloc and free are magically provided by the ptx environment, but > realloc is missing, it's nontrivial to provide an implementation for it. The > Fortran frontend likes to generate calls to realloc, but in one case it seems

Re: [PATCH AVX512] [81.1/n] Extend `function_code' field in `tree_var_decl' structure.

2014-10-22 Thread Kirill Yukhin
Hello, Patch was separated into two parts: tree-core.h changes and target changes. On 21 Oct 16:20, Jakub Jelinek wrote: > On Tue, Oct 21, 2014 at 06:08:15PM +0400, Kirill Yukhin wrote: > > --- a/gcc/tree.h > > +++ b/gcc/tree.h > > @@ -2334,6 +2334,10 @@ extern void decl_value_expr_insert (tree, tr

Re: [PATCH 1/4] Add mkoffload for Intel MIC

2014-10-22 Thread Jakub Jelinek
On Wed, Oct 22, 2014 at 02:30:44AM +0400, Ilya Verbin wrote: > > I don't see anything restricting this program to being built for GNU > > *hosts*. Thus, it needs to be portable (to different hosts; obviously > > it's target-architecture-specific) rather than relying on glibc > > interfaces. (Prov

Re: [PATCH] -fsanitize-recover=list

2014-10-22 Thread Yury Gribov
On 10/17/2014 08:13 PM, Jakub Jelinek wrote: On Mon, Oct 13, 2014 at 02:47:07PM +0400, Yury Gribov wrote: On 09/30/2014 09:39 PM, Jakub Jelinek wrote: LGTM, will hack it up soon in GCC then. Do you plan to work on this in near future? Here is only very lightly tested patch, didn't get to up

Re: Avoid calls to realloc for nvptx

2014-10-22 Thread Jakub Jelinek
On Wed, Oct 22, 2014 at 09:45:29AM +0200, FX wrote: > I’m afraid I don’t understand the reasoning here: > > > Since malloc and free are magically provided by the ptx environment, but > > realloc is missing, it's nontrivial to provide an implementation for it. > > The Fortran frontend likes to ge

Re: [PATCH i386 AVX512] [81/n] Add new built-ins.

2014-10-22 Thread Richard Biener
On Tue, Oct 21, 2014 at 5:08 PM, Kirill Yukhin wrote: > On 21 Oct 18:47, Kirill Yukhin wrote: >> On 21 Oct 16:20, Jakub Jelinek wrote: >> > On Tue, Oct 21, 2014 at 06:08:15PM +0400, Kirill Yukhin wrote: >> > > --- a/gcc/tree.h >> > > +++ b/gcc/tree.h >> > > @@ -2334,6 +2334,10 @@ extern void decl_

Re: The nvptx port [1/11+] indirect jumps

2014-10-22 Thread Richard Biener
On Tue, Oct 21, 2014 at 11:32 PM, Bernd Schmidt wrote: > On 10/21/2014 11:30 PM, Jakub Jelinek wrote: >> >> At least for OpenMP, the best would be if the #pragma omp target regions >> and/or #pragma omp declare target functions contain anything a particular >> offloading accelerator can't handle,

Re: [PATCH 1/4] Add mkoffload for Intel MIC

2014-10-22 Thread Jakub Jelinek
On Tue, Oct 21, 2014 at 09:16:02PM +0400, Ilya Verbin wrote: > --- a/gcc/Makefile.in > +++ b/gcc/Makefile.in > @@ -3895,3 +3895,14 @@ DEPFILES = \ >$(foreach obj,$(ALL_HOST_OBJS),\ > $(dir $(obj))$(DEPDIR)/$(patsubst %.o,%.Po,$(notdir $(obj > -include $(DEPFILES) > + > + > +mkoffload.

[BUILDROBOT] Build failure on AIX (was: [PATCH] AutoFDO patch for trunk)

2014-10-22 Thread Jan-Benedict Glaw
On Mon, 2014-10-20 14:21:19 -0700, Dehao Chen wrote: > The updated patch attached. Will commit the patch in 2~3 hours if no > objection is received. Just noticed that this doesn't build on gcc111, see eg. build #364675 [1], which looks like this: g++ -c -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUC

Re: Avoid calls to realloc for nvptx

2014-10-22 Thread Tobias Burnus
Hmm, for some reasons my first email didn't come through - I have to check at home why. Thus, writing anew: Regarding: > The Fortran frontend likes to generate calls to realloc, but in one case it > seems > like we can compute the old size, and call a function that does > malloc/memcpy/free inste

Re: The nvptx port [1/11+] indirect jumps

2014-10-22 Thread Jakub Jelinek
On Wed, Oct 22, 2014 at 10:18:49AM +0200, Richard Biener wrote: > On Tue, Oct 21, 2014 at 11:32 PM, Bernd Schmidt > wrote: > > On 10/21/2014 11:30 PM, Jakub Jelinek wrote: > >> > >> At least for OpenMP, the best would be if the #pragma omp target regions > >> and/or #pragma omp declare target fun

Re: The nvptx port [1/11+] indirect jumps

2014-10-22 Thread Thomas Schwinge
Hi! On Wed, 22 Oct 2014 10:18:49 +0200, Richard Biener wrote: > On Tue, Oct 21, 2014 at 11:32 PM, Bernd Schmidt > wrote: > > On 10/21/2014 11:30 PM, Jakub Jelinek wrote: > >> > >> At least for OpenMP, the best would be if the #pragma omp target regions > >> and/or #pragma omp declare target fu

Re: Avoid calls to realloc for nvptx

2014-10-22 Thread Jakub Jelinek
On Wed, Oct 22, 2014 at 10:32:26AM +0200, Tobias Burnus wrote: > b) (Re)allocation on assignment, i.e. > A = ... > where A is allocatable. The compiler then allocates the left-hand side if > unallocated or reallocates it if the array shape, dynamic type or a length > type parameter on the right d

[PING] Enhance array types debug info. for Ada

2014-10-22 Thread Pierre-Marie de Rodat
Hello, On 10/08/2014 09:05 PM, Pierre-Marie de Rodat wrote: The latest patches bootstrapped well and passed successfully the GCC testsuite on x86_64-pc-linux-gnu. Ping for https://gcc.gnu.org/ml/gcc-patches/2014-10/msg00694.html Thanks in advance for you feedback! -- Pierre-Marie de Rodat

Re: [PATCH 2/4] Add liboffloadmic

2014-10-22 Thread Jakub Jelinek
On Tue, Oct 21, 2014 at 09:20:34PM +0400, Ilya Verbin wrote: > This patch contains liboffloadmic library. > > It is used by ICC for offloading. The sources are imported from upstream > ( https://www.openmprtl.org/sites/default/files/liboffload_oss.tgz ) > Configure and makefiles are new. > > Als

[PATCH] Fix merge glitch

2014-10-22 Thread Richard Biener
Committed. 2014-10-22 Richard Biener * Makefile.in (s-match): Adjust dependencies to only catch match.pd. Index: gcc/Makefile.in === --- gcc/Makefile.in (revision 216542) +++ gcc/Makefile.in (working copy

RE: [PATCH] Fix PR63266: Keep track of impact of sign extension in bswap

2014-10-22 Thread Thomas Preud'homme
> From: Christophe Lyon [mailto:christophe.l...@linaro.org] > Sent: Tuesday, October 21, 2014 10:03 PM > > +typedef int SItype __attribute__ ((mode (SI))); > What's the purpose of this? It seems unused. Sigh. Bad copy/paste from optimize-bswapsi-1.c I'll add it to my patch for pr63259. > I beli

[match-and-simplify] Merge from trunk

2014-10-22 Thread Richard Biener
2014-10-22 Richard Biener Merge from trunk r216394 through r216542. Brings back infrastructure merge.

Re: Avoid calls to realloc for nvptx

2014-10-22 Thread Thomas Schwinge
Hi! On Wed, 22 Oct 2014 10:04:48 +0200, Jakub Jelinek wrote: > On Wed, Oct 22, 2014 at 09:45:29AM +0200, FX wrote: > > > Since malloc and free are magically provided by the ptx environment, but > > > realloc is missing, [...] > Yeah, I wonder why can't you just wrap the PTX "malloc"/"free" by a

Re: Avoid calls to realloc for nvptx

2014-10-22 Thread Tobias Burnus
[Some quote of mine] On Wed, Oct 22, 2014 at 10:37:02AM +0200, Jakub Jelinek wrote: > But it is the frontend that can know this, not the middle-end. > Having to compute the old size and using some intrinsic unconditionally > on all targets just because the code might be offloaded (and lowering that

Re: [PATCH 3/4] Add libgomp plugin for Intel MIC

2014-10-22 Thread Jakub Jelinek
On Tue, Oct 21, 2014 at 09:24:13PM +0400, Ilya Verbin wrote: > +/* Add path specified in LD_LIBRARY_PATH to MIC_LD_LIBRARY_PATH, which is > + required by liboffloadmic. */ > +__attribute__((constructor)) > +static void > +set_mic_lib_path (void) > +{ > + const char *ld_lib_path = getenv (LD_LIB

Re: Avoid calls to realloc for nvptx

2014-10-22 Thread Jakub Jelinek
On Wed, Oct 22, 2014 at 10:58:32AM +0200, Thomas Schwinge wrote: > So, something in spirit of what has been implemented in > gcc/config/i386/gmm_malloc.h. Yeah, though don't take that literally, gmm_malloc.h e.g. isn't very secure, _mm_malloc (-16384, 32768); might very well result in heap corrupt

Re: [PATCH] -fsanitize-recover=list

2014-10-22 Thread Jakub Jelinek
On Wed, Oct 22, 2014 at 11:59:06AM +0400, Yury Gribov wrote: > >(in some cases for > >the kind that is enabled with -fsanitize= only, in other cases > >perhaps for something covering that and some other options), > > Depending on what? I've just passed contents of -fsanitize= to > -fsanitize-recov

Re: The nvptx port [1/11+] indirect jumps

2014-10-22 Thread Richard Biener
On Wed, Oct 22, 2014 at 10:34 AM, Thomas Schwinge wrote: > Hi! > > On Wed, 22 Oct 2014 10:18:49 +0200, Richard Biener > wrote: >> On Tue, Oct 21, 2014 at 11:32 PM, Bernd Schmidt >> wrote: >> > On 10/21/2014 11:30 PM, Jakub Jelinek wrote: >> >> >> >> At least for OpenMP, the best would be if th

[COMMITTED][PATCH][ARM]Add ACLE 2.0 predefined marco __ARM_FEATURE_IDIV

2014-10-22 Thread Jiong Wang
On 21/10/14 15:30, Ramana Radhakrishnan wrote: On Mon, Oct 13, 2014 at 3:15 PM, Renlin Li wrote: Hi all, This is a simple patch to add missing __ARM_FEATURE_IDIV__ predefined marco(ACLE 2.0) into TARGET_CPU_CPP_BUILTINS. Is it Okay to commit? gcc/ChangeLog: 2014-10-13 Renlin Li *

[PATCH][match-and-simplify] Prepare next merge

2014-10-22 Thread Richard Biener
I am testing the following patch to add a location argument to generic_simplify and properly build GENERIC trees with a location (oops). The patch also implements special handling for NON_LVALUE_EXPR by dropping it for GIMPLE and using non_lvalue_loc to build it for GENERIC. This simplifies impl

Re: The nvptx port [1/11+] indirect jumps

2014-10-22 Thread Jakub Jelinek
On Wed, Oct 22, 2014 at 12:02:16PM +0200, Richard Biener wrote: > > I'm not sure that's what you're suggesting, but at least on non-shared > > memory offloading devices, you can't switch arbitrarily between > > offloading device(s) and host-fallback, for you have to do data > > management between t

[PATCH][match-and-simplify] Remove local generic_simplify prototypes

2014-10-22 Thread Richard Biener
This adds a generic-match.h header to cover these (even though they are not public API). Richard. 2014-10-22 Richard Biener * generic-match.h: New file. * generic-match-head.c: Include generic-match.h, not gimple-match.h. * fold-const.c: Include generic-match.h.

[patch,avr,committed]: Fix __do_global_dtors

2014-10-22 Thread Georg-Johann Lay
This patch fixed the wrong pre-increment of .dtors addresses to a post-increment. The first .dtor was bypassed and the last access read beyond __dtors_end. Installed as obvious: http://gcc.gnu.org/r216550 Johann * config/avr/lib1funcs.S (__do_global_dtors): Fix wrong code in

[patch,avr,4.9,committed]: ad PR63223

2014-10-22 Thread Georg-Johann Lay
This addendum to PR63223 reverses the order in which __do_global_dtors traverses .dtors: The order is from first to last so that it matches trunk implementation and is inverse direction as __do_global_ctors (which is from last .ctors entry to first). Applied as http://gcc.gnu.org/r216551 Joh

Re: [PATCH i386 AVX512] [81/n] Add new built-ins.

2014-10-22 Thread Kirill Yukhin
Hello, On 22 Oct 10:09, Richard Biener wrote: > On Tue, Oct 21, 2014 at 5:08 PM, Kirill Yukhin > wrote: > > On 21 Oct 18:47, Kirill Yukhin wrote: > >> On 21 Oct 16:20, Jakub Jelinek wrote: > >> > On Tue, Oct 21, 2014 at 06:08:15PM +0400, Kirill Yukhin wrote: > >> > > --- a/gcc/tree.h > >> > > +++

Re: [PATCH i386 AVX512] [81/n] Add new built-ins.

2014-10-22 Thread Jakub Jelinek
On Wed, Oct 22, 2014 at 03:34:22PM +0400, Kirill Yukhin wrote: > > Can you test with -mavx512 (or whatever enables the builtins?) > Done. > I did: > sync && time for i in `seq 1000` ; do ./build-x86_64-linux/gcc/xgcc > -B./build-x86_64-linux/gcc -O0 -S test.c -mavx512vl ; done > > Here're r

[libgomp, libiberty, libobjc] Fix gnu11 fallout on Solaris 10+

2014-10-22 Thread Rainer Orth
The gnu11 patch broke Solaris 10 and 11 bootstrap: has /* * It is invalid to compile an XPG3, XPG4, XPG4v2, or XPG5 application * using c99. The same is true for POSIX.1-1990, POSIX.2-1992, POSIX.1b, * and POSIX.1c applications. Likewise, it is invalid to compile an XPG6 * or a POSIX.1-2001

PR lto/63603: Fix -fno-lto handling in driver (gcc/gcc.c)

2014-10-22 Thread Tobias Burnus
I intent to commit the following patch this evening, which was pre-proved for 4.9/trunk by Richard in the PR. However, I still need to do the bootstrapping and regtesting. Tobias 2014-10-22 Richard Biener Tobias Burnus PR lto/63603 * gcc.c (LINK_COMMAND_SPEC): Ad

[PATCH i386 AVX512] [82/n] Add gather built-ins.

2014-10-22 Thread Kirill Yukhin
Hello, This patch introduces built-ins for gather insns. Bootstrapped. AVX-512* tests on top of patch-set all pass under simulator. Is it ok for trunk? gcc/ * config/i386/i386.c (ix86_builtins): Add IX86_BUILTIN_GATHER3ALTSIV4DF, IX86_BUILTIN_GATHER3ALTDIV8SF, IX86_BUILTIN_GATHER

[PATCH i386 AVX512] [83/n] Add scatter built-ins.

2014-10-22 Thread Kirill Yukhin
Hello, This patch adds built-ins for scatter insns. Bootstrapped. AVX-512* tests on top of patch-set all pass under simulator. Is it ok for trunk? gcc/ * config/i386/i386.c (ix86_init_mmx_sse_builtins): Define __builtin_ia32_gather3siv2df, __builtin_ia32_gather3siv4df,

[PATCH i386 AVX512] [84/n] Add missing immediate checks.

2014-10-22 Thread Kirill Yukhin
Hello, This tiny patch adds couple of missing immediate checks. Bootstrapped. AVX-512* tests on top of patch-set all pass under simulator. Is it ok for trunk? gcc/ * config/i386/i386.c (ix86_expand_args_builtin): Handle avx_vpermilv4df_mask, avx_shufpd256_mask, avx_vpermilv2df_ma

[PATCH i386 AVX512] [86/n] Add tests for options.

2014-10-22 Thread Kirill Yukhin
Hello, This patch extends sse-* and avx-* tests which checks immediates/options. Bootstrapped. AVX-512* tests on top of patch-set all pass under simulator. Is it ok for trunk? gcc/ * testsuite/g++.dg/other/i386-2.C: Add new options. * testsuite/g++.dg/other/i386-3.C: Ditto.

[PATCH i386 AVX512] [85/n] Add intrinsics headers.

2014-10-22 Thread Kirill Yukhin
Hello, This patch introduces necessary AVX-512* intrinsics headers. Bootstrapped. AVX-512* tests on top of patch-set all pass under simulator. Is it ok for trunk? gcc/ * config/i386/avx512bwintrin.h: New. * config/i386/avx512dqintrin.h: Ditto. * config/i386/avx512vlbwintr

[PATCH i386 AVX512] [87/n] Add rest of the tests.

2014-10-22 Thread Kirill Yukhin
Hello, This patch adds tests for new intrinsics. Bootstrapped. AVX-512* tests on top of patch-set all pass under simulator. Is it ok for trunk? gcc/ * testsuite/gcc.target/i386/avx512bw-check.h: New. * testsuite/gcc.target/i386/avx512bw-kunpckdq-1.c: Ditto. * testsuite/gc

Re: [PATCH] Account for prologue spills in reg_pressure scheduling

2014-10-22 Thread Richard Sandiford
Maxim Kuvyrkov writes: > + for (i = 0; i < FIRST_PSEUDO_REGISTER; ++i) > + if (call_used_regs[i]) > + for (c = 0; c < ira_pressure_classes_num; ++c) > + { > + int j; > + enum reg_class cl = ira_pressure_classes[c]; > + > + for (j = 0; j < ira_cl

[PATCH i386 AVX512] [88/n] Add missed avx512bw/avx512vl cmp intrinsics.

2014-10-22 Thread Kirill Yukhin
Hello, This patch introduces rest of intrinsics (compare). Bootstrapped. AVX-512* tests on top of patch-set all pass under simulator. Is it ok for trunk? gcc/ * config/i386/avx512bwintrin.h: Add new intrinsics. * config/i386/avx512vlbwintrin.h: Ditto. * config/i386/avx512

[PATCH i386 AVX512] [89/n] Improve mask move insn generation.

2014-10-22 Thread Kirill Yukhin
Hello, This patch fixes kmov* insn generation and adds memory alternative to `movqi_internal' pattern Reg-test included. Bootstrapped. AVX-512* tests on top of patch-set all pass under simulator. Is it ok for trunk? gcc/ * config/i386/i386.md (movhi_internal): Always detect mskmov.

Re: [PATCH i386 AVX512] [87/n] Add rest of the tests.

2014-10-22 Thread Kirill Yukhin
On 22 Oct 16:48, Kirill Yukhin wrote: > Hello, > This patch adds tests for new intrinsics. > > Bootstrapped. > AVX-512* tests on top of patch-set all pass > under simulator. > > Is it ok for trunk? > > gcc/ > * testsuite/gcc.target/i386/avx512bw-check.h: New. Please, disregard "testsuite/g

Re: [PATCH i386 AVX512] [86/n] Add tests for options.

2014-10-22 Thread Kirill Yukhin
On 22 Oct 16:37, Kirill Yukhin wrote: > gcc/ > * testsuite/g++.dg/other/i386-2.C: Add new options. Please, disregard "testsuite/gcc.target" in overall ChangeLog entry. -- Thanks, K

Re: [PATCH i386 AVX512] [88/n] Add missed avx512bw/avx512vl cmp intrinsics.

2014-10-22 Thread Kirill Yukhin
On 22 Oct 16:51, Kirill Yukhin wrote: > gcc/ > * testsuite/gcc.target/i386/avx512bw-vpcmpequb-1.c: New. Please, disregard "testsuite/" in overall ChangeLog entry. -- Thanks, K

[PATCH] Fix folding of X - X to 0

2014-10-22 Thread Richard Biener
The following fixes a bug in fold-const.c which happily drops side-effects when simplifying X - X to 0. I ran into this because on match-and-simplify I cannot simplify expressions with TREE_SIDE_EFFECTS and it happens that TYPE_SIZE for VLAs has side-effects because it usually contains a SAVE_EXP

[PATCH][AArch64] Cleanup logic around aarch64_final_prescan

2014-10-22 Thread Kyrill Tkachov
Hi all, This patch addresses feedback from: https://gcc.gnu.org/ml/gcc-patches/2014-10/msg00933.html and https://gcc.gnu.org/ml/gcc-patches/2014-10/msg00985.html I think the correct way is this approach. We want to return true not only when body is NULL, but also when we know that prev (from wh

[jit] Merger of trunk r216524 into jit branch

2014-10-22 Thread David Malcolm
I've merged svn trunk into the git dmalcolm/jit branch, specifically from trunk r216524 aka d14cac46135326115f0dc589b0b3d2d249d74cf7 (2014-10-21) bringing in all changes since r215958 aka e012cdc775868e9922f5fef9068a764546876d93 (2014-10-06). This required a cleanup of global state "optimizer" in

[PATCH][AArch64] LINK_SPEC changes for Cortex-A53 erratum 835769 workaround

2014-10-22 Thread Kyrill Tkachov
Hi all, This patch contains the LINK_SPEC changes required to pass on the linker option --fix-cortex-a53-835769 when compiling with -mfix-cortex-a53-835769 (or by default when configured with --enable-fix-cortex-a53-835769). This requires a binutils installation with the patch posted at htt

[PATCH][AArch64][4.8] LINK_SPEC changes for Cortex-A53 erratum 835769 workaround

2014-10-22 Thread Kyrill Tkachov
Hi all, This is the 4.8 backport of the LINK_SPEC changes to pass down the linker option --fix-cortex-a53-835769 Bootstrapped and tested on aarch64-none-linux-gnu. This depends on the patches under review at: https://gcc.gnu.org/ml/gcc-patches/2014-10/msg01757.html and https://gcc.gnu.org/ml/g

[PATCH][match-and-simplify] Hande side-effects in GENERIC

2014-10-22 Thread Richard Biener
The following auto-handles preserving of side-effects properly for GENERIC simplification instead of simply rejecting operands with side-effects. Cases we cannot handle correctly are still handled that way. For example for /* (x | CST1) & CST2 -> (x & CST2) | (CST1 & CST2) */ (simplify (bit_a

Re: [Patch, libstdc++/63497] Avoid dereferencing invalid iterator in regex_executor

2014-10-22 Thread Jonathan Wakely
On 21/10/14 09:45 -0700, Tim Shen wrote: On Tue, Oct 21, 2014 at 3:25 AM, Jonathan Wakely wrote: Did you manage to produce a testcase that crashed on trunk? Oh I forgot to mention that I've tried my best to make a testcase that crash the trunk, but failed :). I'm not sure if I should directl

Re: [PATCH][match-and-simplify] Hande side-effects in GENERIC

2014-10-22 Thread Richard Biener
On Wed, 22 Oct 2014, Richard Biener wrote: > > The following auto-handles preserving of side-effects properly > for GENERIC simplification instead of simply rejecting operands > with side-effects. Cases we cannot handle correctly are still > handled that way. > > For example for > > /* (x | CS

Re: [PATCH] Account for prologue spills in reg_pressure scheduling

2014-10-22 Thread Vladimir Makarov
On 2014-10-22 2:17 AM, Maxim Kuvyrkov wrote: On Oct 22, 2014, at 4:24 AM, Vladimir Makarov wrote: On 10/20/2014 02:57 AM, Maxim Kuvyrkov wrote: Hi, This patch improves register pressure scheduling (both SCHED_PRESSURE_WEIGHTED and SCHED_PRESSURE_MODEL) to better estimate number of available

[gomp4] Wait directive with async and wait clauses.

2014-10-22 Thread James Norris
Hi! This patch adds code to handle the OpenACC wait directive and the wait and async clauses for the wait directive as well as the other directives which support them. OK for gomp4 branch? Thanks! Jim ChangeLog 2014-10-22 James Norris * builtin-types.def (BT_FN_VOID_INT_INT_VAR,

[testsuite] Fix gcc.dg/ipa/ipa-icf-2[18].c on Solaris

2014-10-22 Thread Rainer Orth
Two of the new gcc.dg/ipa/ipa-icf-*.c tests were FAILing on Solaris: FAIL: gcc.dg/ipa/ipa-icf-21.c (test for excess errors) UNRESOLVED: gcc.dg/ipa/ipa-icf-21.c scan-ipa-dump icf "Equal symbols: 1" UNRESOLVED: gcc.dg/ipa/ipa-icf-21.c scan-ipa-dump icf "Semantic equality hit:bar->foo" FAIL: gcc.dg/

[testsuite] Fix SPARC testsuite gnu11 fallout

2014-10-22 Thread Rainer Orth
A couple of gcc.target/sparc tests were FAILing on Solaris/SPARC due to the gnu11 change: FAIL: gcc.target/sparc/20001013-1.c (test for excess errors) FAIL: gcc.target/sparc/mnofpu.c (test for excess errors) FAIL: gcc.target/sparc/sparc-ret.c (test for excess errors) FAIL: gcc.target/sparc/ultrasp

Re: Extract and insert merging patch

2014-10-22 Thread Petr Murzin
Hi, Please have a look at updated patch. 2014-10-22 Petr Murzin gcc/ * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge (vec_duplicate (vec_select)). gcc/testsuite/ * gcc.target/i386/extract-insert-combining.c: New. On Fri, Sep 19, 2014 at 1:43 AM, Je

[boehm-gc] Fix gnu11 fallout on SPARC

2014-10-22 Thread Rainer Orth
A couple of boehm-gc testcases are FAILing on Solaris/SPARC due to the recent gnu11 changes: FAIL: boehm-gc.c/gctest.c -O2 (test for excess errors) FAIL: boehm-gc.c/thread_leak_test.c -O2 (test for excess errors) FAIL: boehm-gc.lib/staticrootslib.c -O2 (test for excess errors) All of them are ins

Re: [PATCH][match-and-simplify] Hande side-effects in GENERIC

2014-10-22 Thread Jakub Jelinek
On Wed, Oct 22, 2014 at 04:20:09PM +0200, Richard Biener wrote: > 2014-10-22 Richard Biener > > * genmatch.c (count_captures): New function. > (dt_simplify::gen): Handle preserving side-effects for > GENERIC code generation. > (decision_tree::gen_generic): Do not reject

Re: RFA: Add libstdc++-v3 support for avr 4/7: fix locale_facets_nonio overloading on struct tm using template

2014-10-22 Thread Jonathan Wakely
[CCing the libstdc++ list, all libstdc++ patches should go there as well as gcc-patches] On 21/10/14 17:47 +0100, Joern Rennecke wrote: On 21 October 2014 17:29, Jonathan Wakely wrote: >> +typedef typeof (((tm*)0)->tm_sec) __tm_small_int; I think this should probably use __typeof__ to work w

Re: [PATCH] AutoFDO patch for trunk

2014-10-22 Thread Rainer Orth
Dehao Chen writes: > The updated patch attached. Will commit the patch in 2~3 hours if no > objection is received. Apart from the AIX bootstrap failure your patch introduced, it also breaks Solaris bootstrap: In file included from ./config.h:6:0, from /vol/gcc/src/hg/trunk/loca

[PATCH, committed] Reset ipa-icf.c:optimizer to NULL when done

2014-10-22 Thread David Malcolm
After a recent merge of trunk to the jit branch that brought in ipa-icf, the new pass was segfaulting on the second iteration of an in-process compile; e.g. with: test-factorial.exe: internal compiler error: Segmentation fault 0x7f3f20c2301a crash_signal ../../src/gcc/toplev.c:349 0x7f3f20

[wwwdocs] Add porting_to.html, describe gnu11 changes

2014-10-22 Thread Marek Polacek
The following adds the porting_to.html document for GCC 5 and documents issues arising from moving the default to gnu11. Ok? --- porting_to.html.mp 2014-10-22 17:25:42.122367884 +0200 +++ porting_to.html 2014-10-22 17:23:14.442645393 +0200 @@ -0,0 +1,235 @@ + + + +Porting to GCC 5 + + + +Por

Re: [wwwdocs] Add porting_to.html, describe gnu11 changes

2014-10-22 Thread Marek Polacek
On Wed, Oct 22, 2014 at 05:29:13PM +0200, Marek Polacek wrote: > The following adds the porting_to.html document for GCC 5 and > documents issues arising from moving the default to gnu11. Now with a typo fixed. --- porting_to.html.mp 2014-10-22 17:25:42.122367884 +0200 +++ porting_to.html 20

Re: [PATCH] Fix folding of X - X to 0

2014-10-22 Thread Jeff Law
On 10/22/14 06:58, Richard Biener wrote: The following fixes a bug in fold-const.c which happily drops side-effects when simplifying X - X to 0. I ran into this because on match-and-simplify I cannot simplify expressions with TREE_SIDE_EFFECTS and it happens that TYPE_SIZE for VLAs has side-eff

[build] Link genmatch with $(LIBINTL)

2014-10-22 Thread Rainer Orth
With the match-and-simply patch, Solaris 10 bootstrap is broken: Undefined first referenced symbol in file libintl_bindtextdomain ../libcpp/libcpp.a(init.o) libintl_dgettext../libcpp/libcpp.a(errors.o) ld: fatal: s

Re: [PARCH 2/2, x86, PR63534] Fix darwin bootstrap

2014-10-22 Thread Evgeny Stupachenko
There is a test for Linux x86 that also fails without the changes in the patch: ChangeLog: 2014-10-22 Evgeny Stupachenko PR rtl-optimization/63618 * gcc.target/i386/pr63618.c: New. diff --git a/gcc/testsuite/gcc.target/i386/pr63618.c b/gcc/testsuite/gcc.target/i386/pr63618.c

Re: [build] Link genmatch with $(LIBINTL)

2014-10-22 Thread Jakub Jelinek
On Wed, Oct 22, 2014 at 05:53:22PM +0200, Rainer Orth wrote: > 2014-10-22 Rainer Orth > > * Makefile.in (build/genmatch(build_exeext)): Add $(LIBINTL) to Shouldn't that be build/genmatch$(build_exeext) , both in the ChangeLog and more importantly, in the patch? > BUILD_LIBS. >

Re: [match-and-simplify] Merge from trunk

2014-10-22 Thread David Edelsohn
This merge has broken bootstrap on AIX. genmatch has a dependency on libintl and libiconv, but is not linked with those libraries. ld: 0711-317 ERROR: Undefined symbol: .libintl_dgettext ld: 0711-317 ERROR: Undefined symbol: .libintl_bindtextdomain ld: 0711-317 ERROR: Undefined symbol: .libiconv

Re: [PARCH 2/2, x86, PR63534] Fix darwin bootstrap

2014-10-22 Thread Jakub Jelinek
On Wed, Oct 22, 2014 at 07:55:57PM +0400, Evgeny Stupachenko wrote: > There is a test for Linux x86 that also fails without the changes in the > patch: > > ChangeLog: > > 2014-10-22 Evgeny Stupachenko > > PR rtl-optimization/63618 > * gcc.target/i386/pr63618.c: New. > > diff

Re: [PATCH PR63530] Fix the pointer alignment in vectorization

2014-10-22 Thread Carrot Wei
Thanks for the review. Following patch has been committed. I will port them to 4.9 branch several days later. 2014-10-22 Guozhi Wei PR tree-optimization/63530 tree-vect-data-refs.c (vect_create_addr_base_for_vector_ref): Set pointer alignment according to DR_MISALIGNMEN

Re: [match-and-simplify] Merge from trunk

2014-10-22 Thread David Edelsohn
Richard, It at least needs something like: * Makefile.in (build/genmatch): Link with $(LIBINTL) $(LIBICONV). Index: Makefile.in === --- Makefile.in (revision 216542) +++ Makefile.in (working copy) @@ -2520,7 +2520,7 @@ # These prog

Re: [wwwdocs] Add porting_to.html, describe gnu11 changes

2014-10-22 Thread Mike Stump
On Oct 22, 2014, at 8:29 AM, Marek Polacek wrote: > The following adds the porting_to.html document for GCC 5 and > documents issues arising from moving the default to gnu11. So, one way for a person to port a large project, would be just to select gnu89 as the target language for the project.

Re: [PATCH] AutoFDO patch for trunk

2014-10-22 Thread David Edelsohn
> Rainer Orth writes: > As Joseph is repeating over and over again, *nothing* must be included > before config.h, and auto-profile.c violates this. > > The following patch at least allows the file to compile without errors; > no idea if this the best order for the headers involved. The patch

Re: [PATCH] AutoFDO patch for trunk

2014-10-22 Thread Xinliang David Li
Can someone pre-approve the patch so that Dehao can check it in after basic testing? David On Wed, Oct 22, 2014 at 10:06 AM, David Edelsohn wrote: >> Rainer Orth writes: > >> As Joseph is repeating over and over again, *nothing* must be included >> before config.h, and auto-profile.c violate

Re: [PATCH 2/4] Add liboffloadmic

2014-10-22 Thread Joseph S. Myers
On Wed, 22 Oct 2014, Jakub Jelinek wrote: > Also, do we really want the messy DOS/Windows '\r' in the messages on > Unix-ish targets? Shouldn't that be dependent on what target is the library > configured for? On platforms where it matters, I think it's still right to use \n only - if in the en

Re: [build] Link genmatch with $(LIBINTL)

2014-10-22 Thread David Edelsohn
I reported the same problem in a separate thread. On AIX it needs LIBINTL and LIBICONV. Index: Makefile.in === --- Makefile.in (revision 216542) +++ Makefile.in (working copy) @@ -2520,7 +2520,7 @@ # These programs need libs over an

Re: [wwwdocs] Add porting_to.html, describe gnu11 changes

2014-10-22 Thread Marek Polacek
On Wed, Oct 22, 2014 at 09:56:08AM -0700, Mike Stump wrote: > On Oct 22, 2014, at 8:29 AM, Marek Polacek wrote: > > The following adds the porting_to.html document for GCC 5 and > > documents issues arising from moving the default to gnu11. > > So, one way for a person to port a large project, wo

Re: [build] Link genmatch with $(LIBINTL)

2014-10-22 Thread Joseph S. Myers
On Wed, 22 Oct 2014, Rainer Orth wrote: > 2014-10-22 Rainer Orth > > * Makefile.in (build/genmatch(build_exeext)): Add $(LIBINTL) to > BUILD_LIBS. > Add $(LIBINTL_DEP) dependency. No, this doesn't look right. A program built for the build system needs to use build versions

Re: Extract and insert merging patch

2014-10-22 Thread Jeff Law
On 10/22/14 09:01, Petr Murzin wrote: Hi, Please have a look at updated patch. 2014-10-22 Petr Murzin gcc/ * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge (vec_duplicate (vec_select)). gcc/testsuite/ * gcc.target/i386/extract-insert-combining.c

Re: Do not build soft-fp code at all for powerpc64-linux-gnu

2014-10-22 Thread David Edelsohn
On Tue, Oct 21, 2014 at 9:06 PM, Joseph S. Myers wrote: > When I added support for using soft-fp in libgcc > , libgcc > configuration was still done in the gcc/ directory, meaning that the > variables set in makefile fragments could not dep

Re: [PATCH] AutoFDO patch for trunk

2014-10-22 Thread Dehao Chen
The patch tested OK. And I think it's a trivial patch, and already committed it to trunk. About the perf parser. I'm syncing the toolchain to head which should already have newer kernel support. Thanks, Dehao On Wed, Oct 22, 2014 at 10:07 AM, Xinliang David Li wrote: > Can someone pre-approve t

Re: [PARCH 1/2, x86, PR63534] Fix darwin bootstrap

2014-10-22 Thread Evgeny Stupachenko
>For example, is the pic register saved and restored? Yes, if RA decided that it is better to save it. >If restored, is the code to save it actually better than simply appearing it >out of thin air as did previously? "enabling ebx" gives performance mostly to loops. There still could be some perf

Re: [build] Link genmatch with $(LIBINTL)

2014-10-22 Thread Richard Biener
On October 22, 2014 7:13:41 PM CEST, David Edelsohn wrote: >I reported the same problem in a separate thread. > >On AIX it needs LIBINTL and LIBICONV. I wonder what ends up linking those with Linux? Or is all the features available from glibc? Fixed patch is OK. Thanks, Richard. >Index: Makef

Re: The nvptx port [10/11+] Target files

2014-10-22 Thread Jeff Law
On 10/20/14 08:33, Bernd Schmidt wrote: These are the main target files for the ptx port. t-nvptx is empty for now but will grow some content with follow up patches. Bernd 010-target.diff * configure.ac: Allow configuring lto for nvptx. * configure: Regenerate. gcc/

Re: The nvptx port [7/11+] Inform the port about call arguments

2014-10-22 Thread Jeff Law
On 10/21/14 16:06, Bernd Schmidt wrote: On 10/21/2014 11:53 PM, Jeff Law wrote: So, in the end I'm torn. I don't like adding new hooks when they're not needed, but I have some reservations about relying on the order of stuff in CALL_INSN_FUNCTION_USAGE and I worry a bit that you might end up w

Re: [PATCH 5/8] Enable max_issue for AArch32 and AArch64

2014-10-22 Thread Sebastian Pop
Maxim Kuvyrkov wrote: > This change requires benchmarking, which I can't easily do at the moment. I > would appreciate any benchmarking results that you can share. I will run my testsuite on aarch64. Do you need the perf for all the previous patches 1 to 5 together, or just for patch 5? Thanks,

Re: The nvptx port [8/11+] Write undefined decls.

2014-10-22 Thread Jeff Law
On 10/21/14 16:15, Bernd Schmidt wrote: On 10/22/2014 12:05 AM, Jeff Law wrote: On 10/20/14 14:30, Bernd Schmidt wrote: ptx assembly requires that declarations are written for undefined variables. This adds that functionality. Does this need to happen at the use site, or can it be deferred?

Re: Extract and insert merging patch

2014-10-22 Thread Marc Glisse
On Wed, 22 Oct 2014, Petr Murzin wrote: + && UINTVAL (op2) == 1 << UINTVAL (tem)) With modes like V64QI around, it is better to replace 1 with HOST_WIDE_INT_1U, though we are not consistent about it. -- Marc Glisse

Re: [PATCH 1/4] Add mkoffload for Intel MIC

2014-10-22 Thread Ilya Verbin
On 22 Oct 09:57, Jakub Jelinek wrote: > On Wed, Oct 22, 2014 at 02:30:44AM +0400, Ilya Verbin wrote: > > This mkoffload is expected to be built only with the offload compiler, > > which is expected to be configured with > > '--enable-as-accelerator-for=... --host=x86_64-*-linux-gnu > > --target=x86

Re: [PATCH][match-and-simplify] Hande side-effects in GENERIC

2014-10-22 Thread Richard Biener
On October 22, 2014 5:08:50 PM CEST, Jakub Jelinek wrote: >On Wed, Oct 22, 2014 at 04:20:09PM +0200, Richard Biener wrote: >> 2014-10-22 Richard Biener >> >> * genmatch.c (count_captures): New function. >> (dt_simplify::gen): Handle preserving side-effects for >> GENERIC code ge

Re: [build] Link genmatch with $(LIBINTL)

2014-10-22 Thread David Edelsohn
On Wed, Oct 22, 2014 at 1:31 PM, Richard Biener wrote: > On October 22, 2014 7:13:41 PM CEST, David Edelsohn wrote: >>I reported the same problem in a separate thread. >> >>On AIX it needs LIBINTL and LIBICONV. > > I wonder what ends up linking those with Linux? Or is all the features > availabl

Re: [build] Link genmatch with $(LIBINTL)

2014-10-22 Thread Richard Biener
On October 22, 2014 7:19:33 PM CEST, "Joseph S. Myers" wrote: >On Wed, 22 Oct 2014, Rainer Orth wrote: > >> 2014-10-22 Rainer Orth >> >> * Makefile.in (build/genmatch(build_exeext)): Add $(LIBINTL) to >> BUILD_LIBS. >> Add $(LIBINTL_DEP) dependency. > >No, this doesn't look rig

Re: [PATCH 2/4] Add liboffloadmic

2014-10-22 Thread Ilya Verbin
On 22 Oct 10:54, Jakub Jelinek wrote: > On Tue, Oct 21, 2014 at 09:20:34PM +0400, Ilya Verbin wrote: > > This patch contains liboffloadmic library. > > > > It is used by ICC for offloading. The sources are imported from upstream > > ( https://www.openmprtl.org/sites/default/files/liboffload_oss.t

Re: [build] Link genmatch with $(LIBINTL)

2014-10-22 Thread Joseph S. Myers
On Wed, 22 Oct 2014, Richard Biener wrote: > On October 22, 2014 7:19:33 PM CEST, "Joseph S. Myers" > wrote: > >On Wed, 22 Oct 2014, Rainer Orth wrote: > > > >> 2014-10-22 Rainer Orth > >> > >>* Makefile.in (build/genmatch(build_exeext)): Add $(LIBINTL) to > >>BUILD_LIBS. > >>Add

Re: [PATCH 6/8] Handle SCRATCH in decompose_address

2014-10-22 Thread Jeff Law
On 10/20/14 21:35, Maxim Kuvyrkov wrote: Hi, This patch is a simple fix to allow decompose_address to handle SCRATCH'es during 2nd scheduler pass. This patch is a prerequisite for a scheduler improvement that relies on decompose_address to parse insns. Bootstrapped and regtested on x86_64-linux

Re: The nvptx port [11/11] More tools.

2014-10-22 Thread Jeff Law
On 10/20/14 08:48, Bernd Schmidt wrote: This is a "bonus" optional patch which adds ar, ranlib, as and ld to the ptx port. This is not proper binutils; ar and ranlib are just linked to the host versions, and the other two tools have the following functions: * nvptx-as is required to convert the

Re: [PATCH][0/n] Merge from match-and-simplify

2014-10-22 Thread Jeff Law
On 10/20/14 05:42, Richard Biener wrote: That was a conscious decision and the idea was that the caller should do this via its lattice valueization function which could look like tree valueize (tree t) { if (TREE_CODE (t) == SSA_NAME && !has_single_use (t)) return NULL_TREE; re

  1   2   >