Make sure floating phi nodes are coupled to their control.

R=jarin@chromium.org

Review URL: https://codereview.chromium.org/669683002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24781 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 0c4f8bc6
This diff is collapsed.
...@@ -29,7 +29,7 @@ class Scheduler { ...@@ -29,7 +29,7 @@ class Scheduler {
Schedule* schedule); Schedule* schedule);
private: private:
enum Placement { kUnknown, kSchedulable, kFixed }; enum Placement { kUnknown, kSchedulable, kFixed, kCoupled };
// Per-node data tracked during scheduling. // Per-node data tracked during scheduling.
struct SchedulerData { struct SchedulerData {
...@@ -38,8 +38,8 @@ class Scheduler { ...@@ -38,8 +38,8 @@ class Scheduler {
bool is_connected_control_; // {true} if control-connected to the end node. bool is_connected_control_; // {true} if control-connected to the end node.
bool is_floating_control_; // {true} if control, but not control-connected bool is_floating_control_; // {true} if control, but not control-connected
// to the end node. // to the end node.
Placement placement_ : 3; // Whether the node is fixed, schedulable, Placement placement_ : 2; // Whether the node is fixed, schedulable,
// or not yet known. // coupled to another node, or not yet known.
}; };
ZonePool* zone_pool_; ZonePool* zone_pool_;
...@@ -53,23 +53,15 @@ class Scheduler { ...@@ -53,23 +53,15 @@ class Scheduler {
Scheduler(ZonePool* zone_pool, Zone* zone, Graph* graph, Schedule* schedule); Scheduler(ZonePool* zone_pool, Zone* zone, Graph* graph, Schedule* schedule);
SchedulerData DefaultSchedulerData(); inline SchedulerData DefaultSchedulerData();
inline SchedulerData* GetData(Node* node);
SchedulerData* GetData(Node* node) {
DCHECK(node->id() < static_cast<int>(node_data_.size()));
return &node_data_[node->id()];
}
Placement GetPlacement(Node* node); Placement GetPlacement(Node* node);
int GetRPONumber(BasicBlock* block) { void IncrementUnscheduledUseCount(Node* node, Node* from);
DCHECK(block->rpo_number() >= 0 && void DecrementUnscheduledUseCount(Node* node, Node* from);
block->rpo_number() <
static_cast<int>(schedule_->rpo_order_.size()));
DCHECK(schedule_->rpo_order_[block->rpo_number()] == block);
return block->rpo_number();
}
inline int GetRPONumber(BasicBlock* block);
BasicBlock* GetCommonDominator(BasicBlock* b1, BasicBlock* b2); BasicBlock* GetCommonDominator(BasicBlock* b1, BasicBlock* b2);
// Phase 1: Build control-flow graph and dominator tree. // Phase 1: Build control-flow graph and dominator tree.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment