Re: Handle CONSTRUCTOR in operand_equal_p

2015-10-22 Thread Richard Biener
On Wed, 21 Oct 2015, Jan Hubicka wrote: > Hi, > this is updated patch I am going to commit. As discussed, we also need to > match > non-empty CONSTRUCTOR of vectors, but those should never be having CONSTANT > flags > set, so they need care in the other path trhough operand_equal_p, so I will

Re: Add non-constant vector ctors to operand_equal_p

2015-10-22 Thread Richard Biener
On Thu, 22 Oct 2015, Jan Hubicka wrote: > Hi, > this patch adds matching of non-constant CONSTRUCTOR expressions into > operand_equal_p. As discussed with Richard, those can happen when we are > building vectors out of components. I also added a testcase that triggers > this > path and gets fold

Re: [PATCH v2 10/13] Avoid CSE of MEMs in different address spaces

2015-10-22 Thread Richard Biener
On Wed, Oct 21, 2015 at 7:12 PM, Richard Henderson wrote: > On 10/21/2015 03:37 AM, Jeff Law wrote: >> >> On 10/20/2015 03:27 PM, Richard Henderson wrote: >>> >>> --- >>> gcc/cselib.c | 22 >>> +- >>> gcc/fold-const.c

Re: [OpenACC 1/11] UNIQUE internal function

2015-10-22 Thread Richard Biener
On Wed, Oct 21, 2015 at 9:00 PM, Nathan Sidwell wrote: > This patch implements a new internal function that has a 'uniqueness' > property. Jump-threading cannot clone it and tail-merging cannot combine > multiple instances. > > The uniqueness is implemented by a new gimple fn, > gimple_call_inte

Re: [OpenACC 1/11] UNIQUE internal function

2015-10-22 Thread Richard Biener
On Thu, Oct 22, 2015 at 9:48 AM, Richard Biener wrote: > On Wed, Oct 21, 2015 at 9:00 PM, Nathan Sidwell wrote: >> This patch implements a new internal function that has a 'uniqueness' >> property. Jump-threading cannot clone it and tail-merging cannot combine >> multiple instances. >> >> The u

Re: [PATCH 1/9] ENABLE_CHECKING refactoring

2015-10-22 Thread Richard Biener
On Wed, Oct 21, 2015 at 6:27 PM, Jakub Jelinek wrote: > On Wed, Oct 21, 2015 at 06:22:37PM +0200, Bernd Schmidt wrote: >> On 10/21/2015 06:18 PM, Jeff Law wrote: >> >To avoid conditionally compiled code. I'm of the opinion we should be >> >stomping out as much as we reasonably can. >> >> Yeah, I

Re: [PATCH v2 08/13] Add TARGET_ADDR_SPACE_ZERO_ADDRESS_VALID

2015-10-22 Thread Richard Biener
On Thu, Oct 22, 2015 at 5:12 AM, Sandra Loosemore wrote: > On 10/20/2015 03:27 PM, Richard Henderson wrote: >> >> >> +@deftypefn {Target Hook} bool TARGET_ADDR_SPACE_ZERO_ADDRESS_VALID >> (addr_space_t @var{as}) >> +Define this to modify the default handling of address 0 for the >> +address space.

Re: [OpenACC 1/11] UNIQUE internal function

2015-10-22 Thread Jakub Jelinek
On Thu, Oct 22, 2015 at 09:49:29AM +0200, Richard Biener wrote: > >> Jakub, IYR I originally had IFN_FORK and IFN_JOIN as such distinct internal > >> fns. This replaces that scheme. > >> > >> ok? > > > > Hmm, I'd just have used gimple_has_volatile_ops on the call? That > > should have the > > des

Re: [OpenACC 1/11] UNIQUE internal function

2015-10-22 Thread Jakub Jelinek
On Wed, Oct 21, 2015 at 03:00:47PM -0400, Nathan Sidwell wrote: > To distinguish different uses of the UNIQUE function, I use the first > argument, which is expected to be an INTEGER_CST. I figured this better > than using multiple new internal fns, all with the unique property, as the > latter wo

Re: [OpenACC 1/11] UNIQUE internal function

2015-10-22 Thread Richard Biener
On Thu, Oct 22, 2015 at 9:59 AM, Jakub Jelinek wrote: > On Thu, Oct 22, 2015 at 09:49:29AM +0200, Richard Biener wrote: >> >> Jakub, IYR I originally had IFN_FORK and IFN_JOIN as such distinct >> >> internal >> >> fns. This replaces that scheme. >> >> >> >> ok? >> > >> > Hmm, I'd just have used

Re: [OpenACC 1/11] UNIQUE internal function

2015-10-22 Thread Richard Biener
On Thu, Oct 22, 2015 at 10:04 AM, Jakub Jelinek wrote: > On Wed, Oct 21, 2015 at 03:00:47PM -0400, Nathan Sidwell wrote: >> To distinguish different uses of the UNIQUE function, I use the first >> argument, which is expected to be an INTEGER_CST. I figured this better >> than using multiple new i

Re: [OpenACC 2/11] PTX backend changes

