Change errs() -> dbgs() in a few files.

Swift SVN r12572
This commit is contained in:
Nadav Rotem
2014-01-20 06:36:50 +00:00
parent 42c966fc14
commit a07aed9d1f
7 changed files with 58 additions and 58 deletions

View File

@@ -643,8 +643,8 @@ bool AllocOptimize::promoteLoad(SILInstruction *Inst) {
// Simply replace the load.
assert(isa<LoadInst>(Inst));
DEBUG(llvm::errs() << " *** Promoting load: " << *Inst << "\n");
DEBUG(llvm::errs() << " To value: " << *NewVal.getDef() << "\n");
DEBUG(llvm::dbgs() << " *** Promoting load: " << *Inst << "\n");
DEBUG(llvm::dbgs() << " To value: " << *NewVal.getDef() << "\n");
SILValue(Inst, 0).replaceAllUsesWith(NewVal);
SILValue Addr = Inst->getOperand(0);
@@ -705,8 +705,8 @@ bool AllocOptimize::promoteDestroyAddr(DestroyAddrInst *DAI) {
++NumDestroyAddrPromoted;
DEBUG(llvm::errs() << " *** Promoting destroy_addr: " << *DAI << "\n");
DEBUG(llvm::errs() << " To value: " << *NewVal.getDef() << "\n");
DEBUG(llvm::dbgs() << " *** Promoting destroy_addr: " << *DAI << "\n");
DEBUG(llvm::dbgs() << " To value: " << *NewVal.getDef() << "\n");
SILBuilder(DAI).emitDestroyValueOperation(DAI->getLoc(), NewVal);
DAI->eraseFromParent();
@@ -718,7 +718,7 @@ bool AllocOptimize::promoteDestroyAddr(DestroyAddrInst *DAI) {
/// Explode a copy_addr instruction of a loadable type into lower level
/// operations like loads, stores, retains, releases, copy_value, etc.
void AllocOptimize::explodeCopyAddr(CopyAddrInst *CAI) {
DEBUG(llvm::errs() << " -- Exploding copy_addr: " << *CAI << "\n");
DEBUG(llvm::dbgs() << " -- Exploding copy_addr: " << *CAI << "\n");
SILType ValTy = CAI->getDest().getType().getObjectType();
auto &TL = Module.getTypeLowering(ValTy);
@@ -854,7 +854,7 @@ void AllocOptimize::tryToRemoveDeadAllocation() {
case DIUseKind::IndirectIn:
case DIUseKind::InOutUse:
case DIUseKind::Escape:
DEBUG(llvm::errs() << "*** Failed to remove autogenerated alloc: "
DEBUG(llvm::dbgs() << "*** Failed to remove autogenerated alloc: "
"kept alive by: " << *U.Inst);
return; // These do prevent removal.
}
@@ -867,13 +867,13 @@ void AllocOptimize::tryToRemoveDeadAllocation() {
if (R == nullptr || isa<DeallocStackInst>(R) || isa<DeallocBoxInst>(R))
continue;
DEBUG(llvm::errs() << "*** Failed to remove autogenerated alloc: "
DEBUG(llvm::dbgs() << "*** Failed to remove autogenerated alloc: "
"kept alive by release: " << *R);
return;
}
}
DEBUG(llvm::errs() << "*** Removing autogenerated alloc_stack: "<<*TheMemory);
DEBUG(llvm::dbgs() << "*** Removing autogenerated alloc_stack: "<<*TheMemory);
// If it is safe to remove, do it. Recursively remove all instructions
// hanging off the allocation instruction, then return success. Let the
@@ -919,7 +919,7 @@ static void optimizeMemoryAllocations(SILFunction &Fn) {
continue;
}
DEBUG(llvm::errs() << "*** DI Optimize looking at: " << *Inst << "\n");
DEBUG(llvm::dbgs() << "*** DI Optimize looking at: " << *Inst << "\n");
DIMemoryObjectInfo MemInfo(Inst);
// Set up the datastructure used to collect the uses of the allocation.