Re: [1/2] OpenACC routine support

2015-12-03 Thread Thomas Schwinge
Hi Cesar! On Wed, 2 Dec 2015 15:37:17 -0800, Cesar Philippidis wrote: > On 12/01/2015 06:49 AM, Cesar Philippidis wrote: > > On 12/01/2015 06:40 AM, Thomas Schwinge wrote: > > > >> I noticed while working on other test cases: > >> > >> On Wed, 18 Nov 2015 11:02:01 -0800, Cesar Philippidis > >>

Fix buildbreaker with isl 0.14

2015-12-03 Thread Tom de Vries
[ was: Re: [PATCH] [graphite] handle missing isl_ast_expr ] On 03/12/15 00:56, Tom de Vries wrote: Hi, This break the build for me, with isl 0.14. ... src/gcc/graphite-isl-ast-to-gimple.c: In member function ‘tree_node* translate_isl_ast_to_gimple::binary_op_to_tree(tree, isl_ast_expr*, ivs_pa

Re: [PATCH, C++] Wrap OpenACC wait in EXPR_STMT

2015-12-03 Thread Thomas Schwinge
Hi Chung-Lin! On Mon, 23 Nov 2015 21:15:00 +0800, Chung-Lin Tang wrote: > The OpenACC wait directive is represented as a call to the runtime > function "GOACC_wait" instead of a tree code. I am seeing when > '#pragma acc wait' is using inside a template function, the CALL_EXPR > to GOACC_wait i

Re: [PATCH, C++] Wrap OpenACC wait in EXPR_STMT

2015-12-03 Thread Thomas Schwinge
Hi! On Thu, 03 Dec 2015 09:51:31 +0100, I wrote: > On Mon, 23 Nov 2015 21:15:00 +0800, Chung-Lin Tang > wrote: > > The OpenACC wait directive is represented as a call to the runtime > > function "GOACC_wait" instead of a tree code. I am seeing when > > '#pragma acc wait' is using inside a templ

Re: [PATCH] Handle BUILT_IN_GOACC_PARALLEL in ipa-pta

2015-12-03 Thread Richard Biener
On Thu, 3 Dec 2015, Tom de Vries wrote: > On 03/12/15 01:10, Tom de Vries wrote: > > > > I've managed to reproduce it. The difference between pass and fail is > > whether the compiler is configured with or without accelerator. > > > > I'll look into it. > > In the configuration with accelerator

Add an rsqrt_optab and IFN_RSQRT internal function

2015-12-03 Thread Richard Sandiford
All current uses of builtin_reciprocal convert 1.0/sqrt into rsqrt. This patch adds an rsqrt optab and associated internal function for that instead. We can then pick up the vector forms of rsqrt automatically, fixing an AArch64 regression from my internal_fn patches. With that change, builtin_re

Re: [PATCH] RFC: Use Levenshtein spelling suggestions in Fortran FE

2015-12-03 Thread Janne Blomqvist
On Tue, Dec 1, 2015 at 7:51 PM, Bernhard Reutner-Fischer wrote: > As said, we could as well use a list of candidates with NULL as record marker. > Implementation cosmetics. Steve seems to not be thrilled by the > overall idea in the first place, so unless there is clear support by > somebody else

[PATCH][RTL-ifcvt] PR rtl-optimization/68624: Clean up logic that checks for clobbering conflicts across basic blocks

2015-12-03 Thread Kyrill Tkachov
Hi all, In this fix I want to simplify the control flow of the code that chooses the order in which to emit the then and else basic blocks (and their associated emit_a and emit_b instructions). Currently we check the then block and only if there is a modification there we check the else block

Re: [RFA] [PR tree-optimization/68599] Avoid over-zealous optimization with -funsafe-loop-optimizations

2015-12-03 Thread Richard Biener
On Wed, Dec 2, 2015 at 5:27 PM, Jeff Law wrote: > > > I strongly recommend reading the analysis in pr45122 since pr68599 uses the > same testcase and just triggers the same bug in the RTL optimizers instead > of the tree optimziers. > > As noted in 45122, with -funsafe-loop-optimizations, we may e

Re: Add an rsqrt_optab and IFN_RSQRT internal function

2015-12-03 Thread Jakub Jelinek
On Thu, Dec 03, 2015 at 09:21:03AM +, Richard Sandiford wrote: > * internal-fn.def (RSQRT): New function. > * optabs.def (rsqrt_optab): New optab. > * doc/tm.texi (rsqrtM2): Document Missing full stop. Otherwise looks to me like a nice cleanup and hopefully fixes the aarch64

Re: [PATCH] Derive interface buffers from max name length

2015-12-03 Thread Janne Blomqvist
On Tue, Dec 1, 2015 at 6:51 PM, Bernhard Reutner-Fischer wrote: > On 1 December 2015 at 15:52, Janne Blomqvist > wrote: >> On Tue, Dec 1, 2015 at 2:54 PM, Bernhard Reutner-Fischer >> wrote: >>> These three function used a hardcoded buffer of 100 but would be better >>> off to base off GFC_MAX_S

Re: [PATCH 2/2] [graphite] fix invalid bounds on array refs

2015-12-03 Thread Richard Biener
On Wed, Dec 2, 2015 at 10:36 PM, Sebastian Paul Pop wrote: > Do you recommend that we add a gcc_assert that min is always lower than max? No, min can be one less than max if the array has size zero. > The change in Graphite code can be reverted then: > >>+ /* Fortran has some arrays where high

Re: [PATCH][PR tree-optimization/67816] Fix jump threading when DOM removes conditionals in jump threading path

2015-12-03 Thread Richard Biener
On Wed, Dec 2, 2015 at 11:56 PM, Jeff Law wrote: > On 12/02/2015 08:35 AM, Richard Biener wrote: > be possible to make it do that much like I extended SCCVN to do this (when doing the DOM walk see if any incoming edge is marked executable and if not, mark all outgoing edges as not e

Re: Fix buildbreaker with isl 0.14

2015-12-03 Thread Richard Biener
On Thu, Dec 3, 2015 at 9:49 AM, Tom de Vries wrote: > [ was: Re: [PATCH] [graphite] handle missing isl_ast_expr ] > > On 03/12/15 00:56, Tom de Vries wrote: >> >> Hi, >> >> This break the build for me, with isl 0.14. >> >> ... >> src/gcc/graphite-isl-ast-to-gimple.c: In member function ‘tree_node*

Re: [PATCH, C++] Wrap OpenACC wait in EXPR_STMT

2015-12-03 Thread Chung-Lin Tang
On 2015/12/3 4:59 PM, Thomas Schwinge wrote: > Hi! > > On Thu, 03 Dec 2015 09:51:31 +0100, I wrote: >> On Mon, 23 Nov 2015 21:15:00 +0800, Chung-Lin Tang >> wrote: >>> The OpenACC wait directive is represented as a call to the runtime >>> function "GOACC_wait" instead of a tree code. I am seein

Re: [PATCH, C++] Wrap OpenACC wait in EXPR_STMT

2015-12-03 Thread Jakub Jelinek
On Thu, Dec 03, 2015 at 06:05:36PM +0800, Chung-Lin Tang wrote: > > Oh wait, it looks like the C++ front end is not actually using the > > functions defined in the C/C++-shared gcc/c-family/c-omp.c, but has its > > own implementations in gcc/cp/semantics.c, without "c_" prefixes? In > > addition t

Re: [PATCH AArch64]Handle REG+REG+CONST and REG+NON_REG+CONST in legitimize address

2015-12-03 Thread Richard Earnshaw
+ 0x3ffc". >>>> + Since the offset is within range supported by addressing >>>> + mode "reg+offset", we don't split the const and legalize >>>> + it into below insn and expr sequence: >>>> + r3 =

Re: [PATCH, C++] Wrap OpenACC wait in EXPR_STMT

2015-12-03 Thread Chung-Lin Tang
On 2015/12/3 6:11 PM, Jakub Jelinek wrote: > On Thu, Dec 03, 2015 at 06:05:36PM +0800, Chung-Lin Tang wrote: >>> Oh wait, it looks like the C++ front end is not actually using the >>> functions defined in the C/C++-shared gcc/c-family/c-omp.c, but has its >>> own implementations in gcc/cp/semantics

[PATCHES, PING] Enhance standard DWARF for Ada

2015-12-03 Thread Pierre-Marie de Rodat
On 11/26/2015 01:34 PM, Pierre-Marie de Rodat wrote: Done! (I repalced the dwarf_proc_decl_table hash table with a dwarf_proc_stack_usage_map hash_map) Here's an update for the only affected patch. Regtested again on x86_64-linux. Ping for the patches submitted in

[Ping^2][AArch64][TLSGD][2/2] Implement TLS GD traditional for tiny code model

2015-12-03 Thread Jiong Wang
On 13/11/15 15:21, Jiong Wang wrote: On 05/11/15 14:57, Jiong Wang wrote: Marcus Shawcroft writes: +#ifdef HAVE_AS_TINY_TLSGD_RELOCS + return SYMBOL_TINY_TLSGD; +#else + return SYMBOL_SMALL_TLSGD; +#endif Rather than introduce blocks of conditional compilation it is better to gate differen

Re: [gomp-nvptx 4/9] nvptx backend: add -mgomp option and multilib

2015-12-03 Thread Alexander Monakov
On Wed, 2 Dec 2015, Jakub Jelinek wrote: > Can you post sample code with assembly for -msoft-stack and -muniform-simt > showing how are short interesting cases expanded? Here's short examples; please let me know if I'm misunderstanding and you wanted something else. First, -muniform-simt effect

[PATCH] Handle OBJ_TYPE_REF in FRE

2015-12-03 Thread Richard Biener
The following patch handles CSEing OBJ_TYPE_REF which was omitted because it is a GENERIC expression even on GIMPLE (for whatever reason...). Rather than changing this now the following patch simply treats it properly as such. Bootstrap & regtest running on x86_64-unknown-linux-gnu. Note that t

[PATCH, CHKP] Fix bounds returned for structures

2015-12-03 Thread Ilya Enkovich
Hi, Currently multiple return-struct-* tests from MPX testsuite fail. This patch fixes it. Bootstrapped and tested on x86_64-unknown-linux-gnu. Applied to trunk. I'm going to port it to GCC5 after 5.3 release. Thanks, Ilya -- gcc/ 2015-12-03 Ilya Enkovich * cfgexpand.c (expand_

Re: [UPC 02/22] tree-related changes

2015-12-03 Thread Richard Biener
On Wed, 2 Dec 2015, Gary Funck wrote: > On 12/01/15 12:26:32, Richard Biener wrote: > > On Mon, 30 Nov 2015, Gary Funck wrote: > > > -struct GTY(()) tree_type_common { > > > +struct GTY((user)) tree_type_common { > > >struct tree_common common; > > >tree size; > > >tree size_unit; > >

Re: [ARM] Fix PR middle-end/65958

2015-12-03 Thread Richard Earnshaw
Sorry for the delay, very busy on other things these days... On 16/11/15 20:00, Eric Botcazou wrote: >> More comments inline. > > Revised version attached, which addresses all your comments and in particular > removes the > > +#if PROBE_INTERVAL > 4096 > +#error Cannot use indexed addressing mode

Re: [PATCH] Handle BUILT_IN_GOACC_PARALLEL in ipa-pta

2015-12-03 Thread Tom de Vries
On 03/12/15 09:59, Richard Biener wrote: On Thu, 3 Dec 2015, Tom de Vries wrote: On 03/12/15 01:10, Tom de Vries wrote: I've managed to reproduce it. The difference between pass and fail is whether the compiler is configured with or without accelerator. I'll look into it. In the configurat

Re: [PATCH] Handle BUILT_IN_GOACC_PARALLEL in ipa-pta

2015-12-03 Thread Richard Biener
On Thu, 3 Dec 2015, Tom de Vries wrote: > On 03/12/15 09:59, Richard Biener wrote: > > On Thu, 3 Dec 2015, Tom de Vries wrote: > > > > > On 03/12/15 01:10, Tom de Vries wrote: > > > > > > > > I've managed to reproduce it. The difference between pass and fail is > > > > whether the compiler is co

Re: [PATCH] Handle BUILT_IN_GOACC_PARALLEL in ipa-pta

2015-12-03 Thread Jakub Jelinek
On Thu, Dec 03, 2015 at 12:09:04PM +0100, Tom de Vries wrote: > The flag is set here in expand_omp_target: > ... > 12682 /* Prevent IPA from removing child_fn as unreachable, > since there are no > 12683refs from the parent function to child_fn in offload >

Re: [Patch, fortran] PR68534 - No error on mismatch in number of arguments between submodule and module interface

2015-12-03 Thread Paul Richard Thomas
Dear Steve, I'll take a look at this this afternoon. Thanks for bringing it to my attention. Cheers Paul On 3 December 2015 at 07:43, Steve Kargl wrote: > On Wed, Dec 02, 2015 at 10:26:30PM -0800, Steve Kargl wrote: >> On Wed, Dec 02, 2015 at 10:02:33PM -0800, Steve Kargl wrote: >> > Paul, >>

Re: [PATCH] Fix shrink-wrap bug with anticipating into loops (PR67778, PR68634)

2015-12-03 Thread Bernd Schmidt
On 12/02/2015 07:21 PM, Segher Boessenkool wrote: After shrink-wrapping has found the "tightest fit" for where to place the prologue, it tries move it earlier (so that frame saves are run earlier) -- but without copying any more basic blocks. Unfortunately a candidate block we select can be insi

Re: [PATCH] Fix shrink-wrap bug with anticipating into loops (PR67778, PR68634)

2015-12-03 Thread Bernd Schmidt
On 12/02/2015 07:21 PM, Segher Boessenkool wrote: After shrink-wrapping has found the "tightest fit" for where to place the prologue, it tries move it earlier (so that frame saves are run earlier) -- but without copying any more basic blocks. Another question would be - is there really a good r

Re: Add an rsqrt_optab and IFN_RSQRT internal function

2015-12-03 Thread Richard Biener
On Thu, Dec 3, 2015 at 10:39 AM, Jakub Jelinek wrote: > On Thu, Dec 03, 2015 at 09:21:03AM +, Richard Sandiford wrote: >> * internal-fn.def (RSQRT): New function. >> * optabs.def (rsqrt_optab): New optab. >> * doc/tm.texi (rsqrtM2): Document > > Missing full stop. > > Otherwi

Re: Add fuzzing coverage support

2015-12-03 Thread Bernd Schmidt
On 12/02/2015 06:38 PM, Dmitry Vyukov wrote: One thing to consider would be whether you really need this split between O0/optimize versions, or whether you can find a place in the queue where to insert it unconditionally. Have you considered this at all or did you just follow asan/tsan? I inser

Re: [PATCH, PR46032] Handle BUILT_IN_GOMP_PARALLEL in ipa-pta

2015-12-03 Thread Tom de Vries
On 30/11/15 14:32, Jakub Jelinek wrote: On Mon, Nov 30, 2015 at 02:24:18PM +0100, Richard Biener wrote: OK for stage3 trunk if bootstrap and reg-test succeeds? -|| node->address_taken); +|| (node->address_taken +&& !no

Re: [PATCH, 4/16] Implement -foffload-alias

2015-12-03 Thread Tom de Vries
On 11/11/15 12:00, Jakub Jelinek wrote: On Wed, Nov 11, 2015 at 11:51:02AM +0100, Richard Biener wrote: The option -foffload-alias=pointer instructs the compiler to assume that objects references in an offload region do not alias. The option -foffload-alias=all instructs the compiler to make no

Re: [ARM] Fix PR middle-end/65958

2015-12-03 Thread Eric Botcazou
> I can understand this restriction, but... > > > + /* See the same assertion on PROBE_INTERVAL above. */ > > + gcc_assert ((first % 4096) == 0); > > ... why isn't this a test that FIRST is aligned to PROBE_INTERVAL? Because that isn't guaranteed, FIRST is related to the size of the protectio

Re: [PATCH] Empty redirect_edge_var_map after each pass and function

2015-12-03 Thread Alan Lawrence
On 02/12/15 14:13, Jeff Law wrote: On 12/02/2015 01:33 AM, Richard Biener wrote: Right. So the question I have is how/why did DOM leave anything in the map. And if DOM is fixed to not leave stuff lying around, can we then assert that nothing is ever left in those maps between passes? There's c

Re: [PATCH] Empty redirect_edge_var_map after each pass and function

2015-12-03 Thread Richard Biener
On Thu, 3 Dec 2015, Alan Lawrence wrote: > On 02/12/15 14:13, Jeff Law wrote: > > On 12/02/2015 01:33 AM, Richard Biener wrote: > > > > Right. So the question I have is how/why did DOM leave anything in the > > > > map. > > > > And if DOM is fixed to not leave stuff lying around, can we then asse

Documentation tweaks for internal-fn-related optabs

2015-12-03 Thread Richard Sandiford
As Bernd requested, this patch adds "This pattern cannot FAIL" to the documentation of optabs that came to be mapped to interal functions. For consistency I did the same for optabs that were already being used for internal functions. Many of the optabs weren't documented in the first place, so I a

Re: [PATCH] Empty redirect_edge_var_map after each pass and function

2015-12-03 Thread Richard Biener
On Thu, 3 Dec 2015, Richard Biener wrote: > On Thu, 3 Dec 2015, Alan Lawrence wrote: > > > On 02/12/15 14:13, Jeff Law wrote: > > > On 12/02/2015 01:33 AM, Richard Biener wrote: > > > > > Right. So the question I have is how/why did DOM leave anything in > > > > > the > > > > > map. > > > > > A

Re: [PATCH][RTL-ifcvt] PR rtl-optimization/68624: Clean up logic that checks for clobbering conflicts across basic blocks

2015-12-03 Thread Bernd Schmidt
On 12/03/2015 10:33 AM, Kyrill Tkachov wrote: PR rtl-optimization/68624 * ifcvt.c (noce_try_cmove_arith): Check clobbers of temp regs in both blocks if they exist and simplify the logic choosing the order to emit them in. 2015-12-03 Kyrylo Tkachov PR rtl-optimization

Re: Documentation tweaks for internal-fn-related optabs

2015-12-03 Thread Bernd Schmidt
On 12/03/2015 02:06 PM, Richard Sandiford wrote: As Bernd requested, this patch adds "This pattern cannot FAIL" to the documentation of optabs that came to be mapped to interal functions. For consistency I did the same for optabs that were already being used for internal functions. Many of the o

Re: [PATCH] RFC: Use Levenshtein spelling suggestions in Fortran FE

2015-12-03 Thread Mikael Morin
Le 03/12/2015 10:29, Janne Blomqvist a écrit : On Tue, Dec 1, 2015 at 7:51 PM, Bernhard Reutner-Fischer wrote: As said, we could as well use a list of candidates with NULL as record marker. Implementation cosmetics. Steve seems to not be thrilled by the overall idea in the first place, so unles

Re: [Patch,microblaze]: Instruction prefetch optimization for microblaze.

2015-12-03 Thread Michael Eager
On 12/01/2015 12:49 AM, Ajit Kumar Agarwal wrote: The changes are made in this patch for the instruction prefetch optimizations for Microblaze. Reg tested for Microblaze target. The changes are made for instruction prefetch optimizations for Microblaze. The "wic" microblaze instruction is the

Re: [gomp-nvptx 2/9] nvptx backend: new "uniform SIMT" codegen variant

2015-12-03 Thread Alexander Monakov
On Wed, 2 Dec 2015, Nathan Sidwell wrote: > On 12/02/15 12:09, Alexander Monakov wrote: > > > I meant the PTX linked (post PTX-JIT link) image, so regardless of support, > > it's not an issue. E.g. check early in gomp_nvptx_main if .weak > > __nvptx_has_simd != 0. It would only break if there wa

Re: [1/2] OpenACC routine support

2015-12-03 Thread Cesar Philippidis
On 12/03/2015 12:36 AM, Thomas Schwinge wrote: >> Here's the updated patch. > > ENOPATCH. Here it is. >> The test cases were written in a way such that >> none of them needed to be updated with these changes. > > ... which potentially means they'd match for all kinds of "random" > diagnostics.

[PTX] reorganize data space handling

2015-12-03 Thread Nathan Sidwell
The PTX backend superficially looks like it is using the address space extension mechanism to handle the various PTX data areas. However, it is not really doing that -- the ADDR_SPACE #define values are not registered with the address space handling. The addr_space_t enumeration is used to hol

Re: [PATCH,RFC] Introduce RUN_UNDER_VALGRIND in test-suite

2015-12-03 Thread Bernd Schmidt
On 11/23/2015 10:34 AM, Martin Liška wrote: On 11/21/2015 05:26 AM, Hans-Peter Nilsson wrote: IIRC you can replace the actual dg-runtest proc with your own (implementing a wrapper). Grep aroung, I think we do that already. That's certainly preferable instead of touching all callers. You are

Re: [PATCH] S/390: Fix warning in "*movstr" pattern.

2015-12-03 Thread Dominik Vogt
Version 5 with two fixes to the test case. :-/ (ChangeLog is the same.) Ciao Dominik ^_^ ^_^ -- Dominik Vogt IBM Germany >From 5965f62501b271285bacb90b11ef3f748338d1cf Mon Sep 17 00:00:00 2001 From: Dominik Vogt Date: Tue, 3 Nov 2015 18:03:02 +0100 Subject: [PATCH] S/390: Fix warning in "*

Re: [PR67383][ARM][4.9]Backport of "Allow any register for DImode values in Thumb2"

2015-12-03 Thread Christophe Lyon
On 27 November 2015 at 12:26, Ramana Radhakrishnan wrote: > > > On 27/11/15 09:40, Renlin Li wrote: >> Hi Ramana, >> >> On 16/10/15 14:54, Renlin Li wrote: >>> >>> The command line implies we remove r7 (frame pointer in Thumb2 - historical accident, fno-omit-frame-pointer), r9 (ffixed-r

[PATCH 04/10] Fix g++.dg/template/crash55.C

2015-12-03 Thread David Malcolm
The patch kit changes the output of this case: 1 //PR c++/27668 2 3 template // { dg-error "nested-name-specifier|two or more|valid type" } 4 struct A {}; 5 6 template void foo(A); // { dg-error "cast|argument" "" { target c++98_only } } but only for c++98, from: g++.dg/templ

[PATCH 10/10] Fix g++.dg/warn/Wconversion-real-integer2.C

2015-12-03 Thread David Malcolm
This testcase's output is changed by the patchkit from printing at the "=": BEFORE: g++.dg/warn/Wconversion-real-integer2.C: In function 'void h()': g++.dg/warn/Wconversion-real-integer2.C:32:12: warning: conversion to 'float' alters 'int' constant value [-Wfloat-conversion] vfloat = INT_MAX

[PATCH 08/10] Fix g++.dg/ubsan/pr63956.C

2015-12-03 Thread David Malcolm
With the location patch, various errors in g++.dg/ubsan/pr63956.C change: 8 constexpr int 9 fn1 (int a, int b) 10 { 11if (b != 2) 12 a <<= b; 13return a; 14 } 15 16 constexpr int i1 = fn1 (5, 3); 17 constexpr int i2 = fn1 (5, -2); // { d

Re: [Patch,tree-optimization]: Add new path Splitting pass on tree ssa representation

2015-12-03 Thread Richard Biener
On Sat, Nov 14, 2015 at 12:35 AM, Jeff Law wrote: > On 11/13/2015 01:23 PM, Jeff Law wrote: >> >> On 11/13/2015 11:09 AM, Richard Biener wrote: >> BTW Do we have an API for indicating that new blocks have been added to a loop? If so, then we can likely drop the LOOPS_NEED_FIXU

[PATCH 03/10] Fix g++.dg/gomp/loop-1.C

2015-12-03 Thread David Malcolm
The patch kit affects the locations of the errors reported by g++.dg/gomp/loop-1.C. I reviewed the new locations, and they seemed sane. This patch updates the locations of omp_for_cond to use the location of the cond if available, falling back to the existing behavior of using input_location othe

[PATCH 02/10] Fix g++.dg/cpp0x/nsdmi-template14.C

2015-12-03 Thread David Malcolm
When building new-expressions, we use cp_lexer_previous_token and access its location to get the final position in the source range. Within g++.dg/cpp0x/nsdmi-template14.C, the previous token within a new expr can have been purged, leading to UNKNOWN_LOCATION. g++.dg/cpp0x/nsdmi-template14.C:11

[PATCH 07/10] Fix g++.dg/template/ref3.C

2015-12-03 Thread David Malcolm
Testcase g++.dg/template/ref3.C: 1 // PR c++/28341 2 3 template struct A {}; 4 5 template struct B 6 { 7A<(T)0> b; // { dg-error "constant|not a valid" } 8A a; // { dg-error "constant|not a valid" } 9 }; 10 11 B b; The output of t

[PATCH 09/10] Fix g++.dg/warn/pr35635.C

2015-12-03 Thread David Malcolm
This testcase was broken by the patch kit; upon investigation the best fix is to try to use the location of the relevant expression when warning about conversions, rather than input_location, falling back to the latter via EXPR_LOC_OR_LOC. One dg-warning needed moving, since the caret is on the "?

[PATCH 00/10] C++ expression ranges v4

2015-12-03 Thread David Malcolm
On Wed, 2015-11-25 at 16:26 -0500, Jason Merrill wrote: > > It's not clear to me whether I should be passing in UNKNOWN_LOCATION > > or input_location to the various functions. > > > > cp_build_unary_op used input_location in various places internally, > > so I've passed that in wherever there isn'

[PATCH 05/10] Fix location of dg-error within g++.dg/template/pr64100.C

2015-12-03 Thread David Malcolm
Here's what it now emits (if caret-printing were enabled): g++.dg/template/pr64100.C: In instantiation of ‘class foo’: g++.dg/template/pr64100.C:8:16: required from here g++.dg/template/pr64100.C:5:41: error: invalid use of incomplete type ‘class foo’ static_assert(noexcept(((foo *)1)->~fo

Re: [Patch,tree-optimization]: Add new path Splitting pass on tree ssa representation

2015-12-03 Thread Richard Biener
On Thu, Dec 3, 2015 at 3:38 PM, Richard Biener wrote: > On Sat, Nov 14, 2015 at 12:35 AM, Jeff Law wrote: >> On 11/13/2015 01:23 PM, Jeff Law wrote: >>> >>> On 11/13/2015 11:09 AM, Richard Biener wrote: >>> > > BTW Do we have an API for indicating that new blocks have been added to >

[RTL] canonical form of AND-immediate within COMPARE?

2015-12-03 Thread Kyrill Tkachov
Hi all, Some ISAs have instructions to perform a bitwise AND operation with an immediate and compare the result with zero. For example, the aarch64 TST instruction. This is represented naturally in the MD file as: (define_insn "*and3nr_compare0" [(set (reg:CC_NZ CC_REGNUM) (compare:CC_NZ

[PATCH 06/10] Fix g++.dg/template/pseudodtor3.C

2015-12-03 Thread David Malcolm
gcc/testsuite/ChangeLog: * g++.dg/template/pseudodtor3.C: Update column numbers in dg-error directives. --- gcc/testsuite/g++.dg/template/pseudodtor3.C | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/g++.dg/template/pseudodtor3.C b/gcc/testsui

[C] Issue an error on scalar va_list with reverse storage order

2015-12-03 Thread Eric Botcazou
Hi, further testing revealed an issue with va_arg handling and reverse scalar storage order on some platforms: when va_list is scalar, passing a field of a structure with reverse SSO as first argument to va_start/va_arg/va_end doesn't work because the machinery takes its address and this is not

Re: [PATCH] Empty redirect_edge_var_map after each pass and function

2015-12-03 Thread Alan Lawrence
On 03/12/15 12:58, Richard Biener wrote: On Thu, 3 Dec 2015, Alan Lawrence wrote: On 02/12/15 14:13, Jeff Law wrote: On 12/02/2015 01:33 AM, Richard Biener wrote: Right. So the question I have is how/why did DOM leave anything in the map. And if DOM is fixed to not leave stuff lying around,

[PATCH 01/10] C++ FE: expression ranges v4

2015-12-03 Thread David Malcolm
Changes in this version: - removal of gcc_assert (m_loc != UNKNOWN_LOCATION) from cp_expr ctor - uses protected_set_expr_location or cp_expr::set_location/set_range, rather than attempting to add location_t arguments - adds location support and test coverage based on issues seen in the analogou

Re: [PATCH] Empty redirect_edge_var_map after each pass and function

2015-12-03 Thread Richard Biener
On Thu, 3 Dec 2015, Alan Lawrence wrote: > On 03/12/15 12:58, Richard Biener wrote: > > On Thu, 3 Dec 2015, Alan Lawrence wrote: > > > > > On 02/12/15 14:13, Jeff Law wrote: > > > > On 12/02/2015 01:33 AM, Richard Biener wrote: > > > > > > Right. So the question I have is how/why did DOM leave a

Re: Documentation tweaks for internal-fn-related optabs

2015-12-03 Thread Richard Sandiford
Bernd Schmidt writes: > On 12/03/2015 02:06 PM, Richard Sandiford wrote: >> As Bernd requested, this patch adds "This pattern cannot FAIL" to the >> documentation of optabs that came to be mapped to interal functions. >> For consistency I did the same for optabs that were already being >> used for

Re: [RTL] canonical form of AND-immediate within COMPARE?

2015-12-03 Thread Eric Botcazou
> Some ISAs have instructions to perform a bitwise AND operation with an > immediate and compare the result with zero. Many of them I'd say. > Is there a good way to fix this? It would seem rather weird to have extra MD > patterns to match the zero_extract forms explicitly. Maybe teaching the > a

Re: [PATCH] Fix shrink-wrap bug with anticipating into loops (PR67778, PR68634)

2015-12-03 Thread Richard Sandiford
Segher Boessenkool writes: > On Wed, Dec 02, 2015 at 08:19:05PM +0100, Jakub Jelinek wrote: >> On Wed, Dec 02, 2015 at 06:21:47PM +, Segher Boessenkool wrote: >> > --- a/gcc/shrink-wrap.c >> > +++ b/gcc/shrink-wrap.c >> > @@ -752,7 +752,11 @@ try_shrink_wrapping (edge *entry_edge, bitmap_head

Re: [RFA] [PR tree-optimization/68599] Avoid over-zealous optimization with -funsafe-loop-optimizations

2015-12-03 Thread Jeff Law
On 12/03/2015 02:36 AM, Richard Biener wrote: On Wed, Dec 2, 2015 at 5:27 PM, Jeff Law wrote: I strongly recommend reading the analysis in pr45122 since pr68599 uses the same testcase and just triggers the same bug in the RTL optimizers instead of the tree optimziers. As noted in 45122, with

Re: [PATCH][install.texi] Add note against GNAT 4.8 on ARM targets.

2015-12-03 Thread Alan Lawrence
On 16/11/15 15:08, Alan Lawrence wrote: This follows from the discussion here: https://gcc.gnu.org/ml/gcc/2015-10/msg00082.html . OK for trunk? --Alan gcc/ChangeLog: doc/install.texi: Add note against GNAT 4.8 on ARM targets. --- gcc/doc/install.texi | 2 ++ 1 file changed, 2 inse

Re: [Patch,tree-optimization]: Add new path Splitting pass on tree ssa representation

2015-12-03 Thread Jeff Law
On 12/03/2015 07:38 AM, Richard Biener wrote: This pass is now enabled by default with -Os but has no limits on the amount of stmts it copies. It also will make all loops with this shape have at least two exits (if the resulting loop will be disambiguated the inner loop will have two exits). Ha

Re: [PATCH][install.texi] Add note against GNAT 4.8 on ARM targets.

2015-12-03 Thread Gerald Pfeifer
On Thu, 3 Dec 2015, Alan Lawrence wrote: >> doc/install.texi: Add note against GNAT 4.8 on ARM targets. This looks fine (provided it builds and looks okay). Just... >> +Building the Ada frontend commonly fails (an infinite loop executing >> @code{xsinfo}) if the host compiler is GNAT 4.8.

RE: [PATCH] MIPS/GCC/doc: Reorder `-mcompact-branches='

2015-12-03 Thread Matthew Fortune
Maciej Rozycki writes: > Move the `-mcompact-branches=' option out of the middle of a block of > floating-point options. The option is not related to FP in any way. > Place it immediately below other branch instruction selection options. > > gcc/ > * doc/invoke.texi (Option Summary)

Re: [PATCH] Handle OBJ_TYPE_REF in FRE

2015-12-03 Thread Jan Hubicka
> > The following patch handles CSEing OBJ_TYPE_REF which was omitted > because it is a GENERIC expression even on GIMPLE (for whatever Why it is generic? It is part of gimple grammar :) > reason...). Rather than changing this now the following patch > simply treats it properly as such. Thanks

[gomp4] backport fortran array reduction changes

2015-12-03 Thread Cesar Philippidis
This patch backports the recent array reduction changes in trunk to gomp-4_0-branch. It's mostly straightforward, except I couldn't include changes to reduction-2.f95 because the gimplifier is reordering the loop clauses slightly different in trunk and gomp4. I'm not sure why. Thomas, that's someth

[RFA][PATCH] Run CFG cleanups after reassociation as needed

2015-12-03 Thread Jeff Law
This is something I noticed while working on fixing 67816. Essentially I was seeing trivially true or trivially false conditionals left in the IL for DOM to clean up. While DOM can and will clean that crud up, but a trivially true or trivially false conditional ought to be detected and cleane

C PATCH for c/68668 (grokdeclarator and wrong type of PARM_DECL)

2015-12-03 Thread Marek Polacek
This ought to fix the fallout from PR c/68162 fix. Here the problem is that grokdeclarator created a wrong type for PARM_DECL "p". It created this decl with type "const int[] *" while it should be "const int *". I think the problem is that we weren't using TREE_TYPE on orig_qual_type and thus c_

[PATCH] Add options -finstrument-functions-include-{file,function}-list

2015-12-03 Thread Andi Drebes
By default -finstrument-functions instruments all functions. To limit instrumentation to certain functions or files it is necessary to specify the complement using -finstrument-functions-exclude-file-list or -finstrument-functions-exclude-function-list. The new options -finstrument-functions-inclu

Re: C PATCH for c/68668 (grokdeclarator and wrong type of PARM_DECL)

2015-12-03 Thread Joseph Myers
On Thu, 3 Dec 2015, Marek Polacek wrote: > This ought to fix the fallout from PR c/68162 fix. Here the problem is that > grokdeclarator created a wrong type for PARM_DECL "p". It created this decl > with type "const int[] *" while it should be "const int *". > > I think the problem is that we w

[hsa] Useful checking assert in scan_omp_1_op

2015-12-03 Thread Martin Jambor
Hi, I have found that adding the following checking assert very useful when debugging omp lowering issues, so I have added it to the hsa branch. I hope that nobody will mind, but it of course is not an essential thing to have if someone does. Thanks, Martin 2015-12-03 Martin Jambor

Re: [PATCH] Add options -finstrument-functions-include-{file,function}-list

2015-12-03 Thread Bert Wesarg
Hi, better write your own instrumentation plug-in and do the filtering on your own. The plug-in interface exists since 4.5 so you have a much greater version base that can support your feature already, than some future version of GCC which may have this patch. While we didn't announced it here on

[hsa] Make copy_gimple_seq_and_replace_locals copy seqs in omp clauses

2015-12-03 Thread Martin Jambor
Hi, this is a fix to the last "last" ICE of the hsa branch. THe problem turned out not to be in the gridification itself but, depending your point of view, in the gimple and tree walking infrastructure or in function copy_gimple_seq_and_replace_locals from tree-inline.c on which hsa gridification

Re: Add fuzzing coverage support

2015-12-03 Thread Dmitry Vyukov
I've attached updated patch (also reuploaded https://codereview.appspot.com/280140043). Fixed ChangeLog. Added invoke.texi. Fixed style issues. The function is defined only in kernel at the moment. Here is my patch: https://github.com/dvyukov/linux/commit/f86eda0c895c47ea02ee37e981aeade7b03014d7 I

Re: [hsa] Make copy_gimple_seq_and_replace_locals copy seqs in omp clauses

2015-12-03 Thread Jakub Jelinek
On Thu, Dec 03, 2015 at 07:26:20PM +0100, Martin Jambor wrote: > this is a fix to the last "last" ICE of the hsa branch. THe problem > turned out not to be in the gridification itself but, depending your > point of view, in the gimple and tree walking infrastructure or in > function copy_gimple_se

Re: Add fuzzing coverage support

2015-12-03 Thread Dmitry Vyukov
On Thu, Dec 3, 2015 at 7:34 PM, Dmitry Vyukov wrote: > I've attached updated patch (also reuploaded > https://codereview.appspot.com/280140043). > Fixed ChangeLog. > Added invoke.texi. > Fixed style issues. > > The function is defined only in kernel at the moment. Here is my patch: > https://githu

Re: [PATCH] Fix shrink-wrap bug with anticipating into loops (PR67778, PR68634)

2015-12-03 Thread Segher Boessenkool
On Thu, Dec 03, 2015 at 12:35:51PM +0100, Bernd Schmidt wrote: > On 12/02/2015 07:21 PM, Segher Boessenkool wrote: > >After shrink-wrapping has found the "tightest fit" for where to place > >the prologue, it tries move it earlier (so that frame saves are run > >earlier) -- but without copying any m

Re: [Fortran, Patch] (RFC, Coarray) Implement TS18508's EVENTS

2015-12-03 Thread Alessandro Fanfarillo
Yes please. Thanks. 2015-12-02 23:00 GMT+01:00 Steve Kargl : > Committed as revision 231208. > > Alessandro, Tobias, is this a candidate for a commit to > the 5-branch when it is re-opened? > > -- > steve > > On Wed, Dec 02, 2015 at 03:16:05PM +0100, Alessandro Fanfarillo wrote: >> *PING* >> >> 2

[PATCH] Fix missing range information for "%q+D" format code

2015-12-03 Thread David Malcolm
There are about 220 or so diagnostics in trunk that use "%q+D" in their format string, which, as well as printing a quoted decl, overwrites any location_t supplied to the diagnostic, instead using the location of the associated decl. During development of the location range patch kit I adjusted th

Re: [PATCH] Fix shrink-wrap bug with anticipating into loops (PR67778, PR68634)

2015-12-03 Thread Segher Boessenkool
On Thu, Dec 03, 2015 at 12:31:53PM +0100, Bernd Schmidt wrote: > On 12/02/2015 07:21 PM, Segher Boessenkool wrote: > >After shrink-wrapping has found the "tightest fit" for where to place > >the prologue, it tries move it earlier (so that frame saves are run > >earlier) -- but without copying any m

Re: [PATCH][PR tree-optimization/67816] Fix jump threading when DOM removes conditionals in jump threading path

2015-12-03 Thread Jeff Law
On 12/02/2015 08:35 AM, Richard Biener wrote: The most interesting side effect, and one I haven't fully analyzed yet is an unexpected jump thread -- which I've traced back to differences in what the alias oracle is able to find when we walk unaliased vuses. Which makes totally no sense that it'

Re: [PATCH 02/10] Fix g++.dg/cpp0x/nsdmi-template14.C

2015-12-03 Thread Jason Merrill
On 12/03/2015 09:55 AM, David Malcolm wrote: This patch adds bulletproofing to detect purged tokens, and avoid using them. Alternatively, is it OK to access purged tokens for this kind of thing? If so, would it make more sense to instead leave their locations untouched when purging them? I thi

Re: [PATCH 07/10] Fix g++.dg/template/ref3.C

2015-12-03 Thread Jason Merrill
On 12/03/2015 09:55 AM, David Malcolm wrote: Testcase g++.dg/template/ref3.C: 1 // PR c++/28341 2 3 template struct A {}; 4 5 template struct B 6 { 7 A<(T)0> b; // { dg-error "constant|not a valid" } 8 A a; // { dg-error "constant|not a valid"

Re: [PATCH] Handle OBJ_TYPE_REF in FRE

2015-12-03 Thread Richard Biener
On December 3, 2015 6:40:07 PM GMT+01:00, Jan Hubicka wrote: >> >> The following patch handles CSEing OBJ_TYPE_REF which was omitted >> because it is a GENERIC expression even on GIMPLE (for whatever > >Why it is generic? It is part of gimple grammar :) > >> reason...). Rather than changing this

Re: [PATCH 4/4][AArch64] Add cost model for Exynos M1

2015-12-03 Thread Evandro Menezes
On 11/05/2015 06:09 PM, Evandro Menezes wrote: 2015-10-25 Evandro Menezes gcc/ * config/aarch64/aarch64-cores.def: Use the Exynos M1 cost model. * config/aarch64/aarch64.c (exynosm1_addrcost_table): New variable. (exynosm1_regmove_cost): Likewise. (exynosm1_ve

[PATCH] Improve constant vec_perm expansion on i?86 (PR target/68655)

2015-12-03 Thread Jakub Jelinek
Hi! As discussed in the PR, for some permutation we can get better code if we try to expand it as if it was a permutation in a mode with the same vector size, but wider vector element. The first attempt to do this always had mixed results, lots of improvements, lots of pessimizations, this one at

Re: [PATCH 3b/4][AArch64] Add scheduling model for Exynos M1

2015-12-03 Thread Evandro Menezes
On 11/20/2015 11:17 AM, James Greenhalgh wrote: On Tue, Nov 10, 2015 at 11:54:00AM -0600, Evandro Menezes wrote: 2015-11-10 Evandro Menezes gcc/ * config/aarch64/aarch64-cores.def: Use the Exynos M1 sched model. * config/aarch64/aarch64.md: Include "exynos-m1.md".

[PATCH] Fix reassoc range test vs. value ranges (PR tree-optimization/68671)

2015-12-03 Thread Jakub Jelinek
Hi! As mentioned in the PR, maybe_optimize_range_tests considers basic blocks with not just the final GIMPLE_COND (or for last_bb store feeding into PHI), but also assign stmts that don't trap, don't have side-effects and where the SSA_NAMEs they set are used only in their own bb. Now, if we decid

Re: [PATCH][AArch64] Replace insn to zero up DF register

2015-12-03 Thread Evandro Menezes
On 11/09/2015 04:59 PM, Evandro Menezes wrote: Hi, Marcus. Have you an update from the architecture folks about this? Thank you, Marcus? -- Evandro Menezes

  1   2   >