2015-10-22 Thread Jakub Jelinek
On Wed, Oct 21, 2015 at 03:09:55PM -0400, Nathan Sidwell wrote: > Bernd, any comments? Just a few questions, otherwise it is a PTX territory you PTX maintainers should review. > (*oacc_ntid_insn, oacc_ntid, *oacc_tid_insn, oacc_tid): Delete. Extra space. > +/* Size of buffer needed to br

Re: [OpenACC 3/11] new target hook

2015-10-22 Thread Jakub Jelinek
On Wed, Oct 21, 2015 at 03:13:26PM -0400, Nathan Sidwell wrote: > 2015-10-20 Nathan Sidwell > > * target.def (fork_join): New GOACC hook. > * targhooks.h (default_goacc_fork_join): Declare. > * omp-low.c (default_goacc_forkjoin): New. > * doc/tm.texi.in (TARGET_GOACC_FOR

Re: [OpenACC 4/11] C FE changes

2015-10-22 Thread Jakub Jelinek
On Wed, Oct 21, 2015 at 03:16:20PM -0400, Nathan Sidwell wrote: > 2015-10-20 Cesar Philippidis > Thomas Schwinge > James Norris > Joseph Myers > Julian Brown > > * c-parser.c (c_parser_oacc_shape_clause): New. > (c_parser_oacc_simple_c

[Committed] S/390: PR68015 Fix ICE in s390_emit_compare

2015-10-22 Thread Andreas Krebbel
Committed to head and GCC 5 branch gcc/ChangeLog: 2015-10-22 Andreas Krebbel PR target/68015 * config/s390/s390.md (movcc): Emit compare only if we don't already have a comparison result. gcc/testsuite/ChangeLog: 2015-10-22 Andreas Krebbel PR target/68015

[PATCH] Move MINUS of pointer-plus expr foldings to match.pd

2015-10-22 Thread Richard Biener
Bootstrapped and tested on x86_64-unknown-linux-gnu, the OMP changes were approved by Jakub on IRC. Richard. 2015-10-22 Richard Biener * fold-const.c (fold_addr_of_array_ref_difference): Properly convert operands before folding a MINUS_EXPR. (fold_binary_loc): Move si

Re: Add VIEW_CONVERT_EXPR to operand_equal_p

2015-10-22 Thread Andreas Schwab
+ /* Changes in machine mode are never useless conversions unless. */ Unless what? Andreas. -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."

Re: [OpenACC 5/11] C++ FE changes

2015-10-22 Thread Jakub Jelinek
On Wed, Oct 21, 2015 at 03:18:55PM -0400, Nathan Sidwell wrote: > This patch is the C++ changes matching the C ones of patch 4. In > finish_omp_clauses, the gang, worker, & vector clauses are handled the same > as OpenMP's 'num_threads' clause. One change to num_threads is the > augmentation of a

Re: [OpenACC 6/11] Reduction initialization

2015-10-22 Thread Jakub Jelinek
On Wed, Oct 21, 2015 at 03:24:13PM -0400, Nathan Sidwell wrote: > 2015-10-20 Nathan Sidwell > > * omp-low.c (oacc_init_rediction_array): New. > (oacc_initialize_reduction_data): Initialize array. Ok. Jakub

OpenACC constructs nesting checks (was: [gomp4,committed] Handle oacc region in oacc routine)

2015-10-22 Thread Thomas Schwinge
Hi Tom! On Fri, 16 Oct 2015 11:17:25 +0200, Tom de Vries wrote: > this patch checks for occurance of oacc offload regions in oacc routines > (which means nested parallelism, which is currently not supported) and > gives an appropriate error message. > --- /dev/null > +++ b/gcc/testsuite/c-c++-

Re: [OpenACC 7/11] execution model

