Commit 2bd931e6 authored by mstarzinger's avatar mstarzinger Committed by Commit bot

Some micro-optimizations in the scheduler.

R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25523}
parent bbc5a6c0
......@@ -62,16 +62,6 @@ void BasicBlock::set_control_input(Node* control_input) {
}
void BasicBlock::set_dominator_depth(int32_t dominator_depth) {
dominator_depth_ = dominator_depth;
}
void BasicBlock::set_dominator(BasicBlock* dominator) {
dominator_ = dominator;
}
void BasicBlock::set_loop_depth(int32_t loop_depth) {
loop_depth_ = loop_depth;
}
......
......@@ -146,10 +146,10 @@ class BasicBlock FINAL : public ZoneObject {
void set_deferred(bool deferred) { deferred_ = deferred; }
int32_t dominator_depth() const { return dominator_depth_; }
void set_dominator_depth(int32_t dominator_depth);
void set_dominator_depth(int32_t depth) { dominator_depth_ = depth; }
BasicBlock* dominator() const { return dominator_; }
void set_dominator(BasicBlock* dominator);
void set_dominator(BasicBlock* dominator) { dominator_ = dominator; }
BasicBlock* loop_header() const { return loop_header_; }
void set_loop_header(BasicBlock* loop_header);
......
......@@ -1063,9 +1063,9 @@ void Scheduler::GenerateImmediateDominatorTree() {
// Build the block dominator tree.
schedule_->start()->set_dominator_depth(0);
typedef SpecialRPONumberer::BlockList BlockList;
for (BlockList* l = special_rpo_->order_; l != NULL; l = l->next) {
DCHECK_EQ(schedule_->start(), special_rpo_->order_->block);
for (BlockList* l = special_rpo_->order_->next; l != NULL; l = l->next) {
BasicBlock* current = l->block;
if (current == schedule_->start()) continue;
BasicBlock::Predecessors::iterator pred = current->predecessors_begin();
BasicBlock::Predecessors::iterator end = current->predecessors_end();
DCHECK(pred != end); // All blocks except start have predecessors.
......
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