Re: [PATCH 4/n] OpenMP 4.0 offloading infrastructure: lto-wrapper

2014-10-10 Thread Jakub Jelinek
On Fri, Oct 10, 2014 at 12:07:03AM +0400, Ilya Verbin wrote: On 09 Oct 16:07, Ilya Verbin wrote: + /* By default linker does not discard .gnu.offload_lto_* sections. */ + const char *linker_script = make_temp_file (_linker_script.x); + FILE *stream = fopen

Re: [PATCH] Fix GCC tests fail for installed toolchain due to ASan, UBSan and TSan testsuites drop GCC_EXEC_PREFIX.

2014-10-10 Thread Maxim Ostapenko
Adding Jakub. -Maxim On 10/09/2014 04:34 PM, Maxim Ostapenko wrote: Hi, After enabling ASan, TSan and UBSan testsuites for installed toolchain, many tests started to fail. This is caused by wrong logic in {asan, ubsan, tsan}_finish functions. Here, restore_ld_library_path is called, that is

Re: [PATCH] Fix GCC tests fail for installed toolchain due to ASan, UBSan and TSan testsuites drop GCC_EXEC_PREFIX.

2014-10-10 Thread Jakub Jelinek
On Fri, Oct 10, 2014 at 11:13:11AM +0400, Maxim Ostapenko wrote: Adding Jakub. -Maxim On 10/09/2014 04:34 PM, Maxim Ostapenko wrote: Hi, After enabling ASan, TSan and UBSan testsuites for installed toolchain, many tests started to fail. This is caused by wrong logic in {asan, ubsan,

[PATCH 1/X, i386, PR54232] Enable EBX for x86 in 32bits PIC code

2014-10-10 Thread Evgeny Stupachenko
Hi, The patch enables EBX in RA for x86 32bits PIC mode. It was discussed here: https://gcc.gnu.org/ml/gcc-patches/2014-09/msg02513.html Now there is working version with good performance and stability level - it could be a solid first step of EBX enabling. Bootstrap and make check passed. There

[PATCH 2/X, i386, PR54232] Enable EBX for x86 in 32bits PIC code

2014-10-10 Thread Evgeny Stupachenko
i386 specific part of the patch: 2014-10-08 Ilya Enkovich ilya.enkov...@intel.com Vladimir Makarov vmaka...@redhat.com * gcc/config/i386/i386.c (ix86_use_pseudo_pic_reg): New. (ix86_init_pic_reg): New. (ix86_select_alt_pic_regnum): Add check on pseudo

Re: [PATCH, Pointer Bounds Checker 14/x] Passes [8/n] Remove useless builtin calls

2014-10-10 Thread Richard Biener
On Wed, Oct 8, 2014 at 9:08 PM, Ilya Enkovich enkovich@gmail.com wrote: Hi, This patch adds removal of user calls to chkp builtins which become useless after instrumentation. Thanks, Ilya -- 2014-10-08 Ilya Enkovich ilya.enkov...@intel.com * tree-chkp.c

[PATCH 3/X, i386, PR54232] Enable EBX for x86 in 32bits PIC code

2014-10-10 Thread Evgeny Stupachenko
the patch improves performance when previous are applied. It makes RTL loop invariant behavior for GOT loads same as it was before the 2 previous patches. It improves 164.gzip (+9%), 253.perlbmk (+2%) giving ~0.5% to SPEC2000int (compiled with “-m32 -Ofast -flto -funroll-loops -fPIC” For example

RE: [PATCH] Clean up duplicated function seq_cost

2014-10-10 Thread Zhenqiang Chen
-Original Message- From: Richard Biener [mailto:richard.guent...@gmail.com] Sent: Thursday, October 09, 2014 5:21 PM To: Zhenqiang Chen Cc: GCC Patches Subject: Re: [PATCH] Clean up duplicated function seq_cost On Thu, Oct 9, 2014 at 11:20 AM, Richard Biener

Re: [patch] Fix miscompilation of gnat1 in LTO bootstrap

2014-10-10 Thread Eric Botcazou
I can't see how this can work with LTO. We need a middle-end way to represent the alias relation of those types. At least I can't see how your simple patch covers all cases here? It covers what I think is the most prominent case (unconstrained array types), the other cases are far less

Re: [PATCH] Fix GCC tests fail for installed toolchain due to ASan, UBSan and TSan testsuites drop GCC_EXEC_PREFIX.

2014-10-10 Thread Maxim Ostapenko
On 10/10/2014 11:30 AM, Jakub Jelinek wrote: On Fri, Oct 10, 2014 at 11:13:11AM +0400, Maxim Ostapenko wrote: Adding Jakub. -Maxim On 10/09/2014 04:34 PM, Maxim Ostapenko wrote: Hi, After enabling ASan, TSan and UBSan testsuites for installed toolchain, many tests started to fail. This is

Re: [PATCH] Fix GCC tests fail for installed toolchain due to ASan, UBSan and TSan testsuites drop GCC_EXEC_PREFIX.

2014-10-10 Thread Jakub Jelinek
On Fri, Oct 10, 2014 at 01:09:00PM +0400, Maxim Ostapenko wrote: This works indeed. However, calling set_ld_library_path_env_vars in {asan, tsan, ubsan}_finish will lead to updating LD_LIBRARY_PATH_{32, 64}, LD_RUN_PATH etc. with $ld_library_path:$orig_ld_{library_path_32, library_path_64,

Re: Towards GNU11

2014-10-10 Thread Marek Polacek
On Thu, Oct 09, 2014 at 02:34:51PM -0700, Mike Stump wrote: On Oct 7, 2014, at 2:07 PM, Marek Polacek pola...@redhat.com wrote: I'd like to kick off a discussion about moving the default standard for C from gnu89 to gnu11. I endorse the change of default. Thanks for chiming in. A wiki

Re: [PATCH] Implement -fsanitize=object-size

2014-10-10 Thread Marek Polacek
On Thu, Oct 02, 2014 at 02:04:24PM +0200, Jakub Jelinek wrote: Looks much better. Cool. There are some nits I'd change, like: 1) no need not to handle bitfields 2) IMHO it should handle PARM_DECL and RESULT_DECL alongside of VAR_DECL 3) decl_p IMHO should use just DECL_P 4) it doesn't make

Re: [PATCH] Implement -fsanitize=object-size

2014-10-10 Thread Jakub Jelinek
On Fri, Oct 10, 2014 at 12:04:08PM +0200, Marek Polacek wrote: I couldn't test bootstrap-ubsan, because of error: /home/polacek/x/trunk/prev-x86_64-unknown-linux-gnu/libsanitizer/ubsan/.libs/libubsan.a(ubsan_init.o): .preinit_array section is not allowed in DSO but I remember that the previous

Re: [PATCH 2/X, i386, PR54232] Enable EBX for x86 in 32bits PIC code

2014-10-10 Thread Uros Bizjak
On Fri, Oct 10, 2014 at 9:43 AM, Evgeny Stupachenko evstu...@gmail.com wrote: i386 specific part of the patch: 2014-10-08 Ilya Enkovich ilya.enkov...@intel.com Vladimir Makarov vmaka...@redhat.com * gcc/config/i386/i386.c (ix86_use_pseudo_pic_reg): New.

[PATCH] Small optimization for emit_case_bit_tests (PR tree-optimization/63464)

2014-10-10 Thread Jakub Jelinek
Hi! This patch adds a small optimization to emit_case_bit_tests, instead of emitting (for high, low, mask all constants) (x - low) = (high - low) ((1 (x - low)) mask) if high is smaller than BITS_PER_WORD and low 0 we can emit x = high ((1 x) (mask low)) and avoid subtraction. Do this

[PATCH] Fix up _Alignof with user aligned types (PR c/63495)

2014-10-10 Thread Jakub Jelinek
Hi! As the testcase shows, _Alignof can sometimes return smaller number than the minimum alignment. That is because when laying out structures, fields with types with TYPE_USER_ALIGN set have also DECL_USER_ALIGN set and therefore neither BIGGEST_FIELD_ALIGNMENT nor ADJUST_FIELD_ALIGN is applied

[AArch64] Add --enable-fix-cortex-a53-835769 configure-time option

2014-10-10 Thread Kyrill Tkachov
Hi all, This adds a new configure-time option --enable-fix-cortex-a53-835769 that will enable the Cortex-A53 erratum fix by default so you don't have to specify -mfix-cortex-a53-835769 every time. Documentation in install.texi is added. Ok for trunk? Thanks, Kyrill 2014-10-10 Kyrylo

[PATCH][AArch64] Implement workaround for ARM Cortex-A53 erratum 835769

2014-10-10 Thread Kyrill Tkachov
Hi all, Some early revisions of the Cortex-A53 have an erratum (835769) whereby it is possible for a 64-bit multiply-accumulate instruction in AArch64 state to generate an incorrect result. The details are quite complex and hard to determine statically, since branches in the code may exist in

Re: [PATCH] Small optimization for emit_case_bit_tests (PR tree-optimization/63464)

2014-10-10 Thread Richard Biener
On Fri, 10 Oct 2014, Jakub Jelinek wrote: Hi! This patch adds a small optimization to emit_case_bit_tests, instead of emitting (for high, low, mask all constants) (x - low) = (high - low) ((1 (x - low)) mask) if high is smaller than BITS_PER_WORD and low 0 we can emit x = high ((1

Re: [PATCH] Small optimization for emit_case_bit_tests (PR tree-optimization/63464)

2014-10-10 Thread Jakub Jelinek
On Fri, Oct 10, 2014 at 12:55:21PM +0200, Richard Biener wrote: On Fri, 10 Oct 2014, Jakub Jelinek wrote: This patch adds a small optimization to emit_case_bit_tests, instead of emitting (for high, low, mask all constants) (x - low) = (high - low) ((1 (x - low)) mask) if high is

[PATCH] Fix PR63476

2014-10-10 Thread Richard Biener
This fixes PRE not keeping virtual SSA form up-to-date during insertion and thus eventual VOP walks from the devirt code during elimination. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk. Richard. 2014-10-10 Richard Biener rguent...@suse.de PR

[PATCH v2, RTL]: Fix PR 63483, Scheduler performs Invalid move of aliased memory reference

2014-10-10 Thread Uros Bizjak
On Wed, Oct 8, 2014 at 1:56 PM, Uros Bizjak ubiz...@gmail.com wrote: This message revives an old thread [1], where the miscompilation of gfortran on alpha was found that that resulted in: [...] As said in the audit trail of the bugreport I think that the caller of alpha_set_memflags is

Re: [PATCH] Fix PR63379

2014-10-10 Thread Richard Biener
On Thu, 9 Oct 2014, Richard Biener wrote: This fixes SLP vectorization of a MIN/MAX reduction where we choose a neutral element as the initial value of the first SLP group member. That's of course wrong. Simply don't choose one in which case the proper initial values will used.

Re: [PATCH 3/X, i386, PR54232] Enable EBX for x86 in 32bits PIC code

2014-10-10 Thread Uros Bizjak
On Fri, Oct 10, 2014 at 9:58 AM, Evgeny Stupachenko evstu...@gmail.com wrote: the patch improves performance when previous are applied. It makes RTL loop invariant behavior for GOT loads same as it was before the 2 previous patches. The patch fixes x86 address cost so that cost for addresses

[PATCH] Fix default(none) with array parameters (PR fortran/59488)

2014-10-10 Thread Jakub Jelinek
Hi! This patch makes Fortran array/derived parameters as well as vtables predetermined shared. For the standard proper those aren't really variables at all, and as they are global vars, shared is the best predetermination for them. 2014-10-10 Jakub Jelinek ja...@redhat.com PR

[PING v2][PATCH] Support for BIT_FIELD_REF in asan.c

2014-10-10 Thread Marat Zakirov
On 10/03/2014 10:47 AM, Marat Zakirov wrote: On 09/26/2014 12:55 PM, Marat Zakirov wrote: Hi all! Here's a patch which instruments byte-aligned BIT_FIELD_REFs. During GCC asan-bootstrap and Linux kernel build I didn't find any cases where BIT_FIELD_REF is not 8 bits aligned. But I do not

[PATCH] Fix PR63419

2014-10-10 Thread Richard Biener
force_gimple_operand doesn't really do a deep verification on its input when we ask for a non-simple result here. Instead it trusts that the CONSTRUCTOR PRE feeds it is valid GIMPLE. Unfortunately that isn't so if its elements required a conversion. The following fixes it by merging

Re: [PATCH] Small optimization for emit_case_bit_tests (PR tree-optimization/63464)

2014-10-10 Thread Richard Biener
On Fri, 10 Oct 2014, Jakub Jelinek wrote: On Fri, Oct 10, 2014 at 12:55:21PM +0200, Richard Biener wrote: On Fri, 10 Oct 2014, Jakub Jelinek wrote: This patch adds a small optimization to emit_case_bit_tests, instead of emitting (for high, low, mask all constants) (x - low) = (high -

Re: [PING v2][PATCH] Support for BIT_FIELD_REF in asan.c

2014-10-10 Thread Jakub Jelinek
On Fri, Oct 10, 2014 at 03:40:57PM +0400, Marat Zakirov wrote: gcc/ChangeLog: 2014-09-19 Marat Zakirov m.zaki...@samsung.com * asan.c (instrument_derefs): BIT_FIELD_REF added. gcc/testsuite/ChangeLog: 2014-09-19 Marat Zakirov m.zaki...@samsung.com *

[Ada] New internal primitive Is_Subprogram_Or_Generic_Subprogram

2014-10-10 Thread Arnaud Charlet
This is a minor internal cleanup, to introduce a new primitive Is_Subprogram_Or_Generic_Subprogram with the obvious meaning. No external effect, no test required. Tested on x86_64-pc-linux-gnu, committed on trunk 2014-10-10 Robert Dewar de...@adacore.com * sem_ch7.adb, einfo.adb,

[Ada] Check for attempt to bind GNATprove files

2014-10-10 Thread Arnaud Charlet
If one or more objects is compiled in GNATprove mode (either by using GNATprove directly, or by using -gnatd.F), then the ALI file is marked and gnatbind will exit with a message as shown here. Given: 1. procedure linkdf is 2. begin 3.null; 4. end; If we first compile

Re: [PATCH][AArch64] Implement workaround for ARM Cortex-A53 erratum 835769

2014-10-10 Thread Marcus Shawcroft
On 10 October 2014 11:53, Kyrill Tkachov kyrylo.tkac...@arm.com wrote: Hi all, Some early revisions of the Cortex-A53 have an erratum (835769) whereby it is possible for a 64-bit multiply-accumulate instruction in AArch64 state to generate an incorrect result. The details are quite complex

Re: [AArch64] Add --enable-fix-cortex-a53-835769 configure-time option

2014-10-10 Thread Marcus Shawcroft
On 10 October 2014 11:53, Kyrill Tkachov kyrylo.tkac...@arm.com wrote: Hi all, This adds a new configure-time option --enable-fix-cortex-a53-835769 that will enable the Cortex-A53 erratum fix by default so you don't have to specify -mfix-cortex-a53-835769 every time. Documentation in

Re: [PATCH 2/X, i386, PR54232] Enable EBX for x86 in 32bits PIC code

2014-10-10 Thread Uros Bizjak
On Fri, Oct 10, 2014 at 9:43 AM, Evgeny Stupachenko evstu...@gmail.com wrote: i386 specific part of the patch: 2014-10-08 Ilya Enkovich ilya.enkov...@intel.com Vladimir Makarov vmaka...@redhat.com * gcc/config/i386/i386.c (ix86_use_pseudo_pic_reg): New.

Re: [PATCH 2/X, i386, PR54232] Enable EBX for x86 in 32bits PIC code

2014-10-10 Thread Rainer Orth
Uros Bizjak ubiz...@gmail.com writes: On Fri, Oct 10, 2014 at 9:43 AM, Evgeny Stupachenko evstu...@gmail.com wrote: i386 specific part of the patch: 2014-10-08 Ilya Enkovich ilya.enkov...@intel.com Vladimir Makarov vmaka...@redhat.com * gcc/config/i386/i386.c

Re: [PATCH 2/X, i386, PR54232] Enable EBX for x86 in 32bits PIC code

2014-10-10 Thread Jakub Jelinek
On Fri, Oct 10, 2014 at 02:34:07PM +0200, Rainer Orth wrote: Uros Bizjak ubiz...@gmail.com writes: On Fri, Oct 10, 2014 at 9:43 AM, Evgeny Stupachenko evstu...@gmail.com wrote: i386 specific part of the patch: 2014-10-08 Ilya Enkovich ilya.enkov...@intel.com Vladimir

Re: [AArch64] Add --enable-fix-cortex-a53-835769 configure-time option

2014-10-10 Thread Kyrill Tkachov
On 10/10/14 13:25, Marcus Shawcroft wrote: On 10 October 2014 11:53, Kyrill Tkachov kyrylo.tkac...@arm.com wrote: Hi all, This adds a new configure-time option --enable-fix-cortex-a53-835769 that will enable the Cortex-A53 erratum fix by default so you don't have to specify

Re: [AArch64] Add --enable-fix-cortex-a53-835769 configure-time option

2014-10-10 Thread Marcus Shawcroft
On 10 October 2014 13:38, Kyrill Tkachov kyrylo.tkac...@arm.com wrote: Thanks Marcus, committed as r216076. Can this go to the 4.9 branch as well? It applies cleanly there (with appropriately regenerated configure) and I tested it there with bootstraps with and without the option. Yes that's

[Ada] Issue errors on illegal contracts unless SPARK_Mode is Off

2014-10-10 Thread Arnaud Charlet
Illegal Global/Depends contracts should be flagged by frontend in code for which SPARK_Mode is not specified, as GNATprove relies on contracts being legal in those cases. The frontend should skip these errors only when SPARK_Mode is Off. Now fixed, as shown on the following example. Command:

[Ada] Loop parameter is a constant in an iterator over a formal container.

2014-10-10 Thread Arnaud Charlet
This patch enforces the same semantics for the handling of loop parameters in element iterators over formal containers, os those over formal containers: the loop parameter cannot be assigned to in user code. Compiling formal_test.adb must yield: formal_test.adb:15:07: assignment to loop

Re: [PATCH] Add zero-overhead looping for xtensa backend

2014-10-10 Thread Felix Yang
Hi Sterling, I made some improvement to the patch. Two changes: 1. TARGET_LOOPS is now used as a condition of the doloop related patterns, which is more elegant. 2. As the trip count register of the zero-cost loop maybe potentially spilled, we need to change the patterns in order to

Re: [PATCH 2/X, i386, PR54232] Enable EBX for x86 in 32bits PIC code

2014-10-10 Thread Evgeny Stupachenko
Updated ChangeLog: 2014-10-10 Ilya Enkovich ilya.enkov...@intel.com Vladimir Makarov vmaka...@redhat.com * config/i386/i386.c (ix86_use_pseudo_pic_reg): New. (ix86_init_pic_reg): New. (ix86_select_alt_pic_regnum): Add check on pseudo register.

Re: [PATCH] gcc parallel make check

2014-10-10 Thread Christophe Lyon
Hi Jakub, On 15 September 2014 18:05, Jakub Jelinek ja...@redhat.com wrote: [...] # For parallelized check-% targets, this decides whether parallelization # is desirable (if -jN is used and RUNTESTFLAGS doesn't contain anything # but optional --target_board or --extra_opts arguments). If

Re: [PATCH, Pointer Bounds Checker 14/x] Passes [12/n] Optimize string functions

2014-10-10 Thread Ilya Enkovich
On 09 Oct 11:02, Jeff Law wrote: On 10/08/14 13:18, Ilya Enkovich wrote: Hi, This patch introduces simple optimization of string function calls using variants with no checks and/or bounds copy when possible. Thanks, Ilya -- 2014-10-08 Ilya Enkovich ilya.enkov...@intel.com *

Re: [PATCH] gcc parallel make check

2014-10-10 Thread Jakub Jelinek
On Fri, Oct 10, 2014 at 04:09:39PM +0200, Christophe Lyon wrote: my.exp contains the following construct which is often used in the testsuite: == foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.c]] { # If we're only testing specific files and this isn't one of them, skip

Re: [PATCH][AArch64] Implement workaround for ARM Cortex-A53 erratum 835769

2014-10-10 Thread Kyrill Tkachov
On 10/10/14 15:18, Richard Earnshaw wrote: On 10/10/14 11:53, Kyrill Tkachov wrote: Hi all, Some early revisions of the Cortex-A53 have an erratum (835769) whereby it is possible for a 64-bit multiply-accumulate instruction in AArch64 state to generate an incorrect result. The details are

Re: [PATCH, Pointer Bounds Checker 14/x] Passes [11/n] Optimization helpers

2014-10-10 Thread Ilya Enkovich
On 09 Oct 12:09, Jeff Law wrote: On 10/08/14 13:16, Ilya Enkovich wrote: Hi, This patch introduces structures and manipulation functions used by simple checker optimizations. Structures are used to hold checks information - type of check and checked address in a polinomial form.

[Ada] Operator name returned by GNAT.Source_Info.Enclosing_Entity

2014-10-10 Thread Arnaud Charlet
The string returned by GNAT.Source_Info.Enclosing_Entity did not include names of operators (e.g. **). The following program: 1. with Text_IO; use Text_IO; 2. with GNAT.Source_Info; use GNAT.Source_Info; 3. procedure BadEE is 4.type R is new Boolean; 5.RV : R :=

[Ada] Implement new pragma Prefix_Exception_Messages

2014-10-10 Thread Arnaud Charlet
This implements a new configuration pragma pragma Prefix_Exception_Messages; which causes messages set using raise x with s to be prefixed by the expanded name of the enclosing entity if s is a string literal (if s is more complex, we assume the program is calculating exactly the message it

[Ada] Spurious error on local instantiation of pure generic unit

2014-10-10 Thread Arnaud Charlet
This patch fixes an error in the legality checks of aspects that apply to library units: these aspects are legal on a local instantiation of a library-level generic unit that carries the aspect pure. The following must compile quietly: gcc -c my_buffer.adb --- package My_Buffer with

[Ada] Ada2012 freeze rules for subprogram profiles

2014-10-10 Thread Arnaud Charlet
Ada05-019 specifies that freezing a subprogram does not automatically freeze the profile, i.e. the types of the formals and the return type. In particular an attribute reference 'Access and its relatives do not freeze the profile. Compiling bd.ads must yield: bd.ads:15:34: incorrect

[AArch64] [BE] [1/2] Make large opaque integer modes endianness-safe.

2014-10-10 Thread David Sherwood
Hi, I have a fix (originally written by Tejas Belagod) for the following bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59810 Could someone take a look please? Thanks! David Sherwood. ChangeLog: gcc/: 2014-10-10 David Sherwood david.sherw...@arm.com *

Re: [PATCH] gcc parallel make check

2014-10-10 Thread Christophe Lyon
On 10 October 2014 16:19, Jakub Jelinek ja...@redhat.com wrote: On Fri, Oct 10, 2014 at 04:09:39PM +0200, Christophe Lyon wrote: my.exp contains the following construct which is often used in the testsuite: == foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.c]] { # If we're

Re: [PATCH, Pointer Bounds Checker 14/x] Passes [8/n] Remove useless builtin calls

2014-10-10 Thread Ilya Enkovich
On 09 Oct 15:03, Jeff Law wrote: On 10/08/14 13:08, Ilya Enkovich wrote: Hi, This patch adds removal of user calls to chkp builtins which become useless after instrumentation. Thanks, Ilya -- 2014-10-08 Ilya Enkovich ilya.enkov...@intel.com * tree-chkp.c

Re: [PATCH] gcc parallel make check

2014-10-10 Thread Jakub Jelinek
On Fri, Oct 10, 2014 at 04:50:47PM +0200, Christophe Lyon wrote: On 10 October 2014 16:19, Jakub Jelinek ja...@redhat.com wrote: On Fri, Oct 10, 2014 at 04:09:39PM +0200, Christophe Lyon wrote: my.exp contains the following construct which is often used in the testsuite: ==

FW: [AArch64] [BE] [1/2] Make large opaque integer modes endianness-safe.

2014-10-10 Thread David Sherwood
Hi, I forgot to mention that this patch needs was tested in combination with another patch by Alan Hayward (coming soon) and observed the following: x86_64: No regressions. aarch64: No regressions. aarch64_be: Lots of vector tests now fixed. No new regressions. Regards, David. -Original

New rematerialization sub-pass in LRA

2014-10-10 Thread Vladimir Makarov
Here is a new rematerialization sub-pass of LRA. This summer, I tried to implement a separate register pressure release pass based on rematerialization described in Simpson's PhD. Although this approach is very attractive as implementation of a separate pass is simpler, it did not work in

Re: RFA: RTL typesafety improvements for ira.c

2014-10-10 Thread Vladimir Makarov
On 2014-10-08 10:21 PM, Jeff Law wrote: On 10/01/14 17:27, David Malcolm wrote: FWIW, presumably insn here also can now be an rtx_insn *? (I'd like to eventually strengthen the params to the note-handling functions, so fixing this up now would help with that). Here's the updated patch to

[PATCH x86] Update PARTIAL_REG_DEPENDENCY tune

2014-10-10 Thread Evgeny Stupachenko
Hi, We've met several performance issues (up to 15%) on Silvermont caused by the PARTIAL_REG_DEPENDENCY tuning. Previously discussed here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57954 Propose removing Silvermont related tune from PARTIAL_REG_DEPENDENCY. The patch passed bootstrap, make

Re: [PATCH x86] Update PARTIAL_REG_DEPENDENCY tune

2014-10-10 Thread Uros Bizjak
On Fri, Oct 10, 2014 at 5:07 PM, Evgeny Stupachenko evstu...@gmail.com wrote: We've met several performance issues (up to 15%) on Silvermont caused by the PARTIAL_REG_DEPENDENCY tuning. Previously discussed here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57954 Propose removing Silvermont

[AArch64] [BE] Fix vector load/stores to not use ld1/st1

2014-10-10 Thread Alan Hayward
This patch is dependant on [AArch64] [BE] [1/2] Make large opaque integer modes endianness-safe.” It fixes up movoi/ci/xi for Big Endian, so that we end up with the lsb of a big-endian integer to be in the low byte of the highest-numbered register. movoi uses stp/ldp movxi needs a split version

Re: [PATCH 1/X, i386, PR54232] Enable EBX for x86 in 32bits PIC code

2014-10-10 Thread Vladimir Makarov
On 2014-10-10 3:42 AM, Evgeny Stupachenko wrote: Hi, The patch enables EBX in RA for x86 32bits PIC mode. It was discussed here: https://gcc.gnu.org/ml/gcc-patches/2014-09/msg02513.html Now there is working version with good performance and stability level - it could be a solid first step of

Re: [PATCH][AArch64] Implement workaround for ARM Cortex-A53 erratum 835769

2014-10-10 Thread Richard Earnshaw
On 10/10/14 15:22, Kyrill Tkachov wrote: On 10/10/14 15:18, Richard Earnshaw wrote: On 10/10/14 11:53, Kyrill Tkachov wrote: Hi all, Some early revisions of the Cortex-A53 have an erratum (835769) whereby it is possible for a 64-bit multiply-accumulate instruction in AArch64 state to

[PATCH x86] Increase PARAM_MAX_COMPLETELY_PEELED_INSNS when branch is costly

2014-10-10 Thread Evgeny Stupachenko
Hi, The patch increase PARAM_MAX_COMPLETELY_PEELED_INSNS for CPUs with high branch cost. Bootstrap and make check are in progress. The patch boosts (up to 2,5 times improve) several benchmarks compiled with -Ofast on Silvermont Spec2000: +5% gain on 173.applu +1% gain on 255.vortex Is it ok for

Re: [patch] Use abi_tag attribute on std::list

2014-10-10 Thread Jonathan Wakely
On 03/10/14 15:49 +0100, Jonathan Wakely wrote: On 03/10/14 16:25 +0200, Marc Glisse wrote: On Fri, 3 Oct 2014, Jonathan Wakely wrote: This is the patch I intend to commit to make std::list::size() O(1) as required by C++11. This is an ABI change, so std::list will get tagged with

Re: [PATCH i386 AVX512] [63.1/n] Add vpshufb, perm autogen (except for v64qi).

2014-10-10 Thread Ilya Tocar
On 09 Oct 20:51, Jakub Jelinek wrote: On Thu, Oct 09, 2014 at 04:15:23PM +0400, Ilya Tocar wrote: --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -21358,32 +21358,169 @@ ix86_expand_int_vcond (rtx operands[]) return true; } -ix86_expand_vec_perm_vpermi2 (rtx

Re: [PATCH, ARM] attribute target (thumb,arm)

2014-10-10 Thread Christian Bruel
On 10/09/2014 04:11 PM, Richard Earnshaw wrote: On 09/10/14 12:35, Christian Bruel wrote: On 10/08/2014 06:56 PM, Ramana Radhakrishnan wrote: Hi Christian, snipped agreed stuf 3) about inlining I dislike inlining different modes, From a conceptual use, a user might want to switch mode

Re: [PATCH, Pointer Bounds Checker 14/x] Passes [15/n] Optimize redundant checks

2014-10-10 Thread Ilya Enkovich
2014-10-09 21:41 GMT+04:00 Jeff Law l...@redhat.com: On 10/08/14 13:22, Ilya Enkovich wrote: Hi, This patch adds removal of redundant (covered by other) checks into checker optimization. Thanks, Ilya -- 2014-10-08 Ilya Enkovich ilya.enkov...@intel.com * tree-chkp.c

Re: [PATCH i386 AVX512] [63.1/n] Add vpshufb, perm autogen (except for v64qi).

2014-10-10 Thread Jakub Jelinek
On Fri, Oct 10, 2014 at 07:47:19PM +0400, Ilya Tocar wrote: Updated patch below. You haven't posted ChangeLog entry this time, so using the last one: * config/i386/i386.c

Re: [PATCH] PR63404, gcc 5 miscompiles linux block layer

2014-10-10 Thread Richard Henderson
On 10/08/2014 08:31 AM, Jiong Wang wrote: On 30/09/14 19:36, Jiong Wang wrote: 2014-09-30 17:30 GMT+01:00 Jeff Law l...@redhat.com: On 09/30/14 08:37, Jiong Wang wrote: On 30/09/14 05:21, Jeff Law wrote: I do agree with Richard that it would be useful to see the insns that are

Re: [PATCH x86] Update PARTIAL_REG_DEPENDENCY tune

2014-10-10 Thread H.J. Lu
On Fri, Oct 10, 2014 at 8:07 AM, Evgeny Stupachenko evstu...@gmail.com wrote: Hi, We've met several performance issues (up to 15%) on Silvermont caused by the PARTIAL_REG_DEPENDENCY tuning. Previously discussed here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57954 Propose removing

Re: [PATCH] Fix up _Alignof with user aligned types (PR c/63495)

2014-10-10 Thread Joseph S. Myers
On Fri, 10 Oct 2014, Jakub Jelinek wrote: Hi! As the testcase shows, _Alignof can sometimes return smaller number than the minimum alignment. That is because when laying out structures, fields with types with TYPE_USER_ALIGN set have also DECL_USER_ALIGN set and therefore neither

Re: [PATCH 1/X, i386, PR54232] Enable EBX for x86 in 32bits PIC code

2014-10-10 Thread Jeff Law
On 10/10/14 01:42, Evgeny Stupachenko wrote: Hi, The patch enables EBX in RA for x86 32bits PIC mode. It was discussed here: https://gcc.gnu.org/ml/gcc-patches/2014-09/msg02513.html Now there is working version with good performance and stability level - it could be a solid first step of EBX

Re: [PATCH, ARM] attribute target (thumb,arm)

2014-10-10 Thread Richard Earnshaw
On 10/10/14 15:18, Christian Bruel wrote: On 10/09/2014 04:11 PM, Richard Earnshaw wrote: On 09/10/14 12:35, Christian Bruel wrote: On 10/08/2014 06:56 PM, Ramana Radhakrishnan wrote: Hi Christian, snipped agreed stuf 3) about inlining I dislike inlining different modes, From a

Re: [PATCH, Pointer Bounds Checker 14/x] Passes [8/n] Remove useless builtin calls

2014-10-10 Thread Jeff Law
On 10/10/14 08:52, Ilya Enkovich wrote: THanks, Jeff With this code we remove user builtins calls coming from source code. E.g.: p2 = (int *)__bnd_init_ptr_bounds (p1); *p2 = 0; which means p2 has value of p1 but has default bounds and following store is unchecked. These calls are

Re: [PATCH, Pointer Bounds Checker 14/x] Passes [11/n] Optimization helpers

2014-10-10 Thread Jeff Law
On 10/10/14 08:24, Ilya Enkovich wrote: On 09 Oct 12:09, Jeff Law wrote: On 10/08/14 13:16, Ilya Enkovich wrote: Hi, This patch introduces structures and manipulation functions used by simple checker optimizations. Structures are used to hold checks information - type of check and checked

Regenerated libstdc++-v3/testsuite/Makefile.in

2014-10-10 Thread Jonathan Wakely
I've regenerated this file and committed it so I don't get harmless whitespace changes every time I run autoreconf.

Re: [PATCH, Pointer Bounds Checker 14/x] Passes [12/n] Optimize string functions

2014-10-10 Thread Jeff Law
On 10/10/14 08:19, Ilya Enkovich wrote: So is the purpose here to expose the checks that would normally be done in the mem* routines to their caller in the hopes that doing so will expose redundant checks? Or is there some other reason? There are few reasons to replace instrumented string

Re: [PATCH] Clean up duplicated function seq_cost

2014-10-10 Thread Jeff Law
On 10/10/14 02:17, Zhenqiang Chen wrote: -Original Message- From: Richard Biener [mailto:richard.guent...@gmail.com] Sent: Thursday, October 09, 2014 5:21 PM To: Zhenqiang Chen Cc: GCC Patches Subject: Re: [PATCH] Clean up duplicated function seq_cost On Thu, Oct 9, 2014 at 11:20 AM,

Re: [PATCH x86] Update PARTIAL_REG_DEPENDENCY tune

2014-10-10 Thread Evgeny Stupachenko
Thanks. I've modified ChangeLog. 2014-10-10 Evgeny Stupachenko evstu...@gmail.com * config/i386/x86-tune.def (X86_TUNE_SSE_PARTIAL_REG_DEPENDENCY): Remove m_SILVERMONT and m_INTEL from the tune. On Fri, Oct 10, 2014 at 7:58 PM, H.J. Lu hjl.to...@gmail.com wrote: On Fri, Oct

Re: [PATCH] Implement -fsanitize=object-size

2014-10-10 Thread Marek Polacek
On Fri, Oct 10, 2014 at 12:26:44PM +0200, Jakub Jelinek wrote: On Fri, Oct 10, 2014 at 12:04:08PM +0200, Marek Polacek wrote: I couldn't test bootstrap-ubsan, because of error: /home/polacek/x/trunk/prev-x86_64-unknown-linux-gnu/libsanitizer/ubsan/.libs/libubsan.a(ubsan_init.o):

Re: [PATCH i386 AVX512] [63.1/n] Add vpshufb, perm autogen (except for v64qi).

2014-10-10 Thread Uros Bizjak
On Fri, Oct 10, 2014 at 5:47 PM, Ilya Tocar tocarip.in...@gmail.com wrote: My strong preference would be: enum machine_mode maskmode = mode; rtx (*gen) (rtx, rtx, rtx, rtx); right below the enum machine_mode mode = GET_MODE (d ? d-op0 : op0); line and then inside of the first switch just

Re: [PATCH] PR63404, gcc 5 miscompiles linux block layer

2014-10-10 Thread Jiong Wang
On 10/10/14 16:59, Richard Henderson wrote: On 10/08/2014 08:31 AM, Jiong Wang wrote: Ping ~ And as there is NONDEBUG_INSN_P check before move_insn_for_shrink_wrap invoked, we could avoid creating new wrapper function by invoke single_set_2 directly. I'm committing the following to fix

Re: [PATCH, i386, Pointer Bounds Checker 31/x] Pointer Bounds Checker builtins for i386 target

2014-10-10 Thread Jeff Law
On 10/09/14 10:54, Uros Bizjak wrote: On Thu, Oct 9, 2014 at 4:07 PM, Ilya Enkovich enkovich@gmail.com wrote: It appeared I changed a semantics of BNDMK expand when replaced tree operations with rtl ones. Original code: + op1 = expand_normal (fold_build2 (PLUS_EXPR, TREE_TYPE

Re: New rematerialization sub-pass in LRA

2014-10-10 Thread Jeff Law
On 10/10/14 09:02, Vladimir Makarov wrote: The new LRA rematerialization sub-pass works right before spilling subpass and tries to rematerialize values of spilled pseudos. To implement the new sub-pass, some important changes in LRA were done. First, lra-lives.c updates live info about all

Re: [PATCH 4/n] OpenMP 4.0 offloading infrastructure: lto-wrapper

2014-10-10 Thread Cary Coutant
The linker already has a --strip-lto-sections option, and it's on by default. I'll approve a patch that modifies gold to recognize .gnu.offload_lto.* sections as part of --strip-lto-sections. Really, though, you should be setting the SHF_EXCLUDE bit on these sections. Do that and no

Re: [PATCH] PR63404, gcc 5 miscompiles linux block layer

2014-10-10 Thread Richard Henderson
On 10/10/2014 09:39 AM, Jiong Wang wrote: (1) Don't bother modifying single_set; just look for a bare SET. (2) Tighten the set of expressions we're willing to move. (3) Use direct return false in the failure case, rather than counting a non-zero number of non-constants, etc. Tested on

Re: [PATCH, Pointer Bounds Checker 14/x] Passes [15/n] Optimize redundant checks

2014-10-10 Thread Jeff Law
On 10/10/14 09:50, Ilya Enkovich wrote: Checks and and intersection removal code was added as a simple pass catching trivial cases. I'm sure there are optimizations having common elements with what checker optimizer does. But initially we didn't want to adopt existing optimizers because GIMPLE

Re: [PATCH 4/n] OpenMP 4.0 offloading infrastructure: lto-wrapper

2014-10-10 Thread Jakub Jelinek
On Fri, Oct 10, 2014 at 09:51:02AM -0700, Cary Coutant wrote: The linker already has a --strip-lto-sections option, and it's on by default. I'll approve a patch that modifies gold to recognize .gnu.offload_lto.* sections as part of --strip-lto-sections. Really, though, you should be setting

Re: [PATCH] PR63404, gcc 5 miscompiles linux block layer

2014-10-10 Thread Jeff Law
On 10/10/14 10:52, Richard Henderson wrote: I missed that message. Interesting. I wonder what kind of fallout there would be from changing LO_SUM to RTX_BIN_ARITH, which is what it should have been all along. My guess is that someone looked at HIGH being RTX_CONST_OBJ and thought that LO_SUM

Re: [PATCH] PR63404, gcc 5 miscompiles linux block layer

2014-10-10 Thread Jakub Jelinek
On Fri, Oct 10, 2014 at 11:00:54AM -0600, Jeff Law wrote: But it's really a lot more like a kind of PLUS. If instead we had a LOW to match HIGH it would have been Right. In fact, I believe at the hardware level it's typically implemented as addition. Can be addition or bitwise or, as high

Re: [PATCH 4/n] OpenMP 4.0 offloading infrastructure: lto-wrapper

2014-10-10 Thread Cary Coutant
The question is what will old assemblers and/or linkers do with that, and if there are any that support linker plugins, but not SHF_EXCLUDE. If it helps answer that question, SHF_EXCLUDE support has been in gold for 6 years, and in gas for 4. -cary

Re: [PATCH, i386, Pointer Bounds Checker 33/x] MPX ABI

2014-10-10 Thread Uros Bizjak
On Wed, Oct 1, 2014 at 8:57 PM, Vladimir Makarov vmaka...@redhat.com wrote: The problem is in code introduced by Bernd in IRA and caller-saves.c in 2012. It is basically an optimization for functions returning always the same result as one argument (e.g. memcpy returning 1st argument).

Re: [PATCH][AArch64] Implement workaround for ARM Cortex-A53 erratum 835769

2014-10-10 Thread Andrew Pinski
On Fri, Oct 10, 2014 at 3:53 AM, Kyrill Tkachov kyrylo.tkac...@arm.com wrote: Hi all, Some early revisions of the Cortex-A53 have an erratum (835769) whereby it is possible for a 64-bit multiply-accumulate instruction in AArch64 state to generate an incorrect result. The details are quite

Re: [PATCH, i386, Pointer Bounds Checker 31/x] Pointer Bounds Checker builtins for i386 target

2014-10-10 Thread Ilya Enkovich
2014-10-10 20:45 GMT+04:00 Jeff Law l...@redhat.com: On 10/09/14 10:54, Uros Bizjak wrote: On Thu, Oct 9, 2014 at 4:07 PM, Ilya Enkovich enkovich@gmail.com wrote: It appeared I changed a semantics of BNDMK expand when replaced tree operations with rtl ones. Original code: + op1

Re: [PATCH] PR63404, gcc 5 miscompiles linux block layer

2014-10-10 Thread Jeff Law
On 10/10/14 11:04, Jakub Jelinek wrote: On Fri, Oct 10, 2014 at 11:00:54AM -0600, Jeff Law wrote: But it's really a lot more like a kind of PLUS. If instead we had a LOW to match HIGH it would have been Right. In fact, I believe at the hardware level it's typically implemented as

Re: [PATCH v2, RTL]: Fix PR 63483, Scheduler performs Invalid move of aliased memory reference

2014-10-10 Thread Jeff Law
On 10/10/14 04:06, Uros Bizjak wrote: On Wed, Oct 8, 2014 at 1:56 PM, Uros Bizjak ubiz...@gmail.com wrote: This message revives an old thread [1], where the miscompilation of gfortran on alpha was found that that resulted in: [...] As said in the audit trail of the bugreport I think that

Re: [PATCH] PR63404, gcc 5 miscompiles linux block layer

2014-10-10 Thread Richard Henderson
On 10/10/2014 10:21 AM, Jeff Law wrote: On 10/10/14 11:04, Jakub Jelinek wrote: On Fri, Oct 10, 2014 at 11:00:54AM -0600, Jeff Law wrote: But it's really a lot more like a kind of PLUS. If instead we had a LOW to match HIGH it would have been Right. In fact, I believe at the hardware

Re: [PATCH] PR63404, gcc 5 miscompiles linux block layer

2014-10-10 Thread Jeff Law
On 10/10/14 11:25, Richard Henderson wrote: On 10/10/2014 10:21 AM, Jeff Law wrote: On 10/10/14 11:04, Jakub Jelinek wrote: On Fri, Oct 10, 2014 at 11:00:54AM -0600, Jeff Law wrote: But it's really a lot more like a kind of PLUS. If instead we had a LOW to match HIGH it would have been

  1   2   >