From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C398B3857426; Wed, 28 Sep 2022 15:01:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C398B3857426 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1664377263; bh=h3SXVHxOQILKJukRJONjBlrxhcdNVv8o6d48q+UyW2Q=; h=From:To:Subject:Date:In-Reply-To:References:From; b=AJuyHOIYGbveUqTijS8RF4qKT0rsh16KxIu/6Ufyg+SU9KwTVVpx9vyllOdMywxPZ EaF22FREQJM1xdat/AM2zV8+kjIS+erTWYmQ1oPVnOt9uAVGC0tF8rsHc6LY8adbrQ nk4ZDmbD9LDvwp0MqtksdFP/scegOpP0Io+wjRzI= From: "dmalcolm at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug analyzer/107060] -fanalyzer unbearably slow when compiling GNU Emacs Date: Wed, 28 Sep 2022 15:01:03 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: analyzer X-Bugzilla-Version: 12.2.1 X-Bugzilla-Keywords: compile-time-hog X-Bugzilla-Severity: normal X-Bugzilla-Who: dmalcolm at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: dmalcolm at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: dependson Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107060 David Malcolm changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |99390 --- Comment #5 from David Malcolm --- The real issue here is that -fanalyzer-call-summaries is off by default (du= e to being buggy). Poring over the dumps shows that without trying to summarize= the effects of calls, the analyzer is brute-forcing the exploration of the call graph, leading to an explosion of deep paths, expensively achieving very po= or coverage. Enabling -fanalyzer-call-summaries speeds things up from ~10 minutes to ~1m= 20s (7.5x), but makes it emit lots of -Wanalyzer-use-of-uninitialized-value fal= se positives. Am about to file a bug about that... Sorry about this; I'd recommend disabling -fanalyzer on Emacs until it's reasonable to enable -fanalyzer-call-summaries on it. The dumps show some other issues, like the analyzer seems to be creating lo= ts of regions for tracking "alloca" (~45000 of them in one dump), so I may nee= d to also fix how alloca is handled. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99390 [Bug 99390] [meta-bug] tracker bug for call summaries in -fanalyzer=