Reviewers: titzer,
Description:
Switch CFGBuilder to use NodeMarker.
[email protected]
Please review this at https://codereview.chromium.org/753063004/
Base URL:
https://chromium.googlesource.com/v8/v8.git@local_scheduler-minimal
Affected files (+10, -10 lines):
M src/compiler/scheduler.h
M src/compiler/scheduler.cc
Index: src/compiler/scheduler.cc
diff --git a/src/compiler/scheduler.cc b/src/compiler/scheduler.cc
index
6bb6b317bff09adac8a746d9019441d0b598c777..4b2d23bd30cf04e653157d54d8cd17327833d857
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),
@@ -312,11 +313,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);
}
}
@@ -503,11 +503,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.
};
Index: src/compiler/scheduler.h
diff --git a/src/compiler/scheduler.h b/src/compiler/scheduler.h
index
b83da7d23f19ff8a0886dd2fa4c20d985fe15f98..9da0b6daa49d93d31c53d8d6a0a43a0762c2a46a
100644
--- a/src/compiler/scheduler.h
+++ b/src/compiler/scheduler.h
@@ -49,7 +49,6 @@ class Scheduler {
struct SchedulerData {
BasicBlock* minimum_block_; // Minimum legal RPO placement.
int unscheduled_count_; // Number of unscheduled uses of this
node.
- bool is_connected_control_; // {true} if control-connected to the end
node.
Placement placement_; // Whether the node is fixed, schedulable,
// coupled to another node, or not yet
known.
};
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.