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

Unified Diff: src/hydrogen-load-elimination.cc

Issue 151333003: Load elimination fix: load should not be replaced with another load if the former is not dominated … (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 11 months 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
« no previous file with comments | « src/hydrogen.cc ('k') | test/mjsunit/compiler/load-elimination.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-load-elimination.cc
diff --git a/src/hydrogen-load-elimination.cc b/src/hydrogen-load-elimination.cc
index ea12df865d7b0d91a43eb6f7162374e538509afb..634d75d8620f5ec866048f9794b8e2ff87a5a0a2 100644
--- a/src/hydrogen-load-elimination.cc
+++ b/src/hydrogen-load-elimination.cc
@@ -203,9 +203,12 @@ class HLoadEliminationTable : public ZoneObject {
// Load is not redundant. Fill out a new entry.
approx->last_value_ = instr;
return instr;
- } else {
+ } else if (approx->last_value_->block()->EqualToOrDominates(
+ instr->block())) {
// Eliminate the load. Reuse previously stored value or load instruction.
return approx->last_value_;
+ } else {
+ return instr;
}
}
« no previous file with comments | « src/hydrogen.cc ('k') | test/mjsunit/compiler/load-elimination.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698