Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1527)

Unified Diff: src/hydrogen-gvn.cc

Issue 106723002: Fix loop side-effects of deoptimizing loops with a nested live OSR loop. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/hydrogen-gvn.cc
diff --git a/src/hydrogen-gvn.cc b/src/hydrogen-gvn.cc
index 02b3a0a2c94dc217f625f78556cf1ab8cb0e95c1..1da477cf8413efc6f13c39075a2b104fb2e6052c 100644
--- a/src/hydrogen-gvn.cc
+++ b/src/hydrogen-gvn.cc
@@ -412,10 +412,13 @@ void HGlobalValueNumberingPhase::ComputeBlockSideEffects() {
// Propagate loop side effects upwards.
if (block->HasParentLoopHeader()) {
- int header_id = block->parent_loop_header()->block_id();
- loop_side_effects_[header_id].Add(block->IsLoopHeader()
- ? loop_side_effects_[id]
- : side_effects);
+ HBasicBlock* with_parent = block;
+ if (block->IsLoopHeader()) side_effects = loop_side_effects_[id];
+ while (with_parent->HasParentLoopHeader()) {
+ HBasicBlock* parent_block = with_parent->parent_loop_header();
+ loop_side_effects_[parent_block->block_id()].Add(side_effects);
+ with_parent = parent_block;
+ }
}
}
}
@@ -567,7 +570,9 @@ void HGlobalValueNumberingPhase::ProcessLoopBlock(
}
if (inputs_loop_invariant && ShouldMove(instr, loop_header)) {
- TRACE_GVN_1("Hoisting loop invariant instruction %d\n", instr->id());
+ TRACE_GVN_3("Hoisting loop invariant instruction %d %d %s\n",
titzer 2013/12/05 17:52:09 would like to see "Hoisting loop invariant instru
+ instr->id(), pre_header->block_id(),
+ *GetGVNFlagsString(loop_kills));
// Move the instruction out of the loop.
instr->Unlink();
instr->InsertBefore(pre_header->end());
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-context-osr.js » ('j') | test/mjsunit/regress/regress-context-osr.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698