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

Unified Diff: src/compiler/schedule.cc

Issue 696363002: Make special RPO computation iterative during scheduling. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased. Created 6 years, 1 month 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.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/schedule.cc
diff --git a/src/compiler/schedule.cc b/src/compiler/schedule.cc
index 51400cf04c2d12b71a1b6d1a3126e2da5f69458d..50ece951d689210dae8768931ecb05ab2f84c09a 100644
--- a/src/compiler/schedule.cc
+++ b/src/compiler/schedule.cc
@@ -16,10 +16,11 @@ BasicBlock::BasicBlock(Zone* zone, Id id)
: ao_number_(-1),
rpo_number_(-1),
deferred_(false),
+ dominator_depth_(-1),
dominator_(NULL),
loop_header_(NULL),
+ loop_end_(NULL),
loop_depth_(0),
- loop_end_(-1),
control_(kNone),
control_input_(NULL),
nodes_(zone),
@@ -32,8 +33,9 @@ bool BasicBlock::LoopContains(BasicBlock* block) const {
// RPO numbers must be initialized.
DCHECK(rpo_number_ >= 0);
DCHECK(block->rpo_number_ >= 0);
- if (loop_end_ < 0) return false; // This is not a loop.
- return block->rpo_number_ >= rpo_number_ && block->rpo_number_ < loop_end_;
+ if (loop_end_ == NULL) return false; // This is not a loop.
+ return block->rpo_number_ >= rpo_number_ &&
+ block->rpo_number_ < loop_end_->rpo_number_;
}
@@ -60,6 +62,11 @@ 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;
}
@@ -75,7 +82,7 @@ void BasicBlock::set_rpo_number(int32_t rpo_number) {
}
-void BasicBlock::set_loop_end(int32_t loop_end) { loop_end_ = loop_end; }
+void BasicBlock::set_loop_end(BasicBlock* loop_end) { loop_end_ = loop_end; }
void BasicBlock::set_loop_header(BasicBlock* loop_header) {
« no previous file with comments | « src/compiler/schedule.h ('k') | src/compiler/scheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698