OSDN Git Service

[LoopUnswitch] Make DEBUG output more readable.
authorDavide Italiano <davide@freebsd.org>
Fri, 28 Apr 2017 21:30:50 +0000 (21:30 +0000)
committerDavide Italiano <davide@freebsd.org>
Fri, 28 Apr 2017 21:30:50 +0000 (21:30 +0000)
While debugging a miscompile I realized loopunswitch doesn't
put newlines when printing the instruction being replacement.
Ending up with a single line with many instruction replaced isn't
the best for readability and/or mental sanity.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301692 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/LoopUnswitch.cpp

index 8fa806a..0b56b4e 100644 (file)
@@ -1262,7 +1262,7 @@ static void RemoveFromWorklist(Instruction *I,
 static void ReplaceUsesOfWith(Instruction *I, Value *V,
                               std::vector<Instruction*> &Worklist,
                               Loop *L, LPPassManager *LPM) {
-  DEBUG(dbgs() << "Replace with '" << *V << "': " << *I);
+  DEBUG(dbgs() << "Replace with '" << *V << "': " << *I << "\n");
 
   // Add uses to the worklist, which may be dead now.
   for (unsigned i = 0, e = I->getNumOperands(); i != e; ++i)