[llvm] r301692 - [LoopUnswitch] Make DEBUG output more readable.

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 28 14:30:50 PDT 2017


Author: davide
Date: Fri Apr 28 16:30:50 2017
New Revision: 301692

URL: http://llvm.org/viewvc/llvm-project?rev=301692&view=rev
Log:
[LoopUnswitch] Make DEBUG output more readable.

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.

Modified:
    llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp?rev=301692&r1=301691&r2=301692&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp Fri Apr 28 16:30:50 2017
@@ -1262,7 +1262,7 @@ static void RemoveFromWorklist(Instructi
 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)




More information about the llvm-commits mailing list