mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Change errs() -> dbgs() in a few files.
Swift SVN r12572
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user