Re: [PATCH] Improve x86 and + rotate (PR target/82498)

2017-10-11 Thread Uros Bizjak
On Thu, Oct 12, 2017 at 8:39 AM, Uros Bizjak wrote: > On Thu, Oct 12, 2017 at 8:32 AM, Uros Bizjak wrote: >> On Wed, Oct 11, 2017 at 10:59 PM, Jakub Jelinek wrote: >>> Hi! >>> >>> As can be seen on the testcase below, the *3_mask >>> insn/splitter is able to optimize only the case when the and i

Re: [PATCH] Improve x86 and + rotate (PR target/82498)

2017-10-11 Thread Uros Bizjak
On Thu, Oct 12, 2017 at 8:32 AM, Uros Bizjak wrote: > On Wed, Oct 11, 2017 at 10:59 PM, Jakub Jelinek wrote: >> Hi! >> >> As can be seen on the testcase below, the *3_mask >> insn/splitter is able to optimize only the case when the and is >> performed in SImode and then the result subreged into Q

Re: [PATCH] Improve x86 and + rotate (PR target/82498)

2017-10-11 Thread Uros Bizjak
On Wed, Oct 11, 2017 at 10:59 PM, Jakub Jelinek wrote: > Hi! > > As can be seen on the testcase below, the *3_mask > insn/splitter is able to optimize only the case when the and is > performed in SImode and then the result subreged into QImode, > while if the computation is already in QImode, we d

Re: Make more use of subreg_lowpart_offset

2017-10-11 Thread Jeff Law
On 08/23/2017 04:51 AM, Richard Sandiford wrote: > This patch uses subreg_lowpart_offset in places that open-coded > the calculation. It also uses it in regcprop.c to test whether, > after a mode change, the first register in a multi-register group > is still the right one. > > Tested on aarch64-

Re: 0001-Part-1.-Add-generic-part-for-Intel-CET-enabling

2017-10-11 Thread Jeff Law
On 10/05/2017 04:20 AM, Tsimbalist, Igor V wrote: > I would like to implement the patch in a bit different way depending on > answers I will get for > my following proposals: > > - I propose to make a type with 'nocf_check' attribute to be different from > type w/o the attribute. >The reason

Re: [PATCH] Fix another ICE with C++ addressable bitsize 0 return value (PR c++/82159)

2017-10-11 Thread Jason Merrill
OK. On Wed, Oct 11, 2017 at 4:54 PM, Jakub Jelinek wrote: > Hi! > > Another case where we ICE because we optimize away store to bitsize 0 > addressable object from call. We can't optimize them away, otherwise > we'd try to create the temporaries again and fail to do so. > > Fixed thusly, bootstr

[PATCH 2/2] PR libgcc/59714 complex division is surprising on aarch64

2017-10-11 Thread vladimir . mezentsev
From: Vladimir Mezentsev FMA (floating-point multiply-add) instructions are supported on aarch64. These instructions can produce different result if two operations executed separately. -ffp-contract=off doesn't allow the FMA instructions. Tested on aarch64-linux-gnu. No regression. Two failed t

Re: [PATCH 2/2] C/C++: add fix-it hints for various missing symbols (v3)

2017-10-11 Thread Jason Merrill
On Thu, Oct 5, 2017 at 12:08 PM, David Malcolm wrote: > Here's a slight update to this patch, since v2 was made invalid by > r253411 ("C: underline parameters in mismatching function calls"). > > Both v2 and r253411 added code to c-parser.c/h to track the location_t > of the last consumed token (a

Re: Transform (x >> cst) != 0 to x >= (1 << cst) and (x >> cst) == 0 to x < (1 << cst)

2017-10-11 Thread Jeff Law
On 10/04/2017 12:34 PM, Prathamesh Kulkarni wrote: >>> At a late stage, maybe during an RTL pass or expansion (or just before >>> expansion) it would indeed be good to generate a shift for such >>> comparisons, on targets where that sets a cc. The lack of this >>> transformation could be considere

Re: [patch] generate TAGS for params.def file

2017-10-11 Thread Jeff Law
On 10/09/2017 04:23 AM, Aldy Hernandez wrote: > I hate grepping around for those --param definitions, so I've fixed it. > > I also merged all the *.def files into one pattern. > > OK for trunk? > > curr > > > gcc/ > > * Makefile.in (TAGS): Merge all the *.def files into one pattern. >

Re: [PATCH] Fix bitmap_bit_in_range_p (PR tree-optimization/82493).

2017-10-11 Thread Jeff Law
On 10/11/2017 12:13 AM, Martin Liška wrote: > Hi. > > This fixes some implementations mistakes in sbitmap.c > (bitmap_bit_in_range_p). There's reference > to implementation one can take inspiration from: > https://www.cs.umd.edu/class/sum2003/cmsc311/Notes/BitOp/bitRange.html > > Problem with ou

