summaryrefslogtreecommitdiffstats
path: root/polly/lib/Transform/Simplify.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'polly/lib/Transform/Simplify.cpp')
-rw-r--r--polly/lib/Transform/Simplify.cpp42
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;
OpenPOWER on IntegriCloud