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

Unified Diff: src/compiler/scheduler.h

Issue 899433005: [turbofan] Split pure nodes in the scheduler if beneficial. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: comments Created 5 years, 11 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/pipeline.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 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
« no previous file with comments | « src/compiler/pipeline.cc ('k') | src/compiler/scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698