diff options
Diffstat (limited to 'llvm/include/llvm/ProfileData/InstrProfReader.h')
-rw-r--r-- | llvm/include/llvm/ProfileData/InstrProfReader.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/llvm/include/llvm/ProfileData/InstrProfReader.h b/llvm/include/llvm/ProfileData/InstrProfReader.h index ff50dfde0e79..c4a1e1a01b37 100644 --- a/llvm/include/llvm/ProfileData/InstrProfReader.h +++ b/llvm/include/llvm/ProfileData/InstrProfReader.h @@ -326,12 +326,16 @@ private: uint64_t NamesDelta; const RawInstrProf::ProfileData<IntPtrT> *Data; const RawInstrProf::ProfileData<IntPtrT> *DataEnd; + const RawInstrProf::VTableProfileData<IntPtrT> *VTableBegin = nullptr; + const RawInstrProf::VTableProfileData<IntPtrT> *VTableEnd = nullptr; const char *CountersStart; const char *CountersEnd; const char *BitmapStart; const char *BitmapEnd; const char *NamesStart; const char *NamesEnd; + const char *VNamesStart = nullptr; + const char *VNamesEnd = nullptr; // After value profile is all read, this pointer points to // the header of next profile data (if exists) const uint8_t *ValueDataStart; @@ -622,6 +626,12 @@ public: InstrProfKind getProfileKind() const override; Error populateSymtab(InstrProfSymtab &Symtab) override { + // FIXME: the create method calls 'finalizeSymtab' and sorts a bunch of + // arrays/maps. Since there are other data sources other than 'HashTable' to + // populate a symtab, it might make sense to have something like this + // 1. Let each data source populate Symtab and init the arrays/maps without + // calling 'finalizeSymtab' + // 2. Call 'finalizeSymtab' once to get all arrays/maps sorted if needed. return Symtab.create(HashTable->keys()); } }; @@ -656,6 +666,16 @@ private: std::unique_ptr<MemProfRecordHashTable> MemProfRecordTable; /// MemProf frame profile data on-disk indexed via frame id. std::unique_ptr<MemProfFrameHashTable> MemProfFrameTable; + /// The reader itself doesn't decompress vtable names. A compiler that reads + /// indexed profiles could construct symtab from module IR so it doesn't need + /// the decompressed names. + /// When a symtab is constructed from profiles by llvm-profdata, the list of + /// names could be decompressed based on `VTableNamePtr` and + /// `CompressedVTableNamesLen`. + /// VTableNamePtr points to the beginning of compressed vtable names. + const char *VTableNamePtr = nullptr; + /// The length of compressed vtable names. + uint64_t CompressedVTableNamesLen = 0; /// Total size of binary ids. uint64_t BinaryIdsSize{0}; /// Start address of binary id length and data pairs. |