Re: [PATCH 3/3] Add targetm.insn_cost hook

2017-10-11 Thread Segher Boessenkool
Hi! On Wed, Oct 11, 2017 at 05:39:25PM -0600, Sandra Loosemore wrote: > On 10/09/2017 01:35 PM, Segher Boessenkool wrote: > >This adds a new hook that the insn_cost function uses if a target has > >implemented it (it uses the old pattern_cost nee insn_rtx_cost if not). > As a target maintainer, I

[PATCH,AIX] rs6000 output_aligned_decl_common fix

2017-10-11 Thread David Edelsohn
GCC toplev.c uses ASM_OUTPUT_ALIGNED_DECL_COMMON with a NULL decl to emit the LTO marker, so the rs6000 implementation needs to test for that situation. config/darwin.c tests similarly. With this patch, gcc -flto produces correct output on AIX. Bootstrapped on powerpc-ibm-aix7.2.0.0 Thanks, Dav

[PATCH] rs6000: Remove TARGET_ISEL64

2017-10-11 Thread Segher Boessenkool
TARGET_ISEL64 just means TARGET_ISEL && TARGET_POWERPC64. Since everywhere it is used uses :GPR already, we can just as well use TARGET_ISEL always. Tested as usual, committing. Segher 2017-10-11 Segher Boessenkool * config/rs6000/rs6000.h (TARGET_ISEL64): Delete. * config

Re: [PATCH 3/3] Add targetm.insn_cost hook

2017-10-11 Thread Sandra Loosemore
On 10/09/2017 01:35 PM, Segher Boessenkool wrote: This adds a new hook that the insn_cost function uses if a target has implemented it (it uses the old pattern_cost nee insn_rtx_cost if not). I'll commit this now; it was okayed by Jeff at https://gcc.gnu.org/ml/gcc-patches/2017-08/msg00204.html

Re: [PATCH,AIX] Fix issue with PRI*64 on AIX.

2017-10-11 Thread Ian Lance Taylor
On Tue, Oct 10, 2017 at 2:09 AM, REIX, Tony wrote: > Description: > * This patch enables to build on AIX. > > Tests: > * AIX: Build: SUCCESS >- build made by means of gmake within GCC 8 trunk. > > ChangeLog: > * go-system.h : Enable to build on AIX. > (fix issue with PRIx64 and PRIu64)

Re: patch to fix PR82353

2017-10-11 Thread Vladimir Makarov
On 10/11/2017 05:11 PM, Jakub Jelinek wrote: On Wed, Oct 11, 2017 at 03:39:21PM -0400, Vladimir Makarov wrote: The following patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82353 LRA did not update hard reg liveness on bb borders for hard regs which are part of insn patterns like CF

[PATCH] rs6000: Improve isel

2017-10-11 Thread Segher Boessenkool
This removes output_isel. Instead, the define_insn's now output the isel instructions directly. It adds a reg_or_zero operand predicate, too, because the reg_or_cint predicate is too lax here. Also use it in the "reversed" variants of the instructions. Tested on powerpc64-linux {-m32,-m64}; com

Re: [PATCH] C++: show location of problematic extern "C" specifications

2017-10-11 Thread David Malcolm
On Wed, 2017-10-11 at 17:20 -0400, Jason Merrill wrote: > On Wed, Oct 11, 2017 at 4:50 PM, David Malcolm > wrote: > > On Wed, 2017-10-11 at 15:51 -0400, Jason Merrill wrote: > > > On Tue, Sep 26, 2017 at 3:27 PM, David Malcolm > > om> > > > wrote: > > > > * cp-tree.h (struct saved_scope):

[PATCH, i386]: Re-enable FICOM instruction with IX86_FPCMP_SAHF FP comparison strategy

2017-10-11 Thread Uros Bizjak
Hello! "*cmp__cc_i387" is never matched by combine. The order of operands in x87 ficom compare is forced by combine in simplify_comparison () function. Float operator is treated as RTX_OBJ with a precedence over other operators and is always put in the first place. Patch defines TARGET_CANONICALI

Re: [PATCH] C++: show location of problematic extern "C" specifications

2017-10-11 Thread Jason Merrill
On Wed, Oct 11, 2017 at 4:50 PM, David Malcolm wrote: > On Wed, 2017-10-11 at 15:51 -0400, Jason Merrill wrote: >> On Tue, Sep 26, 2017 at 3:27 PM, David Malcolm >> wrote: >> > * cp-tree.h (struct saved_scope): Add "location" field. >> >> saved_scope seems like the wrong place for this; i

Re: [PATCH 1/2] C++: avoid partial duplicate implementation of cp_parser_error

