improve the DEBUG output of inout-deshadow and allocbox-to-stack.

clean up a couple random things in silcombiner:
  - it shouldn't return "made any changes" out of the pass.
  - statistics should be spelled out more and don't end with periods.



Swift SVN r9755
This commit is contained in:
Chris Lattner
2013-10-29 04:02:32 +00:00
parent ff3290e47c
commit 968e89a3be
4 changed files with 17 additions and 21 deletions

View File

@@ -166,7 +166,8 @@ static bool checkAllocBoxUses(AllocBoxInst *ABI, ValueBase *V,
}
// Otherwise, this looks like it escapes.
DEBUG(llvm::errs() << "*** Failed to promote alloc_box: " << *ABI
DEBUG(llvm::errs() << "*** Failed to promote alloc_box in @"
<< ABI->getFunction()->getName() << ": " << *ABI
<< " Due to user: " << *User << "\n");
return true;
@@ -212,11 +213,7 @@ static bool optimizeAllocBox(AllocBoxInst *ABI,
return false;
}
DEBUG({
llvm::errs() << "*** Promoting alloc_box to stack: " << *ABI;
for (auto UI : ABI->getUses())
llvm::errs() << " User: " << *UI->getUser();
});
DEBUG(llvm::errs() << "*** Promoting alloc_box to stack: " << *ABI);
// Okay, it looks like this value doesn't escape. Promote it to an
// alloc_stack. Start by inserting the alloc stack after the alloc_box.