2015-10-22 Thread Jakub Jelinek
On Wed, Oct 21, 2015 at 03:42:26PM -0400, Nathan Sidwell wrote: > +/* Flags for an OpenACC loop. */ > + > +enum oacc_loop_flags > + { Weird formatting. I see either enum foobarbaz { e1 = ..., e2 = ... }; or enum foobarbaz { e1 = ..., e2 = ... }; styles being used heavily, but not this

Re: [OpenACC 8/11] device-specific lowering

2015-10-22 Thread Jakub Jelinek
On Wed, Oct 21, 2015 at 03:49:08PM -0400, Nathan Sidwell wrote: > This patch is the device-specific half of the previous patch. It processes > the partition head & tail markers and loop abstraction functions inserted > during omp lowering. > > In the oacc_device_lower pass we scan the CFG reconst

Re: [OpenACC 9/11] oacc_device_lower pass gate

2015-10-22 Thread Jakub Jelinek
On Wed, Oct 21, 2015 at 03:50:31PM -0400, Nathan Sidwell wrote: > > This patch is obvious, but included for completeness. We always want to run > the device lowering pass (when openacc is enabled), in order to delete the > marker and loop functions that should never be seen after this point. > >

Re: [OpenACC 10/11] remove plugin restriction

2015-10-22 Thread Jakub Jelinek
On Wed, Oct 21, 2015 at 03:51:42PM -0400, Nathan Sidwell wrote: > Here's another obvious patch. The ptx plugin no longer needs to barf on > gang or worker dimensions of non-unity. > > nathan > > > 2015-10-20 Nathan Sidwell > > * plugin/plugin-nvptx.c (nvptx_exec): Remove check on com

Re: [OpenACC 11/11] execution tests

2015-10-22 Thread Jakub Jelinek
On Wed, Oct 21, 2015 at 03:53:17PM -0400, Nathan Sidwell wrote: > This patch has some new execution tests, verifying loop partitioning is > behaving as expected. > > There are more execution tests on the gomp4 branch, but many of them use > reductions. We'll merge those once reductions are merged

Re: [gomp4 00/14] NVPTX: further porting

2015-10-22 Thread Jakub Jelinek
On Wed, Oct 21, 2015 at 06:18:25PM +0300, Alexander Monakov wrote: > On Wed, 21 Oct 2015, Bernd Schmidt wrote: > > > On 10/20/2015 08:34 PM, Alexander Monakov wrote: > > > This patch series ports enough of libgomp.c to get warp-level parallelism > > > working for OpenMP offloading. The overall ap

Re: [OpenACC 2/11] PTX backend changes

2015-10-22 Thread Bernd Schmidt
On 10/22/2015 10:12 AM, Jakub Jelinek wrote: @@ -2129,6 +3242,19 @@ nvptx_file_end (void) FOR_EACH_HASH_TABLE_ELEMENT (*needed_fndecls_htab, decl, tree, iter) nvptx_record_fndecl (decl, true); fputs (func_decls.str().c_str(), asm_out_file); + + if (worker_bcast_hwm) +{ +

Re: [PATCH] Fix PR67443

2015-10-22 Thread Dominik Vogt
> Eventually we'll get another testcase so I'll leave this for > comments a while and will commit somewhen later this week. In case you're referring to my attempt to port the test case to x86: All the efforts to reproduce the bug on x86 have failed so far. It seems that Gcc is much better in han

Re: [PATCH] 2015-10-19 Benedikt Huber Philipp Tomsich

2015-10-22 Thread Benedikt Huber
https://gcc.gnu.org/contribute.html states "If you do not have write access and a patch of yours has been approved, but not committed, please advise the approver of that fact. You may want to point out lack of write access in your initial submission, too.” Should I apply for svn write access? A

Re: [Boolean Vector, patch 1/5] Introduce boolean vector to be used as a vector comparison type

2015-10-22 Thread Andreas Schwab
FAIL: gcc.c-torture/compile/pr54713-1.c -O0 (internal compiler error) $ gcc/xgcc -Bgcc/ -w -c ../gcc/testsuite/gcc.c-torture/compile/pr54713-1.c ../gcc/testsuite/gcc.c-torture/compile/pr54713-1.c: In function ‘f4’: ../gcc/testsuite/gcc.c-torture/compile/pr54713-1.c:31:1: error: position plus s

Re: [PATCH 1 of 2] print help for undocumented options

2015-10-22 Thread Eric Botcazou
Martin, some subdirectories have their own ChangeLog file so you need to move... > 2015-10-21 Martin Sebor > > PR driver/68043 > * opts.c (undocumented_msg, use_diagnosed_msg): New globals. > (print_filtered_help): Reference aliased option's name and encourage >

Re: [Boolean Vector, patch 1/5] Introduce boolean vector to be used as a vector comparison type

2015-10-22 Thread Ilya Enkovich
2015-10-22 13:13 GMT+03:00 Andreas Schwab : > FAIL: gcc.c-torture/compile/pr54713-1.c -O0 (internal compiler error) Can't reproduce it on i386. What's config used? Ilya

Re: [vec-cmp, patch 1/6] Add optabs for vector comparison

2015-10-22 Thread Ilya Enkovich
2015-10-21 20:25 GMT+03:00 Jeff Law : > On 10/08/2015 08:52 AM, Ilya Enkovich wrote: >> >> Hi, >> >> This series introduces autogeneration of vector comparison and its support >> on i386 target. It lets comparison statements to be vectorized into vector >> comparison instead of VEC_COND_EXPR. Thi

Re: [Boolean Vector, patch 1/5] Introduce boolean vector to be used as a vector comparison type

2015-10-22 Thread Andreas Schwab
Ilya Enkovich writes: > 2015-10-22 13:13 GMT+03:00 Andreas Schwab : >> FAIL: gcc.c-torture/compile/pr54713-1.c -O0 (internal compiler error) > > Can't reproduce it on i386. What's config used? http://gcc.gnu.org/ml/gcc-testresults/2015-10/msg02350.html http://gcc.gnu.org/ml/gcc-testresults/20

Re: [0/7] Type promotion pass and elimination of zext/sext

2015-10-22 Thread Kugan
On 21/10/15 23:45, Richard Biener wrote: > On Tue, Oct 20, 2015 at 10:03 PM, Kugan > wrote: >> >> >> On 07/09/15 12:53, Kugan wrote: >>> >>> This a new version of the patch posted in >>> https://gcc.gnu.org/ml/gcc-patches/2015-08/msg00226.html. I have done >>> more testing and spitted the patch

Move fold_trunc_transparent_mathfn to match.pd

2015-10-22 Thread Richard Sandiford
This moves the fold rules for trunc, floor, ceil, round, nearbyint and rint in one go, since they're tested as a group. Most of the code is supporting the f(x)->x fold when x is known to be integer-valued. Like with the non-negative test, this is probably more elegantly handled by tracking range i

Re: [PATCH] Pass manager: add support for termination of pass list

2015-10-22 Thread Martin Liška
On 10/21/2015 04:06 PM, Richard Biener wrote: > On Wed, Oct 21, 2015 at 1:24 PM, Martin Liška wrote: >> On 10/21/2015 11:59 AM, Richard Biener wrote: >>> On Wed, Oct 21, 2015 at 11:19 AM, Martin Liška wrote: On 10/20/2015 03:39 PM, Richard Biener wrote: > On Tue, Oct 20, 2015 at 3:00 PM,

Re: [OpenACC 1/11] UNIQUE internal function

2015-10-22 Thread Julian Brown
On Thu, 22 Oct 2015 10:05:30 +0200 Richard Biener wrote: > On Thu, Oct 22, 2015 at 9:59 AM, Jakub Jelinek > wrote: > > On Thu, Oct 22, 2015 at 09:49:29AM +0200, Richard Biener wrote: > >> >> Jakub, IYR I originally had IFN_FORK and IFN_JOIN as such > >> >> distinct internal fns. This replaces

[PATCH] Fix PR68046 (part of PR61893)

2015-10-22 Thread Richard Biener
This splits out the non-constant folding part of an earlier approved patch to make -ftrapv work better. The constant folding case is still broken (also ubsan doesn't handle it correctly). Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk. Richard. 2015-10-22 Richard Biene

Re: [PATCH, VECTOR ABI] Add __attribute__((__simd__)) to GCC.

2015-10-22 Thread Kirill Yukhin
Hello, On 15 Oct 17:47, Kirill Yukhin wrote: > Hi Jakub, > On 15 Oct 16:39, Jakub Jelinek wrote: > > On Thu, Oct 15, 2015 at 05:33:32PM +0300, Kirill Yukhin wrote: > > > --- a/gcc/doc/extend.texi > > > +++ b/gcc/doc/extend.texi > > > @@ -3066,6 +3066,20 @@ This function attribute make a stack prote

Re: Move fold_trunc_transparent_mathfn to match.pd

2015-10-22 Thread Richard Biener
On Thu, Oct 22, 2015 at 1:00 PM, Richard Sandiford wrote: > This moves the fold rules for trunc, floor, ceil, round, nearbyint and > rint in one go, since they're tested as a group. Most of the code is > supporting the f(x)->x fold when x is known to be integer-valued. > Like with the non-negativ

Re: Don't dump low gimple functions in gimple dump

2015-10-22 Thread Jakub Jelinek
On Thu, Jun 04, 2015 at 05:02:42PM +0200, Tom de Vries wrote: > >So why does add_new_function not do the dumping and to the correct > >place? That is, > >you are dumping things twice here, once in omp expansion and then again when > >the > >new function reaches omp expansion? > > > > Dumping twi

Re: [0/7] Type promotion pass and elimination of zext/sext

2015-10-22 Thread Richard Biener
On Wed, Oct 21, 2015 at 7:55 PM, Richard Henderson wrote: > On 10/21/2015 03:56 AM, Richard Biener wrote: >> >> On Wed, Oct 21, 2015 at 2:45 PM, Richard Biener >> wrote: >>> >>> On Tue, Oct 20, 2015 at 10:03 PM, Kugan >>> wrote: On 07/09/15 12:53, Kugan wrote: > > >>>

Re: [PATCH, VECTOR ABI] Add __attribute__((__simd__)) to GCC.

2015-10-22 Thread Joseph Myers
On Thu, 22 Oct 2015, Kirill Yukhin wrote: > Ping? You need to update this patch to take account of Marek's fix for bug 67964 (it was because I was suspicious of the "continue;" in this patch accepting invalid syntax that I found that bug), retest and resubmit. -- Joseph S. Myers jos...@codeso

Re: [OpenACC 7/11] execution model

2015-10-22 Thread Nathan Sidwell
On 10/22/15 05:23, Jakub Jelinek wrote: On Wed, Oct 21, 2015 at 03:42:26PM -0400, Nathan Sidwell wrote: +/* Flags for an OpenACC loop. */ + +enum oacc_loop_flags + { Weird formatting. I see either Blame emacs (I thought it was configured for GNU formatting ...) + expr = build2 (

Re: Don't dump low gimple functions in gimple dump

2015-10-22 Thread Tom de Vries
On 22/10/15 14:27, Jakub Jelinek wrote: The state before the patch is: 1) the omp_fn children created during the pre-SSA ompexp pass are dumped first in the *.ssa dump and in all the following ones (these are created as low gimple, non-SSA) Hi, I do see those child fns before the ssa d

Re: [OpenACC 8/11] device-specific lowering

2015-10-22 Thread Nathan Sidwell
On 10/22/15 05:31, Jakub Jelinek wrote: On Wed, Oct 21, 2015 at 03:49:08PM -0400, Nathan Sidwell wrote: So, how do you expand the OACC loops on non-PTX devices (host, or say XeonPhi)? Do you drop the IFNs and replace stuff with normal loops? On a non ptx target (canonical example being the

Re: [OpenACC 7/11] execution model

2015-10-22 Thread Jakub Jelinek
On Thu, Oct 22, 2015 at 08:50:23AM -0400, Nathan Sidwell wrote: > >>+ expr = build2 (TRUNC_MOD_EXPR, ivar_type, ivar, > >>+fold_convert (ivar_type, collapse->iters)); > >>+ expr = build2 (MULT_EXPR, diff_type, fold_convert (diff_type, expr), > >>+collapse->

Re: [OpenACC 1/11] UNIQUE internal function

2015-10-22 Thread Nathan Sidwell
On 10/22/15 04:07, Richard Biener wrote: On Thu, Oct 22, 2015 at 10:04 AM, Jakub Jelinek wrote: Do you have to scan the whole bb? E.g. don't or should not those unique IFNs force end of bb? Yeah, please make them either end or start a BB so we have to check at most a single stmt. ECF_RETU

Re: [OpenACC 2/11] PTX backend changes

2015-10-22 Thread Nathan Sidwell
On 10/22/15 05:55, Bernd Schmidt wrote: On 10/22/2015 10:12 AM, Jakub Jelinek wrote: So, is the worker broadcast buffer effectively a file scope .shared variable? My worry is that as .shared is quite limited resource, if you compile many TUs and each allocates its own broadcast buffer you run

Re: [OpenACC 7/11] execution model

2015-10-22 Thread Nathan Sidwell
On 10/22/15 08:59, Jakub Jelinek wrote: On Thu, Oct 22, 2015 at 08:50:23AM -0400, Nathan Sidwell wrote: + expr = build2 (TRUNC_MOD_EXPR, ivar_type, ivar, +fold_convert (ivar_type, collapse->iters)); + expr = build2 (MULT_EXPR, diff_type, fold_convert (diff_type, exp

Re: [OpenACC 1/11] UNIQUE internal function

2015-10-22 Thread Nathan Sidwell
On 10/22/15 07:10, Julian Brown wrote: On Thu, 22 Oct 2015 10:05:30 +0200 Richard Biener wrote: So you'd need to be more precise as to what properties you are trying to preserve by placing a single stmt somewhere. FWIW an earlier, abandoned attempt at solving the same problem was discussed

Re: Don't dump low gimple functions in gimple dump

2015-10-22 Thread Jakub Jelinek
On Thu, Oct 22, 2015 at 02:51:34PM +0200, Tom de Vries wrote: > On 22/10/15 14:27, Jakub Jelinek wrote: > >The state before the patch is: > >1) the omp_fn children created during the pre-SSA ompexp pass are dumped > >first in the *.ssa dump and in all the following ones (these are created > >

Re: [OpenACC 3/11] new target hook

2015-10-22 Thread Nathan Sidwell
On 10/22/15 04:15, Jakub Jelinek wrote: On Wed, Oct 21, 2015 at 03:13:26PM -0400, Nathan Sidwell wrote: +/* Determine whether fork & joins are needed. */ + +static bool +nvptx_xform_fork_join (gcall *call, const int dims[], + bool ARG_UNUSED (is_fork)) Why is this not c

Re: [OpenACC 1/11] UNIQUE internal function

2015-10-22 Thread Jakub Jelinek
On Thu, Oct 22, 2015 at 09:08:30AM -0400, Nathan Sidwell wrote: > On 10/22/15 07:10, Julian Brown wrote: > >On Thu, 22 Oct 2015 10:05:30 +0200 > >Richard Biener wrote: > > >>So you'd need to be more precise as to what properties you are trying > >>to preserve by placing a single stmt somewhere. >

Re: [OpenACC 2/11] PTX backend changes

2015-10-22 Thread Nathan Sidwell
On 10/22/15 09:01, Nathan Sidwell wrote: On 10/22/15 05:55, Bernd Schmidt wrote: On 10/22/2015 10:12 AM, Jakub Jelinek wrote: So, is the worker broadcast buffer effectively a file scope .shared variable? My worry is that as .shared is quite limited resource, if you compile many TUs and each

[PATCH] [AArch64] support -mfentry feature for arm64

2015-10-22 Thread Li Bin
From: Jiangjiji * gcc/config/aarch64/aarch64.opt: Add a new option. * gcc/config/aarch64/aarch64.c: Add some new functions and Macros. * gcc/config/aarch64/aarch64.h: Modify PROFILE_HOOK and FUNCTION_PROFILER. Signed-off-by: Jiangjiji Signed-off-by: Li Bin --- gcc/config/aarch64/aarch64.c |

Re: [OpenACC 1/11] UNIQUE internal function

2015-10-22 Thread Nathan Sidwell
On 10/22/15 09:17, Jakub Jelinek wrote: On Thu, Oct 22, 2015 at 09:08:30AM -0400, Nathan Sidwell wrote: I agree with Richard that it would be better to write more about what kind of IL changes are acceptable with IFN_UNIQUE in the IL and what are not. E.g. is inlining ok (I'd hope yes)? Is fu

[PATCH] Use strided stores when interleaving fails

2015-10-22 Thread Richard Biener
This makes the vectorizer use strided accesses when single-element interleaving fails. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk. Richard. 2015-10-22 Richard Biener PR tree-optimization/19049 PR tree-optimization/65962 * tree-vect-data-ref

[PATCH] Mitigate PR58497

2015-10-22 Thread Richard Biener
I've had a patch in my dev tree for quite a while that lowers uniform vector stmts to scalar stmts. This also mitigates PR58497 so I decided to push it out now. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2015-10-22 Richard Biener PR tree-optimization/584

Re: [PATCH] [AArch64] support -mfentry feature for arm64

2015-10-22 Thread Marcus Shawcroft
On 22 October 2015 at 14:21, Li Bin wrote: > From: Jiangjiji > > * gcc/config/aarch64/aarch64.opt: Add a new option. > * gcc/config/aarch64/aarch64.c: Add some new functions and Macros. > * gcc/config/aarch64/aarch64.h: Modify PROFILE_HOOK and FUNCTION_PROFILER. > > Signed-off-by: Jiangjiji > Si

Re: [OpenACC 11/11] execution tests

2015-10-22 Thread Nathan Sidwell
On 10/22/15 05:37, Jakub Jelinek wrote: And, I must say I'm at least missing testcases that check parsing but also runtime behavior of the vector or worker clause arguments (there is one gang (static:1) clause, but not the other clauses nor other styles of gang arguments. the static clause is

Re: [OpenACC 1/11] UNIQUE internal function

2015-10-22 Thread Nathan Sidwell
On 10/22/15 04:07, Richard Biener wrote: Yeah, please make them either end or start a BB so we have to check at most a single stmt. ECF_RETURNS_TWICE should achieve that, it also makes it a code motion barrier. Just so I'm clear, you're not saying that RETURNS_TWICE will stop the call being

Re: [OpenACC 2/11] PTX backend changes

2015-10-22 Thread Bernd Schmidt
On 10/21/2015 09:09 PM, Nathan Sidwell wrote: At the beginning of a partitioned region, we have to propagate live register state and stack frame from engine-zero to the other engines (just as would happen on a regular 'fork' call). This is something I'm not terribly happy about, but since I ha

Re: [OpenACC 11/11] execution tests

2015-10-22 Thread Jakub Jelinek
On Thu, Oct 22, 2015 at 09:53:46AM -0400, Nathan Sidwell wrote: > On 10/22/15 05:37, Jakub Jelinek wrote: > > >And, I must say I'm at least missing testcases that check parsing but also > >runtime behavior of the vector or worker clause arguments (there > >is one gang (static:1) clause, but not th

RFA/RFC: insns that do not start a source line

2015-10-22 Thread Nick Clifton
Hi Guys, Sometimes gcc can generate instructions out of order with respect to lines of source code, and this can lead to problems for debuggers. For example, consider this source code snippet: v = 0; /* Line 31 */ goto b;/* Line 32 */ a: v++;

Re: Constify host-side offload data`

2015-10-22 Thread Ilya Verbin
On Wed, Oct 21, 2015 at 10:44:56 -0700, H.J. Lu wrote: > On Wed, Oct 21, 2015 at 10:42 AM, Ilya Verbin wrote: > > On Wed, Oct 21, 2015 at 10:38:10 -0700, H.J. Lu wrote: > >> On Wed, Oct 21, 2015 at 10:33 AM, Ilya Verbin wrote: > >> > H.J., > >> > Maybe linker should print some warning about joini

Re: RFA/RFC: insns that do not start a source line

2015-10-22 Thread Bernd Schmidt
Hi Nick, On 10/22/2015 04:07 PM, Nick Clifton wrote: Sometimes gcc can generate instructions out of order with respect to lines of source code, and this can lead to problems for debuggers. For example, consider this source code snippet: v = 0; /* Line 31 */

Re: [PATCH] vectorizing conditional expressions (PR tree-optimization/65947)

2015-10-22 Thread Alan Lawrence
Just one very small point... On 19/10/15 09:17, Alan Hayward wrote: > - if (check_reduction > - && (!commutative_tree_code (code) || !associative_tree_code (code))) > + if (check_reduction) > { > - if (dump_enabled_p ()) > -report_vect_op (MSG_MISSED_OPTIMIZATION, def_st

Re: [PATCH v2 13/13] Add hook for modifying debug info for address spaces

2015-10-22 Thread Ulrich Weigand
Richard Henderson wrote: > So you would recommend continuing to use address_class for these x86 segments? Yes, I think so. As far as I can see, this would simply require to define two address_class values to correspond to __seg_fs and __seg_gs. (These choices should best be documented in the pl

Re: RFA/RFC: insns that do not start a source line

2015-10-22 Thread Nick Clifton
Hi Bernd, Could you point me at the code generating these NOPs It is in cfgrtl.c:fixup_reorder_chain() nb = split_edge (e); if (!INSN_P (BB_END (nb))) BB_END (nb) = emit_insn_after_noloc (gen_nop (), BB_END (nb), nb

Re: [PATCH] vectorizing conditional expressions (PR tree-optimization/65947)

2015-10-22 Thread Alan Hayward
On 22/10/2015 15:15, "Alan Lawrence" wrote: >Just one very small point... > >On 19/10/15 09:17, Alan Hayward wrote: > > > - if (check_reduction > > - && (!commutative_tree_code (code) || !associative_tree_code >(code))) > > + if (check_reduction) > > { > > - if (dump_enabled_p

Re: [OpenACC 11/11] execution tests

2015-10-22 Thread Nathan Sidwell
On 10/22/15 10:05, Jakub Jelinek wrote: On Thu, Oct 22, 2015 at 09:53:46AM -0400, Nathan Sidwell wrote: On 10/22/15 05:37, Jakub Jelinek wrote: And, I must say I'm at least missing testcases that check parsing but also runtime behavior of the vector or worker clause arguments (there is one gan

Re: [0/7] Type promotion pass and elimination of zext/sext

2015-10-22 Thread Richard Biener
On Thu, Oct 22, 2015 at 12:50 PM, Kugan wrote: > > > On 21/10/15 23:45, Richard Biener wrote: >> On Tue, Oct 20, 2015 at 10:03 PM, Kugan >> wrote: >>> >>> >>> On 07/09/15 12:53, Kugan wrote: This a new version of the patch posted in https://gcc.gnu.org/ml/gcc-patches/2015-08/msg002

Re: [OpenACC 2/11] PTX backend changes

2015-10-22 Thread Nathan Sidwell
On 10/22/15 10:04, Bernd Schmidt wrote: + if (par->mask & GOMP_DIM_MASK (GOMP_DIM_MAX)) +{ /* No propagation needed for a call. */ } + else if (par->mask & GOMP_DIM_MASK (GOMP_DIM_WORKER)) Ok that looks weird with the open brace on the line before the else. I think the standard practice

Re: [OpenACC 1/11] UNIQUE internal function

2015-10-22 Thread Richard Biener
On Thu, Oct 22, 2015 at 4:01 PM, Nathan Sidwell wrote: > On 10/22/15 04:07, Richard Biener wrote: > >> Yeah, please make them either end or start a BB so we have to check >> at most a single stmt. ECF_RETURNS_TWICE should achieve that, >> it also makes it a code motion barrier. > > > Just so I'm

Re: [OpenACC 2/11] PTX backend changes

2015-10-22 Thread Bernd Schmidt
On 10/22/2015 04:24 PM, Nathan Sidwell wrote: + else +{ /* Parent will skip this parallel itself. */ } Here too - actually no need to have an empty else at all. I wanted somewhere clear for the comment to go. (Actually, I think this is the one the compiler warns about -- empty dangl

Re: [OpenACC 1/11] UNIQUE internal function

2015-10-22 Thread Richard Biener
On Thu, Oct 22, 2015 at 3:24 PM, Nathan Sidwell wrote: > On 10/22/15 09:17, Jakub Jelinek wrote: >> >> On Thu, Oct 22, 2015 at 09:08:30AM -0400, Nathan Sidwell wrote: > > >> I agree with Richard that it would be better to write more about what kind >> of IL changes are acceptable with IFN_UNIQUE i

Re: [OpenACC 1/11] UNIQUE internal function

2015-10-22 Thread Nathan Sidwell
On 10/22/15 10:26, Richard Biener wrote: On Thu, Oct 22, 2015 at 4:01 PM, Nathan Sidwell wrote: RETURNS_TWICE will make the invariant motion stop at UNIQUE (HEAD), but it would have done that anyway. It will also be a CSE barrier, thus tem = global; UNIQUE(HEAD) tem2 = global; will not CSE

[Patch, fortran] PR58754 - [4.9/5 Regression] ICE on allocating character array with source

2015-10-22 Thread Paul Richard Thomas
Dear All, This patch speaks for itself. It is by no means as comprehensive as the work on ALLOCATE that Andre has done on 6 branch but has the advantage for 5 branch that it is simple and steers the failing code to the standard assignment, which should be safe. Bootstraps and regtests on FC21/x86

Re: [OpenACC 2/11] PTX backend changes

2015-10-22 Thread Jakub Jelinek
On Thu, Oct 22, 2015 at 04:28:17PM +0200, Bernd Schmidt wrote: > On 10/22/2015 04:24 PM, Nathan Sidwell wrote: > >>>+ else > >>>+{ /* Parent will skip this parallel itself. */ } > >> > >>Here too - actually no need to have an empty else at all. > > > >I wanted somewhere clear for the comm

Re: Constify host-side offload data`

2015-10-22 Thread H.J. Lu
On Thu, Oct 22, 2015 at 7:11 AM, Ilya Verbin wrote: > On Wed, Oct 21, 2015 at 10:44:56 -0700, H.J. Lu wrote: >> On Wed, Oct 21, 2015 at 10:42 AM, Ilya Verbin wrote: >> > On Wed, Oct 21, 2015 at 10:38:10 -0700, H.J. Lu wrote: >> >> On Wed, Oct 21, 2015 at 10:33 AM, Ilya Verbin wrote: >> >> > H.J.

Re: [OpenACC 2/11] PTX backend changes

2015-10-22 Thread Nathan Sidwell
On 10/22/15 10:28, Bernd Schmidt wrote: On 10/22/2015 04:24 PM, Nathan Sidwell wrote: + else +{ /* Parent will skip this parallel itself. */ } Here too - actually no need to have an empty else at all. I wanted somewhere clear for the comment to go. (Actually, I think this is the on

Re: [OpenACC 1/11] UNIQUE internal function

2015-10-22 Thread Nathan Sidwell
On 10/22/15 10:30, Richard Biener wrote: On Thu, Oct 22, 2015 at 3:24 PM, Nathan Sidwell wrote: Essentially, yes. a set of IFN_UNIQUE form a group which must not be separated from each other. The set is discovered implicitly by following the CFG (though I suppose we could add an identifyin

Re: [OpenACC 11/11] execution tests

2015-10-22 Thread Cesar Philippidis
On 10/22/2015 07:23 AM, Nathan Sidwell wrote: > On 10/22/15 10:05, Jakub Jelinek wrote: >> On Thu, Oct 22, 2015 at 09:53:46AM -0400, Nathan Sidwell wrote: >>> On 10/22/15 05:37, Jakub Jelinek wrote: >>> And, I must say I'm at least missing testcases that check parsing but also runtim

Re: [OpenACC 2/11] PTX backend changes

2015-10-22 Thread Nathan Sidwell
On 10/22/15 10:32, Jakub Jelinek wrote: There is a warning for if (cond); but not for if (cond) ; or if (cond) /* comment */ ; which is the style used in various places throughout the compiler. Sadly, that's not quite accurate. The warning occurs for all the empty if's you

Re: [OpenACC 11/11] execution tests

2015-10-22 Thread Nathan Sidwell
On 10/22/15 10:47, Cesar Philippidis wrote: Interesting question. The spec is unclear. It defines gang, worker and vector as follows in section 2.7 in the OpenACC 2.0a spec: gang [( gang-arg-list )] worker [( [num:] int-expr )] vector [( [length:] int-expr )] where gang-arg is one of:

Re: [OpenACC 11/11] execution tests

2015-10-22 Thread Jakub Jelinek
On Thu, Oct 22, 2015 at 07:47:01AM -0700, Cesar Philippidis wrote: > > But it is unclear from the parsing what from these is allowed: > > int v, w; > ... > gang(26) // equivalent to gang(num:26) > gang(v) // gang(num:v) > vector(length: 16) // vector(length: 16) > vector(length: v) // vector(

Re: Benchmarks of v2 (was Re: [PATCH 0/5] RFC: Overhaul of diagnostics (v2))

2015-10-22 Thread David Malcolm
On Mon, 2015-10-19 at 16:51 +0200, Michael Matz wrote: > Hi, > > On Fri, 16 Oct 2015, David Malcolm wrote: > > > This fixes much of the bloat seen for influence.i when sending ranges > > through for every token. > > Yeah, I think that's on the right track. Thanks. > > This was with 8 bits al

Re: [OpenACC 11/11] execution tests

2015-10-22 Thread Cesar Philippidis
On 10/22/2015 08:00 AM, Jakub Jelinek wrote: > On Thu, Oct 22, 2015 at 07:47:01AM -0700, Cesar Philippidis wrote: >>> But it is unclear from the parsing what from these is allowed: >> >> int v, w; >> ... >> gang(26) // equivalent to gang(num:26) >> gang(v) // gang(num:v) >> vector(length: 16) /

Re: [PATCH, MIPS, PR/61114] Migrate to reduc_..._scal optabs.

2015-10-22 Thread Alan Lawrence
On closer inspection I think you can also remove this guy (from loongson.md): (define_insn "reduc_uplus_v8qi" [(set (match_operand:V8QI 0 "register_operand" "=f") (unspec:V8QI [(match_operand:V8QI 1 "register_operand" "f")] UNSPEC_LOONGSON_BIADD))] "TARGET_HARD_FL

Re: Constify host-side offload data`

2015-10-22 Thread Ilya Verbin
On Thu, Oct 22, 2015 at 07:35:55 -0700, H.J. Lu wrote: > On Thu, Oct 22, 2015 at 7:11 AM, Ilya Verbin wrote: > > On Wed, Oct 21, 2015 at 10:44:56 -0700, H.J. Lu wrote: > >> On Wed, Oct 21, 2015 at 10:42 AM, Ilya Verbin wrote: > >> > On Wed, Oct 21, 2015 at 10:38:10 -0700, H.J. Lu wrote: > >> >> O

Re: RFA/RFC: insns that do not start a source line

2015-10-22 Thread Bernd Schmidt
On 10/22/2015 04:19 PM, Nick Clifton wrote: It is in cfgrtl.c:fixup_reorder_chain() nb = split_edge (e); if (!INSN_P (BB_END (nb))) BB_END (nb) = emit_insn_after_noloc (gen_nop (), BB_END (nb), nb); INSN_LOCATION (BB_END (nb)) = e->goto_lo

Re: RFA/RFC: insns that do not start a source line

2015-10-22 Thread Bernd Schmidt
On 10/22/2015 05:08 PM, Bernd Schmidt wrote: So I'm not entirely sure yet what's supposed to happen here, but I think the problem could well be in the expansion phase. Forgot to mention another possibility that crossed my mind: don't compare locations for equality in fixup_reorder_chain, inst

more accurate omp in fortran

2015-10-22 Thread Cesar Philippidis
Currently, for certain omp and oacc errors the fortran will inaccurately report exactly where in the omp/acc construct the error has occurred. E.g. !$acc parallel copy (i) copy (i) copy (j) 1 Error: Symbol ‘i’ present on multiple clauses at (1) instea

[hsa] Also copy distribute pre-body

2015-10-22 Thread Martin Jambor
Hi, I had to interrupt my porting to OpenMP 4.5 to fix this bug. We were not copying the distribute loop pre-body to before target, thus setting the grid size of quite a few kernels to bogus values. Fixed thusly and committed to the branch. Thanks, Martin 2015-10-22 Martin Jambor

Change behavior of -fsched-verbose option

2015-10-22 Thread Nikolai Bozhenov
Hi! Currently -fsched-verbose option redirects debugging dumps to stderr if there is no dump_file for the current pass. It would be fine if there were the only scheduling pass. But for example for AArch64 there are 3 scheduling passes in the default pipeline: sched1, fusion and sched2. So, when p

Re: [vec-cmp, patch 1/6] Add optabs for vector comparison

2015-10-22 Thread Jeff Law
On 10/22/2015 04:35 AM, Ilya Enkovich wrote: 2015-10-21 20:25 GMT+03:00 Jeff Law : On 10/08/2015 08:52 AM, Ilya Enkovich wrote: Hi, This series introduces autogeneration of vector comparison and its support on i386 target. It lets comparison statements to be vectorized into vector comparison

Re: Change behavior of -fsched-verbose option

2015-10-22 Thread Bernd Schmidt
On 10/22/2015 05:38 PM, Nikolai Bozhenov wrote: Currently -fsched-verbose option redirects debugging dumps to stderr if there is no dump_file for the current pass. It would be fine if there were the only scheduling pass. But for example for AArch64 there are 3 scheduling passes in the default pi

Commit: MSP430: Pass silicon errata options on to the assembler

2015-10-22 Thread Nick Clifton
Hi Guys, I am checking in the patch below to allow gcc to pass the new MSP430 -msilicon-errata and -msilicon-errata-warn option on to the assembler. Cheers Nick gcc/ChangeLog 2015-10-22 Nick Clifton * config/msp430/msp430.opt: Add -msilicon-errata and -msilicon-errata

  1   2   >