Index: src/compiler/scheduler.h |
diff --git a/src/compiler/scheduler.h b/src/compiler/scheduler.h |
index b4cea23328618cc8d339dc08adab6c6c3d509f11..882c761f2d524bf2ea4600263fa9731e09210998 100644 |
--- a/src/compiler/scheduler.h |
+++ b/src/compiler/scheduler.h |
@@ -7,6 +7,7 @@ |
#include "src/v8.h" |
+#include "src/base/flags.h" |
#include "src/compiler/node.h" |
#include "src/compiler/opcodes.h" |
#include "src/compiler/schedule.h" |
@@ -28,9 +29,13 @@ class SpecialRPONumberer; |
// ordering the basic blocks in the special RPO order. |
class Scheduler { |
public: |
+ // Flags that control the mode of operation. |
+ enum Flag { kNoFlags = 0u, kSplitNodes = 1u << 1 }; |
+ typedef base::Flags<Flag> Flags; |
+ |
// The complete scheduling algorithm. Creates a new schedule and places all |
// nodes from the graph into it. |
- static Schedule* ComputeSchedule(Zone* zone, Graph* graph); |
+ static Schedule* ComputeSchedule(Zone* zone, Graph* graph, Flags flags); |
// Compute the RPO of blocks in an existing schedule. |
static BasicBlockVector* ComputeSpecialRPO(Zone* zone, Schedule* schedule); |
@@ -60,6 +65,7 @@ class Scheduler { |
Zone* zone_; |
Graph* graph_; |
Schedule* schedule_; |
+ Flags flags_; |
NodeVectorVector scheduled_nodes_; // Per-block list of nodes in reverse. |
NodeVector schedule_root_nodes_; // Fixed root nodes seed the worklist. |
ZoneQueue<Node*> schedule_queue_; // Worklist of schedulable nodes. |
@@ -68,7 +74,7 @@ class Scheduler { |
SpecialRPONumberer* special_rpo_; // Special RPO numbering of blocks. |
ControlEquivalence* equivalence_; // Control dependence equivalence. |
- Scheduler(Zone* zone, Graph* graph, Schedule* schedule); |
+ Scheduler(Zone* zone, Graph* graph, Schedule* schedule, Flags flags); |
inline SchedulerData DefaultSchedulerData(); |
inline SchedulerData* GetData(Node* node); |
@@ -110,6 +116,9 @@ class Scheduler { |
void MovePlannedNodes(BasicBlock* from, BasicBlock* to); |
}; |
+ |
+DEFINE_OPERATORS_FOR_FLAGS(Scheduler::Flags) |
+ |
} // namespace compiler |
} // namespace internal |
} // namespace v8 |