@@ -30,7 +30,7 @@ constexpr unsigned ITLBEntries = 16;
3030
3131// / Initialize and return a position map for binary basic blocks
3232void extractBasicBlockInfo (
33- const std::vector<BinaryFunction *> &BinaryFunctions,
33+ const BinaryFunctionListType &BinaryFunctions,
3434 std::unordered_map<BinaryBasicBlock *, uint64_t > &BBAddr,
3535 std::unordered_map<BinaryBasicBlock *, uint64_t > &BBSize) {
3636
@@ -54,7 +54,7 @@ void extractBasicBlockInfo(
5454// / the ordering of basic blocks. The method returns a pair
5555// / (the number of fallthrough branches, the total number of branches)
5656std::pair<uint64_t , uint64_t >
57- calcTSPScore (const std::vector<BinaryFunction *> &BinaryFunctions,
57+ calcTSPScore (const BinaryFunctionListType &BinaryFunctions,
5858 const std::unordered_map<BinaryBasicBlock *, uint64_t > &BBAddr,
5959 const std::unordered_map<BinaryBasicBlock *, uint64_t > &BBSize) {
6060 uint64_t Score = 0 ;
@@ -95,7 +95,7 @@ using Predecessors = std::vector<std::pair<BinaryFunction *, uint64_t>>;
9595// / Build a simplified version of the call graph: For every function, keep
9696// / its callers and the frequencies of the calls
9797std::unordered_map<const BinaryFunction *, Predecessors>
98- extractFunctionCalls (const std::vector<BinaryFunction *> &BinaryFunctions) {
98+ extractFunctionCalls (const BinaryFunctionListType &BinaryFunctions) {
9999 std::unordered_map<const BinaryFunction *, Predecessors> Calls;
100100
101101 for (BinaryFunction *SrcFunction : BinaryFunctions) {
@@ -140,7 +140,7 @@ extractFunctionCalls(const std::vector<BinaryFunction *> &BinaryFunctions) {
140140// / the page. The following procedure detects short and long calls, and
141141// / estimates the expected number of cache misses for the long ones.
142142double expectedCacheHitRatio (
143- const std::vector<BinaryFunction *> &BinaryFunctions,
143+ const BinaryFunctionListType &BinaryFunctions,
144144 const std::unordered_map<BinaryBasicBlock *, uint64_t > &BBAddr,
145145 const std::unordered_map<BinaryBasicBlock *, uint64_t > &BBSize) {
146146 std::unordered_map<const BinaryFunction *, Predecessors> Calls =
@@ -213,7 +213,7 @@ double expectedCacheHitRatio(
213213} // namespace
214214
215215void CacheMetrics::printAll (raw_ostream &OS,
216- const std::vector<BinaryFunction *> &BFs) {
216+ const BinaryFunctionListType &BFs) {
217217 // Stats related to hot-cold code splitting
218218 size_t NumFunctions = 0 ;
219219 size_t NumProfiledFunctions = 0 ;
0 commit comments