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

Unified Diff: runtime/vm/flow_graph_range_analysis.cc

Issue 907093002: Port flow_graph*, disassembler to ISL_Print (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
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 | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/flow_graph_type_propagator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_range_analysis.cc
diff --git a/runtime/vm/flow_graph_range_analysis.cc b/runtime/vm/flow_graph_range_analysis.cc
index ab54a1ff07fc5bc3e73804bc346be8ed7aefdd02..738c294dc0246667e3ece60b14342e98f3ec3065 100644
--- a/runtime/vm/flow_graph_range_analysis.cc
+++ b/runtime/vm/flow_graph_range_analysis.cc
@@ -183,7 +183,7 @@ void RangeAnalysis::DiscoverSimpleInductionVariables() {
InductionVariableInfo* info = DetectSimpleInductionVariable(current);
if (info != NULL) {
if (FLAG_trace_range_analysis) {
- OS::Print("Simple loop variable: %s bound <%s>\n",
+ ISL_Print("Simple loop variable: %s bound <%s>\n",
current->ToCString(),
info->limit() != NULL ?
info->limit()->ToCString() : "?");
@@ -695,7 +695,7 @@ bool RangeAnalysis::InferRange(JoinOperator op,
if (!range.Equals(defn->range())) {
if (FLAG_trace_range_analysis) {
- OS::Print("%c [%" Pd "] %s: %s => %s\n",
+ ISL_Print("%c [%" Pd "] %s: %s => %s\n",
OpPrefix(op),
iteration,
defn->ToCString(),
@@ -998,7 +998,7 @@ class BoundsCheckGeneralizer {
if (upper_bound == UnwrapConstraint(check->index()->definition())) {
// Unable to construct upper bound for the index.
if (FLAG_trace_range_analysis) {
- OS::Print("Failed to construct upper bound for %s index\n",
+ ISL_Print("Failed to construct upper bound for %s index\n",
check->ToCString());
}
return;
@@ -1009,7 +1009,7 @@ class BoundsCheckGeneralizer {
// upper bound through scheduler.
if (!Simplify(&upper_bound, NULL)) {
if (FLAG_trace_range_analysis) {
- OS::Print("Failed to simplify upper bound for %s index\n",
+ ISL_Print("Failed to simplify upper bound for %s index\n",
check->ToCString());
}
return;
@@ -1024,7 +1024,7 @@ class BoundsCheckGeneralizer {
GrowableArray<Definition*> non_positive_symbols;
if (!FindNonPositiveSymbols(&non_positive_symbols, upper_bound)) {
if (FLAG_trace_range_analysis) {
- OS::Print("Failed to generalize %s index to %s"
+ ISL_Print("Failed to generalize %s index to %s"
" (can't ensure positivity)\n",
check->ToCString(),
IndexBoundToCString(upper_bound));
@@ -1058,7 +1058,7 @@ class BoundsCheckGeneralizer {
// Can't prove that lower bound is positive even with additional checks
// against potentially non-positive symbols. Give up.
if (FLAG_trace_range_analysis) {
- OS::Print("Failed to generalize %s index to %s"
+ ISL_Print("Failed to generalize %s index to %s"
" (lower bound is not positive)\n",
check->ToCString(),
IndexBoundToCString(upper_bound));
@@ -1067,7 +1067,7 @@ class BoundsCheckGeneralizer {
}
if (FLAG_trace_range_analysis) {
- OS::Print("For %s computed index bounds [%s, %s]\n",
+ ISL_Print("For %s computed index bounds [%s, %s]\n",
check->ToCString(),
IndexBoundToCString(lower_bound),
IndexBoundToCString(upper_bound));
@@ -1088,7 +1088,7 @@ class BoundsCheckGeneralizer {
precondition = scheduler_.Emit(precondition, check);
if (precondition == NULL) {
if (FLAG_trace_range_analysis) {
- OS::Print(" => failed to insert positivity constraint\n");
+ ISL_Print(" => failed to insert positivity constraint\n");
}
scheduler_.Rollback();
return;
@@ -1102,7 +1102,7 @@ class BoundsCheckGeneralizer {
new_check->mark_generalized();
if (new_check->IsRedundant(array_length)) {
if (FLAG_trace_range_analysis) {
- OS::Print(" => generalized check is redundant\n");
+ ISL_Print(" => generalized check is redundant\n");
}
RemoveGeneralizedCheck(check);
return;
@@ -1111,13 +1111,13 @@ class BoundsCheckGeneralizer {
new_check = scheduler_.Emit(new_check, check);
if (new_check != NULL) {
if (FLAG_trace_range_analysis) {
- OS::Print(" => generalized check was hoisted into B%" Pd "\n",
+ ISL_Print(" => generalized check was hoisted into B%" Pd "\n",
new_check->GetBlock()->block_id());
}
RemoveGeneralizedCheck(check);
} else {
if (FLAG_trace_range_analysis) {
- OS::Print(" => generalized check can't be hoisted\n");
+ ISL_Print(" => generalized check can't be hoisted\n");
}
scheduler_.Rollback();
}
@@ -1567,7 +1567,7 @@ void RangeAnalysis::MarkUnreachableBlocks() {
if (target == branch->true_successor()) {
// True unreachable.
if (FLAG_trace_constant_propagation) {
- OS::Print("Range analysis: True unreachable (B%" Pd ")\n",
+ ISL_Print("Range analysis: True unreachable (B%" Pd ")\n",
branch->true_successor()->block_id());
}
branch->set_constant_target(branch->false_successor());
@@ -1575,7 +1575,7 @@ void RangeAnalysis::MarkUnreachableBlocks() {
ASSERT(target == branch->false_successor());
// False unreachable.
if (FLAG_trace_constant_propagation) {
- OS::Print("Range analysis: False unreachable (B%" Pd ")\n",
+ ISL_Print("Range analysis: False unreachable (B%" Pd ")\n",
branch->false_successor()->block_id());
}
branch->set_constant_target(branch->true_successor());
@@ -1666,14 +1666,14 @@ IntegerInstructionSelector::IntegerInstructionSelector(FlowGraph* flow_graph)
void IntegerInstructionSelector::Select() {
if (FLAG_trace_integer_ir_selection) {
- OS::Print("---- starting integer ir selection -------\n");
+ ISL_Print("---- starting integer ir selection -------\n");
}
FindPotentialUint32Definitions();
FindUint32NarrowingDefinitions();
Propagate();
ReplaceInstructions();
if (FLAG_trace_integer_ir_selection) {
- OS::Print("---- after integer ir selection -------\n");
+ ISL_Print("---- after integer ir selection -------\n");
FlowGraphPrinter printer(*flow_graph_);
printer.PrintBlocks();
}
@@ -1694,7 +1694,7 @@ bool IntegerInstructionSelector::IsPotentialUint32Definition(Definition* def) {
void IntegerInstructionSelector::FindPotentialUint32Definitions() {
if (FLAG_trace_integer_ir_selection) {
- OS::Print("++++ Finding potential Uint32 definitions:\n");
+ ISL_Print("++++ Finding potential Uint32 definitions:\n");
}
for (BlockIterator block_it = flow_graph_->reverse_postorder_iterator();
@@ -1710,7 +1710,7 @@ void IntegerInstructionSelector::FindPotentialUint32Definitions() {
if ((defn != NULL) && defn->HasSSATemp()) {
if (IsPotentialUint32Definition(defn)) {
if (FLAG_trace_integer_ir_selection) {
- OS::Print("Adding %s\n", current->ToCString());
+ ISL_Print("Adding %s\n", current->ToCString());
}
potential_uint32_defs_.Add(defn);
}
@@ -1744,14 +1744,14 @@ bool IntegerInstructionSelector::IsUint32NarrowingDefinition(Definition* def) {
void IntegerInstructionSelector::FindUint32NarrowingDefinitions() {
ASSERT(selected_uint32_defs_ != NULL);
if (FLAG_trace_integer_ir_selection) {
- OS::Print("++++ Selecting Uint32 definitions:\n");
- OS::Print("++++ Initial set:\n");
+ ISL_Print("++++ Selecting Uint32 definitions:\n");
+ ISL_Print("++++ Initial set:\n");
}
for (intptr_t i = 0; i < potential_uint32_defs_.length(); i++) {
Definition* defn = potential_uint32_defs_[i];
if (IsUint32NarrowingDefinition(defn)) {
if (FLAG_trace_integer_ir_selection) {
- OS::Print("Adding %s\n", defn->ToCString());
+ ISL_Print("Adding %s\n", defn->ToCString());
}
selected_uint32_defs_->Add(defn->ssa_temp_index());
}
@@ -1811,7 +1811,7 @@ void IntegerInstructionSelector::Propagate() {
intptr_t iteration = 0;
while (changed) {
if (FLAG_trace_integer_ir_selection) {
- OS::Print("+++ Iteration: %" Pd "\n", iteration++);
+ ISL_Print("+++ Iteration: %" Pd "\n", iteration++);
}
changed = false;
for (intptr_t i = 0; i < potential_uint32_defs_.length(); i++) {
@@ -1826,7 +1826,7 @@ void IntegerInstructionSelector::Propagate() {
}
if (CanBecomeUint32(defn)) {
if (FLAG_trace_integer_ir_selection) {
- OS::Print("Adding %s\n", defn->ToCString());
+ ISL_Print("Adding %s\n", defn->ToCString());
}
// Found a new candidate.
selected_uint32_defs_->Add(defn->ssa_temp_index());
@@ -1836,7 +1836,7 @@ void IntegerInstructionSelector::Propagate() {
}
}
if (FLAG_trace_integer_ir_selection) {
- OS::Print("Reached fixed point\n");
+ ISL_Print("Reached fixed point\n");
}
}
@@ -1883,7 +1883,7 @@ Definition* IntegerInstructionSelector::ConstructReplacementFor(
void IntegerInstructionSelector::ReplaceInstructions() {
if (FLAG_trace_integer_ir_selection) {
- OS::Print("++++ Replacing instructions:\n");
+ ISL_Print("++++ Replacing instructions:\n");
}
for (intptr_t i = 0; i < potential_uint32_defs_.length(); i++) {
Definition* defn = potential_uint32_defs_[i];
@@ -1894,7 +1894,7 @@ void IntegerInstructionSelector::ReplaceInstructions() {
Definition* replacement = ConstructReplacementFor(defn);
ASSERT(replacement != NULL);
if (FLAG_trace_integer_ir_selection) {
- OS::Print("Replacing %s with %s\n", defn->ToCString(),
+ ISL_Print("Replacing %s with %s\n", defn->ToCString(),
replacement->ToCString());
}
if (!Range::IsUnknown(defn->range())) {
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/flow_graph_type_propagator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698