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

Unified Diff: src/compiler/scheduler.h

Issue 426233002: Land the Fan (disabled) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback, rebase and "git cl format" Created 6 years, 5 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.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
new file mode 100644
index 0000000000000000000000000000000000000000..18e8f92769aad9bc0f129dcdaab8e0fb9f1da812
--- /dev/null
+++ b/src/compiler/scheduler.h
@@ -0,0 +1,82 @@
+// Copyright 2013 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef V8_COMPILER_SCHEDULER_H_
+#define V8_COMPILER_SCHEDULER_H_
+
+#include <vector>
+
+#include "src/v8.h"
+
+#include "src/compiler/opcodes.h"
+#include "src/compiler/schedule.h"
+#include "src/zone-allocator.h"
+#include "src/zone-containers.h"
+
+namespace v8 {
+namespace internal {
+namespace compiler {
+
+class Scheduler {
+ public:
+ explicit Scheduler(Zone* zone);
+ Scheduler(Zone* zone, Graph* graph, Schedule* schedule);
+
+ Schedule* NewSchedule(Graph* graph);
+
+ BasicBlockVector* ComputeSpecialRPO();
+
+ private:
+ Zone* zone_;
+ Graph* graph_;
+ Schedule* schedule_;
+ NodeVector branches_;
+ NodeVector calls_;
+ NodeVector deopts_;
+ NodeVector returns_;
+ NodeVector loops_and_merges_;
+ BasicBlockVector node_block_placement_;
+ IntVector unscheduled_uses_;
+ NodeVectorVector scheduled_nodes_;
+ NodeVector schedule_root_nodes_;
+ IntVector schedule_early_rpo_index_;
+
+ int GetRPONumber(BasicBlock* block) {
+ ASSERT(block->rpo_number_ >= 0 &&
+ block->rpo_number_ < static_cast<int>(schedule_->rpo_order_.size()));
+ ASSERT(schedule_->rpo_order_[block->rpo_number_] == block);
+ return block->rpo_number_;
+ }
+
+ void PrepareAuxiliaryNodeData();
+ void PrepareAuxiliaryBlockData();
+
+ friend class CreateBlockVisitor;
+ void CreateBlocks();
+
+ void WireBlocks();
+
+ void AddPredecessorsForLoopsAndMerges();
+ void AddSuccessorsForBranches();
+ void AddSuccessorsForReturns();
+ void AddSuccessorsForCalls();
+ void AddSuccessorsForDeopts();
+
+ void GenerateImmediateDominatorTree();
+ BasicBlock* GetCommonDominator(BasicBlock* b1, BasicBlock* b2);
+
+ friend class ScheduleEarlyNodeVisitor;
+ void ScheduleEarly();
+
+ friend class PrepareUsesVisitor;
+ void PrepareUses();
+
+ friend class ScheduleLateNodeVisitor;
+ void ScheduleLate();
+};
+}
+}
+} // namespace v8::internal::compiler
+
+#endif // V8_COMPILER_SCHEDULER_H_
« no previous file with comments | « src/compiler/schedule.cc ('k') | src/compiler/scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698