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

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

Issue 1738973002: [turbofan] More "auto" keyword cleanup (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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 | « src/compiler/graph.cc ('k') | src/compiler/instruction.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 07851768b3d432bbc91dc65b6aa3b3aee8b3a8e4..6a9e620d0bc8d2a71a58e5a040f735d9b04d0dcb 100644
--- a/src/compiler/graph-visualizer.cc
+++ b/src/compiler/graph-visualizer.cc
@@ -231,8 +231,8 @@ class GraphC1Visualizer {
void PrintInputs(InputIterator* i, int count, const char* prefix);
void PrintType(Node* node);
- void PrintLiveRange(LiveRange* range, const char* type, int vreg);
- void PrintLiveRangeChain(TopLevelLiveRange* range, const char* type);
+ void PrintLiveRange(const LiveRange* range, const char* type, int vreg);
+ void PrintLiveRangeChain(const TopLevelLiveRange* range, const char* type);
class Tag final BASE_EMBEDDED {
public:
@@ -505,31 +505,30 @@ void GraphC1Visualizer::PrintLiveRanges(const char* phase,
Tag tag(this, "intervals");
PrintStringProperty("name", phase);
- for (auto range : data->fixed_double_live_ranges()) {
+ for (const TopLevelLiveRange* range : data->fixed_double_live_ranges()) {
PrintLiveRangeChain(range, "fixed");
}
- for (auto range : data->fixed_live_ranges()) {
+ for (const TopLevelLiveRange* range : data->fixed_live_ranges()) {
PrintLiveRangeChain(range, "fixed");
}
- for (auto range : data->live_ranges()) {
+ for (const TopLevelLiveRange* range : data->live_ranges()) {
PrintLiveRangeChain(range, "object");
}
}
-
-void GraphC1Visualizer::PrintLiveRangeChain(TopLevelLiveRange* range,
+void GraphC1Visualizer::PrintLiveRangeChain(const TopLevelLiveRange* range,
const char* type) {
if (range == nullptr || range->IsEmpty()) return;
int vreg = range->vreg();
- for (LiveRange* child = range; child != nullptr; child = child->next()) {
+ for (const LiveRange* child = range; child != nullptr;
+ child = child->next()) {
PrintLiveRange(child, type, vreg);
}
}
-
-void GraphC1Visualizer::PrintLiveRange(LiveRange* range, const char* type,
+void GraphC1Visualizer::PrintLiveRange(const LiveRange* range, const char* type,
int vreg) {
if (range != nullptr && !range->IsEmpty()) {
PrintIndent();
@@ -545,7 +544,7 @@ void GraphC1Visualizer::PrintLiveRange(LiveRange* range, const char* type,
os_ << " \"" << assigned_reg.ToString() << "\"";
}
} else if (range->spilled()) {
- auto top = range->TopLevel();
+ const TopLevelLiveRange* top = range->TopLevel();
int index = -1;
if (top->HasSpillRange()) {
index = kMaxInt; // This hasn't been set yet.
@@ -564,8 +563,8 @@ void GraphC1Visualizer::PrintLiveRange(LiveRange* range, const char* type,
}
os_ << " " << vreg;
- for (auto interval = range->first_interval(); interval != nullptr;
- interval = interval->next()) {
+ for (const UseInterval* interval = range->first_interval();
+ interval != nullptr; interval = interval->next()) {
os_ << " [" << interval->start().value() << ", "
<< interval->end().value() << "[";
}
« no previous file with comments | « src/compiler/graph.cc ('k') | src/compiler/instruction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698