From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26163 invoked by alias); 8 Mar 2013 16:22:46 -0000 Received: (qmail 25717 invoked by uid 48); 8 Mar 2013 16:21:14 -0000 From: "xinliangli at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/56490] [4.6/4.7/4.8 Regression] -Wall triggering infinite loop Date: Fri, 08 Mar 2013 16:22: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-Keywords: compile-time-hog, diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: xinliangli at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.6.4 X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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 X-SW-Source: 2013-03/txt/msg00701.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56490 --- Comment #5 from davidxl 2013-03-08 16:21:13 UTC --- (In reply to comment #4) > Clearly the limiting is bougs ... the issue is with large fanout BBs > we recurse in compute_control_dep_chain which leads to exponential > complexity. Limiting that to 8^5 isn't really a fix ... (yes, you > can call that O(1)). > > compute_control_dep_chain is called 65 million times(!) for the testcase > after the patch. > > There has to be a better algorithmic way of implementing this. > > IMHO still not fixed in 4.8. Right. However for on demand computation like this, limiting is still needed. For this particular case, limiting the depth to 3 (or may be smaller) won't cause any regressions.