2017-10-11 Thread Jason Merrill
On Tue, Sep 26, 2017 at 9:56 AM, David Malcolm wrote: > In r251026 (aka 3fe34694f0990d1d649711ede0326497f8a849dc, > "C/C++: show pertinent open token when missing a close token") > I copied part of cp_parser_error into cp_parser_required_error, > leading to duplication of code. > > This patch elim

libgo patch committed: fix uintptr(_t)? issues

2017-10-11 Thread Ian Lance Taylor
This patch by Tony Reix fixes a couple of issues in libgo on systems that distinguish between libgo's uintptr and uintptr_t. Bootstrapped on x86_64-pc-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE === --- gcc/

Re: patch to fix PR82353

2017-10-11 Thread Jakub Jelinek
On Wed, Oct 11, 2017 at 03:39:21PM -0400, Vladimir Makarov wrote: > The following patch fixes > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82353 > > LRA did not update hard reg liveness on bb borders for hard regs which are > part of insn patterns like CFLAGS reg. It was ok for inheritance i

[PATCH] Improve x86 and + rotate (PR target/82498)

2017-10-11 Thread Jakub Jelinek
Hi! As can be seen on the testcase below, the *3_mask insn/splitter is able to optimize only the case when the and is performed in SImode and then the result subreged into QImode, while if the computation is already in QImode, we don't handle it. Fixed by adding another pattern, bootstrapped/regt

[PATCH] Add further VEC_SELECT verification

2017-10-11 Thread Jakub Jelinek
Hi! This patch adds verification that vec_select in *.md files doesn't have any out of bounds indices in the selector. Bootstrapped/regtested on x86_64-linux and i686-linux, tested by building cc1 of aarch64, arm, powerpc64le and s390x cross, and tested by hacking up sse.md to have an out of boun

[PATCH] Fix another ICE with C++ addressable bitsize 0 return value (PR c++/82159)

2017-10-11 Thread Jakub Jelinek
Hi! Another case where we ICE because we optimize away store to bitsize 0 addressable object from call. We can't optimize them away, otherwise we'd try to create the temporaries again and fail to do so. Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2017-10-1

[PATCH] Add some further testcases

2017-10-11 Thread Jakub Jelinek
On Tue, Oct 10, 2017 at 10:21:22PM +0200, Jakub Jelinek wrote: > While going through still open [5 Regression] bugs manually, I've gathered > various testcases from PRs that were fixed by other changes and thus > IMHO the tests are worth being added. I have some further PRs to go through > tomorro

Re: [PATCH] C++: show location of problematic extern "C" specifications

2017-10-11 Thread David Malcolm
On Wed, 2017-10-11 at 15:51 -0400, Jason Merrill wrote: > On Tue, Sep 26, 2017 at 3:27 PM, David Malcolm > wrote: > > * cp-tree.h (struct saved_scope): Add "location" field. > > saved_scope seems like the wrong place for this; it's only > interesting > at parse time, so having it saved du

Re: [PATCH] C++: show location of problematic extern "C" specifications

2017-10-11 Thread Jason Merrill
On Tue, Sep 26, 2017 at 3:27 PM, David Malcolm wrote: > * cp-tree.h (struct saved_scope): Add "location" field. saved_scope seems like the wrong place for this; it's only interesting at parse time, so having it saved during template instantiation doesn't seem useful. I'd prefer to put it

patch to fix PR82353

2017-10-11 Thread Vladimir Makarov
The following patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82353 LRA did not update hard reg liveness on bb borders for hard regs which are part of insn patterns like CFLAGS reg. It was ok for inheritance in EBB which creates only moves and they usually have no embedded hard regs

[PATCH] C: detect more missing semicolons (PR c/7356)

2017-10-11 Thread David Malcolm
[This patch assumes the two patches here: https://gcc.gnu.org/ml/gcc-patches/2017-10/msg00274.html ] c_parser_declaration_or_fndef has logic for parsing what might be either a declaration or a function definition. This patch adds a test to detect cases where a semicolon would have terminated the

Re: [PATCH 00/17] RFC: New source-location representation; Language Server Protocol

2017-10-11 Thread David Malcolm
On Mon, 2017-07-24 at 16:04 -0400, David Malcolm wrote: > We currently capture some source location information in the > frontends, but there are many kinds of source entity for which we > *don't* > retain the location information after the initial parse. > > For example, in the C/C++ frontends: >

Re: [PATCH 1/2] add unique_ptr header

2017-10-11 Thread David Malcolm
On Sat, 2017-08-05 at 01:39 -0400, Trevor Saunders wrote: > On Fri, Aug 04, 2017 at 08:55:50PM +0100, Jonathan Wakely wrote: > > On 01/08/17 23:09 -0400, Trevor Saunders wrote: > > > aiui C++03 is C++98 with a few additions to the stl. > > > > Again, STL != C++ Standard Library. > > > > C++03 mad

[PATCH, i386]: Remove dead x87 cbranch helpers

2017-10-11 Thread Uros Bizjak
Hello! Remove dead code, obsoleted by cbranch rewrite years ago. 2017-10-11 Uros Bizjak * config/i386/i386.md (*cmp__i387): Do not use float_operator operator predicate. (*cmp__cc_i387): Ditto. * config/i386/predicates.md (float_operator): Remove predicate. 2017-10-11 Uros B

[PATCH] Include path enumeration

2017-10-11 Thread Nathan Sidwell
We have an enumeration to indicate particular fragments of the include path. But 1) it's unnamed. So we pass it as int or size_t(!), which is stupid. 2) It's members have rather generic names (QUOTE, BRACKET, SYSTEM, AFTER) 3) There's no MAX value, so we use a magic constant '4'. This patch

