[PATCH] D118390: [InstrProf] Make the IndexedInstrProf header backwards compatible.
Snehasish Kumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 17 11:50:31 PST 2022
snehasish added a comment.
This patch broke on big endian systems due to the interpretation of the FormatVersion variable. While refactoring the code, I replaced uses of the FormatVersion local variable with Header::Version in all but one check. For little endian reader and writer setup this passed since we always check the format version after a byte_swap to little endian (so in this case it was a no-op). I added a new method to the Header struct to return the format version in little endian instead of a local var. This passed all the instrprof unit tests on a local big endian setup. I would have liked to update this diff but arc got confused so if you have any comments please add them to https://reviews.llvm.org/rGa3beb34015fc. Thanks!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118390/new/
https://reviews.llvm.org/D118390
More information about the llvm-commits
mailing list