[llvm] r280819 - [LoopInterchange] Improve debug output. NFC.
Chad Rosier via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 7 08:56:59 PDT 2016
Author: mcrosier
Date: Wed Sep 7 10:56:59 2016
New Revision: 280819
URL: http://llvm.org/viewvc/llvm-project?rev=280819&view=rev
Log:
[LoopInterchange] Improve debug output. NFC.
Modified:
llvm/trunk/lib/Transforms/Scalar/LoopInterchange.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/LoopInterchange.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopInterchange.cpp?rev=280819&r1=280818&r2=280819&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopInterchange.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopInterchange.cpp Wed Sep 7 10:56:59 2016
@@ -122,11 +122,11 @@ static bool populateDependencyMatrix(Cha
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(Ch
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, Sm
}
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 Function
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();
More information about the llvm-commits
mailing list