[cfe-dev] Compilation benchmark: bzip2: Follow up data
Richard Pennington
rich at pennware.com
Sun Dec 23 02:50:28 PST 2007
Richard Pennington wrote:
[snip]
> Speed is a Really Good Thing, of course. That's one reason why I'm
> writing the ellsif driver (getting everything done in in-memory passes).
>
Here are two comparisons of compilation using -O0 and -O5. I'm not sure
if these optimization levels are the same as clangs. The sources have
been preprocessed by gcc. The only file I/O is reading the .i files. The
rest is done in memory. The last few lines with zero timings haven't
been implemented yet, but the number are fun, none the less:
[~/elsa/ellsif] dev% ./ellsif -v test/ofmt.i test/sieve.i -time-actions -O5
<premain>: CommandLine Error: Argument 'machine-licm' defined more than
once!
ellsif: CommandLine Error: Argument 'machine-licm' defined more than once!
Adding test/ofmt.i as a preprocessed C file
Adding test/sieve.i as a preprocessed C file
Phase: Preprocessing
test/ofmt.i is ignored during this phase
test/sieve.i is ignored during this phase
Phase: Translation
compile test/ofmt.i to become an unoptimized LLVM bitcode file
typechecking results:
errors: 0
warnings: 0
compile test/sieve.i to become an unoptimized LLVM bitcode file
typechecking results:
errors: 0
warnings: 0
Phase: Optimization
optimize ofmt.ubc to become an LLVM bitcode file
optimize sieve.ubc to become an LLVM bitcode file
Phase: Bitcode linking
bclink ofmt.bc to become a file that has been linked
bclink sieve.bc to become a file that has been linked
bclink a.bc added to the file list
Phase: Bitcode to assembly
ofmt.bc is ignored during this phase
sieve.bc is ignored during this phase
bcassemble a.bc to become an assembly source file
Phase: Assembly
ofmt.bc is ignored during this phase
sieve.bc is ignored during this phase
assemble a.s to become an object file, linker command file, etc
Phase: Linking
ofmt.bc is ignored during this phase
sieve.bc is ignored during this phase
link a.o to become a file that has been linked
===-------------------------------------------------------------------------===
... Ellsif action timing report ...
===-------------------------------------------------------------------------===
Total Execution Time: 0.4880 seconds (0.7018 wall clock)
---User Time--- --System Time-- --User+System-- ---Wall
Time--- --- Name ---
0.2080 ( 44.8%) 0.0000 ( 0.0%) 0.2080 ( 42.6%) 0.3169 (
45.1%) Optimization
0.2000 ( 43.1%) 0.0200 ( 83.3%) 0.2200 ( 45.0%) 0.3010 (
42.8%) Type checking
0.0160 ( 3.4%) 0.0000 ( 0.0%) 0.0160 ( 3.2%) 0.0327 (
4.6%) Elaboration
0.0200 ( 4.3%) 0.0040 ( 16.6%) 0.0240 ( 4.9%) 0.0241 (
3.4%) LLVM generation
0.0120 ( 2.5%) 0.0000 ( 0.0%) 0.0120 ( 2.4%) 0.0148 (
2.1%) Integrity checking
0.0080 ( 1.7%) 0.0000 ( 0.0%) 0.0080 ( 1.6%) 0.0099 (
1.4%) Bitcode linking
0.0000 ( 0.0%) 0.0000 ( 0.0%) 0.0000 ( 0.0%) 0.0020 (
0.2%) Parsing
0.0000 ( 0.0%) 0.0000 ( 0.0%) 0.0000 ( 0.0%) 0.0000 (
0.0%) Bitcode to assembly
0.0000 ( 0.0%) 0.0000 ( 0.0%) 0.0000 ( 0.0%) 0.0000 (
0.0%) Assembly
0.0000 ( 0.0%) 0.0000 ( 0.0%) 0.0000 ( 0.0%) 0.0000 (
0.0%) Linking
0.4640 (100.0%) 0.0240 (100.0%) 0.4880 (100.0%) 0.7018
(100.0%) TOTAL
[~/elsa/ellsif] dev% ./ellsif -v test/ofmt.i test/sieve.i -time-actions -O0
<premain>: CommandLine Error: Argument 'machine-licm' defined more than
once!
ellsif: CommandLine Error: Argument 'machine-licm' defined more than once!
Adding test/ofmt.i as a preprocessed C file
Adding test/sieve.i as a preprocessed C file
Phase: Preprocessing
test/ofmt.i is ignored during this phase
test/sieve.i is ignored during this phase
Phase: Translation
compile test/ofmt.i to become an unoptimized LLVM bitcode file
typechecking results:
errors: 0
warnings: 0
compile test/sieve.i to become an unoptimized LLVM bitcode file
typechecking results:
errors: 0
warnings: 0
Phase: Optimization
optimize ofmt.ubc to become an LLVM bitcode file
optimize sieve.ubc to become an LLVM bitcode file
Phase: Bitcode linking
bclink ofmt.bc to become a file that has been linked
bclink sieve.bc to become a file that has been linked
bclink a.bc added to the file list
Phase: Bitcode to assembly
ofmt.bc is ignored during this phase
sieve.bc is ignored during this phase
bcassemble a.bc to become an assembly source file
Phase: Assembly
ofmt.bc is ignored during this phase
sieve.bc is ignored during this phase
assemble a.s to become an object file, linker command file, etc
Phase: Linking
ofmt.bc is ignored during this phase
sieve.bc is ignored during this phase
link a.o to become a file that has been linked
===-------------------------------------------------------------------------===
... Ellsif action timing report ...
===-------------------------------------------------------------------------===
Total Execution Time: 0.3040 seconds (0.4440 wall clock)
---User Time--- --System Time-- --User+System-- ---Wall
Time--- --- Name ---
0.2040 ( 69.8%) 0.0120 (100.0%) 0.2160 ( 71.0%) 0.2445 (
55.0%) Type checking
0.0200 ( 6.8%) 0.0000 ( 0.0%) 0.0200 ( 6.5%) 0.1199 (
27.0%) Bitcode linking
0.0200 ( 6.8%) 0.0000 ( 0.0%) 0.0200 ( 6.5%) 0.0350 (
7.8%) Elaboration
0.0240 ( 8.2%) 0.0000 ( 0.0%) 0.0240 ( 7.8%) 0.0244 (
5.5%) LLVM generation
0.0120 ( 4.1%) 0.0000 ( 0.0%) 0.0120 ( 3.9%) 0.0126 (
2.8%) Integrity checking
0.0079 ( 2.7%) 0.0000 ( 0.0%) 0.0079 ( 2.6%) 0.0052 (
1.1%) Optimization
0.0040 ( 1.3%) 0.0000 ( 0.0%) 0.0040 ( 1.3%) 0.0021 (
0.4%) Parsing
0.0000 ( 0.0%) 0.0000 ( 0.0%) 0.0000 ( 0.0%) 0.0000 (
0.0%) Bitcode to assembly
0.0000 ( 0.0%) 0.0000 ( 0.0%) 0.0000 ( 0.0%) 0.0000 (
0.0%) Assembly
0.0000 ( 0.0%) 0.0000 ( 0.0%) 0.0000 ( 0.0%) 0.0000 (
0.0%) Linking
0.2920 (100.0%) 0.0120 (100.0%) 0.3040 (100.0%) 0.4440
(100.0%) TOTAL
[~/elsa/ellsif] dev%
As soon as I get assembly output done I'll try it on bzip2.
-Rich
More information about the cfe-dev
mailing list