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

Unified Diff: src/compiler/graph-visualizer.cc

Issue 639123009: Classes: Add basic support for properties (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: git rebase Created 6 years, 2 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 | « src/compiler/graph-builder.cc ('k') | src/compiler/ia32/code-generator-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/graph-visualizer.cc
diff --git a/src/compiler/graph-visualizer.cc b/src/compiler/graph-visualizer.cc
index 97fb8322c333c6e972a606c98f450fef90c5aad1..31256ec38964280f2d12f7a271d75f481f4cc6de 100644
--- a/src/compiler/graph-visualizer.cc
+++ b/src/compiler/graph-visualizer.cc
@@ -118,7 +118,7 @@ class JSONGraphEdgeWriter : public NullNodeVisitor {
void Print() { const_cast<Graph*>(graph_)->VisitNodeInputsFromEnd(this); }
- GenericGraphVisit::Control PreEdge(Node* from, int index, Node* to);
+ void PreEdge(Node* from, int index, Node* to);
private:
std::ostream& os_;
@@ -129,8 +129,7 @@ class JSONGraphEdgeWriter : public NullNodeVisitor {
};
-GenericGraphVisit::Control JSONGraphEdgeWriter::PreEdge(Node* from, int index,
- Node* to) {
+void JSONGraphEdgeWriter::PreEdge(Node* from, int index, Node* to) {
if (first_edge_) {
first_edge_ = false;
} else {
@@ -152,7 +151,6 @@ GenericGraphVisit::Control JSONGraphEdgeWriter::PreEdge(Node* from, int index,
}
os_ << "{\"source\":" << to->id() << ",\"target\":" << from->id()
<< ",\"index\":" << index << ",\"type\":\"" << edge_type << "\"}";
- return GenericGraphVisit::CONTINUE;
}
@@ -174,7 +172,6 @@ class GraphVisualizer : public NullNodeVisitor {
void Print();
GenericGraphVisit::Control Pre(Node* node);
- GenericGraphVisit::Control PreEdge(Node* from, int index, Node* to);
private:
void AnnotateNode(Node* node);
@@ -221,17 +218,6 @@ GenericGraphVisit::Control GraphVisualizer::Pre(Node* node) {
}
-GenericGraphVisit::Control GraphVisualizer::PreEdge(Node* from, int index,
- Node* to) {
- if (use_to_def_) return GenericGraphVisit::CONTINUE;
- // When going from def to use, only consider white -> other edges, which are
- // the dead nodes that use live nodes. We're probably not interested in
- // dead nodes that only use other dead nodes.
- if (white_nodes_.count(from) > 0) return GenericGraphVisit::CONTINUE;
- return GenericGraphVisit::SKIP;
-}
-
-
static bool IsLikelyBackEdge(Node* from, int index, Node* to) {
if (from->opcode() == IrOpcode::kPhi ||
from->opcode() == IrOpcode::kEffectPhi) {
@@ -593,9 +579,11 @@ void GraphC1Visualizer::PrintSchedule(const char* phase,
PrintIntProperty("loop_depth", current->loop_depth());
- if (instructions->code_start(current) >= 0) {
- int first_index = instructions->first_instruction_index(current);
- int last_index = instructions->last_instruction_index(current);
+ const InstructionBlock* instruction_block =
+ instructions->InstructionBlockAt(current->GetRpoNumber());
+ if (instruction_block->code_start() >= 0) {
+ int first_index = instruction_block->first_instruction_index();
+ int last_index = instruction_block->last_instruction_index();
PrintIntProperty("first_lir_id", LifetimePosition::FromInstructionIndex(
first_index).Value());
PrintIntProperty("last_lir_id", LifetimePosition::FromInstructionIndex(
@@ -674,8 +662,8 @@ void GraphC1Visualizer::PrintSchedule(const char* phase,
if (instructions != NULL) {
Tag LIR_tag(this, "LIR");
- for (int j = instructions->first_instruction_index(current);
- j <= instructions->last_instruction_index(current); j++) {
+ for (int j = instruction_block->first_instruction_index();
+ j <= instruction_block->last_instruction_index(); j++) {
PrintIndent();
os_ << j << " " << *instructions->InstructionAt(j) << " <|@\n";
}
« no previous file with comments | « src/compiler/graph-builder.cc ('k') | src/compiler/ia32/code-generator-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698