time spent in compiler phases

meissner@osf.org (Michael Meissner)
Thu, 3 Oct 91 22:34:05 -0400

          From comp.compilers

Related articles
time spent in compiler phases greg@cs.heriot-watt.ac.uk (Greg Michaelson) (1991-09-26)
time spent in compiler phases haertel@euclid.uoregon.edu (1991-09-29)
time spent in compiler phases meissner@osf.org (1991-10-03)
| List of all articles for this month |
Newsgroups: comp.compilers
From: meissner@osf.org (Michael Meissner)
Keywords: performance, C
Organization: Compilers Central
References: 91-09-077
Date: Thu, 3 Oct 91 22:34:05 -0400

| Does any one have figures for the proportion of total compile time
| spent in lexical analysis, syntax analysis, semantic analysis, code
| generation and optimisation?


The GNU GCC compiler has an option -Q, which prints the time in seconds
for various phases of the main part of the compiler, and also traces each
function as it is being compiled to stderr. Here is the -Q output for the
MIPS compiler, comparing -g, -O, and -O3 optimizations. The file being
compiled is aux-output.c (aka out-mips.c) from the current gcc 2.00 alpha
version. I have included timings for the 1.39 production compiler we use
within OSF/1, and the current alpha version of 2.00:


1.39 -g 1.39 -O 1.39 -O3
======= ======= ========
time in parse: 11.608632 8.737722 8.433054
time in integration: 0.011718 0.003906 0.179676
time in md pre opt: 0.039060 0.019530 0.035154
time in jump: 0.000000 0.699174 0.675738
time in cse: 0.000000 2.804508 2.988090
time in loop: 0.000000 0.328104 0.457002
time in flow: 2.081898 2.035026 2.230326
time in combine: 0.000000 0.761670 0.859320
time in md post opt: 0.000000 0.000000 0.000000
time in local-alloc: 0.000000 1.183518 1.324134
time in global-alloc: 2.870910 2.386566 2.480310
time in dbranch: 0.000000 0.000000 0.000000
time in final: 4.499712 2.433438 2.390472
time in varconst: 0.976500 0.507780 0.382788
time in symout: 0.441378 0.000000 0.000000
time in dump: 0.000000 0.000000 0.000000


1.95 -g 1.95 -O 1.95 -O3
======= ======= ========
time in parse: 9.015048 9.350964 8.620542
time in integration: 0.011718 0.003906 0.164052
time in jump: 0.000000 1.913940 2.437344
time in cse: 0.000000 3.730230 6.667542
time in loop: 0.000000 0.382788 0.542934
time in cse2: 0.000000 0.000000 5.558238
time in flow: 1.867068 2.058462 2.074086
time in combine: 0.000000 3.620862 3.823974
time in sched: 0.000000 0.000000 4.964526
time in local-alloc: 0.000000 1.421784 1.285074
time in global-alloc: 2.425626 3.644298 3.577896
time in sched2: 0.000000 0.000000 2.230326
time in dbranch: 0.000000 3.761478 3.656016
time in shorten-branch: 0.000000 0.402318 0.398412
time in stack-reg: 0.000000 0.000000 0.000000
time in final: 2.820132 2.140488 2.074086
time in varconst: 0.453096 0.488250 0.320292
time in symout: 0.574182 0.000000 0.000000
time in dump: 0.000000 0.000000 0.000000


--
Michael Meissner email: meissner@osf.org phone: 617-621-8861
Open Software Foundation, 11 Cambridge Center, Cambridge, MA, 02142
[Parsing looks slow, but remember that there is a lot of other stuff done
during the parsing phase, e.g. creating the symbol table. I'm not sure how
you'd pick out just the parsing. -John]
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.