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

Unified Diff: src/compiler/scheduler.h

Issue 499363002: Schedule floating control. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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/compiler/schedule.h ('k') | 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 f7c77989e1c5136c1b83a4f1f293dd3a6ba5f389..773cbfa45db1d432208708a859d391ec49f368a6 100644
--- a/src/compiler/scheduler.h
+++ b/src/compiler/scheduler.h
@@ -31,19 +31,37 @@ class Scheduler {
static void ComputeCFG(Graph* graph, Schedule* schedule);
private:
+ enum Placement { kUnknown, kSchedulable, kFixed };
+
+ // Per-node data tracked during scheduling.
+ struct SchedulerData {
+ int unscheduled_count_; // Number of unscheduled uses of this node.
+ int minimum_rpo_; // Minimum legal RPO placement.
+ bool is_connected_control_; // {true} if control-connected to the end node.
+ bool is_floating_control_; // {true} if control, but not control-connected
+ // to the end node.
+ Placement placement_ : 3; // Whether the node is fixed, schedulable,
+ // or not yet known.
+ };
+
Zone* zone_;
Graph* graph_;
Schedule* schedule_;
- IntVector unscheduled_uses_;
NodeVectorVector scheduled_nodes_;
NodeVector schedule_root_nodes_;
- IntVector schedule_early_rpo_index_;
+ ZoneVector<SchedulerData> node_data_;
+ bool has_floating_control_;
Scheduler(Zone* zone, Graph* graph, Schedule* schedule);
- bool IsBasicBlockBegin(Node* node);
- bool HasFixedSchedulePosition(Node* node);
- bool IsScheduleRoot(Node* node);
+ SchedulerData* GetData(Node* node) {
+ DCHECK(node->id() < static_cast<int>(node_data_.size()));
+ return &node_data_[node->id()];
+ }
+
+ void BuildCFG();
+
+ Placement GetPlacement(Node* node);
int GetRPONumber(BasicBlock* block) {
DCHECK(block->rpo_number_ >= 0 &&
@@ -52,12 +70,11 @@ class Scheduler {
return block->rpo_number_;
}
- void PrepareAuxiliaryNodeData();
- void PrepareAuxiliaryBlockData();
-
void GenerateImmediateDominatorTree();
BasicBlock* GetCommonDominator(BasicBlock* b1, BasicBlock* b2);
+ friend class CFGBuilder;
+
friend class ScheduleEarlyNodeVisitor;
void ScheduleEarly();
@@ -66,6 +83,10 @@ class Scheduler {
friend class ScheduleLateNodeVisitor;
void ScheduleLate();
+
+ bool ConnectFloatingControl();
+
+ void ConnectFloatingControlSubgraph(BasicBlock* block, Node* node);
};
}
}
« no previous file with comments | « src/compiler/schedule.h ('k') | src/compiler/scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698