diff options
| author | Craig Topper <craig.topper@gmail.com> | 2013-07-04 01:31:24 +0000 |
|---|---|---|
| committer | Craig Topper <craig.topper@gmail.com> | 2013-07-04 01:31:24 +0000 |
| commit | af0dea13479bbd1eacfb1404ac09c729174c32fe (patch) | |
| tree | 993847ade847808ef85e08533460c7b149dda80f /llvm/lib/Analysis/ProfileEstimatorPass.cpp | |
| parent | a24dc7fa8c82651be2d74a8f5e09d8fa06e4f3ca (diff) | |
| download | bcm5719-llvm-af0dea13479bbd1eacfb1404ac09c729174c32fe.tar.gz bcm5719-llvm-af0dea13479bbd1eacfb1404ac09c729174c32fe.zip | |
Use SmallVectorImpl::iterator/const_iterator instead of SmallVector to avoid specifying the vector size.
llvm-svn: 185606
Diffstat (limited to 'llvm/lib/Analysis/ProfileEstimatorPass.cpp')
| -rw-r--r-- | llvm/lib/Analysis/ProfileEstimatorPass.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/ProfileEstimatorPass.cpp b/llvm/lib/Analysis/ProfileEstimatorPass.cpp index b284b995ac7..365b64c0ae0 100644 --- a/llvm/lib/Analysis/ProfileEstimatorPass.cpp +++ b/llvm/lib/Analysis/ProfileEstimatorPass.cpp @@ -181,7 +181,7 @@ void ProfileEstimatorPass::recurseBasicBlock(BasicBlock *BB) { double incoming = BBWeight; // Subtract the flow leaving the loop. std::set<Edge> ProcessedExits; - for (SmallVector<Edge, 8>::iterator ei = ExitEdges.begin(), + for (SmallVectorImpl<Edge>::iterator ei = ExitEdges.begin(), ee = ExitEdges.end(); ei != ee; ++ei) { if (ProcessedExits.insert(*ei).second) { double w = getEdgeWeight(*ei); @@ -216,7 +216,7 @@ void ProfileEstimatorPass::recurseBasicBlock(BasicBlock *BB) { // be distributed is split and the rounded, the last edge gets a somewhat // bigger value, but we are close enough for an estimation. double fraction = floor(incoming/Edges.size()); - for (SmallVector<Edge, 8>::iterator ei = Edges.begin(), ee = Edges.end(); + for (SmallVectorImpl<Edge>::iterator ei = Edges.begin(), ee = Edges.end(); ei != ee; ++ei) { double w = 0; if (ei != (ee-1)) { @@ -289,7 +289,7 @@ void ProfileEstimatorPass::recurseBasicBlock(BasicBlock *BB) { double fraction = Edges.size() ? floor(BBWeight/Edges.size()) : 0.0; // Finally we know what flow is still not leaving the block, distribute this // flow onto the empty edges. - for (SmallVector<Edge, 8>::iterator ei = Edges.begin(), ee = Edges.end(); + for (SmallVectorImpl<Edge>::iterator ei = Edges.begin(), ee = Edges.end(); ei != ee; ++ei) { if (ei != (ee-1)) { EdgeInformation[BB->getParent()][*ei] += fraction; |

