[llvm] [memprof] Reduce schema for Version2 (PR #89876)

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 24 08:31:32 PDT 2024


https://github.com/teresajohnson commented:

Question about testing below.

It also occurs to me that we should do something on the profile use side in the compiler to detect which fields were in the profile, and give an error if we try to use other fields. I have a bit of concern that if someone tries to experiment with compiler changes on the use side that make use of additional fields and forgets about this change that they will get 0s for other fields and it silently won't behave as expected. E.g. maybe in llvm/include/llvm/ProfileData/MemProf.h possibly save the Schema used in deserialize, and assert in the get* functions if a field is used that wasn't in that set?

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


More information about the llvm-commits mailing list