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

Unified Diff: src/compiler/scheduler.h

Issue 685773002: Switch scheduler to iterative floating control placement. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Jaro. Created 6 years, 2 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 | « no previous file | src/compiler/scheduler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/scheduler.h
diff --git a/src/compiler/scheduler.h b/src/compiler/scheduler.h
index a0addbdc2c11b719635b374cea6888253a413722..25e93f96cbd35d18fb760028b11908f15eb202c7 100644
--- a/src/compiler/scheduler.h
+++ b/src/compiler/scheduler.h
@@ -29,7 +29,18 @@ class Scheduler {
Schedule* schedule);
private:
- enum Placement { kUnknown, kSchedulable, kFixed, kCoupled };
+ // Placement of a node changes during scheduling. The placement state
+ // transitions over time while the scheduler is choosing a position:
+ //
+ // +---------------------+-----+----> kFixed
+ // / / /
+ // kUnknown ----+------> kCoupled ----+ /
+ // \ /
+ // +----> kSchedulable ----+--------> kScheduled
+ //
+ // 1) GetPlacement(): kUnknown -> kCoupled|kSchedulable|kFixed
+ // 2) UpdatePlacement(): kCoupled|kSchedulable -> kFixed|kScheduled
+ enum Placement { kUnknown, kSchedulable, kFixed, kCoupled, kScheduled };
// Per-node data tracked during scheduling.
struct SchedulerData {
@@ -49,7 +60,6 @@ class Scheduler {
NodeVector schedule_root_nodes_; // Fixed root nodes seed the worklist.
ZoneQueue<Node*> schedule_queue_; // Worklist of schedulable nodes.
ZoneVector<SchedulerData> node_data_; // Per-node data for all nodes.
- bool has_floating_control_;
Scheduler(Zone* zone, Graph* graph, Schedule* schedule);
@@ -57,6 +67,7 @@ class Scheduler {
inline SchedulerData* GetData(Node* node);
Placement GetPlacement(Node* node);
+ void UpdatePlacement(Node* node, Placement placement);
void IncrementUnscheduledUseCount(Node* node, Node* from);
void DecrementUnscheduledUseCount(Node* node, Node* from);
@@ -85,8 +96,8 @@ class Scheduler {
friend class ScheduleLateNodeVisitor;
void ScheduleLate();
- bool ConnectFloatingControl();
- void ConnectFloatingControlSubgraph(BasicBlock* block, Node* node);
+ void FuseFloatingControl(BasicBlock* block, Node* node);
+ void MovePlannedNodes(BasicBlock* from, BasicBlock* to);
};
} // namespace compiler
« no previous file with comments | « no previous file | src/compiler/scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698