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

Unified Diff: src/compiler/scheduler.h

Issue 499363002: Schedule floating control. (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/schedule.h ('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 a25e0a03f40f133b96171f9338a4de67787d7325..85b5a7a4ffa46c75830ee2702e7e21b3d4f86429 100644
--- a/src/compiler/scheduler.h
+++ b/src/compiler/scheduler.h
@@ -34,19 +34,34 @@ class Scheduler {
static void ComputeCFG(Graph* graph, Schedule* schedule);
private:
+ enum Placement { kUnknown, kSchedulable, kFixed };
+
+ struct SchedulerData {
Michael Starzinger 2014/08/26 14:49:23 nit: Can we get a short comment of how this data s
+ int unscheduled_count_;
+ int minimum_rpo_;
+ bool is_connected_control_;
+ bool is_floating_control_;
+ Placement placement_ : 3;
+ };
+
Zone* zone_;
Graph* graph_;
Schedule* schedule_;
- IntVector unscheduled_uses_;
NodeVectorVector scheduled_nodes_;
NodeVector schedule_root_nodes_;
- IntVector schedule_early_rpo_index_;
+ std::vector<SchedulerData, zone_allocator<SchedulerData>> node_data_;
+ bool has_floating_control_;
Scheduler(Zone* zone, Graph* graph, Schedule* schedule);
- bool IsBasicBlockBegin(Node* node);
- bool HasFixedSchedulePosition(Node* node);
- bool IsScheduleRoot(Node* node);
+ SchedulerData* GetData(Node* node) {
+ DCHECK(node->id() < static_cast<int>(node_data_.size()));
+ return &node_data_[node->id()];
+ }
+
+ void BuildCFG();
+
+ Placement GetPlacement(Node* node);
int GetRPONumber(BasicBlock* block) {
DCHECK(block->rpo_number_ >= 0 &&
@@ -55,12 +70,11 @@ class Scheduler {
return block->rpo_number_;
}
- void PrepareAuxiliaryNodeData();
- void PrepareAuxiliaryBlockData();
-
void GenerateImmediateDominatorTree();
BasicBlock* GetCommonDominator(BasicBlock* b1, BasicBlock* b2);
+ friend class CFGBuilder;
+
friend class ScheduleEarlyNodeVisitor;
void ScheduleEarly();
@@ -69,6 +83,10 @@ class Scheduler {
friend class ScheduleLateNodeVisitor;
void ScheduleLate();
+
+ bool ConnectFloatingControl();
+
+ void ConnectFloatingControlSubgraph(BasicBlock* block, Node* node);
};
}
}
« no previous file with comments | « src/compiler/schedule.h ('k') | src/compiler/scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698