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

Unified Diff: src/compiler/scheduler.cc

Issue 753063004: Switch CFGBuilder to use NodeMarker. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_scheduler-minimal
Patch Set: Rebased. Created 6 years 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/compiler/scheduler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/scheduler.cc
diff --git a/src/compiler/scheduler.cc b/src/compiler/scheduler.cc
index 03c4c377f913ad1e432f495ffaa45124fb4ce77c..96d1c3715f6e956c82154218eca3021a994740c1 100644
--- a/src/compiler/scheduler.cc
+++ b/src/compiler/scheduler.cc
@@ -59,7 +59,7 @@ Schedule* Scheduler::ComputeSchedule(Zone* zone, Graph* graph) {
Scheduler::SchedulerData Scheduler::DefaultSchedulerData() {
- SchedulerData def = {schedule_->start(), 0, false, kUnknown};
+ SchedulerData def = {schedule_->start(), 0, kUnknown};
return def;
}
@@ -235,6 +235,7 @@ class CFGBuilder : public ZoneObject {
CFGBuilder(Zone* zone, Scheduler* scheduler)
: scheduler_(scheduler),
schedule_(scheduler->schedule_),
+ queued_(scheduler->graph_, 2),
queue_(zone),
control_(zone),
component_entry_(NULL),
@@ -309,11 +310,10 @@ class CFGBuilder : public ZoneObject {
void Queue(Node* node) {
// Mark the connected control nodes as they are queued.
- Scheduler::SchedulerData* data = scheduler_->GetData(node);
- if (!data->is_connected_control_) {
- data->is_connected_control_ = true;
+ if (!queued_.Get(node)) {
BuildBlocks(node);
queue_.push(node);
+ queued_.Set(node, true);
control_.push_back(node);
}
}
@@ -500,11 +500,12 @@ class CFGBuilder : public ZoneObject {
Scheduler* scheduler_;
Schedule* schedule_;
- ZoneQueue<Node*> queue_;
- NodeVector control_;
- Node* component_entry_;
- BasicBlock* component_start_;
- BasicBlock* component_end_;
+ NodeMarker<bool> queued_; // Mark indicating whether node is queued.
+ ZoneQueue<Node*> queue_; // Queue used for breadth-first traversal.
+ NodeVector control_; // List of encountered control nodes.
+ Node* component_entry_; // Component single-entry node.
+ BasicBlock* component_start_; // Component single-entry block.
+ BasicBlock* component_end_; // Component single-exit block.
};
« no previous file with comments | « src/compiler/scheduler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698