diff options
Diffstat (limited to 'lib/Analysis/ProfileInfoLoaderPass.cpp')
-rw-r--r-- | lib/Analysis/ProfileInfoLoaderPass.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/Analysis/ProfileInfoLoaderPass.cpp b/lib/Analysis/ProfileInfoLoaderPass.cpp index 89d90bc..9e1dfb6 100644 --- a/lib/Analysis/ProfileInfoLoaderPass.cpp +++ b/lib/Analysis/ProfileInfoLoaderPass.cpp @@ -20,7 +20,6 @@ #include "llvm/Analysis/ProfileInfo.h" #include "llvm/Analysis/ProfileInfoLoader.h" #include "llvm/Support/CommandLine.h" -#include "llvm/Support/Compiler.h" #include "llvm/Support/CFG.h" #include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" @@ -38,7 +37,7 @@ ProfileInfoFilename("profile-info-file", cl::init("llvmprof.out"), cl::desc("Profile file loaded by -profile-loader")); namespace { - class VISIBILITY_HIDDEN LoaderPass : public ModulePass, public ProfileInfo { + class LoaderPass : public ModulePass, public ProfileInfo { std::string Filename; std::set<Edge> SpanningTree; std::set<const BasicBlock*> BBisUnvisited; @@ -61,7 +60,7 @@ namespace { // recurseBasicBlock() - Calculates the edge weights for as much basic // blocks as possbile. virtual void recurseBasicBlock(const BasicBlock *BB); - virtual void readEdgeOrRemember(Edge, Edge&, unsigned &, unsigned &); + virtual void readEdgeOrRemember(Edge, Edge&, unsigned &, double &); virtual void readEdge(ProfileInfo::Edge, std::vector<unsigned>&); /// run - Load the profile information from the specified file. @@ -85,7 +84,7 @@ Pass *llvm::createProfileLoaderPass(const std::string &Filename) { } void LoaderPass::readEdgeOrRemember(Edge edge, Edge &tocalc, - unsigned &uncalc, unsigned &count) { + unsigned &uncalc, double &count) { double w; if ((w = getEdgeWeight(edge)) == MissingValue) { tocalc = edge; @@ -118,7 +117,7 @@ void LoaderPass::recurseBasicBlock(const BasicBlock *BB) { // collect weights of all incoming and outgoing edges, rememer edges that // have no value - unsigned incount = 0; + double incount = 0; SmallSet<const BasicBlock*,8> pred_visited; pred_const_iterator bbi = pred_begin(BB), bbe = pred_end(BB); if (bbi==bbe) { @@ -130,7 +129,7 @@ void LoaderPass::recurseBasicBlock(const BasicBlock *BB) { } } - unsigned outcount = 0; + double outcount = 0; SmallSet<const BasicBlock*,8> succ_visited; succ_const_iterator sbbi = succ_begin(BB), sbbe = succ_end(BB); if (sbbi==sbbe) { |