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

            Bug ID: 115855
           Summary: Slow compilation of Firefox with -O2 (in callgraph
                    expansion)
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Keywords: compile-time-hog
          Severity: normal
          Priority: P3
         Component: ipa
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---

Using the original testcase from PR115836, compilation takes a large amount of
time. It comes from Firefox.

With `g++ -c gl.ii -m32 -Wno-attributes -ftime-report`, I get:
```
real    0m48.348s
user    0m39.089s
sys     0m8.994s
```

With `g++ -c gl.ii -m32 -Wno-attributes -ftime-report -O2`, I get:
```
real    1m23.516s
user    1m8.139s
sys     0m14.896s
```

This is with a checking compiler though so testing with =release would be
appreciated.

With -O2:
```
[...]
 phase opt and generate             :  63.81 ( 94%)  11.82 ( 81%)  76.07 ( 92%)
 1622M ( 80%)
 |name lookup                       :   0.54 (  1%)   0.38 (  3%)   1.17 (  1%)
 7911k (  0%)
 |overload resolution               :   1.01 (  1%)   0.39 (  3%)   1.52 (  2%)
  119M (  6%)
 garbage collection                 :   3.38 (  5%)   0.13 (  1%)   3.54 (  4%)
    0  (  0%)
 dump files                         :   0.77 (  1%)   0.33 (  2%)   0.99 (  1%)
    0  (  0%)
 callgraph construction             :   0.37 (  1%)   0.18 (  1%)   0.54 (  1%)
   51M (  3%)
 callgraph optimization             :   0.79 (  1%)   0.30 (  2%)   1.04 (  1%)
  108k (  0%)
 callgraph functions expansion      :  46.08 ( 68%)   5.71 ( 39%)  52.10 ( 63%)
  960M ( 48%)
 callgraph ipa passes               :  16.33 ( 24%)   5.67 ( 39%)  22.13 ( 27%)
  544M ( 27%)
[...]
```

Reply via email to