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

Unified Diff: src/hydrogen-gvn.h

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/flag-definitions.h ('k') | src/hydrogen-gvn.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-gvn.h
diff --git a/src/hydrogen-gvn.h b/src/hydrogen-gvn.h
index fdbad99c6bb4de6d2250dd427ef05ef5b6877ead..23b24404084d76c0471c6551999732a3f4d53b18 100644
--- a/src/hydrogen-gvn.h
+++ b/src/hydrogen-gvn.h
@@ -42,17 +42,16 @@ class HGlobalValueNumberingPhase : public HPhase {
explicit HGlobalValueNumberingPhase(HGraph* graph);
void Run() {
- Analyze();
- // Trigger a second analysis pass to further eliminate duplicate values
- // that could only be discovered by removing side-effect-generating
- // instructions during the first pass.
- if (FLAG_smi_only_arrays && removed_side_effects_) {
+ int max_fixpoint_iteration_count = FLAG_gvn_iterations;
+ for (int i = 0; i < max_fixpoint_iteration_count; i++) {
Analyze();
- // TODO(danno): Turn this into a fixpoint iteration.
+ if (!removed_side_effects_) break;
+ Reset();
}
}
private:
+ void Reset();
void Analyze();
GVNFlagSet CollectSideEffectsOnPathsToDominatedBlock(
HBasicBlock* dominator,
« no previous file with comments | « src/flag-definitions.h ('k') | src/hydrogen-gvn.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698