diff options
author | Nicola Zaghen <nicola.zaghen@imgtec.com> | 2018-05-15 13:37:17 +0000 |
---|---|---|
committer | Nicola Zaghen <nicola.zaghen@imgtec.com> | 2018-05-15 13:37:17 +0000 |
commit | 349506a926c78af36cdcac75d44ac7522f168d06 (patch) | |
tree | e3d1f236a6bf854d438b9d8a824c7a4d676d0e0e /polly/lib/Transform/Simplify.cpp | |
parent | e7245b429b942946ed3cb8f422b22e3de6d00a3c (diff) | |
download | bcm5719-llvm-349506a926c78af36cdcac75d44ac7522f168d06.tar.gz bcm5719-llvm-349506a926c78af36cdcac75d44ac7522f168d06.zip |
[polly] Update uses of DEBUG macro to LLVM_DEBUG.
The DEBUG() macro is very generic so it might clash with other projects.
The renaming was done as follows:
- git grep -l 'DEBUG' | xargs sed -i 's/\bDEBUG\s\?(/LLVM_DEBUG(/g'
- git diff -U0 master | ../clang/tools/clang-format/clang-format-diff.py -i -p1 -style LLVM
Differential Revision: https://reviews.llvm.org/D44978
llvm-svn: 332352
Diffstat (limited to 'polly/lib/Transform/Simplify.cpp')
-rw-r--r-- | polly/lib/Transform/Simplify.cpp | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/polly/lib/Transform/Simplify.cpp b/polly/lib/Transform/Simplify.cpp index 73111d905e9..1402f434796 100644 --- a/polly/lib/Transform/Simplify.cpp +++ b/polly/lib/Transform/Simplify.cpp @@ -194,8 +194,8 @@ private: // If all of a write's elements are overwritten, remove it. isl::union_map AccRelUnion = AccRel; if (AccRelUnion.is_subset(WillBeOverwritten)) { - DEBUG(dbgs() << "Removing " << MA - << " which will be overwritten anyway\n"); + LLVM_DEBUG(dbgs() << "Removing " << MA + << " which will be overwritten anyway\n"); Stmt.removeSingleMemoryAccess(MA); OverwritesRemoved++; @@ -453,9 +453,9 @@ private: isl::map AccRelStoredVal = isl::map::from_domain_and_range( AccRelWrapped, makeValueSet(StoredVal)); if (isl::union_map(AccRelStoredVal).is_subset(Known)) { - DEBUG(dbgs() << "Cleanup of " << MA << ":\n"); - DEBUG(dbgs() << " Scalar: " << *StoredVal << "\n"); - DEBUG(dbgs() << " AccRel: " << AccRel << "\n"); + LLVM_DEBUG(dbgs() << "Cleanup of " << MA << ":\n"); + LLVM_DEBUG(dbgs() << " Scalar: " << *StoredVal << "\n"); + LLVM_DEBUG(dbgs() << " AccRel: " << AccRel << "\n"); Stmt.removeSingleMemoryAccess(MA); @@ -497,8 +497,8 @@ private: S->simplifySCoP(true); assert(NumStmtsBefore >= S->getSize()); StmtsRemoved = NumStmtsBefore - S->getSize(); - DEBUG(dbgs() << "Removed " << StmtsRemoved << " (of " << NumStmtsBefore - << ") statements\n"); + LLVM_DEBUG(dbgs() << "Removed " << StmtsRemoved << " (of " << NumStmtsBefore + << ") statements\n"); TotalStmtsRemoved[CallNo] += StmtsRemoved; } @@ -516,8 +516,9 @@ private: if (!AccRel.is_empty().is_true()) continue; - DEBUG(dbgs() << "Removing " << MA - << " because it's a partial access that never occurs\n"); + LLVM_DEBUG( + dbgs() << "Removing " << MA + << " because it's a partial access that never occurs\n"); DeferredRemove.push_back(MA); } @@ -548,7 +549,8 @@ private: for (MemoryAccess *MA : AllMAs) { if (UsedMA.count(MA)) continue; - DEBUG(dbgs() << "Removing " << MA << " because its value is not used\n"); + LLVM_DEBUG(dbgs() << "Removing " << MA + << " because its value is not used\n"); ScopStmt *Stmt = MA->getStatement(); Stmt->removeSingleMemoryAccess(MA); @@ -569,8 +571,8 @@ private: for (Instruction *Inst : AllInsts) { auto It = UsedInsts.find({&Stmt, Inst}); if (It == UsedInsts.end()) { - DEBUG(dbgs() << "Removing "; Inst->print(dbgs()); - dbgs() << " because it is not used\n"); + LLVM_DEBUG(dbgs() << "Removing "; Inst->print(dbgs()); + dbgs() << " because it is not used\n"); DeadInstructionsRemoved++; TotalDeadInstructionsRemoved[CallNo]++; continue; @@ -636,29 +638,29 @@ public: this->S = &S; ScopsProcessed[CallNo]++; - DEBUG(dbgs() << "Removing partial writes that never happen...\n"); + LLVM_DEBUG(dbgs() << "Removing partial writes that never happen...\n"); removeEmptyPartialAccesses(); - DEBUG(dbgs() << "Removing overwrites...\n"); + LLVM_DEBUG(dbgs() << "Removing overwrites...\n"); removeOverwrites(); - DEBUG(dbgs() << "Coalesce partial writes...\n"); + LLVM_DEBUG(dbgs() << "Coalesce partial writes...\n"); coalesceWrites(); - DEBUG(dbgs() << "Removing redundant writes...\n"); + LLVM_DEBUG(dbgs() << "Removing redundant writes...\n"); removeRedundantWrites(); - DEBUG(dbgs() << "Cleanup unused accesses...\n"); + LLVM_DEBUG(dbgs() << "Cleanup unused accesses...\n"); LoopInfo *LI = &getAnalysis<LoopInfoWrapperPass>().getLoopInfo(); markAndSweep(LI); - DEBUG(dbgs() << "Removing statements without side effects...\n"); + LLVM_DEBUG(dbgs() << "Removing statements without side effects...\n"); removeUnnecessaryStmts(); if (isModified()) ScopsModified[CallNo]++; - DEBUG(dbgs() << "\nFinal Scop:\n"); - DEBUG(dbgs() << S); + LLVM_DEBUG(dbgs() << "\nFinal Scop:\n"); + LLVM_DEBUG(dbgs() << S); auto ScopStats = S.getStatistics(); NumValueWrites[CallNo] += ScopStats.NumValueWrites; |