From 0981a0a1060b1286bc99b06ab2564680f2649696 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Thu, 3 Sep 2009 07:37:42 +0000 Subject: [PATCH] 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 --- lib/Analysis/ProfileInfoLoaderPass.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Analysis/ProfileInfoLoaderPass.cpp b/lib/Analysis/ProfileInfoLoaderPass.cpp index 1a2332c0e99..e79dd8c0c22 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 <<" (# "<