diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2011-01-19 11:06:13 -0800 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2011-01-19 11:06:13 -0800 |
commit | b8f006ef72bb518397483d5b43111ddbcff250c8 (patch) | |
tree | 0bd0a7f2ae70606aca210c38596fa8f2f6e52194 /deps/v8/src/hydrogen.cc | |
parent | e6e6e87463d4b1d3d8d5c129e4d008d35a1b5463 (diff) | |
download | node-new-b8f006ef72bb518397483d5b43111ddbcff250c8.tar.gz |
Upgrade V8 to 3.0.9
Diffstat (limited to 'deps/v8/src/hydrogen.cc')
-rw-r--r-- | deps/v8/src/hydrogen.cc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/deps/v8/src/hydrogen.cc b/deps/v8/src/hydrogen.cc index 7aa66fd619..da41ef94dc 100644 --- a/deps/v8/src/hydrogen.cc +++ b/deps/v8/src/hydrogen.cc @@ -687,6 +687,11 @@ HGraph::HGraph(CompilationInfo* info) } +bool HGraph::AllowAggressiveOptimizations() const { + return info()->shared_info()->opt_count() + 1 < Compiler::kDefaultMaxOptCount; +} + + Handle<Code> HGraph::Compile() { int values = GetMaximumValueID(); if (values > LAllocator::max_initial_value_ids()) { @@ -1453,8 +1458,12 @@ void HGlobalValueNumberer::ProcessLoopBlock(HBasicBlock* block, // about code that was never executed. bool HGlobalValueNumberer::ShouldMove(HInstruction* instr, HBasicBlock* loop_header) { - if (!instr->IsChange() && - FLAG_aggressive_loop_invariant_motion) return true; + if (FLAG_aggressive_loop_invariant_motion && + !instr->IsChange() && + (!instr->IsCheckInstruction() || + graph_->AllowAggressiveOptimizations())) { + return true; + } HBasicBlock* block = instr->block(); bool result = true; if (block != loop_header) { |