Update sample profile propagation algorithm.
[oota-llvm.git] / include / llvm / ProfileData / SampleProf.h
index 0f1f4ed9a92e51e327118e0b5cba845619a8dedb..ef5afc7eb3b0b39dfc03f5f08a93356a3c95b148 100644 (file)
@@ -213,12 +213,6 @@ public:
   void addHeadSamples(unsigned Num) { TotalHeadSamples += Num; }
   void addBodySamples(int LineOffset, unsigned Discriminator, unsigned Num) {
     assert(LineOffset >= 0);
-    // When dealing with instruction weights, we use the value
-    // zero to indicate the absence of a sample. If we read an
-    // actual zero from the profile file, use the value 1 to
-    // avoid the confusion later on.
-    if (Num == 0)
-      Num = 1;
     BodySamples[LineLocation(LineOffset, Discriminator)].addSamples(Num);
   }
   void addCalledTargetSamples(int LineOffset, unsigned Discriminator,