Re: [PATCH] Add a warning for invalid function casts

2017-10-11 Thread Martin Sebor
On 10/11/2017 11:26 AM, Joseph Myers wrote: On Tue, 10 Oct 2017, Martin Sebor wrote: The ideal solution for 1) would be a function pointer that can never be used to call a function (i.e., the void* equivalent for functions).[X] I don't think that's relevant. The normal idiom for this in mode

Re: [PATCH] Fix bitmap_bit_in_range_p (PR tree-optimization/82493).

2017-10-11 Thread Jeff Law
On 10/11/2017 12:13 AM, Martin Liška wrote: > Hi. > > This fixes some implementations mistakes in sbitmap.c > (bitmap_bit_in_range_p). There's reference > to implementation one can take inspiration from: > https://www.cs.umd.edu/class/sum2003/cmsc311/Notes/BitOp/bitRange.html > > Problem with ou

PING Re: [PATCH] C++: show location of problematic extern "C" specifications

2017-10-11 Thread David Malcolm
Ping On Tue, 2017-09-26 at 15:27 -0400, David Malcolm wrote: > There are a few places where the C++ FE will complain when attempting > to do things within an extern "C" linkage specifier. > > I've run into problems where it wasn't clear where the pertinent > extern "C" was; for example, when fail

Re: [PATCH] Add a warning for invalid function casts

2017-10-11 Thread Joseph Myers
On Tue, 10 Oct 2017, Martin Sebor wrote: > The ideal solution for 1) would be a function pointer that can > never be used to call a function (i.e., the void* equivalent > for functions).[X] I don't think that's relevant. The normal idiom for this in modern C code, if not just using void *, is v

PING Re: [PATCH 2/2] C/C++: add fix-it hints for various missing symbols (v3)

2017-10-11 Thread David Malcolm
Ping On Thu, 2017-10-05 at 12:08 -0400, David Malcolm wrote: > Here's a slight update to this patch, since v2 was made invalid by > r253411 ("C: underline parameters in mismatching function calls"). > > Both v2 and r253411 added code to c-parser.c/h to track the > location_t > of the last consum

PING: Re: [PATCH 1/2] C++: avoid partial duplicate implementation of cp_parser_error

2017-10-11 Thread David Malcolm
Ping On Tue, 2017-09-26 at 09:56 -0400, David Malcolm wrote: > In r251026 (aka 3fe34694f0990d1d649711ede0326497f8a849dc, > "C/C++: show pertinent open token when missing a close token") > I copied part of cp_parser_error into cp_parser_required_error, > leading to duplication of code. > > This pa

Re: correct attribute ifunc C++ type safety (PR 82301)

2017-10-11 Thread Jeff Law
On 10/11/2017 05:14 AM, Nathan Sidwell wrote: > On 10/04/2017 03:40 PM, Martin Sebor wrote: >> On 09/28/2017 08:25 AM, Nathan Sidwell wrote: > > >> Since the original tests (where the resolver returns void*) pass >> across the board I assume it must work for all supported ABIs. >> Or is there som

[committed][PATCH] Fix typo in end of array address computation

2017-10-11 Thread Jeff Law
I was playing around a bit last night and found that struct-layout-1_generate.c which creates the structure layout compatibility tests has an out of bounds array index. struct-layout-1_generate.c: In function ‘generate_fields’: struct-layout-1_generate.c:1896:24: warning: array subscript is above

Re: [RFC] overflow safe scaling of 64bit values

