diff options
Diffstat (limited to 'lib/Transforms/Scalar')
-rw-r--r-- | lib/Transforms/Scalar/IndVarSimplify.cpp | 4 | ||||
-rw-r--r-- | lib/Transforms/Scalar/LICM.cpp | 6 | ||||
-rw-r--r-- | lib/Transforms/Scalar/LoopRotation.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/Scalar/LoopUnswitch.cpp | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp index 01b74815f5..7f0e65e7f2 100644 --- a/lib/Transforms/Scalar/IndVarSimplify.cpp +++ b/lib/Transforms/Scalar/IndVarSimplify.cpp @@ -224,7 +224,7 @@ Instruction *IndVarSimplify::LinearFunctionTestReplace(Loop *L, SCEVExpander &RW) { // Find the exit block for the loop. We can currently only handle loops with // a single exit. - std::vector<BasicBlock*> ExitBlocks; + SmallVector<BasicBlock*, 8> ExitBlocks; L->getExitBlocks(ExitBlocks); if (ExitBlocks.size() != 1) return 0; BasicBlock *ExitBlock = ExitBlocks[0]; @@ -309,7 +309,7 @@ void IndVarSimplify::RewriteLoopExitValues(Loop *L) { // We insert the code into the preheader of the loop if the loop contains // multiple exit blocks, or in the exit block if there is exactly one. BasicBlock *BlockToInsertInto; - std::vector<BasicBlock*> ExitBlocks; + SmallVector<BasicBlock*, 8> ExitBlocks; L->getUniqueExitBlocks(ExitBlocks); if (ExitBlocks.size() == 1) BlockToInsertInto = ExitBlocks[0]; diff --git a/lib/Transforms/Scalar/LICM.cpp b/lib/Transforms/Scalar/LICM.cpp index 7f4d783bdb..ac927da07e 100644 --- a/lib/Transforms/Scalar/LICM.cpp +++ b/lib/Transforms/Scalar/LICM.cpp @@ -446,7 +446,7 @@ bool LICM::isLoopInvariantInst(Instruction &I) { void LICM::sink(Instruction &I) { DOUT << "LICM sinking instruction: " << I; - std::vector<BasicBlock*> ExitBlocks; + SmallVector<BasicBlock*, 8> ExitBlocks; CurLoop->getExitBlocks(ExitBlocks); if (isa<LoadInst>(I)) ++NumMovedLoads; @@ -623,7 +623,7 @@ bool LICM::isSafeToExecuteUnconditionally(Instruction &Inst) { return true; // Get the exit blocks for the current loop. - std::vector<BasicBlock*> ExitBlocks; + SmallVector<BasicBlock*, 8> ExitBlocks; CurLoop->getExitBlocks(ExitBlocks); // For each exit block, get the DT node and walk up the DT until the @@ -725,7 +725,7 @@ void LICM::PromoteValuesInLoop() { // std::set<BasicBlock*> ProcessedBlocks; - std::vector<BasicBlock*> ExitBlocks; + SmallVector<BasicBlock*, 8> ExitBlocks; CurLoop->getExitBlocks(ExitBlocks); for (unsigned i = 0, e = ExitBlocks.size(); i != e; ++i) if (ProcessedBlocks.insert(ExitBlocks[i]).second) { diff --git a/lib/Transforms/Scalar/LoopRotation.cpp b/lib/Transforms/Scalar/LoopRotation.cpp index a9c3fb9533..c2e0d230a6 100644 --- a/lib/Transforms/Scalar/LoopRotation.cpp +++ b/lib/Transforms/Scalar/LoopRotation.cpp @@ -157,7 +157,7 @@ bool LoopRotate::rotateLoop(Loop *Lp, LPPassManager &LPM) { // Keep it simple, and restrict loop rotation to loops with one exit only. // In future, lift this restriction and support for multiple exits if // required. - std::vector<BasicBlock *> ExitBlocks; + SmallVector<BasicBlock*, 8> ExitBlocks; L->getExitBlocks(ExitBlocks); if (ExitBlocks.size() > 1) return false; diff --git a/lib/Transforms/Scalar/LoopUnswitch.cpp b/lib/Transforms/Scalar/LoopUnswitch.cpp index f0c09e6d7d..2f087227c7 100644 --- a/lib/Transforms/Scalar/LoopUnswitch.cpp +++ b/lib/Transforms/Scalar/LoopUnswitch.cpp @@ -622,7 +622,7 @@ void LoopUnswitch::UnswitchNontrivialCondition(Value *LIC, Constant *Val, // We want the loop to come after the preheader, but before the exit blocks. LoopBlocks.insert(LoopBlocks.end(), L->block_begin(), L->block_end()); - std::vector<BasicBlock*> ExitBlocks; + SmallVector<BasicBlock*, 8> ExitBlocks; L->getUniqueExitBlocks(ExitBlocks); // Split all of the edges from inside the loop to their exit blocks. Update |