[llvm-commits] [llvm] r80907 - /llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp

Daniel Dunbar daniel at zuster.org
Thu Sep 3 00:37:43 PDT 2009


Author: ddunbar
Date: Thu Sep  3 02:37:42 2009
New Revision: 80907

URL: http://llvm.org/viewvc/llvm-project?rev=80907&view=rev
Log:
Remove undefined behavior when loading optimal edge profile info.

Modified:
    llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp

Modified: llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp?rev=80907&r1=80906&r2=80907&view=diff

==============================================================================
--- llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp (original)
+++ llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp Thu Sep  3 02:37:42 2009
@@ -159,7 +159,7 @@
 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");





More information about the llvm-commits mailing list