aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Scalar/LoopInterchange.cpp
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@codeaurora.org>2016-09-07 15:56:59 +0000
committerChad Rosier <mcrosier@codeaurora.org>2016-09-07 15:56:59 +0000
commitf5814f56b8cd1eefbd37a80b802f5ac0d4bf420e (patch)
tree2d8a9b09d2eb83fea675ad648ca1bea270727b74 /llvm/lib/Transforms/Scalar/LoopInterchange.cpp
parent3a5f40c19175390e3790867972820599060016de (diff)
downloadllvm-f5814f56b8cd1eefbd37a80b802f5ac0d4bf420e.zip
llvm-f5814f56b8cd1eefbd37a80b802f5ac0d4bf420e.tar.gz
llvm-f5814f56b8cd1eefbd37a80b802f5ac0d4bf420e.tar.bz2
[LoopInterchange] Improve debug output. NFC.
llvm-svn: 280819
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LoopInterchange.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/LoopInterchange.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopInterchange.cpp b/llvm/lib/Transforms/Scalar/LoopInterchange.cpp
index 8bd0a96..428daac 100644
--- a/llvm/lib/Transforms/Scalar/LoopInterchange.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopInterchange.cpp
@@ -122,11 +122,11 @@ static bool populateDependencyMatrix(CharMatrix &DepMatrix, unsigned Level,
if (D->isFlow()) {
// TODO: Handle Flow dependence.Check if it is sufficient to populate
// the Dependence Matrix with the direction reversed.
- DEBUG(dbgs() << "Flow dependence not handled");
+ DEBUG(dbgs() << "Flow dependence not handled\n");
return false;
}
if (D->isAnti()) {
- DEBUG(dbgs() << "Found Anti dependence \n");
+ DEBUG(dbgs() << "Found Anti dependence\n");
unsigned Levels = D->getLevels();
char Direction;
for (unsigned II = 1; II <= Levels; ++II) {
@@ -278,7 +278,9 @@ static bool isLegalToInterChangeLoops(CharMatrix &DepMatrix,
static void populateWorklist(Loop &L, SmallVector<LoopVector, 8> &V) {
- DEBUG(dbgs() << "Calling populateWorklist called\n");
+ DEBUG(dbgs() << "Calling populateWorklist on Func: "
+ << L.getHeader()->getParent()->getName() << " Loop: %"
+ << L.getHeader()->getName() << '\n');
LoopVector LoopList;
Loop *CurrentLoop = &L;
const std::vector<Loop *> *Vec = &CurrentLoop->getSubLoops();
@@ -296,6 +298,7 @@ static void populateWorklist(Loop &L, SmallVector<LoopVector, 8> &V) {
}
LoopList.push_back(CurrentLoop);
V.push_back(std::move(LoopList));
+ DEBUG(dbgs() << "Worklist size = " << V.size() << "\n");
}
static PHINode *getInductionVariable(Loop *L, ScalarEvolution *SE) {
@@ -461,7 +464,6 @@ struct LoopInterchange : public FunctionPass {
for (Loop *L : *LI)
populateWorklist(*L, Worklist);
- DEBUG(dbgs() << "Worklist size = " << Worklist.size() << "\n");
bool Changed = true;
while (!Worklist.empty()) {
LoopVector LoopList = Worklist.pop_back_val();