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

Unified Diff: src/compiler/scheduler.h

Issue 460633002: Remove duplication in Scheduler and simplify interface. Make ComputeSchedule() and ComputeSpecialRP… (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/raw-machine-assembler.cc ('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 843b071a9832bb18320ea309e73990a9dc84b05c..dabffff53947216f60dfe9a18b3fd8d033c44383 100644
--- a/src/compiler/scheduler.h
+++ b/src/compiler/scheduler.h
@@ -18,14 +18,15 @@ namespace v8 {
namespace internal {
namespace compiler {
+// Computes a schedule from a graph, placing nodes into basic blocks and
+// ordering the basic blocks in the special RPO order.
class Scheduler {
public:
- explicit Scheduler(Zone* zone);
- Scheduler(Zone* zone, Graph* graph, Schedule* schedule);
-
- Schedule* NewSchedule(Graph* graph);
+ // Create a new schedule and place all computations from the graph in it.
+ static Schedule* ComputeSchedule(Graph* graph);
- BasicBlockVector* ComputeSpecialRPO();
+ // Compute the RPO of blocks in an existing schedule.
+ static BasicBlockVector* ComputeSpecialRPO(Schedule* schedule);
private:
Zone* zone_;
@@ -42,6 +43,8 @@ class Scheduler {
NodeVector schedule_root_nodes_;
IntVector schedule_early_rpo_index_;
+ Scheduler(Zone* zone, Graph* graph, Schedule* schedule);
+
int GetRPONumber(BasicBlock* block) {
DCHECK(block->rpo_number_ >= 0 &&
block->rpo_number_ < static_cast<int>(schedule_->rpo_order_.size()));
« no previous file with comments | « src/compiler/raw-machine-assembler.cc ('k') | src/compiler/scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698