summaryrefslogtreecommitdiffstats
path: root/polly/lib/CodeGen/ManagedMemoryRewrite.cpp
diff options
context:
space:
mode:
authorNicola Zaghen <nicola.zaghen@imgtec.com>2018-05-15 13:37:17 +0000
committerNicola Zaghen <nicola.zaghen@imgtec.com>2018-05-15 13:37:17 +0000
commit349506a926c78af36cdcac75d44ac7522f168d06 (patch)
treee3d1f236a6bf854d438b9d8a824c7a4d676d0e0e /polly/lib/CodeGen/ManagedMemoryRewrite.cpp
parente7245b429b942946ed3cb8f422b22e3de6d00a3c (diff)
downloadbcm5719-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/CodeGen/ManagedMemoryRewrite.cpp')
-rw-r--r--polly/lib/CodeGen/ManagedMemoryRewrite.cpp29
1 files changed, 15 insertions, 14 deletions
diff --git a/polly/lib/CodeGen/ManagedMemoryRewrite.cpp b/polly/lib/CodeGen/ManagedMemoryRewrite.cpp
index a8240140809..e14da1dbdb9 100644
--- a/polly/lib/CodeGen/ManagedMemoryRewrite.cpp
+++ b/polly/lib/CodeGen/ManagedMemoryRewrite.cpp
@@ -124,8 +124,8 @@ static void expandConstantExpr(ConstantExpr *Cur, PollyIRBuilder &Builder,
Instruction *I = Cur->getAsInstruction();
assert(I && "unable to convert ConstantExpr to Instruction");
- DEBUG(dbgs() << "Expanding ConstantExpression: (" << *Cur
- << ") in Instruction: (" << *I << ")\n";);
+ LLVM_DEBUG(dbgs() << "Expanding ConstantExpression: (" << *Cur
+ << ") in Instruction: (" << *I << ")\n";);
// Invalidate `Cur` so that no one after this point uses `Cur`. Rather,
// they should mutate `I`.
@@ -209,19 +209,20 @@ replaceGlobalArray(Module &M, const DataLayout &DL, GlobalVariable &Array,
Array.hasInternalLinkage() ||
IgnoreLinkageForGlobals;
if (!OnlyVisibleInsideModule) {
- DEBUG(dbgs() << "Not rewriting (" << Array
- << ") to managed memory "
- "because it could be visible externally. To force rewrite, "
- "use -polly-acc-rewrite-ignore-linkage-for-globals.\n");
+ LLVM_DEBUG(
+ dbgs() << "Not rewriting (" << Array
+ << ") to managed memory "
+ "because it could be visible externally. To force rewrite, "
+ "use -polly-acc-rewrite-ignore-linkage-for-globals.\n");
return;
}
if (!Array.hasInitializer() ||
!isa<ConstantAggregateZero>(Array.getInitializer())) {
- DEBUG(dbgs() << "Not rewriting (" << Array
- << ") to managed memory "
- "because it has an initializer which is "
- "not a zeroinitializer.\n");
+ LLVM_DEBUG(dbgs() << "Not rewriting (" << Array
+ << ") to managed memory "
+ "because it has an initializer which is "
+ "not a zeroinitializer.\n");
return;
}
@@ -288,14 +289,14 @@ static void getAllocasToBeManaged(Function &F,
auto *Alloca = dyn_cast<AllocaInst>(&I);
if (!Alloca)
continue;
- DEBUG(dbgs() << "Checking if (" << *Alloca << ") may be captured: ");
+ LLVM_DEBUG(dbgs() << "Checking if (" << *Alloca << ") may be captured: ");
if (PointerMayBeCaptured(Alloca, /* ReturnCaptures */ false,
/* StoreCaptures */ true)) {
Allocas.insert(Alloca);
- DEBUG(dbgs() << "YES (captured).\n");
+ LLVM_DEBUG(dbgs() << "YES (captured).\n");
} else {
- DEBUG(dbgs() << "NO (not captured).\n");
+ LLVM_DEBUG(dbgs() << "NO (not captured).\n");
}
}
}
@@ -303,7 +304,7 @@ static void getAllocasToBeManaged(Function &F,
static void rewriteAllocaAsManagedMemory(AllocaInst *Alloca,
const DataLayout &DL) {
- DEBUG(dbgs() << "rewriting: (" << *Alloca << ") to managed mem.\n");
+ LLVM_DEBUG(dbgs() << "rewriting: (" << *Alloca << ") to managed mem.\n");
Module *M = Alloca->getModule();
assert(M && "Alloca does not have a module");
OpenPOWER on IntegriCloud