public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/66851] New: support double reduction in parloops
@ 2015-07-13 0:00 vries at gcc dot gnu.org
2015-07-13 0:01 ` [Bug tree-optimization/66851] " vries at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: vries at gcc dot gnu.org @ 2015-07-13 0:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66851
Bug ID: 66851
Summary: support double reduction in parloops
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: vries at gcc dot gnu.org
Target Milestone: ---
outer-4.c contains an xfail:
...
/* { dg-do compile } */
/* { dg-options "-O2 -ftree-parallelize-loops=4 -fdump-tree-parloops-details
-fdump-tree-optimized" } */
void abort (void);
int g_sum=0;
int x[500][500];
__attribute__((noinline))
void parloop (int N)
{
int i, j;
int sum;
/* Double reduction is currently not supported, outer loop is not
parallelized. Inner reduction is detected, inner loop is
parallelized. */
sum = 0;
for (i = 0; i < N; i++)
for (j = 0; j < N; j++)
sum += x[i][j];
g_sum = sum;
}
int main(void)
{
parloop(500);
return 0;
}
/* { dg-final { scan-tree-dump-times "parallelizing outer loop" 1 "parloops" {
xfail *-*-* } } } */
/* { dg-final { scan-tree-dump-times "loopfn" 4 "optimized" } } */
...
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/66851] support double reduction in parloops
2015-07-13 0:00 [Bug tree-optimization/66851] New: support double reduction in parloops vries at gcc dot gnu.org
@ 2015-07-13 0:01 ` vries at gcc dot gnu.org
2015-07-13 14:56 ` vries at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: vries at gcc dot gnu.org @ 2015-07-13 0:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66851
--- Comment #1 from vries at gcc dot gnu.org ---
Created attachment 35963
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35963&action=edit
Tentative patch
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/66851] support double reduction in parloops
2015-07-13 0:00 [Bug tree-optimization/66851] New: support double reduction in parloops vries at gcc dot gnu.org
2015-07-13 0:01 ` [Bug tree-optimization/66851] " vries at gcc dot gnu.org
@ 2015-07-13 14:56 ` vries at gcc dot gnu.org
2015-07-24 10:32 ` vries at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: vries at gcc dot gnu.org @ 2015-07-13 14:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66851
vries at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |missed-optimization, patch
Version|unknown |6.0
Assignee|unassigned at gcc dot gnu.org |vries at gcc dot gnu.org
--- Comment #2 from vries at gcc dot gnu.org ---
https://gcc.gnu.org/ml/gcc-patches/2015-07/msg01057.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/66851] support double reduction in parloops
2015-07-13 0:00 [Bug tree-optimization/66851] New: support double reduction in parloops vries at gcc dot gnu.org
2015-07-13 0:01 ` [Bug tree-optimization/66851] " vries at gcc dot gnu.org
2015-07-13 14:56 ` vries at gcc dot gnu.org
@ 2015-07-24 10:32 ` vries at gcc dot gnu.org
2015-07-28 14:21 ` vries at gcc dot gnu.org
2015-07-28 14:22 ` vries at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: vries at gcc dot gnu.org @ 2015-07-24 10:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66851
--- Comment #3 from vries at gcc dot gnu.org ---
pinged: https://gcc.gnu.org/ml/gcc-patches/2015-07/msg02034.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/66851] support double reduction in parloops
2015-07-13 0:00 [Bug tree-optimization/66851] New: support double reduction in parloops vries at gcc dot gnu.org
` (2 preceding siblings ...)
2015-07-24 10:32 ` vries at gcc dot gnu.org
@ 2015-07-28 14:21 ` vries at gcc dot gnu.org
2015-07-28 14:22 ` vries at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: vries at gcc dot gnu.org @ 2015-07-28 14:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66851
--- Comment #4 from vries at gcc dot gnu.org ---
https://gcc.gnu.org/ml/gcc-cvs/2015-07/msg01090.html
Author: vries
Date: Tue Jul 28 07:54:04 2015
New Revision: 226300
URL: https://gcc.gnu.org/viewcvs?rev=226300&root=gcc&view=rev
Log:
Handle double reduction in parloops
2015-07-28 Tom de Vries <tom@codesourcery.com>
* tree-parloops.c (reduc_stmt_res): New function.
(initialize_reductions, add_field_for_reduction)
(create_phi_for_local_result, create_loads_for_reductions)
(create_stores_for_reduction, build_new_reduction): Handle case that
reduc_stmt is a phi.
(gather_scalar_reductions): Allow double_reduc reductions.
* gcc.dg/autopar/uns-outer-4.c: Remove xfail on scan for parallelizing
outer loop.
* testsuite/libgomp.c/uns-outer-4.c: New test.
Added:
trunk/libgomp/testsuite/libgomp.c/uns-outer-4.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/autopar/uns-outer-4.c
trunk/gcc/tree-parloops.c
trunk/libgomp/ChangeLog
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/66851] support double reduction in parloops
2015-07-13 0:00 [Bug tree-optimization/66851] New: support double reduction in parloops vries at gcc dot gnu.org
` (3 preceding siblings ...)
2015-07-28 14:21 ` vries at gcc dot gnu.org
@ 2015-07-28 14:22 ` vries at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: vries at gcc dot gnu.org @ 2015-07-28 14:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66851
vries at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
--- Comment #5 from vries at gcc dot gnu.org ---
Patch and test-case committed, marking resolved-fixed.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-07-28 14:22 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-13 0:00 [Bug tree-optimization/66851] New: support double reduction in parloops vries at gcc dot gnu.org
2015-07-13 0:01 ` [Bug tree-optimization/66851] " vries at gcc dot gnu.org
2015-07-13 14:56 ` vries at gcc dot gnu.org
2015-07-24 10:32 ` vries at gcc dot gnu.org
2015-07-28 14:21 ` vries at gcc dot gnu.org
2015-07-28 14:22 ` vries at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).