about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorBjörn Steinbrink <bsteinbr@gmail.com>2013-07-07 14:53:57 +0200
committerBjörn Steinbrink <bsteinbr@gmail.com>2013-07-07 14:53:57 +0200
commite41e4358516190bf84172f21d9e25e45da81caf4 (patch)
tree989b8411bb0f03215e26f9d6c61828e74a1190eb /src/libsyntax/parse/parser.rs
parent6595c42577964247aaf7f61e5f054902c2ce1d45 (diff)
downloadrust-e41e4358516190bf84172f21d9e25e45da81caf4.tar.gz
rust-e41e4358516190bf84172f21d9e25e45da81caf4.zip
Implement scopes independent of LLVM basic blocks
Currently, scopes are tied to LLVM basic blocks. For each scope, there
are two new basic blocks, which means two extra jumps in the unoptimized
IR. These blocks aren't actually required, but only used to act as the
boundary for cleanups.

By keeping track of the current scope within a single basic block, we
can avoid those extra blocks and jumps, shrinking the pre-optimization
IR quite considerably. For example, the IR for trans_intrinsic goes
from ~22k lines to ~16k lines, almost 30% less.

The impact on the build times of optimized builds is rather small (about
1%), but unoptimized builds are about 11% faster. The testsuite for
unoptimized builds runs between 15% (CPU time) and 7.5% (wallclock time on
my i7) faster.

Also, in some situations this helps LLVM to generate better code by
inlining functions that it previously considered to be too large.
Likely because of the pointless blocks/jumps that were still present at
the time the inlining pass runs.

Refs #7462
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
0 files changed, 0 insertions, 0 deletions