mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Replace old DEBUG macro with new LLVM_DEBUG
...using a sed command provided by Vedant:
$ find . -name \*.cpp -print -exec sed -i "" -E "s/ DEBUG\(/ LLVM_DEBUG(/g" {} \;
This commit is contained in:
@@ -301,10 +301,10 @@ handleRefCountInstMatch(SILInstruction *RefCountInst) {
|
||||
bool BottomUpRefCountState::merge(const BottomUpRefCountState &Other) {
|
||||
|
||||
auto NewState = MergeBottomUpLatticeStates(LatState, Other.LatState);
|
||||
DEBUG(llvm::dbgs() << " Performing BottomUp Merge.\n");
|
||||
DEBUG(llvm::dbgs() << " Left: " << LatState << "; Right: "
|
||||
LLVM_DEBUG(llvm::dbgs() << " Performing BottomUp Merge.\n");
|
||||
LLVM_DEBUG(llvm::dbgs() << " Left: " << LatState << "; Right: "
|
||||
<< Other.LatState << "; Result: " << NewState << "\n");
|
||||
DEBUG(llvm::dbgs() << " V: ";
|
||||
LLVM_DEBUG(llvm::dbgs() << " V: ";
|
||||
if (hasRCRoot())
|
||||
getRCRoot()->dump();
|
||||
else
|
||||
@@ -326,7 +326,7 @@ bool BottomUpRefCountState::merge(const BottomUpRefCountState &Other) {
|
||||
//
|
||||
// TODO: Add support for working around control dependence issues.
|
||||
if (LatState == BottomUpRefCountState::LatticeState::None) {
|
||||
DEBUG(llvm::dbgs() << " Found LatticeState::None. "
|
||||
LLVM_DEBUG(llvm::dbgs() << " Found LatticeState::None. "
|
||||
"Clearing State!\n");
|
||||
clear();
|
||||
return false;
|
||||
@@ -334,7 +334,7 @@ bool BottomUpRefCountState::merge(const BottomUpRefCountState &Other) {
|
||||
|
||||
if (!Transition.isValid() || !Other.Transition.isValid() ||
|
||||
!Transition.merge(Other.Transition)) {
|
||||
DEBUG(llvm::dbgs() << " Failed merge!\n");
|
||||
LLVM_DEBUG(llvm::dbgs() << " Failed merge!\n");
|
||||
clear();
|
||||
return false;
|
||||
}
|
||||
@@ -447,7 +447,7 @@ void BottomUpRefCountState::updateForSameLoopInst(
|
||||
// pointer up to this point. This has the effect of performing a use and a
|
||||
// decrement.
|
||||
if (handlePotentialGuaranteedUser(I, SetFactory, AA)) {
|
||||
DEBUG(llvm::dbgs() << " Found Potential Guaranteed Use:\n "
|
||||
LLVM_DEBUG(llvm::dbgs() << " Found Potential Guaranteed Use:\n "
|
||||
<< getRCRoot());
|
||||
return;
|
||||
}
|
||||
@@ -456,7 +456,7 @@ void BottomUpRefCountState::updateForSameLoopInst(
|
||||
// the reference counted value we are tracking... in a manner that could
|
||||
// cause us to change states. If we do change states continue...
|
||||
if (handlePotentialDecrement(I, AA)) {
|
||||
DEBUG(llvm::dbgs() << " Found Potential Decrement:\n "
|
||||
LLVM_DEBUG(llvm::dbgs() << " Found Potential Decrement:\n "
|
||||
<< getRCRoot());
|
||||
return;
|
||||
}
|
||||
@@ -465,7 +465,7 @@ void BottomUpRefCountState::updateForSameLoopInst(
|
||||
// could be used by the given instruction.
|
||||
if (!handlePotentialUser(I, SetFactory, AA))
|
||||
return;
|
||||
DEBUG(llvm::dbgs() << " Found Potential Use:\n " << getRCRoot());
|
||||
LLVM_DEBUG(llvm::dbgs() << " Found Potential Use:\n " << getRCRoot());
|
||||
}
|
||||
|
||||
void BottomUpRefCountState::updateForDifferentLoopInst(
|
||||
@@ -478,7 +478,7 @@ void BottomUpRefCountState::updateForDifferentLoopInst(
|
||||
if (valueCanBeGuaranteedUsedGivenLatticeState()) {
|
||||
if (mayGuaranteedUseValue(I, getRCRoot(), AA) ||
|
||||
mayDecrementRefCount(I, getRCRoot(), AA)) {
|
||||
DEBUG(llvm::dbgs() << " Found potential guaranteed use:\n "
|
||||
LLVM_DEBUG(llvm::dbgs() << " Found potential guaranteed use:\n "
|
||||
<< getRCRoot());
|
||||
handleGuaranteedUser(getRCRoot(), SetFactory, AA);
|
||||
return;
|
||||
@@ -490,7 +490,7 @@ void BottomUpRefCountState::updateForDifferentLoopInst(
|
||||
// use.
|
||||
if (!handlePotentialUser(I, SetFactory, AA))
|
||||
return;
|
||||
DEBUG(llvm::dbgs() << " Found Potential Use:\n " << getRCRoot());
|
||||
LLVM_DEBUG(llvm::dbgs() << " Found Potential Use:\n " << getRCRoot());
|
||||
}
|
||||
|
||||
void BottomUpRefCountState::updateForPredTerminators(
|
||||
@@ -750,10 +750,10 @@ handleRefCountInstMatch(SILInstruction *RefCountInst) {
|
||||
|
||||
bool TopDownRefCountState::merge(const TopDownRefCountState &Other) {
|
||||
auto NewState = MergeTopDownLatticeStates(LatState, Other.LatState);
|
||||
DEBUG(llvm::dbgs() << " Performing TopDown Merge.\n");
|
||||
DEBUG(llvm::dbgs() << " Left: " << LatState << "; Right: "
|
||||
LLVM_DEBUG(llvm::dbgs() << " Performing TopDown Merge.\n");
|
||||
LLVM_DEBUG(llvm::dbgs() << " Left: " << LatState << "; Right: "
|
||||
<< Other.LatState << "; Result: " << NewState << "\n");
|
||||
DEBUG(llvm::dbgs() << " V: ";
|
||||
LLVM_DEBUG(llvm::dbgs() << " V: ";
|
||||
if (hasRCRoot())
|
||||
getRCRoot()->dump();
|
||||
else
|
||||
@@ -775,14 +775,14 @@ bool TopDownRefCountState::merge(const TopDownRefCountState &Other) {
|
||||
// TODO: Add support for determining control dependence.
|
||||
if (LatState == TopDownRefCountState::LatticeState::None) {
|
||||
clear();
|
||||
DEBUG(llvm::dbgs() << " Found LatticeState::None. "
|
||||
LLVM_DEBUG(llvm::dbgs() << " Found LatticeState::None. "
|
||||
"Clearing State!\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!Transition.isValid() || !Other.Transition.isValid() ||
|
||||
!Transition.merge(Other.Transition)) {
|
||||
DEBUG(llvm::dbgs() << " Failed merge!\n");
|
||||
LLVM_DEBUG(llvm::dbgs() << " Failed merge!\n");
|
||||
clear();
|
||||
return false;
|
||||
}
|
||||
@@ -880,7 +880,7 @@ void TopDownRefCountState::updateForSameLoopInst(
|
||||
// pointer up to this point. This has the effect of performing a use and a
|
||||
// decrement.
|
||||
if (handlePotentialGuaranteedUser(I, SetFactory, AA)) {
|
||||
DEBUG(llvm::dbgs() << " Found Potential Guaranteed Use:\n "
|
||||
LLVM_DEBUG(llvm::dbgs() << " Found Potential Guaranteed Use:\n "
|
||||
<< getRCRoot());
|
||||
return;
|
||||
}
|
||||
@@ -889,7 +889,7 @@ void TopDownRefCountState::updateForSameLoopInst(
|
||||
// the reference counted value we are tracking in a manner that could
|
||||
// cause us to change states. If we do change states continue...
|
||||
if (handlePotentialDecrement(I, SetFactory, AA)) {
|
||||
DEBUG(llvm::dbgs() << " Found Potential Decrement:\n "
|
||||
LLVM_DEBUG(llvm::dbgs() << " Found Potential Decrement:\n "
|
||||
<< getRCRoot());
|
||||
return;
|
||||
}
|
||||
@@ -898,7 +898,7 @@ void TopDownRefCountState::updateForSameLoopInst(
|
||||
// could be used by the given instruction.
|
||||
if (!handlePotentialUser(I, AA))
|
||||
return;
|
||||
DEBUG(llvm::dbgs() << " Found Potential Use:\n " << getRCRoot());
|
||||
LLVM_DEBUG(llvm::dbgs() << " Found Potential Use:\n " << getRCRoot());
|
||||
}
|
||||
|
||||
void TopDownRefCountState::updateForDifferentLoopInst(
|
||||
@@ -911,7 +911,7 @@ void TopDownRefCountState::updateForDifferentLoopInst(
|
||||
if (valueCanBeGuaranteedUsedGivenLatticeState()) {
|
||||
if (mayGuaranteedUseValue(I, getRCRoot(), AA) ||
|
||||
mayDecrementRefCount(I, getRCRoot(), AA)) {
|
||||
DEBUG(llvm::dbgs() << " Found potential guaranteed use!\n");
|
||||
LLVM_DEBUG(llvm::dbgs() << " Found potential guaranteed use!\n");
|
||||
handleGuaranteedUser(I, getRCRoot(), SetFactory, AA);
|
||||
return;
|
||||
}
|
||||
@@ -919,7 +919,7 @@ void TopDownRefCountState::updateForDifferentLoopInst(
|
||||
|
||||
if (!handlePotentialUser(I, AA))
|
||||
return;
|
||||
DEBUG(llvm::dbgs() << " Found Potential Use:\n " << getRCRoot());
|
||||
LLVM_DEBUG(llvm::dbgs() << " Found Potential Use:\n " << getRCRoot());
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
Reference in New Issue
Block a user