diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-08-23 04:37:46 +0000 | 
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-08-23 04:37:46 +0000 | 
| commit | bdff548e4dd577a72094d57b282de4e765643b96 (patch) | |
| tree | 71c6617214b134968352b854c8f82ce8c89e1282 /lib/Transforms/Utils/UnrollLoop.cpp | |
| parent | 405ce8db96f7a3a5a4c3da0f71d2ca54d30316f0 (diff) | |
| download | external_llvm-bdff548e4dd577a72094d57b282de4e765643b96.zip external_llvm-bdff548e4dd577a72094d57b282de4e765643b96.tar.gz external_llvm-bdff548e4dd577a72094d57b282de4e765643b96.tar.bz2 | |
eliminate the "Value" printing methods that print to a std::ostream.
This required converting a bunch of stuff off DOUT and other cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79819 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/UnrollLoop.cpp')
| -rw-r--r-- | lib/Transforms/Utils/UnrollLoop.cpp | 15 | 
1 files changed, 8 insertions, 7 deletions
| diff --git a/lib/Transforms/Utils/UnrollLoop.cpp b/lib/Transforms/Utils/UnrollLoop.cpp index aa1f09b6..4d838b5 100644 --- a/lib/Transforms/Utils/UnrollLoop.cpp +++ b/lib/Transforms/Utils/UnrollLoop.cpp @@ -63,7 +63,7 @@ static BasicBlock *FoldBlockIntoPredecessor(BasicBlock *BB, LoopInfo* LI) {    if (OnlyPred->getTerminator()->getNumSuccessors() != 1)      return 0; -  DOUT << "Merging: " << *BB << "into: " << *OnlyPred; +  DEBUG(errs() << "Merging: " << *BB << "into: " << *OnlyPred);    // Resolve any PHI nodes at the start of the block.  They are all    // guaranteed to have exactly one entry if they exist, unless there are @@ -114,7 +114,8 @@ bool llvm::UnrollLoop(Loop *L, unsigned Count, LoopInfo* LI, LPPassManager* LPM)    if (!BI || BI->isUnconditional()) {      // The loop-rotate pass can be helpful to avoid this in many cases. -    DOUT << "  Can't unroll; loop not terminated by a conditional branch.\n"; +    DEBUG(errs() << +             "  Can't unroll; loop not terminated by a conditional branch.\n");      return false;    } @@ -126,9 +127,9 @@ bool llvm::UnrollLoop(Loop *L, unsigned Count, LoopInfo* LI, LPPassManager* LPM)      TripMultiple = L->getSmallConstantTripMultiple();    if (TripCount != 0) -    DOUT << "  Trip Count = " << TripCount << "\n"; +    DEBUG(errs() << "  Trip Count = " << TripCount << "\n");    if (TripMultiple != 1) -    DOUT << "  Trip Multiple = " << TripMultiple << "\n"; +    DEBUG(errs() << "  Trip Multiple = " << TripMultiple << "\n");    // Effectively "DCE" unrolled iterations that are beyond the tripcount    // and will never be executed. @@ -160,11 +161,11 @@ bool llvm::UnrollLoop(Loop *L, unsigned Count, LoopInfo* LI, LPPassManager* LPM)      DEBUG(errs() << "UNROLLING loop %" << Header->getName()            << " by " << Count);      if (TripMultiple == 0 || BreakoutTrip != TripMultiple) { -      DOUT << " with a breakout at trip " << BreakoutTrip; +      DEBUG(errs() << " with a breakout at trip " << BreakoutTrip);      } else if (TripMultiple != 1) { -      DOUT << " with " << TripMultiple << " trips per branch"; +      DEBUG(errs() << " with " << TripMultiple << " trips per branch");      } -    DOUT << "!\n"; +    DEBUG(errs() << "!\n");    }    std::vector<BasicBlock*> LoopBlocks = L->getBlocks(); | 
