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

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

Issue 192673002: Merge the "Compute Minus Zero Checks" phase into the range analysis. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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-minus-zero.cc ('k') | src/hydrogen-range-analysis.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-range-analysis.h
diff --git a/src/hydrogen-range-analysis.h b/src/hydrogen-range-analysis.h
index a1e9737c5e08c0ad79e0c1a215c25d660c617619..e0cc3c5dad618dd2ebe6866f26b08bf1f841d4d9 100644
--- a/src/hydrogen-range-analysis.h
+++ b/src/hydrogen-range-analysis.h
@@ -37,7 +37,9 @@ namespace internal {
class HRangeAnalysisPhase : public HPhase {
public:
explicit HRangeAnalysisPhase(HGraph* graph)
- : HPhase("H_Range analysis", graph), changed_ranges_(16, zone()) { }
+ : HPhase("H_Range analysis", graph), changed_ranges_(16, zone()),
+ in_worklist_(graph->GetMaximumValueID(), zone()),
+ worklist_(32, zone()) {}
void Run();
@@ -49,8 +51,19 @@ class HRangeAnalysisPhase : public HPhase {
void InferRange(HValue* value);
void RollBackTo(int index);
void AddRange(HValue* value, Range* range);
+ void AddToWorklist(HValue* value) {
+ if (in_worklist_.Contains(value->id())) return;
+ in_worklist_.Add(value->id());
+ worklist_.Add(value, zone());
+ }
+ void PropagateMinusZeroChecks(HValue* value);
ZoneList<HValue*> changed_ranges_;
+
+ BitVector in_worklist_;
+ ZoneList<HValue*> worklist_;
+
+ DISALLOW_COPY_AND_ASSIGN(HRangeAnalysisPhase);
};
« no previous file with comments | « src/hydrogen-minus-zero.cc ('k') | src/hydrogen-range-analysis.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698