llvm-project
d936924f - [BOLT][NFC] Make YamlProfileToFunction a DenseMap (#108712)

Commit
1 year ago
[BOLT][NFC] Make YamlProfileToFunction a DenseMap (#108712) YAML function profiles have sparse function IDs, assigned from sequential function IDs from profiled binary. For example, for one large binary, YAML profile has 15K functions, but the highest ID is ~600K, close to number of functions in the profiled binary. In `matchProfileToFunction`, `YamlProfileToFunction` vector was resized to match function ID, which entails a 40X overcommit. Change the type of `YamlProfileToFunction` to DenseMap to reduce memory utilization. #99891 makes use of it for profile lookup associated with a given binary function.
Author
Parents
Loading