From: mstarzinger Date: Wed, 26 Nov 2014 13:13:34 +0000 (-0800) Subject: Some micro-optimizations in the scheduler. X-Git-Tag: upstream/4.7.83~5517 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2bd931e6e2c7351e9369e4eb558f09c79e693760;p=platform%2Fupstream%2Fv8.git Some micro-optimizations in the scheduler. R=bmeurer@chromium.org Review URL: https://codereview.chromium.org/764533003 Cr-Commit-Position: refs/heads/master@{#25523} --- diff --git a/src/compiler/schedule.cc b/src/compiler/schedule.cc index 50ece95..0e7caa0 100644 --- a/src/compiler/schedule.cc +++ b/src/compiler/schedule.cc @@ -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; } diff --git a/src/compiler/schedule.h b/src/compiler/schedule.h index ad1a267..94525cd 100644 --- a/src/compiler/schedule.h +++ b/src/compiler/schedule.h @@ -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); diff --git a/src/compiler/scheduler.cc b/src/compiler/scheduler.cc index 8c16936..35d7ab9 100644 --- a/src/compiler/scheduler.cc +++ b/src/compiler/scheduler.cc @@ -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.