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

Unified Diff: src/hydrogen-gvn.cc

Issue 149573014: Perform a fix point iteration for GVN. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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-gvn.h ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-gvn.cc
diff --git a/src/hydrogen-gvn.cc b/src/hydrogen-gvn.cc
index 3ad93129cd9c981fd9d61784ce1011335a21d4a9..905fd86c99034175836445d3379ee701f3c387ab 100644
--- a/src/hydrogen-gvn.cc
+++ b/src/hydrogen-gvn.cc
@@ -374,7 +374,19 @@ HGlobalValueNumberingPhase::HGlobalValueNumberingPhase(HGraph* graph)
zone());
loop_side_effects_.AddBlock(GVNFlagSet(), graph->blocks()->length(),
zone());
- }
+}
+
+
+void HGlobalValueNumberingPhase::Reset() {
+ block_side_effects_.Clear();
+ loop_side_effects_.Clear();
+ visited_on_paths_.Clear();
+ block_side_effects_.AddBlock(GVNFlagSet(), graph()->blocks()->length(),
+ zone());
+ loop_side_effects_.AddBlock(GVNFlagSet(), graph()->blocks()->length(),
+ zone());
+}
+
void HGlobalValueNumberingPhase::Analyze() {
removed_side_effects_ = false;
@@ -791,7 +803,9 @@ void HGlobalValueNumberingPhase::AnalyzeGraph() {
instr->Mnemonic(),
other->id(),
other->Mnemonic());
- instr->HandleSideEffectDominator(changes_flag, other);
+ if (instr->HandleSideEffectDominator(changes_flag, other)) {
+ removed_side_effects_ = true;
+ }
}
}
}
« no previous file with comments | « src/hydrogen-gvn.h ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698