Remove undefined behavior when loading optimal edge profile info.

llvm-svn: 80907
This commit is contained in:
Daniel Dunbar 2009-09-03 07:37:42 +00:00
parent 6ea9973a0b
commit 51ec7bb5aa

View File

@ -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");