Browse files

Make block inlining a level 2 optimization.

It's quite worthwhile; we've had it as a level 3 optimization for a
long while now, applying it to the setting. perl6-bench also used it.
For a while, lack of OSR in MoarVM meant it could make things worse in
the odd case; now that's dealt with, and the issues that caused it to
blow up a few spectests have been isolated, we'll try enabling it as
a default optimization. Plenty of time up to release for testing.
  • Loading branch information...
jnthn committed Jun 29, 2014
1 parent f12ff54 commit a39c092b4e0f046359d6c9e5d3f8e77dc34caa79
Showing with 1 addition and 4 deletions.
  1. +1 −4 src/Perl6/Optimizer.nqp
@@ -860,11 +860,8 @@ class Perl6::Optimizer {
# If we have no interesting ones, then we can inline the
# statements.
# XXX We can also check for lack of colliding symbols and
# do something in that case. However, it's non-trivial as
# the static lexpad entries will need twiddling with.
if +@sigsyms == 0 {
if $!level >= 3 {
if $!level >= 2 {
my $outer := $!symbols.top_block;
$result := self.inline_immediate_block($block, $outer,
nqp::existskey($vars_info.get_decls(), '$_'));

0 comments on commit a39c092

Please sign in to comment.