Re: [patch] Fix failure of ACATS c45503c at -O2

2015-10-21 Thread Eric Botcazou
> So the only question is whether or not the CEIL_MOD_EXPR and > ROUND_MOD_EXPR bits are right. I'm confident the change to > FLOOR_MOD_EXPR is right. OK. > Do we have any reasonable way to test CEIL_MOD_EXPR & ROUND_MOD_EXPR? Note that the patch makes the function punt on those 2 so it can do

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

2015-10-21 Thread Martin Jambor
Hi, On Tue, Oct 20, 2015 at 09:34:22PM +0300, Alexander Monakov wrote: > Hello, > > This patch series moves libgomp/nvptx porting further along to get initial > bits of parallel execution working, mostly unbreaking the testsuite. Please > have a look! I'm interested in feedback, and would like

[PATCH] Fix PR68026

2015-10-21 Thread Richard Biener
This fixes a missed optimization in CCP bit-propagation where we lost the fact of upper zero bits of unsigned VARYING values (the wide-int conversion made somewhat of a mess of all this). Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk. Richard. 2015-10-21 Richard Biener

[PATCH] Fix PR68031

2015-10-21 Thread Richard Biener
The following fixes the SSA name walking of the tree_nonnegative predicate to stop when the SSA name is registered for update. Otherwise we might end up looking at stale data. This would also have fixed PR67915. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2015-10-21

[PATCH] Enhance SCCVN PHI equality GIMPLE cond compare

2015-10-21 Thread Richard Biener
This enhances comparing of the two controlling GIMPLE conds of two PHI nodes. We can handle swapped and inverted conditions and we should of course valueize the operands. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2015-10-21 Richard Biener * tree-ssa-scc

Re: [gomp4 01/14] nvptx: emit kernels for 'omp target entrypoint' only for OpenACC

2015-10-21 Thread Jakub Jelinek
On Tue, Oct 20, 2015 at 09:34:23PM +0300, Alexander Monakov wrote: > The NVPTX backend emits each functions either as .func (callable only from the > device code) or as .kernel (entry point for a parallel region). OpenMP > lowering adds "omp target entrypoint" attribute to functions outlined from

Re: [gomp4 05/14] omp-low: set 'omp target entrypoint' only on entypoints

2015-10-21 Thread Jakub Jelinek
On Tue, Oct 20, 2015 at 09:34:27PM +0300, Alexander Monakov wrote: > (note to reviewers: I'm not sure what we're after here, on the high level; > will be happy to rework the patch in a saner manner based on feedback, or even > drop it for now) > > At the moment the attribute setting logic in omp-l

Re: [gomp4 01/14] nvptx: emit kernels for 'omp target entrypoint' only for OpenACC

2015-10-21 Thread Alexander Monakov
On Wed, 21 Oct 2015, Jakub Jelinek wrote: > On Tue, Oct 20, 2015 at 09:34:23PM +0300, Alexander Monakov wrote: > > The NVPTX backend emits each functions either as .func (callable only from > > the > > device code) or as .kernel (entry point for a parallel region). OpenMP > > lowering adds "omp

Re: [gomp4 06/14] omp-low: copy omp_data_o to shared memory on NVPTX

2015-10-21 Thread Jakub Jelinek
On Tue, Oct 20, 2015 at 09:34:28PM +0300, Alexander Monakov wrote: > (This patch serves as a straw man proposal to have something concrete for > discussion and further patches) > > On PTX, stack memory is private to each thread. When master thread constructs > 'omp_data_o' on its own stack and pa

[PATCH, i386]: Fix PR 68018, ICE: in ix86_compute_frame_layout on MS_ABI target with -mstackrealign

2015-10-21 Thread Uros Bizjak
Hello! As said in the PR: -mstackrealign is a new functionality on MS_ABI targets, and there are some places in the compiler that assume that these targets are always aligned to 16bytes. This alignment is in fact mandated by ABI, and all deviations can be considered ABI violations. However, we ca

Re: Add a pass to back-propagate use information

