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

Unified Diff: src/hydrogen-escape-analysis.h

Issue 23533003: Implement fixpoint iteration for escape analysis. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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/deoptimizer.cc ('k') | src/hydrogen-escape-analysis.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-escape-analysis.h
diff --git a/src/hydrogen-escape-analysis.h b/src/hydrogen-escape-analysis.h
index 2d425e2ecd692e4831cd2c802fd0e597881b3f7c..ff796866a8475baa3ef80f457998cb460d9810b2 100644
--- a/src/hydrogen-escape-analysis.h
+++ b/src/hydrogen-escape-analysis.h
@@ -40,14 +40,17 @@ class HEscapeAnalysisPhase : public HPhase {
explicit HEscapeAnalysisPhase(HGraph* graph)
: HPhase("H_Escape analysis", graph),
captured_(0, zone()),
+ maybe_more_work_(true),
number_of_objects_(0),
number_of_values_(0),
cumulative_values_(0),
block_states_(graph->blocks()->length(), zone()) { }
void Run() {
titzer 2013/08/30 11:19:29 I would move this method into the .cc file and mak
Michael Starzinger 2013/09/17 13:47:13 Done. After rebasing I can just check for "capture
- CollectCapturedValues();
- PerformScalarReplacement();
+ for (int i = 0; i < kMaxFixpointIterationCount && maybe_more_work_; i++) {
+ CollectCapturedValues();
+ PerformScalarReplacement();
+ }
}
private:
@@ -71,9 +74,15 @@ class HEscapeAnalysisPhase : public HPhase {
block_states_.Set(block->block_id(), state);
}
+ // Maximum number of escape analysis iterations.
+ static const int kMaxFixpointIterationCount = 2;
+
// List of allocations captured during collection phase.
ZoneList<HInstruction*> captured_;
+ // Indicates another iteration might discover new captured objects.
+ bool maybe_more_work_;
+
// Number of captured objects on which scalar replacement was done.
int number_of_objects_;
« no previous file with comments | « src/deoptimizer.cc ('k') | src/hydrogen-escape-analysis.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698