2017-10-11 Thread Jan Hubicka
> > Any ideas for better version? If not I will go ahead with this variant and > > increase profile probability base. > > Why not use GCC wide int? Because I would like to keep operations fast on in common case where overflows do not happen. There was at least one case (the propagation of probabi

Re: [PATCH] Improve FAIL message for dump-*-times functions.

2017-10-11 Thread Segher Boessenkool
Hi! On Wed, Oct 11, 2017 at 10:14:29AM +0200, Martin Liška wrote: > This patch helps to find why an expected number of scan patterns does not > match: > > FAIL: gcc.dg/unroll-3.c scan-tree-dump-times cunrolli "loop with 3 iterations > completely unrolled" 222 (found 1 times) > FAIL: c-c++-commo

Re: [PATCH] Improve FAIL message for dump-*-times functions.

2017-10-11 Thread Jeff Law
On 10/11/2017 02:14 AM, Martin Liška wrote: > Hi. > > This patch helps to find why an expected number of scan patterns does not > match: > > FAIL: gcc.dg/unroll-3.c scan-tree-dump-times cunrolli "loop with 3 iterations > completely unrolled" 222 (found 1 times) > FAIL: c-c++-common/attr-simd-2.

Re: [PING] Re: correct attribute ifunc C++ type safety (PR 82301)

2017-10-11 Thread Martin Sebor
On 10/11/2017 10:32 AM, Nathan Sidwell wrote: On 10/11/2017 12:21 PM, Martin Sebor wrote: Ping? Since I submitted the updated patch it has been suggested to me that providing a new option to control the warning rather than using an existing one would be preferable (see bug 82435 for the backgro

Re: [PATCH] DECL_ASSEMBLER_NAME and friends

2017-10-11 Thread Nathan Sidwell
On 10/11/2017 11:28 AM, Nathan Sidwell wrote: On 10/11/2017 08:28 AM, Richard Biener wrote: On Tue, Oct 10, 2017 at 3:03 PM, Nathan Sidwell wrote: I have a patch cleaning up a bit of the C++ FE, which will involve hashing via DECL_ASSEMBLER_NAME.  however, all the items in that hash are known

Re: [PING] Re: correct attribute ifunc C++ type safety (PR 82301)

2017-10-11 Thread Nathan Sidwell
On 10/11/2017 12:21 PM, Martin Sebor wrote: Ping? Since I submitted the updated patch it has been suggested to me that providing a new option to control the warning rather than using an existing one would be preferable (see bug 82435 for the background).  The attached update to the patch adds -W

[PING] Re: correct attribute ifunc C++ type safety (PR 82301)

2017-10-11 Thread Martin Sebor
Ping? Since I submitted the updated patch it has been suggested to me that providing a new option to control the warning rather than using an existing one would be preferable (see bug 82435 for the background). The attached update to the patch adds -Wattribute-alias for this purpose and restores

[PATCH GCC]Refine comment and set type for partition merged from SCC

2017-10-11 Thread Bin Cheng
Hi, When reading the code I found it's could be confusing without comment. This patch adds comment explaining why we want merge PARALLEL type partitions in a SCC, even though the result partition can no longer be executed in parallel. It also sets type of the result partition to sequential. Bootst

Re: [PATCH] DECL_ASSEMBLER_NAME and friends

2017-10-11 Thread Nathan Sidwell
On 10/11/2017 08:28 AM, Richard Biener wrote: On Tue, Oct 10, 2017 at 3:03 PM, Nathan Sidwell wrote: I have a patch cleaning up a bit of the C++ FE, which will involve hashing via DECL_ASSEMBLER_NAME. however, all the items in that hash are known to have it set, so its mapping to a function ca

Re: [PATCH][RFC] Instrument function exit with __builtin_unreachable in C++.

2017-10-11 Thread Jason Merrill
On Thu, Oct 5, 2017 at 12:53 PM, Martin Liška wrote: > On 10/05/2017 05:07 PM, Jason Merrill wrote: >> On Thu, Oct 5, 2017 at 6:31 AM, Martin Liška wrote: >>> As discussed 2 days ago on IRC with Jakub and Jonathan, C++ standard says >>> that having a non-return >>> function with missing return st

[PATCH][GRAPHITE] Fix PR82451 (and PR82355 in a different way)

2017-10-11 Thread Richard Biener
For PR82355 I introduced a fake dimension to ISL to allow CHRECs having an evolution in a loop that isn't fully part of the SESE region we are processing. That was easier than fending off those CHRECs (without simply giving up on SESE regions with those). But it didn't fully solve the issue as P

[og7] Enable 0-length array data mappings for implicit data clauses

2017-10-11 Thread Cesar Philippidis
I've pushed this patch to openacc-gcc-7-branch which teaches the gimplifier how to create 0-length arrays mappings for certain pointer and reference typed variables. This is necessary to satisfy the implicit expectation in OpenACC where the user considers pointer variables used like arrays as havin

Re: [PATCH] Add -fsanitize=pointer-{compare,subtract}.

2017-10-11 Thread Jakub Jelinek
On Wed, Oct 11, 2017 at 03:36:40PM +0200, Martin Liška wrote: > > std::swap(addr1, addr2); ? I don't see it used in any of libsanitizer > > though, so not sure if the corresponding STL header is included. > > They don't use it anywhere and I had some #include issues. That's why I did > it manual

Re: [patch] configure option to override TARGET_LIBC_PROVIDES_SSP

2017-10-11 Thread Gerald Pfeifer
On Mon, 9 Oct 2017, Sandra Loosemore wrote: >> The install.texi documentation for --disable-libssp only says "Specify > that the run-time libraries for stack smashing protection should not be >> built.". I think it needs updating to mention these additional effects as >> well. > Oops. :") How ab

[og7] Enable fortran derived types in acc enter/exit data

2017-10-11 Thread Cesar Philippidis
This patch enables fortran derived type members to be used in acc enter/exit data constructs. Now, both acc enter/exit data and acc update support individual derived type members. Eventually, I'd like all of the acc data clauses to support individual derived type members. But that may not happen in

Re: [PATCH][RFC] Instrument function exit with __builtin_unreachable in C++.

2017-10-11 Thread Martin Liška
On 10/05/2017 06:53 PM, Martin Liška wrote: >>  We probably want to provide a way to turn off this behavior. >> >> If we're going to enable this by default, we probably also want >> -Wreturn-type on by default. > > Agree. Hi. So turning on the warning by default for c++, we get about 500 failing

[og7] Allow the accelerator to have more offloaded functions than the host

2017-10-11 Thread Cesar Philippidis
Consider the following example: Let lib1.c contain function f1. Let lib2.c contain function f2. Both f1 and f2 contain offloaded functions. Create a static library with both lib1.o and lib2.o. Next create a program which using that static library, but only calls f1. If you build this program wi

Re: [PATCH] DECL_ASSEMBLER_NAME and friends

2017-10-11 Thread Jan Hubicka
> On Tue, Oct 10, 2017 at 3:03 PM, Nathan Sidwell wrote: > > I have a patch cleaning up a bit of the C++ FE, which will involve hashing > > via DECL_ASSEMBLER_NAME. however, all the items in that hash are known to > > have it set, so its mapping to a function call is undesirable. > > > > This pat

Re: [PATCH][GRAPHITE] Fix PR82449

2017-10-11 Thread Sebastian Pop
On Oct 9, 2017 8:48 AM, "Richard Biener" wrote: On Mon, 9 Oct 2017, Richard Biener wrote: > On Fri, 6 Oct 2017, Sebastian Pop wrote: > > > On Fri, Oct 6, 2017 at 8:33 AM, Richard Biener wrote: > > > > > On Fri, 6 Oct 2017, Sebastian Pop wrote: > > > > > > > On Fri, Oct 6, 2017 at 6:56 AM, Richa

Re: [PATCH] Add -fsanitize=pointer-{compare,subtract}.

2017-10-11 Thread Martin Liška
On 10/11/2017 09:37 AM, Jakub Jelinek wrote: > On Wed, Oct 11, 2017 at 07:55:44AM +0200, Martin Liška wrote: >>> Conceptually, these two instrumentations rely on address sanitization, >>> not really sure if we should supporting them for kernel sanitization (but I >>> bet it is just going to be too

Re: [PATCH][mingw] Enable colorized diagnostics

2017-10-11 Thread JonY
On 10/09/2017 01:07 PM, Liu Hao wrote: > On 2017/10/9 19:01, JonY wrote: >> On 10/08/2017 11:39 AM, Liu Hao wrote: >> >> I'm not sure if it should be enabled by default due to the interleaving >> problem, but seeing as the user has to go out to set GCC_COLORS to use >> this feature, I suppose it is

[PATCH] Fix infer_loop_bounds_from_pointer_arith

2017-10-11 Thread Richard Biener
The following fixes a common mistake in calling analyze_scalar_evolution -- it's supposed to be called with the loop the use is directly in. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2017-10-11 Richard Biener * tree-ssa-loop-niter.c (infer_loop_bounds_fr

Re: [PATCH PR82472]Update postorder number for merged partition.

2017-10-11 Thread Richard Biener
On Wed, Oct 11, 2017 at 12:06 PM, Bin Cheng wrote: > Hi, > This patch fixes the reported ICE. Root cause is postorder number is not > updated > after merging partitions in SCC. As a result, reduction partition may not be > scheduled > as the last one because partitions are sorted in descending

Re: [PATCH] Simplify SCEV entry

2017-10-11 Thread Andreas Schwab
ched evolutions the obvious way. > (scev_initialize): Assert we are not yet initialized. That breaks gfortran.dg/graphite/pr68279.f90: during GIMPLE pass: graphite /daten/aranym/gcc/gcc-20171011/gcc/testsuite/gfortran.dg/graphite/pr68279.f90:8:0: internal compiler error: in set_codegen_e

Re: X+Y < X iff Y<0 moved to match.pd

2017-10-11 Thread Richard Biener
On Tue, Oct 10, 2017 at 4:22 PM, Marc Glisse wrote: > On Mon, 9 Oct 2017, Richard Biener wrote: > >> On Sun, Oct 8, 2017 at 1:22 PM, Marc Glisse wrote: >>> >>> Hello, >>> >>> this moves (and extends a bit) one more transformation from fold-const.c >>> to >>> match.pd. The single_use restriction i

Re: [PATCH] DECL_ASSEMBLER_NAME and friends

2017-10-11 Thread Richard Biener
On Tue, Oct 10, 2017 at 3:03 PM, Nathan Sidwell wrote: > I have a patch cleaning up a bit of the C++ FE, which will involve hashing > via DECL_ASSEMBLER_NAME. however, all the items in that hash are known to > have it set, so its mapping to a function call is undesirable. > > This patch adds DECL

Re: [PATCH GCC][5/7]Extend loop distribution for two-level innermost loop nest

2017-10-11 Thread Richard Biener
On Wed, Oct 11, 2017 at 2:05 PM, Bin.Cheng wrote: > On Mon, Oct 9, 2017 at 2:48 PM, Richard Biener > wrote: >> On Thu, Oct 5, 2017 at 3:17 PM, Bin Cheng wrote: >>> Hi, >>> For now distribution pass only handles the innermost loop. This patch >>> extends the pass >>> to cover two-level innermos

Re: [PATCH] Fix use-after-scope error.

2017-10-11 Thread Martin Liška
On 10/11/2017 09:15 AM, Jakub Jelinek wrote: > On Wed, Oct 11, 2017 at 08:17:25AM +0200, Martin Liška wrote: >> One can see use-after-scope error in boostrap-asan: >> >> gcc/ChangeLog: >> >> 2017-10-10 Martin Liska >> >> * print-rtl.c (print_insn): Move declaration of idbuf >> to same

Re: [PATCH] Fix a test-case for Darwin.

2017-10-11 Thread Martin Liška
On 10/11/2017 09:13 AM, Jakub Jelinek wrote: > On Wed, Oct 11, 2017 at 08:15:16AM +0200, Martin Liška wrote: >> Hello. >> >> This should address failing test-case on Darwin. > > Guess this should fix it not just on Darwin, but also on any target > where the assembler doesn't have a call instructio

Re: [PATCH] preprocessor stringizing raw strings

2017-10-11 Thread Andreas Schwab
On Okt 11 2017, Nathan Sidwell wrote: > Index: g++.dg/cpp/string-3.C > === > --- g++.dg/cpp/string-3.C (revision 253622) > +++ g++.dg/cpp/string-3.C (working copy) > @@ -6,4 +6,4 @@ > BEGIN STRINGIZE(R"( > )") END > > -//

[PATCH] Shrink POLYNOMIAL_CHREC

2017-10-11 Thread Richard Biener
This moves CHREC_VARIABLE to the tree base union as it just records a loop number there's no need to allocate a tree node and tree operand for it. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. 2017-10-11 Richard Biener * tree.def (POLYNOMIAL_CHREC): Remove

Re: [PATCH GCC][5/7]Extend loop distribution for two-level innermost loop nest

2017-10-11 Thread Bin.Cheng
On Mon, Oct 9, 2017 at 2:48 PM, Richard Biener wrote: > On Thu, Oct 5, 2017 at 3:17 PM, Bin Cheng wrote: >> Hi, >> For now distribution pass only handles the innermost loop. This patch >> extends the pass >> to cover two-level innermost loop nest. It also refactors code in >> pass_loop_distri

Re: [PATCH] preprocessor stringizing raw strings

2017-10-11 Thread Nathan Sidwell
Christophe, Didn't you forget to add -save-temps in the testcase? I'm seeing it failing because: g++.dg/cpp/string-3.C -std=c++11 : output file does not exist UNRESOLVED: g++.dg/cpp/string-3.C -std=c++11 scan-file BEGIN "R\\"(\\n)\\""\n END Surprisingly we emit a .i file, but I'd also flubbe

[PATCH 2/2] S/390: Do not end groups after fallthru edge

2017-10-11 Thread Robin Dapp
This patch fixes cases where we start a new group although the previous one has not ended. Regression tested on s390x. gcc/ChangeLog: 2017-10-11 Robin Dapp * config/s390/s390.c (s390_has_ok_fallthru): New function. (s390_sched_score): Temporarily change s390_sched_state.

[PATCH 1/2] S/390: Handle long-running instructions

2017-10-11 Thread Robin Dapp
This patch introduces balancing of long-running instructions that may clog the pipeline. gcc/ChangeLog: 2017-10-11 Robin Dapp * config/s390/s390.c (NUM_SIDES): New constant. (LONGRUNNING_THRESHOLD): New constant. (LATENCY_FACTOR): New constant. (s390_sched_sco

Re: correct attribute ifunc C++ type safety (PR 82301)

2017-10-11 Thread Nathan Sidwell
On 10/04/2017 03:40 PM, Martin Sebor wrote: On 09/28/2017 08:25 AM, Nathan Sidwell wrote: Since the original tests (where the resolver returns void*) pass across the board I assume it must work for all supported ABIs. Or is there some subtlety between the before and after code that I'm missin

Re: [RFC] overflow safe scaling of 64bit values

2017-10-11 Thread Richard Biener
On Tue, 10 Oct 2017, Jan Hubicka wrote: > Hi, > in order to drop frequencies from basic blocks and counts from edges I need > to make probabilities more precise (so we do not get all those roundoff errors > from 1-base fixpoint arithmetics). Increasing base is easy now, but it > means that in

[PATCH PR82472]Update postorder number for merged partition.

2017-10-11 Thread Bin Cheng
Hi, This patch fixes the reported ICE. Root cause is postorder number is not updated after merging partitions in SCC. As a result, reduction partition may not be scheduled as the last one because partitions are sorted in descending postorder. Bootstrap and test on x86_64 and AArch64. Is it OK?

[PATCH] Improve FAIL message for dump-*-times functions.

2017-10-11 Thread Martin Liška
Hi. This patch helps to find why an expected number of scan patterns does not match: FAIL: gcc.dg/unroll-3.c scan-tree-dump-times cunrolli "loop with 3 iterations completely unrolled" 222 (found 1 times) FAIL: c-c++-common/attr-simd-2.c -Wc++-compat scan-assembler-times _ZGVbN4_simd_attr: 11

Re: [PATCH] Do not error for no_sanitize attributes (PR sanitizer/82490).

2017-10-11 Thread Jakub Jelinek
On Wed, Oct 11, 2017 at 09:45:27AM +0200, Markus Trippelsdorf wrote: > On 2017.10.11 at 09:39 +0200, Jakub Jelinek wrote: > > On Wed, Oct 11, 2017 at 08:24:28AM +0200, Martin Liška wrote: > > > Hi. > > > > > > This changes error to a warning: > > > warning: ‘foobar’ attribute directive ignored [-W

Re: [PATCH] Do not error for no_sanitize attributes (PR sanitizer/82490).

2017-10-11 Thread Markus Trippelsdorf
On 2017.10.11 at 09:39 +0200, Jakub Jelinek wrote: > On Wed, Oct 11, 2017 at 08:24:28AM +0200, Martin Liška wrote: > > Hi. > > > > This changes error to a warning: > > warning: ‘foobar’ attribute directive ignored [-Wattributes] > > > > Patch can bootstrap on ppc64le-redhat-linux and survives reg

Re: Zen tuning part 6: Break up CPU specific tuning bits to central place

2017-10-11 Thread Uros Bizjak
Hello! > * i386/i386.c Move all CPU cost tables to x86-tune-costs.h > (COSTS_N_BYTES): Move to x86-tune-costs.h > (DUMMY_STRINGOP_ALGS):x86-tune-costs.h Missing full stops. Partial sentence in the last one. > (TARGET_SCHED_DISPATCH): Move to ix86-tnue-sched-bd.c. > (TARGET_SCHED_DISPATCH_DO): M

Re: [PATCH] Do not error for no_sanitize attributes (PR sanitizer/82490).

2017-10-11 Thread Jakub Jelinek
On Wed, Oct 11, 2017 at 08:24:28AM +0200, Martin Liška wrote: > Hi. > > This changes error to a warning: > warning: ‘foobar’ attribute directive ignored [-Wattributes] > > Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. What is the rationale for not warning? LLVM comp

Re: [PATCH] Add -fsanitize=pointer-{compare,subtract}.

2017-10-11 Thread Jakub Jelinek
On Wed, Oct 11, 2017 at 07:55:44AM +0200, Martin Liška wrote: > > Conceptually, these two instrumentations rely on address sanitization, > > not really sure if we should supporting them for kernel sanitization (but I > > bet it is just going to be too costly for kernel). > > So, we also need to mak

Re: [PATCH] Fix use-after-scope error.

2017-10-11 Thread Jakub Jelinek
On Wed, Oct 11, 2017 at 08:17:25AM +0200, Martin Liška wrote: > One can see use-after-scope error in boostrap-asan: > > gcc/ChangeLog: > > 2017-10-10 Martin Liska > > * print-rtl.c (print_insn): Move declaration of idbuf > to same scope as name. > --- > gcc/print-rtl.c | 2 +- >

Re: [PATCH] Fix a test-case for Darwin.

2017-10-11 Thread Jakub Jelinek
On Wed, Oct 11, 2017 at 08:15:16AM +0200, Martin Liška wrote: > Hello. > > This should address failing test-case on Darwin. Guess this should fix it not just on Darwin, but also on any target where the assembler doesn't have a call instruction but something different (e.g. bl and many others). >