summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/ProfileInfoLoaderPass.cpp
diff options
context:
space:
mode:
authorEdward O'Callaghan <eocallaghan@auroraux.org>2009-11-02 02:55:39 +0000
committerEdward O'Callaghan <eocallaghan@auroraux.org>2009-11-02 02:55:39 +0000
commit78eedecade7f7ae60a4afb191eda12af7a10b951 (patch)
tree27eaff2364b05f358865d5b811438b4530eb6c47 /llvm/lib/Analysis/ProfileInfoLoaderPass.cpp
parentb5a13d4c903be1892c5693e6219d6b13be29e912 (diff)
downloadbcm5719-llvm-78eedecade7f7ae60a4afb191eda12af7a10b951.tar.gz
bcm5719-llvm-78eedecade7f7ae60a4afb191eda12af7a10b951.zip
Apply fix for PR5135, Credit to Andreas Neustifter.
llvm-svn: 85779
Diffstat (limited to 'llvm/lib/Analysis/ProfileInfoLoaderPass.cpp')
-rw-r--r--llvm/lib/Analysis/ProfileInfoLoaderPass.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Analysis/ProfileInfoLoaderPass.cpp b/llvm/lib/Analysis/ProfileInfoLoaderPass.cpp
index 7fd714d8b17..9e1dfb6ff71 100644
--- a/llvm/lib/Analysis/ProfileInfoLoaderPass.cpp
+++ b/llvm/lib/Analysis/ProfileInfoLoaderPass.cpp
@@ -60,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.
@@ -84,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;
@@ -117,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) {
@@ -129,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) {
OpenPOWER on IntegriCloud