[llvm] r254055 - Move member functions closer to others of the same class (NFC)

Xinliang David Li via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 24 19:24:37 PST 2015


Author: davidxl
Date: Tue Nov 24 21:24:37 2015
New Revision: 254055

URL: http://llvm.org/viewvc/llvm-project?rev=254055&view=rev
Log:
Move member functions closer to others of the same class (NFC)

Modified:
    llvm/trunk/lib/ProfileData/InstrProf.cpp

Modified: llvm/trunk/lib/ProfileData/InstrProf.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ProfileData/InstrProf.cpp?rev=254055&r1=254054&r2=254055&view=diff
==============================================================================
--- llvm/trunk/lib/ProfileData/InstrProf.cpp (original)
+++ llvm/trunk/lib/ProfileData/InstrProf.cpp Tue Nov 24 21:24:37 2015
@@ -143,6 +143,22 @@ uint64_t stringToHash(uint32_t ValueKind
   return Value;
 }
 
+uint32_t ValueProfRecord::getNumValueData() const {
+  uint32_t NumValueData = 0;
+  for (uint32_t I = 0; I < NumValueSites; I++)
+    NumValueData += SiteCountArray[I];
+  return NumValueData;
+}
+
+ValueProfRecord *ValueProfRecord::getNext() {
+  return reinterpret_cast<ValueProfRecord *>((char *)this + getSize());
+}
+
+InstrProfValueData *ValueProfRecord::getValueData() {
+  return reinterpret_cast<InstrProfValueData *>(
+      (char *)this + getValueProfRecordHeaderSize(NumValueSites));
+}
+
 void ValueProfRecord::deserializeTo(InstrProfRecord &Record,
                                     InstrProfRecord::ValueMapType *VMap) {
   Record.reserveSites(Kind, NumValueSites);
@@ -331,19 +347,5 @@ ValueProfRecord *ValueProfData::getFirst
                                              sizeof(ValueProfData));
 }
 
-uint32_t ValueProfRecord::getNumValueData() const {
-  uint32_t NumValueData = 0;
-  for (uint32_t I = 0; I < NumValueSites; I++)
-    NumValueData += SiteCountArray[I];
-  return NumValueData;
 }
 
-ValueProfRecord *ValueProfRecord::getNext() {
-  return reinterpret_cast<ValueProfRecord *>((char *)this + getSize());
-}
-
-InstrProfValueData *ValueProfRecord::getValueData() {
-  return reinterpret_cast<InstrProfValueData *>(
-      (char *)this + getValueProfRecordHeaderSize(NumValueSites));
-}
-}




More information about the llvm-commits mailing list