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

Unified Diff: src/compiler/scheduler.h

Issue 642803003: Improve comments and readability of scheduler. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 854e27d4203ca3fe620e38da4accc30de3f0baf0..9e806814dec2aa7188a7118ccaf303648b50b1ae 100644
--- a/src/compiler/scheduler.h
+++ b/src/compiler/scheduler.h
@@ -19,17 +19,13 @@ namespace compiler {
// ordering the basic blocks in the special RPO order.
class Scheduler {
public:
- // The complete scheduling algorithm.
- // Create a new schedule and place all nodes from the graph into it.
+ // The complete scheduling algorithm. Creates a new schedule and places all
+ // nodes from the graph into it.
static Schedule* ComputeSchedule(Graph* graph);
// Compute the RPO of blocks in an existing schedule.
static BasicBlockVector* ComputeSpecialRPO(Schedule* schedule);
- // (Exposed for testing only)
- // Build and connect the CFG for a node graph, but don't schedule nodes.
- static void ComputeCFG(Graph* graph, Schedule* schedule);
-
private:
enum Placement { kUnknown, kSchedulable, kFixed };
@@ -61,8 +57,6 @@ class Scheduler {
return &node_data_[node->id()];
}
- void BuildCFG();
-
Placement GetPlacement(Node* node);
int GetRPONumber(BasicBlock* block) {
@@ -73,26 +67,31 @@ class Scheduler {
return block->rpo_number();
}
- void GenerateImmediateDominatorTree();
BasicBlock* GetCommonDominator(BasicBlock* b1, BasicBlock* b2);
+ // Phase 1: Build control-flow graph and dominator tree.
friend class CFGBuilder;
+ void BuildCFG();
+ void GenerateImmediateDominatorTree();
- friend class ScheduleEarlyNodeVisitor;
- void ScheduleEarly();
-
+ // Phase 2: Prepare use counts for nodes.
friend class PrepareUsesVisitor;
void PrepareUses();
+ // Phase 3: Schedule nodes early.
+ friend class ScheduleEarlyNodeVisitor;
+ void ScheduleEarly();
+
+ // Phase 4: Schedule nodes late.
friend class ScheduleLateNodeVisitor;
void ScheduleLate();
bool ConnectFloatingControl();
-
void ConnectFloatingControlSubgraph(BasicBlock* block, Node* node);
};
-}
-}
-} // namespace v8::internal::compiler
+
+} // namespace compiler
+} // namespace internal
+} // namespace v8
#endif // V8_COMPILER_SCHEDULER_H_
« 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