summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/ProfileInfoLoaderPass.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-09-03 07:37:42 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-09-03 07:37:42 +0000
commit0dc21e4713b5d8c2c6f2e85c378cd04509d091e4 (patch)
treef97b7a4c02a9425a439dceecfe00de14d689644d /llvm/lib/Analysis/ProfileInfoLoaderPass.cpp
parent51a0712538be172448b4230d1f2b106bec215362 (diff)
downloadbcm5719-llvm-0dc21e4713b5d8c2c6f2e85c378cd04509d091e4.tar.gz
bcm5719-llvm-0dc21e4713b5d8c2c6f2e85c378cd04509d091e4.zip
Remove undefined behavior when loading optimal edge profile info.
llvm-svn: 80907
Diffstat (limited to 'llvm/lib/Analysis/ProfileInfoLoaderPass.cpp')
-rw-r--r--llvm/lib/Analysis/ProfileInfoLoaderPass.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/ProfileInfoLoaderPass.cpp b/llvm/lib/Analysis/ProfileInfoLoaderPass.cpp
index 1a2332c0e99..e79dd8c0c22 100644
--- a/llvm/lib/Analysis/ProfileInfoLoaderPass.cpp
+++ b/llvm/lib/Analysis/ProfileInfoLoaderPass.cpp
@@ -159,7 +159,7 @@ void LoaderPass::recurseBasicBlock(const BasicBlock *BB) {
void LoaderPass::readOrRememberEdge(ProfileInfo::Edge e,
unsigned weight, unsigned ei,
Function *F) {
- if (weight != (unsigned)MissingValue) {
+ if (weight != ~0U) {
EdgeInformation[F][e] += weight;
DEBUG(errs()<<"--Read Edge Counter for " << e
<<" (# "<<ei<<"): "<<(unsigned)getEdgeWeight(e)<<"\n");
OpenPOWER on IntegriCloud