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

Unified Diff: src/compiler/scheduler.cc

Issue 948263004: [turbofan] change tracing in scheduler so block_id is id: instead of B and rpo_number is now B (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/scheduler.cc
diff --git a/src/compiler/scheduler.cc b/src/compiler/scheduler.cc
index 39c58b76126f0062c6002c9fd5fa603130bc8970..9a4c7af6eade6523c345fff23684c0f204168fb5 100644
--- a/src/compiler/scheduler.cc
+++ b/src/compiler/scheduler.cc
@@ -368,7 +368,7 @@ class CFGBuilder : public ZoneObject {
BasicBlock* block = schedule_->block(node);
if (block == NULL) {
block = schedule_->NewBasicBlock();
- Trace("Create block B%d for #%d:%s\n", block->id().ToInt(), node->id(),
+ Trace("Create block id:%d for #%d:%s\n", block->id().ToInt(), node->id(),
node->op()->mnemonic());
FixNode(block, node);
}
@@ -504,11 +504,11 @@ class CFGBuilder : public ZoneObject {
void TraceConnect(Node* node, BasicBlock* block, BasicBlock* succ) {
DCHECK_NOT_NULL(block);
if (succ == NULL) {
- Trace("Connect #%d:%s, B%d -> end\n", node->id(), node->op()->mnemonic(),
- block->id().ToInt());
+ Trace("Connect #%d:%s, id:%d -> end\n", node->id(),
+ node->op()->mnemonic(), block->id().ToInt());
} else {
- Trace("Connect #%d:%s, B%d -> B%d\n", node->id(), node->op()->mnemonic(),
- block->id().ToInt(), succ->id().ToInt());
+ Trace("Connect #%d:%s, id:%d -> id:%d\n", node->id(),
+ node->op()->mnemonic(), block->id().ToInt(), succ->id().ToInt());
}
}
@@ -877,18 +877,19 @@ class SpecialRPONumberer : public ZoneObject {
BasicBlock* end = current_loop->end;
current->set_loop_end(end == NULL ? BeyondEndSentinel() : end);
current_header = current_loop->header;
- Trace("B%d is a loop header, increment loop depth to %d\n",
+ Trace("id:%d is a loop header, increment loop depth to %d\n",
current->id().ToInt(), loop_depth);
}
current->set_loop_depth(loop_depth);
if (current->loop_header() == NULL) {
- Trace("B%d is not in a loop (depth == %d)\n", current->id().ToInt(),
+ Trace("id:%d is not in a loop (depth == %d)\n", current->id().ToInt(),
current->loop_depth());
} else {
- Trace("B%d has loop header B%d, (depth == %d)\n", current->id().ToInt(),
- current->loop_header()->id().ToInt(), current->loop_depth());
+ Trace("id:%d has loop header id:%d, (depth == %d)\n",
+ current->id().ToInt(), current->loop_header()->id().ToInt(),
+ current->loop_depth());
}
}
}
@@ -954,27 +955,27 @@ class SpecialRPONumberer : public ZoneObject {
os << " (";
for (size_t i = 0; i < loops_.size(); i++) {
if (i > 0) os << " ";
- os << "B" << loops_[i].header->id();
+ os << "id:" << loops_[i].header->id();
}
os << ")";
}
os << ":\n";
for (BasicBlock* block = order_; block != NULL; block = block->rpo_next()) {
- os << std::setw(5) << block->rpo_number() << ":";
+ os << std::setw(5) << "B" << block->rpo_number() << ":";
for (size_t i = 0; i < loops_.size(); i++) {
bool range = loops_[i].header->LoopContains(block);
bool membership = loops_[i].header != block && range;
os << (membership ? " |" : " ");
os << (range ? "x" : " ");
}
- os << " B" << block->id() << ": ";
+ os << " id:" << block->id() << ": ";
if (block->loop_end() != NULL) {
- os << " range: [" << block->rpo_number() << ", "
+ os << " range: [B" << block->rpo_number() << ", B"
<< block->loop_end()->rpo_number() << ")";
}
if (block->loop_header() != NULL) {
- os << " header: B" << block->loop_header()->id();
+ os << " header: id:" << block->loop_header()->id();
}
if (block->loop_depth() > 0) {
os << " depth: " << block->loop_depth();
@@ -1095,7 +1096,7 @@ void Scheduler::PropagateImmediateDominators(BasicBlock* block) {
block->set_dominator(dominator);
block->set_dominator_depth(dominator->dominator_depth() + 1);
block->set_deferred(deferred | block->deferred());
- Trace("Block B%d's idom is B%d, depth = %d\n", block->id().ToInt(),
+ Trace("Block id:%d's idom is id:%d, depth = %d\n", block->id().ToInt(),
dominator->id().ToInt(), block->dominator_depth());
}
}
@@ -1214,7 +1215,7 @@ class ScheduleEarlyNodeVisitor {
// Fixed nodes already know their schedule early position.
if (scheduler_->GetPlacement(node) == Scheduler::kFixed) {
data->minimum_block_ = schedule_->block(node);
- Trace("Fixing #%d:%s minimum_block = B%d, dominator_depth = %d\n",
+ Trace("Fixing #%d:%s minimum_block = id:%d, dominator_depth = %d\n",
node->id(), node->op()->mnemonic(),
data->minimum_block_->id().ToInt(),
data->minimum_block_->dominator_depth());
@@ -1252,7 +1253,7 @@ class ScheduleEarlyNodeVisitor {
if (block->dominator_depth() > data->minimum_block_->dominator_depth()) {
data->minimum_block_ = block;
queue_.push(node);
- Trace("Propagating #%d:%s minimum_block = B%d, dominator_depth = %d\n",
+ Trace("Propagating #%d:%s minimum_block = id:%d, dominator_depth = %d\n",
node->id(), node->op()->mnemonic(),
data->minimum_block_->id().ToInt(),
data->minimum_block_->dominator_depth());
@@ -1348,9 +1349,10 @@ class ScheduleLateNodeVisitor {
// The schedule early block dominates the schedule late block.
BasicBlock* min_block = scheduler_->GetData(node)->minimum_block_;
DCHECK_EQ(min_block, BasicBlock::GetCommonDominator(block, min_block));
- Trace("Schedule late of #%d:%s is B%d at loop depth %d, minimum = B%d\n",
- node->id(), node->op()->mnemonic(), block->id().ToInt(),
- block->loop_depth(), min_block->id().ToInt());
+ Trace(
+ "Schedule late of #%d:%s is id:%d at loop depth %d, minimum = id:%d\n",
+ node->id(), node->op()->mnemonic(), block->id().ToInt(),
+ block->loop_depth(), min_block->id().ToInt());
// Hoist nodes out of loops if possible. Nodes can be hoisted iteratively
// into enclosing loop pre-headers until they would preceed their schedule
@@ -1359,7 +1361,7 @@ class ScheduleLateNodeVisitor {
if (hoist_block &&
hoist_block->dominator_depth() >= min_block->dominator_depth()) {
do {
- Trace(" hoisting #%d:%s to block B%d\n", node->id(),
+ Trace(" hoisting #%d:%s to block id:%d\n", node->id(),
node->op()->mnemonic(), hoist_block->id().ToInt());
DCHECK_LT(hoist_block->loop_depth(), block->loop_depth());
block = hoist_block;
@@ -1409,7 +1411,7 @@ class ScheduleLateNodeVisitor {
BasicBlock* use_block = GetBlockForUse(edge);
if (use_block == nullptr || marked_[use_block->id().ToSize()]) continue;
if (use_block == block) {
- Trace(" not splitting #%d:%s, it is used in B%d\n", node->id(),
+ Trace(" not splitting #%d:%s, it is used in id:%d\n", node->id(),
node->op()->mnemonic(), block->id().ToInt());
marking_queue_.clear();
return block;
@@ -1437,7 +1439,7 @@ class ScheduleLateNodeVisitor {
// {block} to the end contain at least one use of {node}, and hence there's
// no point in splitting the {node} in this case.
if (marked_[block->id().ToSize()]) {
- Trace(" not splitting #%d:%s, its common dominator B%d is perfect\n",
+ Trace(" not splitting #%d:%s, its common dominator id:%d is perfect\n",
node->id(), node->op()->mnemonic(), block->id().ToInt());
return block;
}
@@ -1459,12 +1461,12 @@ class ScheduleLateNodeVisitor {
// Place the {node} at {use_block}.
block = use_block;
use_node = node;
- Trace(" pushing #%d:%s down to B%d\n", node->id(),
+ Trace(" pushing #%d:%s down to id:%d\n", node->id(),
node->op()->mnemonic(), block->id().ToInt());
} else {
// Place a copy of {node} at {use_block}.
use_node = CloneNode(node);
- Trace(" cloning #%d:%s for B%d\n", use_node->id(),
+ Trace(" cloning #%d:%s for id:%d\n", use_node->id(),
use_node->op()->mnemonic(), use_block->id().ToInt());
scheduler_->schedule_queue_.push(use_node);
}
@@ -1541,7 +1543,7 @@ class ScheduleLateNodeVisitor {
}
BasicBlock* result = schedule_->block(use);
if (result == NULL) return NULL;
- Trace(" must dominate use #%d:%s in B%d\n", use->id(),
+ Trace(" must dominate use #%d:%s in id:%d\n", use->id(),
use->op()->mnemonic(), result->id().ToInt());
return result;
}
@@ -1672,7 +1674,7 @@ void Scheduler::FuseFloatingControl(BasicBlock* block, Node* node) {
void Scheduler::MovePlannedNodes(BasicBlock* from, BasicBlock* to) {
- Trace("Move planned nodes from B%d to B%d\n", from->id().ToInt(),
+ Trace("Move planned nodes from id:%d to id:%d\n", from->id().ToInt(),
to->id().ToInt());
NodeVector* nodes = &(scheduled_nodes_[from->id().ToSize()]);
for (Node* const node : *nodes) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698