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

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 8 10:49:21 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--;
----------------
teresajohnson wrote:

done. added an assert on the current version so we make sure this handling is updated if needed.

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


More information about the llvm-commits mailing list