From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9697 invoked by alias); 10 Apr 2014 22:01:48 -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 9647 invoked by uid 48); 10 Apr 2014 22:01:43 -0000 From: "mircea.namolaru at inria dot fr" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/59121] [4.8/4.9 Regression] endless loop with -O2 -floop-parallelize-all Date: Thu, 10 Apr 2014 22:01: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.8.1 X-Bugzilla-Keywords: compile-time-hog X-Bugzilla-Severity: normal X-Bugzilla-Who: mircea.namolaru at inria dot fr X-Bugzilla-Status: NEW X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.3 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-04/txt/msg00765.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59121 --- Comment #19 from Mircea Namolaru --- The problem for many of these simple cases is with Graphite formulation of memory accesses constraints. For Fortran, or C (if arrays are declared as pointers), a memory access is not constrained enough (basically it is expressed as a function of a single induction variable). This may increase dramatically the number of the constraint solutions. The computation time for them could become prohibitive as well. But even worse, even if the computation finishes, part of the solutions found are false dependencies restricting possible legal transformations. The solution is to constrain more the memory access - as it is done for C arrays (similar code in C as this Fortran example don't create any problem). A possible solution is to express the access in terms of basic induction variable as in the original source code - maybe by modifying the front end. But other solutions are possible. For sure not a work for GCC 4.9.