The patch include the following changes:
- Make indexed value profile data more compact by peeling out the per-site value count field into its own smaller sized array.
- Introduced formal data structure definitions to specify value profile data layout in indexed format. Previously the layout of the data is only assumed in the client code (scattered in three different places : size computation, EmitData, and ReadData) which can be out of sync.
- The bulk of reading/writing is the implementation of serialization/deserialization of the value profile data: interfaces that convert between on-disk ValueProfData and InstrProfRecord class.
- The new data structure also serves as a central place for layout documentation.
recordfor -> record for