2015-10-21 Thread Richard Sandiford
Richard Biener writes: > On Mon, Oct 19, 2015 at 2:38 PM, Richard Sandiford > wrote: >> Richard Biener writes: >>> On Thu, Oct 15, 2015 at 3:17 PM, Richard Sandiford >>> wrote: +/* Strip all sign operations from the rvalue at *RHS_PTR in STMT. + Return true if something changed. Th

Re: Add VIEW_CONVERT_EXPR to operand_equal_p

2015-10-21 Thread Richard Biener
On Wed, Oct 21, 2015 at 6:05 AM, Jan Hubicka wrote: > Hi, > here is updated patch that applies changes suggested by Richard. I apologize > for the delay - the testing failed several times on gcc10.fsffrance.org for me > for out-of-memory errors (which are unrelated) and I was on the travel. > > Bo

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

2015-10-21 Thread Jakub Jelinek
On Tue, Oct 20, 2015 at 09:34:22PM +0300, Alexander Monakov wrote: > I've opted not to use dynamic parallelism. It increases the hardware > requirement from sm_30 to sm_35, needs a library from CUDA Toolkit at link I'll try to add the thread_limit/num_teams arguments to GOMP_target_41 soon (toget

Re: [PATCH] Don't allow FSM threader to create irreducible loops unless it eliminates a multi-way branch

2015-10-21 Thread Richard Biener
On Mon, Oct 19, 2015 at 6:23 PM, Jeff Law wrote: > If I hack up GCC's old jump threader to avoid threading across backedges and > instead let the FSM threader handle that case, then we end up with cases > where the FSM threader creates irreducible loops with marginal benefit. > > This can be seen

Re: [gomp4 07/14] libgomp nvptx plugin: launch target functions via gomp_nvptx_main

2015-10-21 Thread Jakub Jelinek
On Tue, Oct 20, 2015 at 11:19:06PM +0200, Bernd Schmidt wrote: > On 10/20/2015 11:13 PM, Alexander Monakov wrote: > >On Tue, 20 Oct 2015, Bernd Schmidt wrote: > > > >>On 10/20/2015 08:34 PM, Alexander Monakov wrote: > >>>2. Make gomp_nvptx_main a device (.func) function. To have that work, > >>>

Re: [gomp4 06/14] omp-low: copy omp_data_o to shared memory on NVPTX

2015-10-21 Thread Alexander Monakov
On Wed, 21 Oct 2015, Jakub Jelinek wrote: > On Tue, Oct 20, 2015 at 09:34:28PM +0300, Alexander Monakov wrote: > > (This patch serves as a straw man proposal to have something concrete for > > discussion and further patches) > > > > On PTX, stack memory is private to each thread. When master t

Re: [gomp4 08/14] libgomp nvptx: populate proc.c

2015-10-21 Thread Jakub Jelinek
On Tue, Oct 20, 2015 at 09:34:30PM +0300, Alexander Monakov wrote: > This provides minimal implementations of gomp_dynamic_max_threads and > omp_get_num_procs. > > * config/nvptx/proc.c: New. LGTM. Jakub

Re: [PATCH PR67921]Use sizetype for CHREC_RIGHT when building pointer type CHREC

2015-10-21 Thread Richard Biener
On Wed, Oct 21, 2015 at 6:46 AM, Bin Cheng wrote: > Hi, > As analyzed in PR67921, I think the issue is caused by fold_binary_loc which > folds: > 4 - (sizetype) &c - (sizetype) ((int *) p1_8(D) + ((sizetype) a_23 * 24 + > 4)) > into below form: > ((sizetype) -((int *) p1_8(D) + ((sizetype) a_2

Re: [PATCH v2 6/6] Libsanitizer merge from upstream r250806 (was r249633).

2015-10-21 Thread Yury Gribov
On 10/20/2015 02:29 PM, Maxim Ostapenko wrote: In this patch, I'm trying to add a general instruction how to perform the merge. This is just a documentation patch, any suggestions and opinions are welcome. Thanks, this should simplify work for other maintainers in future) Some general remarks:

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

2015-10-21 Thread Alexander Monakov
On Wed, 21 Oct 2015, Jakub Jelinek wrote: > > time (libcudadevrt.a), and imposes overhead at run time. The last point > > might > > But if this is the case, that is really serious issue. Is that really > something that isn't available in a shared library? > E.g. with my distro GCC maintainer ha

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

2015-10-21 Thread Martin Liška
On 10/20/2015 03:39 PM, Richard Biener wrote: > On Tue, Oct 20, 2015 at 3:00 PM, Martin Liška wrote: >> Hello. >> >> As part of upcoming merge of HSA branch, we would like to have possibility >> to terminate >> pass manager after execution of the HSA generation pass. The HSA back-end is >> imple

Re: [gomp4 06/14] omp-low: copy omp_data_o to shared memory on NVPTX

2015-10-21 Thread Jakub Jelinek
On Wed, Oct 21, 2015 at 12:07:22PM +0300, Alexander Monakov wrote: > On Wed, 21 Oct 2015, Jakub Jelinek wrote: > > > On Tue, Oct 20, 2015 at 09:34:28PM +0300, Alexander Monakov wrote: > > > (This patch serves as a straw man proposal to have something concrete for > > > discussion and further patch

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

2015-10-21 Thread Jakub Jelinek
On Wed, Oct 21, 2015 at 12:16:35PM +0300, Alexander Monakov wrote: > > Of course that doesn't help the thread-limit-2.c testcase. > > Why not? Because the compiler can be configured for multiple offloading devices, and PTX might not be the first device. So, you'd need to have a tcl test whether

Re: [gomp4 09/14] libgomp: provide barriers on NVPTX

2015-10-21 Thread Jakub Jelinek
On Tue, Oct 20, 2015 at 09:34:31PM +0300, Alexander Monakov wrote: > + asm ("bar.sync 0, %0;" : : "r"(32*bar->total)); Formatting, space between "(, spaces around * (in many places). As for re-convergence of threads in a warp, if we use threads in the warp other than thread 0 only for simd regio

Re: [PATCH PR67921]Use sizetype for CHREC_RIGHT when building pointer type CHREC

2015-10-21 Thread Bin.Cheng
On Wed, Oct 21, 2015 at 5:15 PM, Richard Biener wrote: > On Wed, Oct 21, 2015 at 6:46 AM, Bin Cheng wrote: >> Hi, >> As analyzed in PR67921, I think the issue is caused by fold_binary_loc which >> folds: >> 4 - (sizetype) &c - (sizetype) ((int *) p1_8(D) + ((sizetype) a_23 * 24 + >> 4)) >> into

Re: [gomp4 10/14] libgomp: arrange a team of pre-started threads via gomp_nvptx_main

2015-10-21 Thread Jakub Jelinek
On Tue, Oct 20, 2015 at 09:34:32PM +0300, Alexander Monakov wrote: > diff --git a/libgomp/config/nvptx/team.c b/libgomp/config/nvptx/team.c > deleted file mode 100644 > index e69de29..000 > diff --git a/libgomp/libgomp.h b/libgomp/libgomp.h > index 1454adf..f25b265 100644 > --- a/libgomp/libgom

Re: Move some bit and binary optimizations in simplify and match

2015-10-21 Thread Richard Biener
On Wed, Oct 21, 2015 at 8:48 AM, Marc Glisse wrote: > On Tue, 20 Oct 2015, Richard Biener wrote: > >> On Tue, Oct 20, 2015 at 8:46 AM, Hurugalawadi, Naveen >> wrote: >>> >>> Hi, >>> > +/* Fold X + (X / CST) * -CST to X % CST. */ > This one is still wrong >>> >>> Removed. >>> > I don'

