aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis
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
commitdf7d5b1736f8fc99a8f5bedcd96559d099793d92 (patch)
tree49b5e374cc67fd8a03ceb53cea87ade0815cc2a7 /lib/Analysis
parentb55972f828465055a2e144cf74733abad3132534 (diff)
downloadexternal_llvm-df7d5b1736f8fc99a8f5bedcd96559d099793d92.zip
external_llvm-df7d5b1736f8fc99a8f5bedcd96559d099793d92.tar.gz
external_llvm-df7d5b1736f8fc99a8f5bedcd96559d099793d92.tar.bz2
Remove undefined behavior when loading optimal edge profile info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80907 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r--lib/Analysis/ProfileInfoLoaderPass.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Analysis/ProfileInfoLoaderPass.cpp b/lib/Analysis/ProfileInfoLoaderPass.cpp
index 1a2332c..e79dd8c 100644
--- a/lib/Analysis/ProfileInfoLoaderPass.cpp
+++ b/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");