https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105112
Bug ID: 105112
Summary: Speed up -fanalyzer on big-code.c
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: analyzer
Assignee: dmalcolm at gcc dot gnu.org
Reporter: dmalcolm at gcc dot gnu.org
Target Milestone: ---
Several large functions with arithmetics and one-deep loops, posted by Michael
Matz to gcc-patches:
https://gcc.gnu.org/ml/gcc-patches/2013-09/msg00062.html
Also at:
https://github.com/davidmalcolm/gcc-benchmarking/blob/master/test-sources/big-code.c
-ftime-report shows that -fanalyzer increases compile time (without
optimizations) from 6 seconds to 30 seconds, almost all of which is spent
processing the worklist:
[...snip...]
analyzer : 0.61 ( 2%) 0.01 ( 1%) 0.63 ( 2%)
0 ( 0%)
analyzer: supergraph : 0.04 ( 0%) 0.02 ( 2%) 0.06 ( 0%)
0 ( 0%)
analyzer: state purge : 0.57 ( 2%) 0.05 ( 5%) 0.62 ( 2%)
0 ( 0%)
analyzer: planning : 0.00 ( 0%) 0.00 ( 0%) 0.01 ( 0%)
0 ( 0%)
analyzer: processing worklist : 23.91 ( 82%) 0.50 ( 50%) 24.55 ( 80%)
24M ( 12%)
TOTAL : 29.32 1.00 30.51
200M
-Wanalyzer-too-complex shows that it eventually starts giving up.
The analyzer isn't going to have anything interesting to report on this code;
hopefully there are ways for it to go faster for this example.