aboutsummaryrefslogtreecommitdiffstats
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
commit0981a0a1060b1286bc99b06ab2564680f2649696 (patch)
tree49b5e374cc67fd8a03ceb53cea87ade0815cc2a7
parent47ad2d6e9702f572de4df1c0b2b66ef40fcda48c (diff)
downloadexternal_llvm-0981a0a1060b1286bc99b06ab2564680f2649696.zip
external_llvm-0981a0a1060b1286bc99b06ab2564680f2649696.tar.gz
external_llvm-0981a0a1060b1286bc99b06ab2564680f2649696.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
-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");