[PATCH] D15100: [PGO] Add support for reading multiple versions of indexed profile format profile data
David Li via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 1 11:32:12 PST 2015
davidxl marked 2 inline comments as done.
================
Comment at: include/llvm/ProfileData/InstrProfReader.h:278
@@ +277,3 @@
+
+template <typename OnDiskHashTableImpl>
+class InstrProfReaderIndex : public InstrProfReaderIndexBase {
----------------
vsk wrote:
> It'd make for less typing if we use `typename IndexType` and keep `std::unique_ptr<IndexType> Index` where you have `HashTable`.
Removed OnDisk prefix to shorten the typename.
================
Comment at: lib/ProfileData/InstrProfReader.cpp:542
@@ +541,3 @@
+ Start + HashOffset, Cur, Start, HashType, FormatVersion);
+ else
+ llvm_unreachable("Only version 2 and below is supported");
----------------
vsk wrote:
> I expected this to be an NFC commit, but this looks like breakage. InstrProfWriter uses IndexedInstrProf::Version (3).
Good catch. Fixed.
This indicates a hole in the test coverage. I will add V2 and V3 format test cases in a follow up patch.
http://reviews.llvm.org/D15100
More information about the llvm-commits
mailing list