From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24583 invoked by alias); 29 Jan 2014 12:52:15 -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 24552 invoked by uid 48); 29 Jan 2014 12:52:12 -0000 From: "grosser at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/58028] [4.9 Regression] Several failures in libgomp.graphite after revision 200946 Date: Wed, 29 Jan 2014 12:52: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: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: grosser at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.9.0 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: 2014-01/txt/msg03009.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58028 --- Comment #9 from Tobias Grosser --- (In reply to rguenther@suse.de from comment #8) > On Wed, 29 Jan 2014, dominiq at lps dot ens.fr wrote: > > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58028 > > > > --- Comment #7 from Dominique d'Humieres --- > > > The testsuite failures are. We have to do sth about them. > > > > Revert r200946? > > Probably - the > > + * graphite-dependences.c (carries_deps): Do not assume the > schedule is > + in 2D + 1 form. > > part looks wrong. > > - idx = 2 * depth + 1; > - for (i = 0; i < idx; i++) > + for (i = 0; i < depth - 1; i++) > > we now iterate over less dimensions than before. Only in cases where the schedule is not in 2D + 1 form. In case the schedule is in 2D + 1 form int scheduling_dim = isl_set_n_dim (domain); will be equal to 2 * depth + 1. > I'd say we should simply check whether the loop _is_ in 2D + 1 form > at > > + isl_set *domain = isl_set_from_cloog_domain (stmt->domain); > + int scheduling_dim = isl_set_n_dim (domain); > + > if (flag_loop_parallelize_all > - && loop_is_parallel_p (loop, bb_pbb_mapping, level)) > + && loop_is_parallel_p (loop, bb_pbb_mapping, scheduling_dim)) > loop->can_be_parallel = true; > > thus > > if (flag_loop_parallelize_all > && scheduling_dim == 2 * level + 1 > && loop_is_parallel_p (loop, bb_pbb_mapping, level) > loop->can_be_parallel = true; The change you propose seems conservatively correct, as in that loops that are not in 2D + 1 form are not detected to be parallel. This change may hide the bug, but I don't see any bug it solves. > no time to check whether reverting the other hunk plus this will > resolve the bug the revision fixed and restores the testcases. I assume it will fix the crash, but it will not detect parallellism in none 2D+1 loops, something the isl scheduler happily creates.