[llvm] [PGO] Add support for writing previous indexed format (PR #84505)

Snehasish Kumar via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 8 10:29:17 PST 2024


================
@@ -433,6 +435,8 @@ Error InstrProfWriter::writeImpl(ProfOStream &OS) {
   IndexedInstrProf::Header Header;
   Header.Magic = IndexedInstrProf::Magic;
   Header.Version = IndexedInstrProf::ProfVersion::CurrentVersion;
+  if (WritePrevVersion)
+    Header.Version--;
----------------
snehasish wrote:

Since the changes down below are VTableName change specific would it make more sense to explicitly set this to the version we want?

https://github.com/llvm/llvm-project/pull/84505


More information about the llvm-commits mailing list