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:
Jordan Rose
2018-07-20 14:37:07 -07:00
parent d7c503d2ce
commit cefb0b62ba
114 changed files with 1018 additions and 1018 deletions

View File

@@ -782,11 +782,11 @@ bool CSE::processNode(DominanceInfoNode *Node) {
SILInstruction *Inst = &*nextI;
++nextI;
DEBUG(llvm::dbgs() << "SILCSE VISITING: " << *Inst << "\n");
LLVM_DEBUG(llvm::dbgs() << "SILCSE VISITING: " << *Inst << "\n");
// Dead instructions should just be removed.
if (isInstructionTriviallyDead(Inst)) {
DEBUG(llvm::dbgs() << "SILCSE DCE: " << *Inst << '\n');
LLVM_DEBUG(llvm::dbgs() << "SILCSE DCE: " << *Inst << '\n');
eraseFromParentWithDebugInsts(Inst, nextI);
Changed = true;
++NumSimplify;
@@ -796,7 +796,7 @@ bool CSE::processNode(DominanceInfoNode *Node) {
// If the instruction can be simplified (e.g. X+0 = X) then replace it with
// its simpler value.
if (SILValue V = simplifyInstruction(Inst)) {
DEBUG(llvm::dbgs() << "SILCSE SIMPLIFY: " << *Inst << " to: " << *V
LLVM_DEBUG(llvm::dbgs() << "SILCSE SIMPLIFY: " << *Inst << " to: " << *V
<< '\n');
replaceAllSimplifiedUsesAndErase(Inst, V,
[&nextI](SILInstruction *deleteI) {
@@ -821,7 +821,7 @@ bool CSE::processNode(DominanceInfoNode *Node) {
// Now that we know we have an instruction we understand see if the
// instruction has an available value. If so, use it.
if (SILInstruction *AvailInst = AvailableValues->lookup(Inst)) {
DEBUG(llvm::dbgs() << "SILCSE CSE: " << *Inst << " to: " << *AvailInst
LLVM_DEBUG(llvm::dbgs() << "SILCSE CSE: " << *Inst << " to: " << *AvailInst
<< '\n');
// Instructions producing a new opened archetype need a special handling,
// because replacing these instructions may require a replacement
@@ -840,7 +840,7 @@ bool CSE::processNode(DominanceInfoNode *Node) {
// Otherwise, just remember that this value is available.
AvailableValues->insert(Inst, Inst);
DEBUG(llvm::dbgs() << "SILCSE Adding to value table: " << *Inst << " -> "
LLVM_DEBUG(llvm::dbgs() << "SILCSE Adding to value table: " << *Inst << " -> "
<< *Inst << "\n");
}
@@ -1163,7 +1163,7 @@ class SILCSE : public SILFunctionTransform {
bool RunsOnHighLevelSil;
void run() override {
DEBUG(llvm::dbgs() << "***** CSE on function: " << getFunction()->getName()
LLVM_DEBUG(llvm::dbgs() << "***** CSE on function: " << getFunction()->getName()
<< " *****\n");
DominanceAnalysis* DA = getAnalysis<DominanceAnalysis>();