diff options
| author | Benjamin Kramer <benny.kra@googlemail.com> | 2016-02-13 16:01:12 +0000 |
|---|---|---|
| committer | Benjamin Kramer <benny.kra@googlemail.com> | 2016-02-13 16:01:12 +0000 |
| commit | 8a752e316dfc5974753730d8c1484361e7f1ea19 (patch) | |
| tree | fa0b4857f90e781bdbd686a7041e6caf1db922ae | |
| parent | 0bb97746a8819a8e494a8f2deb5a7a34c93b60d4 (diff) | |
| download | bcm5719-llvm-8a752e316dfc5974753730d8c1484361e7f1ea19.tar.gz bcm5719-llvm-8a752e316dfc5974753730d8c1484361e7f1ea19.zip | |
Use ArrayRef to hide SmallVector details, kill a useless vector copy along the way.
llvm-svn: 260824
| -rw-r--r-- | llvm/lib/Transforms/IPO/SampleProfile.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/IPO/SampleProfile.cpp b/llvm/lib/Transforms/IPO/SampleProfile.cpp index 191f85e8b58..9fb6fac9911 100644 --- a/llvm/lib/Transforms/IPO/SampleProfile.cpp +++ b/llvm/lib/Transforms/IPO/SampleProfile.cpp @@ -139,8 +139,7 @@ protected: void printBlockEquivalence(raw_ostream &OS, const BasicBlock *BB); bool computeBlockWeights(Function &F); void findEquivalenceClasses(Function &F); - void findEquivalencesFor(BasicBlock *BB1, - SmallVector<BasicBlock *, 8> Descendants, + void findEquivalencesFor(BasicBlock *BB1, ArrayRef<BasicBlock *> Descendants, DominatorTreeBase<BasicBlock> *DomTree); void propagateWeights(Function &F); uint64_t visitEdge(Edge E, unsigned *NumUnknownEdges, Edge *UnknownEdge); @@ -731,7 +730,7 @@ bool SampleProfileLoader::inlineHotFunctions(Function &F) { /// with blocks from \p BB1's dominator tree, then /// this is the post-dominator tree, and vice versa. void SampleProfileLoader::findEquivalencesFor( - BasicBlock *BB1, SmallVector<BasicBlock *, 8> Descendants, + BasicBlock *BB1, ArrayRef<BasicBlock *> Descendants, DominatorTreeBase<BasicBlock> *DomTree) { const BasicBlock *EC = EquivalenceClass[BB1]; uint64_t Weight = BlockWeights[EC]; |

