Index: runtime/vm/flow_graph_allocator.cc |
diff --git a/runtime/vm/flow_graph_allocator.cc b/runtime/vm/flow_graph_allocator.cc |
index 83c13daecf3ede5f104d6039799c4293daef643a..7766f98ee045e6ede3b2121a798de105b9c06b15 100644 |
--- a/runtime/vm/flow_graph_allocator.cc |
+++ b/runtime/vm/flow_graph_allocator.cc |
@@ -266,7 +266,7 @@ void FlowGraphAllocator::AnalyzeLiveness() { |
static void PrintBitVector(const char* tag, BitVector* v) { |
OS::Print("%s:", tag); |
for (BitVector::Iterator it(v); !it.Done(); it.Advance()) { |
- OS::Print(" %d", it.Current()); |
+ OS::Print(" %"Pd"", it.Current()); |
} |
OS::Print("\n"); |
} |
@@ -276,12 +276,12 @@ void FlowGraphAllocator::DumpLiveness() { |
const intptr_t block_count = postorder_.length(); |
for (intptr_t i = 0; i < block_count; i++) { |
BlockEntryInstr* block = postorder_[i]; |
- OS::Print("block @%d -> ", block->block_id()); |
+ OS::Print("block @%"Pd" -> ", block->block_id()); |
Instruction* last = block->last_instruction(); |
for (intptr_t j = 0; j < last->SuccessorCount(); j++) { |
BlockEntryInstr* succ = last->SuccessorAt(j); |
- OS::Print(" @%d", succ->block_id()); |
+ OS::Print(" @%"Pd"", succ->block_id()); |
} |
OS::Print("\n"); |
@@ -443,7 +443,7 @@ void LiveRange::Print() { |
return; |
} |
- OS::Print(" live range v%d [%d, %d) in ", vreg(), Start(), End()); |
+ OS::Print(" live range v%"Pd" [%"Pd", %"Pd") in ", vreg(), Start(), End()); |
assigned_location().Print(); |
OS::Print("\n"); |
@@ -451,11 +451,11 @@ void LiveRange::Print() { |
for (UseInterval* interval = first_use_interval_; |
interval != NULL; |
interval = interval->next()) { |
- OS::Print(" use interval [%d, %d)\n", |
+ OS::Print(" use interval [%"Pd", %"Pd")\n", |
interval->start(), |
interval->end()); |
while ((use_pos != NULL) && (use_pos->pos() <= interval->end())) { |
- OS::Print(" use at %d", use_pos->pos()); |
+ OS::Print(" use at %"Pd"", use_pos->pos()); |
if (use_pos->location_slot() != NULL) { |
OS::Print(" as "); |
use_pos->location_slot()->Print(); |
@@ -1359,7 +1359,7 @@ LiveRange* LiveRange::SplitAt(intptr_t split_pos) { |
first_safepoint_after_split, |
next_sibling_); |
- TRACE_ALLOC(OS::Print(" split sibling [%d, %d)\n", |
+ TRACE_ALLOC(OS::Print(" split sibling [%"Pd", %"Pd")\n", |
next_sibling_->Start(), next_sibling_->End())); |
last_use_interval_ = last_before_split; |
@@ -1376,7 +1376,7 @@ LiveRange* LiveRange::SplitAt(intptr_t split_pos) { |
LiveRange* FlowGraphAllocator::SplitBetween(LiveRange* range, |
intptr_t from, |
intptr_t to) { |
- TRACE_ALLOC(OS::Print("split %d [%d, %d) between [%d, %d)\n", |
+ TRACE_ALLOC(OS::Print("split %"Pd" [%"Pd", %"Pd") between [%"Pd", %"Pd")\n", |
range->vreg(), range->Start(), range->End(), from, to)); |
intptr_t split_pos = kIllegalPosition; |
@@ -1414,7 +1414,8 @@ void FlowGraphAllocator::SpillBetween(LiveRange* range, |
intptr_t from, |
intptr_t to) { |
ASSERT(from < to); |
- TRACE_ALLOC(OS::Print("spill %d [%d, %d) between [%d, %d)\n", |
+ TRACE_ALLOC(OS::Print("spill %"Pd" [%"Pd", %"Pd") " |
+ "between [%"Pd", %"Pd")\n", |
range->vreg(), range->Start(), range->End(), from, to)); |
LiveRange* tail = range->SplitAt(from); |
@@ -1431,7 +1432,7 @@ void FlowGraphAllocator::SpillBetween(LiveRange* range, |
void FlowGraphAllocator::SpillAfter(LiveRange* range, intptr_t from) { |
- TRACE_ALLOC(OS::Print("spill %d [%d, %d) after %d\n", |
+ TRACE_ALLOC(OS::Print("spill %"Pd" [%"Pd", %"Pd") after %"Pd"\n", |
range->vreg(), range->Start(), range->End(), from)); |
LiveRange* tail = range->SplitAt(from); |
Spill(tail); |
@@ -1537,7 +1538,7 @@ bool FlowGraphAllocator::AllocateFreeRegister(LiveRange* unallocated) { |
TRACE_ALLOC(OS::Print("found hint ")); |
TRACE_ALLOC(hint.Print()); |
- TRACE_ALLOC(OS::Print(" for %d: free until %d\n", |
+ TRACE_ALLOC(OS::Print(" for %"Pd": free until %"Pd"\n", |
unallocated->vreg(), free_until)); |
} else if (free_until != kMaxPosition) { |
for (intptr_t reg = 0; reg < NumberOfRegisters(); ++reg) { |
@@ -1568,11 +1569,11 @@ bool FlowGraphAllocator::AllocateFreeRegister(LiveRange* unallocated) { |
TRACE_ALLOC(OS::Print("assigning free register ")); |
TRACE_ALLOC(MakeRegisterLocation(candidate).Print()); |
- TRACE_ALLOC(OS::Print(" to %d\n", unallocated->vreg())); |
+ TRACE_ALLOC(OS::Print(" to %"Pd"\n", unallocated->vreg())); |
if (free_until != kMaxPosition) { |
// There was an intersection. Split unallocated. |
- TRACE_ALLOC(OS::Print(" splitting at %d\n", free_until)); |
+ TRACE_ALLOC(OS::Print(" splitting at %"Pd"\n", free_until)); |
LiveRange* tail = unallocated->SplitAt(free_until); |
AddToUnallocated(tail); |
} |
@@ -1612,7 +1613,7 @@ void FlowGraphAllocator::AllocateAnyRegister(LiveRange* unallocated) { |
TRACE_ALLOC(OS::Print("assigning blocked register ")); |
TRACE_ALLOC(MakeRegisterLocation(candidate).Print()); |
- TRACE_ALLOC(OS::Print(" to live range %d until %d\n", |
+ TRACE_ALLOC(OS::Print(" to live range %"Pd" until %"Pd"\n", |
unallocated->vreg(), blocked_at)); |
if (blocked_at < unallocated->End()) { |
@@ -1769,7 +1770,7 @@ void FlowGraphAllocator::ConvertUseTo(UsePosition* use, Location loc) { |
ASSERT(use->location_slot() != NULL); |
Location* slot = use->location_slot(); |
ASSERT(slot->IsUnallocated()); |
- TRACE_ALLOC(OS::Print(" use at %d converted to ", use->pos())); |
+ TRACE_ALLOC(OS::Print(" use at %"Pd" converted to ", use->pos())); |
TRACE_ALLOC(loc.Print()); |
TRACE_ALLOC(OS::Print("\n")); |
*slot = loc; |
@@ -1782,7 +1783,8 @@ void FlowGraphAllocator::ConvertAllUses(LiveRange* range) { |
const Location loc = range->assigned_location(); |
ASSERT(!loc.IsInvalid()); |
- TRACE_ALLOC(OS::Print("range [%d, %d) for v%d has been allocated to ", |
+ TRACE_ALLOC(OS::Print("range [%"Pd", %"Pd") " |
+ "for v%"Pd" has been allocated to ", |
range->Start(), range->End(), range->vreg())); |
TRACE_ALLOC(loc.Print()); |
TRACE_ALLOC(OS::Print(":\n")); |
@@ -1944,7 +1946,8 @@ void FlowGraphAllocator::AllocateUnallocatedRanges() { |
LiveRange* range = unallocated_.Last(); |
unallocated_.RemoveLast(); |
const intptr_t start = range->Start(); |
- TRACE_ALLOC(OS::Print("Processing live range for vreg %d starting at %d\n", |
+ TRACE_ALLOC(OS::Print("Processing live range for vreg %"Pd" " |
+ "starting at %"Pd"\n", |
range->vreg(), |
start)); |
@@ -1980,12 +1983,12 @@ bool FlowGraphAllocator::TargetLocationIsSpillSlot(LiveRange* range, |
void FlowGraphAllocator::ConnectSplitSiblings(LiveRange* parent, |
BlockEntryInstr* source_block, |
BlockEntryInstr* target_block) { |
- TRACE_ALLOC(OS::Print("Connect source_block=%d, target_block=%d\n", |
+ TRACE_ALLOC(OS::Print("Connect source_block=%"Pd", target_block=%"Pd"\n", |
source_block->block_id(), |
target_block->block_id())); |
if (parent->next_sibling() == NULL) { |
// Nothing to connect. The whole range was allocated to the same location. |
- TRACE_ALLOC(OS::Print("range %d has no siblings\n", parent->vreg())); |
+ TRACE_ALLOC(OS::Print("range %"Pd" has no siblings\n", parent->vreg())); |
return; |
} |
@@ -2022,10 +2025,10 @@ void FlowGraphAllocator::ConnectSplitSiblings(LiveRange* parent, |
range = range->next_sibling(); |
} |
- TRACE_ALLOC(OS::Print("connecting [%d, %d) [", |
+ TRACE_ALLOC(OS::Print("connecting [%"Pd", %"Pd") [", |
source_cover->Start(), source_cover->End())); |
TRACE_ALLOC(source.Print()); |
- TRACE_ALLOC(OS::Print("] to [%d, %d) [", |
+ TRACE_ALLOC(OS::Print("] to [%"Pd", %"Pd") [", |
target_cover->Start(), target_cover->End())); |
TRACE_ALLOC(target.Print()); |
TRACE_ALLOC(OS::Print("]\n")); |
@@ -2057,10 +2060,10 @@ void FlowGraphAllocator::ResolveControlFlow() { |
while (range->next_sibling() != NULL) { |
LiveRange* sibling = range->next_sibling(); |
- TRACE_ALLOC(OS::Print("connecting [%d, %d) [", |
+ TRACE_ALLOC(OS::Print("connecting [%"Pd", %"Pd") [", |
range->Start(), range->End())); |
TRACE_ALLOC(range->assigned_location().Print()); |
- TRACE_ALLOC(OS::Print("] to [%d, %d) [", |
+ TRACE_ALLOC(OS::Print("] to [%"Pd", %"Pd") [", |
sibling->Start(), sibling->End())); |
TRACE_ALLOC(sibling->assigned_location().Print()); |
TRACE_ALLOC(OS::Print("]\n")); |