Re: Add simple sign-stripping cases to match.pd

2015-10-21 Thread Richard Sandiford
Richard Sandiford writes: > Richard Sandiford writes: >> Marc Glisse writes: >>> On Thu, 15 Oct 2015, Richard Sandiford wrote: >>> This patch makes sure that, for every simplification that uses fold_strip_sign_ops, there are associated match.pd rules for the leaf sign ops, i.e. ab

Re: [patch] Fix failure of ACATS c45503c at -O2

2015-10-21 Thread Richard Biener
On Wed, Oct 21, 2015 at 9:24 AM, Eric Botcazou wrote: >> So the only question is whether or not the CEIL_MOD_EXPR and >> ROUND_MOD_EXPR bits are right. I'm confident the change to >> FLOOR_MOD_EXPR is right. > > OK. > >> Do we have any reasonable way to test CEIL_MOD_EXPR & ROUND_MOD_EXPR? > > No

Re: Add a pass to back-propagate use information

2015-10-21 Thread Richard Biener
On Wed, Oct 21, 2015 at 10:48 AM, Richard Sandiford wrote: > Richard Biener writes: >> On Mon, Oct 19, 2015 at 2:38 PM, Richard Sandiford >> wrote: >>> Richard Biener writes: On Thu, Oct 15, 2015 at 3:17 PM, Richard Sandiford wrote: > +/* Strip all sign operations from the rvalue

Re: [gomp4 11/14] libgomp: avoid variable-length stack allocation in team.c

2015-10-21 Thread Jakub Jelinek
On Tue, Oct 20, 2015 at 09:34:33PM +0300, Alexander Monakov wrote: > NVPTX does not support alloca or variable-length stack allocations, thus > heap allocation needs to be used instead. I've opted to make this a generic > change instead of guarding it with an #ifdef: libgomp usually leaves thread

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

2015-10-21 Thread Richard Biener
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, Martin Liška wrote: >>> Hello. >>> >>> As part of upcoming merge of HSA branch, we would like to have possibility >>> to terminate >>> pass manager after exec

Re: [gomp4 12/14] libgomp: fixup error.c on nvptx

2015-10-21 Thread Jakub Jelinek
On Tue, Oct 20, 2015 at 09:34:34PM +0300, Alexander Monakov wrote: > NVPTX provides vprintf, but there's no stream separation: everything is > printed as if into stdout. This is the minimal change to get error.c working. > > * error.c [__nvptx__]: Replace vfprintf, fputs, fputc with [v]prin

Re: [gomp4 13/14] libgomp: provide minimal GOMP_teams

2015-10-21 Thread Jakub Jelinek
On Tue, Oct 20, 2015 at 09:34:35PM +0300, Alexander Monakov wrote: > On NVPTX, we don't need most of target.c functionality, except for GOMP_teams. > Provide it as a copy of the generic implementation for now (it most likely > will need to change down the line: on NVPTX we do need to spawn several

Re: [gomp4 14/14] libgomp: use more generic implementations on nvptx

2015-10-21 Thread Jakub Jelinek
On Tue, Oct 20, 2015 at 09:34:36PM +0300, Alexander Monakov wrote: > This patch removes 0-size libgomp stubs where generic implementations can be > compiled for the NVPTX target. > > It also removes non-stub critical.c, which contains assembly implementations > for GOMP_atomic_{start,end}, but doe

Re: RFC: PATCH to pointer_int_sum vs. pointer-arith-10.c

2015-10-21 Thread Richard Biener
On Tue, Oct 20, 2015 at 9:10 PM, Jason Merrill wrote: > I made this change on the delayed folding branch and then noticed that it > broke pointer-arith-10.c, which you added to the testsuite. The patch > changes the -original dump from > > return (char *) ((sizetype) p + (sizetype) i); > > to >

Re: [gomp4 06/14] omp-low: copy omp_data_o to shared memory on NVPTX

2015-10-21 Thread Bernd Schmidt
On 10/21/2015 11:07 AM, Alexander Monakov wrote: In PTX, stack storage is in .local address space -- and that memory is thread-private. A thread can make a pointer to its own stack memory and successfully dereference it, but dereferencing that pointer from other threads does not work (I observe

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

2015-10-21 Thread Richard Biener
On Mon, Oct 19, 2015 at 10:17 AM, Alan Hayward wrote: > > >>On 30/09/2015 13:45, "Richard Biener" wrote: >> >>>On Wed, Sep 23, 2015 at 5:51 PM, Alan Hayward >>>wrote: On 18/09/2015 14:53, "Alan Hayward" wrote: > > >On 18/09/2015 14:26, "Alan Lawrence" wrote: >>>

Re: [1/7] Add new tree code SEXT_EXPR

2015-10-21 Thread Richard Biener
On Thu, Oct 15, 2015 at 7:49 AM, Kugan wrote: > > > On 12/10/15 23:21, Richard Biener wrote: >> On Sun, Oct 11, 2015 at 12:35 PM, Kugan >> wrote: >>> >>> >>> On 15/09/15 23:18, Richard Biener wrote: On Mon, Sep 7, 2015 at 4:55 AM, Kugan wrote: > > This patch adds support for n

Re: [PATCH 6/9] ENABLE_CHECKING refactoring: generators

2015-10-21 Thread Richard Biener
On Mon, Oct 19, 2015 at 1:55 AM, Mikhail Maltsev wrote: > On 10/06/2015 03:56 PM, Richard Biener wrote: >> The generators should simply unconditionally check (not in generated >> files, of course). >> And the generated code parts should use flag_checking. >> >> Richard. > > genautomata has some ma

Re: [PATCH 5/9] ENABLE_CHECKING refactoring: pool allocators

2015-10-21 Thread Richard Biener
On Mon, Oct 19, 2015 at 2:09 AM, Mikhail Maltsev wrote: > On 10/06/2015 03:45 PM, Richard Biener wrote: >> On Tue, Oct 6, 2015 at 2:41 PM, Bernd Schmidt wrote: >>> On 10/06/2015 01:32 AM, Mikhail Maltsev wrote: gcc/ChangeLog: 2015-10-05 Mikhail Maltsev * a

Re: [Boolean Vector, patch 3/5] Use boolean vector in C/C++ FE

2015-10-21 Thread Ilya Enkovich
2015-10-21 0:34 GMT+03:00 Jeff Law : > On 10/13/2015 09:59 AM, Ilya Enkovich wrote: Looking into that I got an impression vector modes are used by C/C++ vector extensions only. And I think regression testing would reveal some failures otherwise. >>> >>> >>> Maybe this

Re: Add VIEW_CONVERT_EXPR to operand_equal_p

2015-10-21 Thread Eric Botcazou
> here is updated patch that applies changes suggested by Richard. I apologize > for the delay - the testing failed several times on gcc10.fsffrance.org for > me for out-of-memory errors (which are unrelated) and I was on the travel. > > Bootstrapped/regtested x86_64-linux, OK? > > * tree.c

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

2015-10-21 Thread Martin Liška
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, Martin Liška wrote: Hello. As part of upcoming merge of HSA branch, we would like to have poss

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

2015-10-21 Thread Bernd Schmidt
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 approach is as follows. Could you elaborate a bit what you mean by this just so we understand each other in terms of terminolog

Re: [PATCH] Don't allow FSM threader to create irreducible loops unless it eliminates a multi-way branch

2015-10-21 Thread Hans-Peter Nilsson
On Tue, 20 Oct 2015, Jeff Law wrote: > On 10/20/2015 06:03 PM, Hans-Peter Nilsson wrote: > > I have no idea whether there's an actual bug related to the > > patch or something "just waiting to happen" and 16-bit-offsets > > just too close to the limits. Brief inspection of the generated > > assemb

Re: [PATCH PR67921]Use sizetype for CHREC_RIGHT when building pointer type CHREC

2015-10-21 Thread Richard Biener
On Wed, Oct 21, 2015 at 11:39 AM, Bin.Cheng wrote: > On Wed, Oct 21, 2015 at 5:15 PM, Richard Biener > wrote: >> On Wed, Oct 21, 2015 at 6:46 AM, Bin Cheng wrote: >>> Hi, >>> As analyzed in PR67921, I think the issue is caused by fold_binary_loc which >>> folds: >>> 4 - (sizetype) &c - (sizety

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

2015-10-21 Thread Richard Biener
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 to make it more easier to review. >> There are still c

[PATCH] Fix PR67443

2015-10-21 Thread Richard Biener
The following patch fixes PR67443, ao_ref_from_mem's special handling of some negative MEM_OFFSET cases being wrong in general. The patch removes the special-casing and places an additional safety net for MEM_EXPR handlings that rely on component bounds being honored. The patch might pessimize t

Re: [PATCH] Fix ICE for SIMD clones usage in LTO

2015-10-21 Thread Ilya Enkovich
Ping 2015-10-05 19:13 GMT+03:00 Ilya Enkovich : > Hi, > > When SIMD clone is created original function may be defined in another > partition. In this case SIMD clone also has to have in_other_partition flag. > Now it doesn't and we get an ICE. This patch fixes it. Bootstrapped and > regtest

Re: [PATCH] Fix ICE for SIMD clones usage in LTO

2015-10-21 Thread Jakub Jelinek
On Wed, Oct 21, 2015 at 03:57:14PM +0300, Ilya Enkovich wrote: > Ping This is ok for trunk. > > 2015-10-05 Ilya Enkovich > > > > * omp-low.c (simd_clone_create): Set in_other_partition > > for created clones. > > > > gcc/testsuite/ > > > > 2015-10-05 Ilya Enkovich > > > >

Re: [patch] Fix failure of ACATS c45503c at -O2

2015-10-21 Thread Eric Botcazou
> Maybe add the comments to tree.def instead. Good idea, revised patch attached. * tree.def (CEIL_DIV_EXPR, FLOOR_DIV_EXPR, ROUND_DIV_EXPR): Tweak comments. (TRUNC_MOD_EXPR, CEIL_MOD_EXPR, FLOOR_MOD_EXPR, ROUND_MOD_EXPR): Add comments on sign of the result.

Re: [patch] Fix failure of ACATS c45503c at -O2

2015-10-21 Thread Richard Biener
On Wed, Oct 21, 2015 at 3:06 PM, Eric Botcazou wrote: >> Maybe add the comments to tree.def instead. > > Good idea, revised patch attached. Ok. Thanks, Richard. > > * tree.def (CEIL_DIV_EXPR, FLOOR_DIV_EXPR, ROUND_DIV_EXPR): Tweak > comments. > (TRUNC_MOD_EXPR, CEIL_MOD_

Re: [PATCH v3] SH FDPIC backend support

2015-10-21 Thread Oleg Endo
Rich, Thanks for the updated patch. Please do not start new threads for a continuation of an existing thread. This makes it difficult to track in the archives. On Tue, 2015-10-20 at 23:41 -0400, Rich Felker wrote: > Attached is a hopefully near-ready-for-commit version of the SH/FDPIC > patch. I

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

2015-10-21 Thread Jeff Law
On 10/20/2015 03:27 PM, Richard Henderson wrote: --- gcc/cselib.c | 22 +- gcc/fold-const.c | 14 +++--- gcc/testsuite/gcc.target/i386/addr-space-2.c | 11 +++ 3 files changed, 31 insertions(+), 1

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

2015-10-21 Thread Jeff Law
On 10/20/2015 03:27 PM, Richard Henderson wrote: --- gcc/config/i386/i386.c | 21 + gcc/doc/tm.texi| 7 +++ gcc/doc/tm.texi.in | 2 ++ gcc/dwarf2out.c| 48 +--- gcc/target.def | 10 ++

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

2015-10-21 Thread Richard Biener
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: >>> >>> 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 spitt

Re: [PATCH v2 08/13] Add TARGET_ADDR_SPACE_ZERO_ADDRESS_VALID

2015-10-21 Thread Jeff Law
On 10/20/2015 03:27 PM, Richard Henderson wrote: --- gcc/config/i386/i386.c | 10 ++ gcc/doc/tm.texi| 5 + gcc/doc/tm.texi.in | 2 ++ gcc/fold-const.c | 6 +- gcc/gimple.c | 12 +--- gcc/target.def | 9 + gcc/targhook

Re: [PATCH v2 02/13] Relax ADDR_SPACE_GENERIC_P checks for default address space hooks

2015-10-21 Thread Jeff Law
On 10/20/2015 03:27 PM, Richard Henderson wrote: If all address spaces use the same modes and forms, we would be forced to replicate these hooks in the backend. Which would then require the creation of a new hook to replace target_default_pointer_address_modes_p. --- gcc/targhooks.c | 39 +

Re: [PATCH v2 09/13] Fix PR 66768

2015-10-21 Thread Jeff Law
On 10/20/2015 03:27 PM, Richard Henderson wrote: --- gcc/tree-ssa-address.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) I think this change is fine. Needs a testcase though. I'll also note you need ChangeLogs for all these patches. I know you know that, so it's just a reminder t

Re: [PATCH v2 01/13] Change default of non-overlapping address space conversion

2015-10-21 Thread Jeff Law
On 10/20/2015 03:27 PM, Richard Henderson wrote: The current default of making all undefined coversions being set to null is not useful. It has caused all users to lie and say that spaces are subsets when they are not, just so that they can override the conversion. Usual comment about needing a

Re: [gomp4 06/14] omp-low: copy omp_data_o to shared memory on NVPTX

2015-10-21 Thread Alexander Monakov
On Wed, 21 Oct 2015, Bernd Schmidt wrote: > On 10/21/2015 11:07 AM, Alexander Monakov wrote: > > > In PTX, stack storage is in .local address space -- and that memory is > > thread-private. A thread can make a pointer to its own stack memory and > > successfully dereference it, but dereferencing

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

2015-10-21 Thread Richard Biener
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, Martin Liška wrote: > Hello. > > As pa

[C++ Patches] PR c++/66781 and c++/67847

2015-10-21 Thread Paolo Carlini
Hi, I have two fixes for ICEs on invalid code. I'm not completely sure about the wording of the error message for c++/67847, fwiw, clang issues something rather similar. The other one should be more straightforward. Tested x86_64-linux. Thanks, Paolo. / /cp 2015-10-21 P

Re: [gomp4 10/14] libgomp: arrange a team of pre-started threads via gomp_nvptx_main

2015-10-21 Thread Alexander Monakov
On Wed, 21 Oct 2015, Jakub Jelinek wrote: > > -#if defined HAVE_TLS || defined USE_EMUTLS > > +#if defined __nvptx__ > > +extern struct gomp_thread *nvptx_thrs; > > What kind of address space is this variable? It should be > a per-CTA var, so that different teams have different, and > simultaneou

Re: [PATCH] Don't allow FSM threader to create irreducible loops unless it eliminates a multi-way branch

2015-10-21 Thread Jeff Law
On 10/21/2015 06:05 AM, Hans-Peter Nilsson wrote: On Tue, 20 Oct 2015, Jeff Law wrote: On 10/20/2015 06:03 PM, Hans-Peter Nilsson wrote: I have no idea whether there's an actual bug related to the patch or something "just waiting to happen" and 16-bit-offsets just too close to the limits. Brie

Re: [PATCH] Don't allow FSM threader to create irreducible loops unless it eliminates a multi-way branch

2015-10-21 Thread Jeff Law
On 10/21/2015 02:56 AM, Richard Biener wrote: On Mon, Oct 19, 2015 at 6:23 PM, Jeff Law wrote: If I hack up GCC's old jump threader to avoid threading across backedges and instead let the FSM threader handle that case, then we end up with cases where the FSM threader creates irreducible loops w

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

2015-10-21 Thread H.J. Lu
On Tue, Oct 20, 2015 at 2:27 PM, Richard Henderson wrote: > --- > gcc/config/i386/i386.c | 21 + > gcc/doc/tm.texi| 7 +++ > gcc/doc/tm.texi.in | 2 ++ > gcc/dwarf2out.c| 48 +--- > gcc/target.def |

[PATCH] Fix bootsrap/68041

2015-10-21 Thread Maxim Ostapenko
Hi, recent libsanitizer merge ( https://gcc.gnu.org/ml/gcc-patches/2015-10/msg01851.html) broke bootstrap on x86_64-apple-darwin14 because for Darwin sanitizer libs shouldn't be linked with -lrt flag. Also, right now, libubsan links with -lc++abi for Darwin, that is wrong, because we don't wa

Re: [gomp4 10/14] libgomp: arrange a team of pre-started threads via gomp_nvptx_main

2015-10-21 Thread Jakub Jelinek
On Wed, Oct 21, 2015 at 05:40:24PM +0300, Alexander Monakov wrote: > On Wed, 21 Oct 2015, Jakub Jelinek wrote: > > > -#if defined HAVE_TLS || defined USE_EMUTLS > > > +#if defined __nvptx__ > > > +extern struct gomp_thread *nvptx_thrs; > > > > What kind of address space is this variable? It shoul

Re: [PATCH] Fix bootsrap/68041

2015-10-21 Thread Jakub Jelinek
On Wed, Oct 21, 2015 at 05:56:42PM +0300, Maxim Ostapenko wrote: > Hi, > > recent libsanitizer merge ( > https://gcc.gnu.org/ml/gcc-patches/2015-10/msg01851.html) broke bootstrap on > x86_64-apple-darwin14 because for Darwin sanitizer libs shouldn't be linked > with -lrt flag. Also, right now, lib

Re: [ARM] Use vector wide add for mixed-mode adds

2015-10-21 Thread Charles Baylis
On 20 October 2015 at 08:54, Michael Collison wrote: > I want to ask a question about existing patterns in neon.md that utilize the > vec_select and all the lanes as my example does: Why are the following > pattern not matched if the target is big endian? > (define_insn "neon_vec_unpack_lo_" >

[PATCH] unconditionally compile most of the delay slot code

2015-10-21 Thread tbsaunde+gcc
From: Trevor Saunders Hi, $subject bootstrapped+ regtested x86_64-linux-gnu, I wouldn't mind a second pair of eyes on this one given its not totally trivial. Trev gcc/ChangeLog: 2015-10-20 Trevor Saunders * cfgrtl.c (pass_free_cfg::execute): Adjust. * final.c (dbr_sequenc

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

2015-10-21 Thread Alexander Monakov
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 approach is as follows. > > Could you elaborate a bit what you mean by this ju

Re: [PATCH] unconditionally compile most of the delay slot code

2015-10-21 Thread Jeff Law
On 10/21/2015 09:13 AM, tbsaunde+...@tbsaunde.org wrote: From: Trevor Saunders Hi, $subject bootstrapped+ regtested x86_64-linux-gnu, I wouldn't mind a second pair of eyes on this one given its not totally trivial. Trev gcc/ChangeLog: 2015-10-20 Trevor Saunders * cfgrtl.c (pass

Re: [PATCH 1/9] ENABLE_CHECKING refactoring

2015-10-21 Thread Jeff Law
On 10/19/2015 07:23 AM, Mikhail Maltsev wrote: On 10/19/2015 02:13 PM, Bernd Schmidt wrote: But for normal C conditions the patches end up using flag_checking, so the CHECKING_P macro buys us nothing over ENABLE_CHECKING. Presumably 'if (CHECKING_P)' can be used for performance-critical parts (

[OpenACC] loop nesting check

2015-10-21 Thread Nathan Sidwell
Hi, in preparing a patch set of the OpenACC execution model for trunk, I discovered some broken tests in the testsuite. We were failing to diagnose some incorrectly nested loops, and that led to ICEs in my patch set. This patch implements a check for openacc loop directives, checking that the

Re: [PATCH][Testsuite] Add --param sra-max-scalarization-size-Ospeed to sra-12.c

2015-10-21 Thread Jeff Law
On 10/21/2015 09:52 AM, Alan Lawrence wrote: gcc.dg/tree-ssa/sra-12.c is skipped on a bunch of targets, including AArch64, because the default max-scalarization-size depends on MOVE_RATIO, and on those targets thus ends up being too small for SRA to optimize the testcase. Recently I noticed that

[PATCH][Testsuite] Add --param sra-max-scalarization-size-Ospeed to sra-12.c

2015-10-21 Thread Alan Lawrence
gcc.dg/tree-ssa/sra-12.c is skipped on a bunch of targets, including AArch64, because the default max-scalarization-size depends on MOVE_RATIO, and on those targets thus ends up being too small for SRA to optimize the testcase. Recently I noticed that the test has been failing for some time on ARM

Re: [PATCH 1/9] ENABLE_CHECKING refactoring

2015-10-21 Thread Bernd Schmidt
On 10/21/2015 05:56 PM, Jeff Law wrote: The problem is the existing ENABLE_CHECKING conditions. Anything which is #ifdef ENABLE_CHECKING will have its behavior changed if we change things so that ENABLE_CHECKING is always defined with a value. So if we wanted to continue to use ENABLE_CHECKING,

Re: [OpenACC] loop nesting check

2015-10-21 Thread Bernd Schmidt
On 10/21/2015 05:59 PM, Nathan Sidwell wrote: in preparing a patch set of the OpenACC execution model for trunk, I discovered some broken tests in the testsuite. We were failing to diagnose some incorrectly nested loops, and that led to ICEs in my patch set. This patch implements a check for op

Re: [OpenACC] loop nesting check

2015-10-21 Thread Jakub Jelinek
On Wed, Oct 21, 2015 at 11:59:03AM -0400, Nathan Sidwell wrote: > Hi, > in preparing a patch set of the OpenACC execution model for trunk, I > discovered some broken tests in the testsuite. We were failing to diagnose > some incorrectly nested loops, and that led to ICEs in my patch set. > > This

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

2015-10-21 Thread Bernd Schmidt
On 10/21/2015 05:18 PM, 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 approach is as follows. Could you

Re: [OpenACC] loop nesting check

2015-10-21 Thread Nathan Sidwell
On 10/21/15 12:06, Bernd Schmidt wrote: Were they just compile tests? Yes, some of the tests already expected errors, but missed some. I think one test didn't expect an error, but is a clearly bogus test. nathan

Re: [PATCH 1/9] ENABLE_CHECKING refactoring

2015-10-21 Thread Richard Biener
On October 21, 2015 6:04:38 PM GMT+02:00, Bernd Schmidt wrote: >On 10/21/2015 05:56 PM, Jeff Law wrote: >> The problem is the existing ENABLE_CHECKING conditions. >> >> Anything which is #ifdef ENABLE_CHECKING will have its behavior >changed >> if we change things so that ENABLE_CHECKING is alway

Re: [PATCH 1/9] ENABLE_CHECKING refactoring

2015-10-21 Thread Jeff Law
On 10/21/2015 10:04 AM, Bernd Schmidt wrote: On 10/21/2015 05:56 PM, Jeff Law wrote: The problem is the existing ENABLE_CHECKING conditions. Anything which is #ifdef ENABLE_CHECKING will have its behavior changed if we change things so that ENABLE_CHECKING is always defined with a value. So if

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

2015-10-21 Thread Ulrich Weigand
Richard Henderson wrote: > +@deftypefn {Target Hook} int TARGET_ADDR_SPACE_DEBUG (addr_space_t @var{as}) > +Define this to define how the address space is encoded in dwarf. > +The result, @var{r}, should be positive to indicate > +@code{DW_AT_address_class @var{r}} should be emitted; or negative >

[C PATCH] Warn about variadic functions defined without prototypes (PR c/68024)

2015-10-21 Thread Marek Polacek
Joseph, is this what you had in mind in this PR? With this patch, we warn anytime we see a prototype-less function that is variadic. It seems rare enough not to warrant a separate warning option for it. Bootstrapped/regtested on x86_64-linux, ok for trunk? 2015-10-21 Marek Polacek P

Re: [PATCH 1/9] ENABLE_CHECKING refactoring

2015-10-21 Thread Bernd Schmidt
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 get that, but the point I'm trying to make is that if you get rid of all conditional compilation, you don't need either ENABLE_CHEC

Re: [PATCH 1/9] ENABLE_CHECKING refactoring

2015-10-21 Thread Jeff Law
On 10/21/2015 10:18 AM, Richard Biener wrote: On October 21, 2015 6:04:38 PM GMT+02:00, Bernd Schmidt wrote: On 10/21/2015 05:56 PM, Jeff Law wrote: The problem is the existing ENABLE_CHECKING conditions. Anything which is #ifdef ENABLE_CHECKING will have its behavior changed if we change

Re: [PATCH 1/9] ENABLE_CHECKING refactoring

2015-10-21 Thread Jakub Jelinek
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 get that, but the point I'm trying to make is that if you get

[Patch, MIPS] Patch to fix MIPS optimization bug in combine

2015-10-21 Thread Steve Ellcey
A bug was reported against the GCC MIPS64 compiler that involves a bad combine and this patch fixes the bug. When using '-fexpensive-optimizations -march=mips64r2 -mabi=64' GCC is combining these instructions: (insn 13 12 14 2 (set (reg:DI 206 [ *last_3(D)+-4 ]) (zero_extend:DI (subreg/s

Re: [PATCH] Fix partial template specialization syntax in wide-int.h

2015-10-21 Thread Mike Stump
On Oct 19, 2015, at 12:46 PM, H.J. Lu wrote: Ok. Does this need to go into the gcc-5 release branch as well? If so, ok there too. Thanks. >>> I think there is no need for it. >> >> It is also need for gcc-5. I am backporting it now. > > This is what I checked into gcc-5-branch. Tha

[gomp4] loop nesting check

2015-10-21 Thread Nathan Sidwell
This is the gomp4-branch variant of the loop nesting patch I just committed to trunk. The gomp4 branch had some checking, but a) it didn't catch all erroreous cases b) gave an ambiguous error, by not mentioning 'OpenACC' committed to gomp4 nathan 2015-10-21 Nathan Sidwell gcc/ * omp-low.c

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

2015-10-21 Thread Richard Henderson
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 | 14 +++--- gcc/testsuite/gcc.target/i386/addr-space-2.c | 11 +

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

2015-10-21 Thread Joseph Myers
On Wed, 21 Oct 2015, Richard Biener wrote: > Or maybe we should simply make GIMPLE _always_ adhere to the ABI > details from the start (gimplification). Note that this does not only involve > PROMOTE_MODE. Note that for what GIMPLE is concerned I'd only > "lower" passing / returning in registers

Re: [C PATCH] Warn about variadic functions defined without prototypes (PR c/68024)

2015-10-21 Thread Joseph Myers
On Wed, 21 Oct 2015, Marek Polacek wrote: > Joseph, is this what you had in mind in this PR? With this patch, we > warn anytime we see a prototype-less function that is variadic. It > seems rare enough not to warrant a separate warning option for it. > > Bootstrapped/regtested on x86_64-linux,

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

2015-10-21 Thread Richard Henderson
On 10/21/2015 04:53 AM, H.J. Lu wrote: On Tue, Oct 20, 2015 at 2:27 PM, Richard Henderson wrote: --- gcc/config/i386/i386.c | 21 + gcc/doc/tm.texi| 7 +++ gcc/doc/tm.texi.in | 2 ++ gcc/dwarf2out.c| 48 +

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

2015-10-21 Thread H.J. Lu
On Wed, Oct 21, 2015 at 10:17 AM, Richard Henderson wrote: > On 10/21/2015 04:53 AM, H.J. Lu wrote: >> >> On Tue, Oct 20, 2015 at 2:27 PM, Richard Henderson wrote: >>> >>> --- >>> gcc/config/i386/i386.c | 21 + >>> gcc/doc/tm.texi| 7 +++ >>> gcc/doc/tm.texi.i

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

2015-10-21 Thread 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. This allows to avoid some restrictions implied by boole

  1   2   >