public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug analyzer/107060] New: -fanalyzer unbearably slow when compiling GNU Emacs
@ 2022-09-27 19:20 eggert at cs dot ucla.edu
  2022-09-27 20:55 ` [Bug analyzer/107060] " dmalcolm at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: eggert at cs dot ucla.edu @ 2022-09-27 19:20 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107060

            Bug ID: 107060
           Summary: -fanalyzer unbearably slow when compiling GNU Emacs
           Product: gcc
           Version: 12.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: analyzer
          Assignee: dmalcolm at gcc dot gnu.org
          Reporter: eggert at cs dot ucla.edu
  Target Milestone: ---

Created attachment 53634
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53634&action=edit
compressed source file that gcc -S -fanalyzer -O2 compiles verrrry slowly

For a while, gcc -fanalyzer has been so unbearably slow when compiling GNU
Emacs that we Emacs developers disable -fanalyzer unless the builder
specifically asks for it, which almost nobody does because it's sooo slow. I
haven't bothered to file a bug report because I assumed the analyzer code was
still being worked on and tuned, but I just now tried -fanalyzer again on a new
machine and it was still so slow that I am finally filing a bug report.

The biggest pole in the tent is when gcc compiles Emacs's xdisp.c file, which
is large for Emacs (38 Klines) but not that large. I am attaching the
preprocessed output as the file u.i.gz. Compile it with:

gzip -d u.i
gcc -S -fanalyzer -O2 u.i

On my older Fedora 36 desktop (AMD Phenom II X4 910e) with gcc (GCC) 12.2.1
20220819 (Red Hat 12.2.1-2) GCC takes 12 minutes 3 seconds, which is
ridiculous. On my newer Ubuntu 22.04 desktop (Intel Xeon W-1350) with gcc-12
(Ubuntu 12.1.0-2ubuntu1~22.04) 12.1.0, GCC takes 3 minutes 43 seconds, which is
still way too long.

Could you please take a look at this test case and see what's slowing down
-fanalyzer? If you can't improve GCC, is there some easy way we Emacs
developers can rewrite the source to avoid the performance issue, whatever it
is? Thanks.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-03-02 18:26 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-27 19:20 [Bug analyzer/107060] New: -fanalyzer unbearably slow when compiling GNU Emacs eggert at cs dot ucla.edu
2022-09-27 20:55 ` [Bug analyzer/107060] " dmalcolm at gcc dot gnu.org
2022-09-27 21:31 ` dmalcolm at gcc dot gnu.org
2022-09-27 22:22 ` dmalcolm at gcc dot gnu.org
2022-09-28 13:57 ` dmalcolm at gcc dot gnu.org
2022-09-28 15:01 ` dmalcolm at gcc dot gnu.org
2022-09-29  8:10 ` rguenth at gcc dot gnu.org
2022-10-05 17:54 ` cvs-commit at gcc dot gnu.org
2022-10-05 18:20 ` dmalcolm at gcc dot gnu.org
2023-03-02 18:26 ` dmalcolm at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).