From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13238 invoked by alias); 7 Sep 2015 09:25:10 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 9018 invoked by uid 48); 7 Sep 2015 09:25:06 -0000 From: "vries at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/67476] Add --param parloops-schedule= Date: Mon, 07 Sep 2015 09:25:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 6.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-09/txt/msg00476.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67476 --- Comment #2 from vries at gcc dot gnu.org --- All but the static omp schedules use expand_omp_for_generic. There does seem to be some ssa support in expand_omp_for_generic. If we revert "Don't cancel loop tree in parloops" (r226427) to eliminate disturbance from that patch, what doesn't seem to work is reductions. We can see here that there's an inner loop PHI for sum in bb4. ... f._loopfn.0 (void * .paral_data_param) { int i.9; unsigned int sum.7; long int .iend0.15; long int .istart0.14; unsigned int * restrict a.10; unsigned int n.8; long int _6; _Bool _7; long int _8; unsigned int ivtmp_9; long int _10; unsigned int _11; unsigned int ivtmp_14; unsigned int ivtmp_15; long unsigned int _19; long unsigned int _20; unsigned int * _21; unsigned int _22; _Bool _25; unsigned int * _27; : n.8_4 = MEM[(struct *).paral_data_param_1(D)].n; a.10_5 = MEM[(struct *).paral_data_param_1(D)].a; _6 = (long int) n.8_4; _7 = __builtin_GOMP_loop_dynamic_start (0, _6, 1, 1, &.istart0.14, &.iend0.15); if (_7 != 0) goto ; else goto ; : _8 = .istart0.14; ivtmp_9 = (unsigned int) _8; _10 = .iend0.15; _11 = (unsigned int) _10; : # sum.7_12 = PHI # ivtmp_14 = PHI i.9_18 = (int) ivtmp_14; _19 = (long unsigned int) i.9_18; _20 = _19 * 4; _21 = a.10_5 + _20; _22 = *_21; sum.7_13 = sum.7_12 + _22; ivtmp_15 = ivtmp_14 + 1; if (_11 > ivtmp_15) goto ; else goto ; : _25 = __builtin_GOMP_loop_dynamic_next (&.istart0.14, &.iend0.15); if (_25 != 0) goto ; else goto ; : # sum.7_26 = PHI __builtin_GOMP_loop_end_nowait (); _27 = &MEM[(struct *).paral_data_param_1(D)].sum.7; __atomic_fetch_add_4 (_27, sum.7_26, 0); return; } ... What is missing, is the outer loop phi for sum in bb3.