| Index: runtime/vm/flow_graph_optimizer.cc
 | 
| diff --git a/runtime/vm/flow_graph_optimizer.cc b/runtime/vm/flow_graph_optimizer.cc
 | 
| index 95ea36e590b795185ebd1cfd26f2a43ccc7fba18..54a571a44ddc36a3c8e19ed516a0c0c262a3c1ce 100644
 | 
| --- a/runtime/vm/flow_graph_optimizer.cc
 | 
| +++ b/runtime/vm/flow_graph_optimizer.cc
 | 
| @@ -637,16 +637,16 @@ static void ReplaceCurrentInstruction(ForwardInstructionIterator* iterator,
 | 
|      EnsureSSATempIndex(graph, current_defn, replacement_defn);
 | 
|  
 | 
|      if (FLAG_trace_optimization) {
 | 
| -      ISL_Print("Replacing v%" Pd " with v%" Pd "\n",
 | 
| +      THR_Print("Replacing v%" Pd " with v%" Pd "\n",
 | 
|                  current_defn->ssa_temp_index(),
 | 
|                  replacement_defn->ssa_temp_index());
 | 
|      }
 | 
|    } else if (FLAG_trace_optimization) {
 | 
|      if (current_defn == NULL) {
 | 
| -      ISL_Print("Removing %s\n", current->DebugName());
 | 
| +      THR_Print("Removing %s\n", current->DebugName());
 | 
|      } else {
 | 
|        ASSERT(!current_defn->HasUses());
 | 
| -      ISL_Print("Removing v%" Pd ".\n", current_defn->ssa_temp_index());
 | 
| +      THR_Print("Removing v%" Pd ".\n", current_defn->ssa_temp_index());
 | 
|      }
 | 
|    }
 | 
|    iterator->RemoveCurrentFromGraph();
 | 
| @@ -2337,7 +2337,7 @@ bool FlowGraphOptimizer::InstanceCallNeedsClassCheck(
 | 
|      const Class& cls = Class::Handle(Z, function.Owner());
 | 
|      if (!thread()->cha()->HasOverride(cls, name)) {
 | 
|        if (FLAG_trace_cha) {
 | 
| -        ISL_Print("  **(CHA) Instance call needs no check, "
 | 
| +        THR_Print("  **(CHA) Instance call needs no check, "
 | 
|              "no overrides of '%s' '%s'\n",
 | 
|              name.ToCString(), cls.ToCString());
 | 
|        }
 | 
| @@ -4036,7 +4036,7 @@ bool FlowGraphOptimizer::TypeCheckAsClassEquality(const AbstractType& type) {
 | 
|    if (!type_class.IsPrivate()) {
 | 
|      if (FLAG_use_cha_deopt) {
 | 
|        if (FLAG_trace_cha) {
 | 
| -        ISL_Print("  **(CHA) Typecheck as class equality since no "
 | 
| +        THR_Print("  **(CHA) Typecheck as class equality since no "
 | 
|              "subclasses: %s\n",
 | 
|              type_class.ToCString());
 | 
|        }
 | 
| @@ -4620,7 +4620,7 @@ void FlowGraphOptimizer::VisitStoreInstanceField(
 | 
|      }
 | 
|      if (!unboxed_field) {
 | 
|        if (FLAG_trace_optimization || FLAG_trace_field_guards) {
 | 
| -        ISL_Print("Disabling unboxing of %s\n", field.ToCString());
 | 
| +        THR_Print("Disabling unboxing of %s\n", field.ToCString());
 | 
|          if (!setter.IsNull()) {
 | 
|            OS::Print("  setter usage count: %" Pd "\n", setter.usage_counter());
 | 
|          }
 | 
| @@ -4849,7 +4849,7 @@ void FlowGraphOptimizer::WidenSmiToInt32() {
 | 
|      }
 | 
|  
 | 
|      if (FLAG_trace_smi_widening) {
 | 
| -      ISL_Print("analysing candidate: %s\n", op->ToCString());
 | 
| +      THR_Print("analysing candidate: %s\n", op->ToCString());
 | 
|      }
 | 
|      worklist.Clear();
 | 
|      worklist.Add(op);
 | 
| @@ -4861,14 +4861,14 @@ void FlowGraphOptimizer::WidenSmiToInt32() {
 | 
|        Definition* defn = worklist.definitions()[j];
 | 
|  
 | 
|        if (FLAG_trace_smi_widening) {
 | 
| -        ISL_Print("> %s\n", defn->ToCString());
 | 
| +        THR_Print("> %s\n", defn->ToCString());
 | 
|        }
 | 
|  
 | 
|        if (defn->IsBinarySmiOp() &&
 | 
|            BenefitsFromWidening(defn->AsBinarySmiOp())) {
 | 
|          gain++;
 | 
|          if (FLAG_trace_smi_widening) {
 | 
| -          ISL_Print("^ [%" Pd "] (o) %s\n", gain, defn->ToCString());
 | 
| +          THR_Print("^ [%" Pd "] (o) %s\n", gain, defn->ToCString());
 | 
|          }
 | 
|        }
 | 
|  
 | 
| @@ -4886,7 +4886,7 @@ void FlowGraphOptimizer::WidenSmiToInt32() {
 | 
|            // Mint operation produces untagged result. We avoid tagging.
 | 
|            gain++;
 | 
|            if (FLAG_trace_smi_widening) {
 | 
| -            ISL_Print("^ [%" Pd "] (i) %s\n", gain, input->ToCString());
 | 
| +            THR_Print("^ [%" Pd "] (i) %s\n", gain, input->ToCString());
 | 
|            }
 | 
|          } else if (defn_loop == loops[input->GetBlock()->preorder_number()] &&
 | 
|                     (input->Type()->ToCid() == kSmiCid)) {
 | 
| @@ -4897,7 +4897,7 @@ void FlowGraphOptimizer::WidenSmiToInt32() {
 | 
|            // coalesced with untagging. Start coalescing them.
 | 
|            gain--;
 | 
|            if (FLAG_trace_smi_widening) {
 | 
| -            ISL_Print("v [%" Pd "] (i) %s\n", gain, input->ToCString());
 | 
| +            THR_Print("v [%" Pd "] (i) %s\n", gain, input->ToCString());
 | 
|            }
 | 
|          }
 | 
|        }
 | 
| @@ -4914,7 +4914,7 @@ void FlowGraphOptimizer::WidenSmiToInt32() {
 | 
|            if (!instr->IsReturn() && !instr->IsPushArgument()) {
 | 
|              gain--;
 | 
|              if (FLAG_trace_smi_widening) {
 | 
| -              ISL_Print("v [%" Pd "] (u) %s\n",
 | 
| +              THR_Print("v [%" Pd "] (u) %s\n",
 | 
|                          gain,
 | 
|                          use->instruction()->ToCString());
 | 
|              }
 | 
| @@ -4932,14 +4932,14 @@ void FlowGraphOptimizer::WidenSmiToInt32() {
 | 
|            // sign extension operation.
 | 
|            gain++;
 | 
|            if (FLAG_trace_smi_widening) {
 | 
| -            ISL_Print("^ [%" Pd "] (u) %s\n",
 | 
| +            THR_Print("^ [%" Pd "] (u) %s\n",
 | 
|                        gain,
 | 
|                        use->instruction()->ToCString());
 | 
|            }
 | 
|          } else if (defn_loop == loops[instr->GetBlock()->preorder_number()]) {
 | 
|            gain--;
 | 
|            if (FLAG_trace_smi_widening) {
 | 
| -            ISL_Print("v [%" Pd "] (u) %s\n",
 | 
| +            THR_Print("v [%" Pd "] (u) %s\n",
 | 
|                        gain,
 | 
|                        use->instruction()->ToCString());
 | 
|            }
 | 
| @@ -4950,7 +4950,7 @@ void FlowGraphOptimizer::WidenSmiToInt32() {
 | 
|      processed->AddAll(worklist.contains_vector());
 | 
|  
 | 
|      if (FLAG_trace_smi_widening) {
 | 
| -      ISL_Print("~ %s gain %" Pd "\n", op->ToCString(), gain);
 | 
| +      THR_Print("~ %s gain %" Pd "\n", op->ToCString(), gain);
 | 
|      }
 | 
|  
 | 
|      if (gain > 0) {
 | 
| @@ -5078,7 +5078,7 @@ void LICM::Hoist(ForwardInstructionIterator* it,
 | 
|      current->AsCheckArrayBound()->set_licm_hoisted(true);
 | 
|    }
 | 
|    if (FLAG_trace_optimization) {
 | 
| -    ISL_Print("Hoisting instruction %s:%" Pd " from B%" Pd " to B%" Pd "\n",
 | 
| +    THR_Print("Hoisting instruction %s:%" Pd " from B%" Pd " to B%" Pd "\n",
 | 
|                current->DebugName(),
 | 
|                current->GetDeoptId(),
 | 
|                current->GetBlock()->block_id(),
 | 
| @@ -5895,9 +5895,9 @@ class AliasedSet : public ZoneAllocated {
 | 
|           !it.Done();
 | 
|           it.Advance()) {
 | 
|        if (comma) {
 | 
| -        ISL_Print(", ");
 | 
| +        THR_Print(", ");
 | 
|        }
 | 
| -      ISL_Print("%s", places_[it.Current()]->ToCString());
 | 
| +      THR_Print("%s", places_[it.Current()]->ToCString());
 | 
|        comma = true;
 | 
|      }
 | 
|    }
 | 
| @@ -5992,16 +5992,16 @@ class AliasedSet : public ZoneAllocated {
 | 
|      }
 | 
|  
 | 
|      if (FLAG_trace_load_optimization) {
 | 
| -      ISL_Print("Aliases KILL sets:\n");
 | 
| +      THR_Print("Aliases KILL sets:\n");
 | 
|        for (intptr_t i = 0; i < aliases_.length(); ++i) {
 | 
|          const Place* alias = aliases_[i];
 | 
|          BitVector* kill = GetKilledSet(alias->id());
 | 
|  
 | 
| -        ISL_Print("%s: ", alias->ToCString());
 | 
| +        THR_Print("%s: ", alias->ToCString());
 | 
|          if (kill != NULL) {
 | 
|            PrintSet(kill);
 | 
|          }
 | 
| -        ISL_Print("\n");
 | 
| +        THR_Print("\n");
 | 
|        }
 | 
|      }
 | 
|    }
 | 
| @@ -6388,7 +6388,7 @@ static PhiPlaceMoves* ComputePhiMoves(
 | 
|        BlockEntryInstr* block = phi->GetBlock();
 | 
|  
 | 
|        if (FLAG_trace_optimization) {
 | 
| -        ISL_Print("phi dependent place %s\n", place->ToCString());
 | 
| +        THR_Print("phi dependent place %s\n", place->ToCString());
 | 
|        }
 | 
|  
 | 
|        Place input_place(*place);
 | 
| @@ -6401,7 +6401,7 @@ static PhiPlaceMoves* ComputePhiMoves(
 | 
|            map->Insert(result);
 | 
|            places->Add(result);
 | 
|            if (FLAG_trace_optimization) {
 | 
| -            ISL_Print("  adding place %s as %" Pd "\n",
 | 
| +            THR_Print("  adding place %s as %" Pd "\n",
 | 
|                        result->ToCString(),
 | 
|                        result->id());
 | 
|            }
 | 
| @@ -6457,7 +6457,7 @@ static AliasedSet* NumberPlaces(
 | 
|          places->Add(result);
 | 
|  
 | 
|          if (FLAG_trace_optimization) {
 | 
| -          ISL_Print("numbering %s as %" Pd "\n",
 | 
| +          THR_Print("numbering %s as %" Pd "\n",
 | 
|                      result->ToCString(),
 | 
|                      result->id());
 | 
|          }
 | 
| @@ -6726,7 +6726,7 @@ class LoadOptimizer : public ValueObject {
 | 
|            Definition* replacement = (*out_values)[place_id];
 | 
|            EnsureSSATempIndex(graph_, defn, replacement);
 | 
|            if (FLAG_trace_optimization) {
 | 
| -            ISL_Print("Replacing load v%" Pd " with v%" Pd "\n",
 | 
| +            THR_Print("Replacing load v%" Pd " with v%" Pd "\n",
 | 
|                        defn->ssa_temp_index(),
 | 
|                        replacement->ssa_temp_index());
 | 
|            }
 | 
| @@ -6934,18 +6934,18 @@ class LoadOptimizer : public ValueObject {
 | 
|        }
 | 
|  
 | 
|        if (FLAG_trace_load_optimization) {
 | 
| -        ISL_Print("B%" Pd "\n", block->block_id());
 | 
| -        ISL_Print("  IN: ");
 | 
| +        THR_Print("B%" Pd "\n", block->block_id());
 | 
| +        THR_Print("  IN: ");
 | 
|          aliased_set_->PrintSet(in_[preorder_number]);
 | 
| -        ISL_Print("\n");
 | 
| +        THR_Print("\n");
 | 
|  
 | 
| -        ISL_Print("  KILL: ");
 | 
| +        THR_Print("  KILL: ");
 | 
|          aliased_set_->PrintSet(kill_[preorder_number]);
 | 
| -        ISL_Print("\n");
 | 
| +        THR_Print("\n");
 | 
|  
 | 
| -        ISL_Print("  OUT: ");
 | 
| +        THR_Print("  OUT: ");
 | 
|          aliased_set_->PrintSet(out_[preorder_number]);
 | 
| -        ISL_Print("\n");
 | 
| +        THR_Print("\n");
 | 
|        }
 | 
|      }
 | 
|  
 | 
| @@ -6998,7 +6998,7 @@ class LoadOptimizer : public ValueObject {
 | 
|  
 | 
|        if (FLAG_trace_optimization) {
 | 
|          for (BitVector::Iterator it(loop_gen); !it.Done(); it.Advance()) {
 | 
| -          ISL_Print("place %s is loop invariant for B%" Pd "\n",
 | 
| +          THR_Print("place %s is loop invariant for B%" Pd "\n",
 | 
|                      aliased_set_->places()[it.Current()]->ToCString(),
 | 
|                      header->block_id());
 | 
|          }
 | 
| @@ -7069,7 +7069,7 @@ class LoadOptimizer : public ValueObject {
 | 
|      phis_.Add(phi);  // Postpone phi insertion until after load forwarding.
 | 
|  
 | 
|      if (FLAG_trace_load_optimization) {
 | 
| -      ISL_Print("created pending phi %s for %s at B%" Pd "\n",
 | 
| +      THR_Print("created pending phi %s for %s at B%" Pd "\n",
 | 
|                  phi->ToCString(),
 | 
|                  aliased_set_->places()[place_id]->ToCString(),
 | 
|                  block->block_id());
 | 
| @@ -7108,7 +7108,7 @@ class LoadOptimizer : public ValueObject {
 | 
|            EnsureSSATempIndex(graph_, load, replacement);
 | 
|  
 | 
|            if (FLAG_trace_optimization) {
 | 
| -            ISL_Print("Replacing load v%" Pd " with v%" Pd "\n",
 | 
| +            THR_Print("Replacing load v%" Pd " with v%" Pd "\n",
 | 
|                        load->ssa_temp_index(),
 | 
|                        replacement->ssa_temp_index());
 | 
|            }
 | 
| @@ -7297,7 +7297,7 @@ class LoadOptimizer : public ValueObject {
 | 
|        }
 | 
|  
 | 
|        if (FLAG_trace_load_optimization) {
 | 
| -        ISL_Print("Replacing %s with congruent %s\n",
 | 
| +        THR_Print("Replacing %s with congruent %s\n",
 | 
|                    a->ToCString(),
 | 
|                    b->ToCString());
 | 
|        }
 | 
| @@ -7503,7 +7503,7 @@ class StoreOptimizer : public LivenessAnalysis {
 | 
|              if (!live_in->Contains(instr->place_id()) &&
 | 
|                  CanEliminateStore(instr)) {
 | 
|                if (FLAG_trace_optimization) {
 | 
| -                ISL_Print(
 | 
| +                THR_Print(
 | 
|                      "Removing dead store to place %" Pd " in block B%" Pd "\n",
 | 
|                      instr->place_id(), block->block_id());
 | 
|                }
 | 
| @@ -7556,7 +7556,7 @@ class StoreOptimizer : public LivenessAnalysis {
 | 
|      }
 | 
|      if (FLAG_trace_load_optimization) {
 | 
|        Dump();
 | 
| -      ISL_Print("---\n");
 | 
| +      THR_Print("---\n");
 | 
|      }
 | 
|    }
 | 
|  
 | 
| @@ -7590,7 +7590,7 @@ class StoreOptimizer : public LivenessAnalysis {
 | 
|          if (!live_out->Contains(instr->place_id()) &&
 | 
|              CanEliminateStore(instr)) {
 | 
|            if (FLAG_trace_optimization) {
 | 
| -            ISL_Print("Removing dead store to place %" Pd " block B%" Pd "\n",
 | 
| +            THR_Print("Removing dead store to place %" Pd " block B%" Pd "\n",
 | 
|                        instr->place_id(), block->block_id());
 | 
|            }
 | 
|            instr->RemoveFromGraph(/* ignored */ false);
 | 
| @@ -7684,14 +7684,14 @@ void DeadCodeElimination::EliminateDeadPhis(FlowGraph* flow_graph) {
 | 
|              phi->UnuseAllInputs();
 | 
|              (*join->phis_)[i] = NULL;
 | 
|              if (FLAG_trace_optimization) {
 | 
| -              ISL_Print("Removing dead phi v%" Pd "\n", phi->ssa_temp_index());
 | 
| +              THR_Print("Removing dead phi v%" Pd "\n", phi->ssa_temp_index());
 | 
|              }
 | 
|            } else if (phi->IsRedundant()) {
 | 
|              phi->ReplaceUsesWith(phi->InputAt(0)->definition());
 | 
|              phi->UnuseAllInputs();
 | 
|              (*join->phis_)[i] = NULL;
 | 
|              if (FLAG_trace_optimization) {
 | 
| -              ISL_Print("Removing redundant phi v%" Pd "\n",
 | 
| +              THR_Print("Removing redundant phi v%" Pd "\n",
 | 
|                           phi->ssa_temp_index());
 | 
|              }
 | 
|            } else {
 | 
| @@ -8234,7 +8234,7 @@ static bool IsAllocationSinkingCandidate(Definition* alloc,
 | 
|         use = use->next_use()) {
 | 
|      if (!IsSafeUse(use, check_type)) {
 | 
|        if (FLAG_trace_optimization) {
 | 
| -        ISL_Print("use of %s at %s is unsafe for allocation sinking\n",
 | 
| +        THR_Print("use of %s at %s is unsafe for allocation sinking\n",
 | 
|                    alloc->ToCString(),
 | 
|                    use->instruction()->ToCString());
 | 
|        }
 | 
| @@ -8264,7 +8264,7 @@ void AllocationSinking::EliminateAllocation(Definition* alloc) {
 | 
|    ASSERT(IsAllocationSinkingCandidate(alloc, kStrictCheck));
 | 
|  
 | 
|    if (FLAG_trace_optimization) {
 | 
| -    ISL_Print("removing allocation from the graph: v%" Pd "\n",
 | 
| +    THR_Print("removing allocation from the graph: v%" Pd "\n",
 | 
|                alloc->ssa_temp_index());
 | 
|    }
 | 
|  
 | 
| @@ -8345,7 +8345,7 @@ void AllocationSinking::CollectCandidates() {
 | 
|      Definition* alloc = candidates_[i];
 | 
|      if (alloc->Identity().IsAllocationSinkingCandidate()) {
 | 
|        if (FLAG_trace_optimization) {
 | 
| -        ISL_Print("discovered allocation sinking candidate: v%" Pd "\n",
 | 
| +        THR_Print("discovered allocation sinking candidate: v%" Pd "\n",
 | 
|                    alloc->ssa_temp_index());
 | 
|        }
 | 
|  
 | 
| @@ -8440,7 +8440,7 @@ void AllocationSinking::DiscoverFailedCandidates() {
 | 
|      Definition* alloc = candidates_[i];
 | 
|      if (!alloc->Identity().IsAllocationSinkingCandidate()) {
 | 
|        if (FLAG_trace_optimization) {
 | 
| -        ISL_Print("allocation v%" Pd " can't be eliminated\n",
 | 
| +        THR_Print("allocation v%" Pd " can't be eliminated\n",
 | 
|                    alloc->ssa_temp_index());
 | 
|        }
 | 
|  
 | 
| 
 |