[all-commits] [llvm/llvm-project] d93692: [BOLT][NFC] Make YamlProfileToFunction a DenseMap ...

Amir Ayupov via All-commits all-commits at lists.llvm.org
Fri Nov 8 15:25:10 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d936924f5e22e8efbc27873f62e8dfc6e410fcf9
      https://github.com/llvm/llvm-project/commit/d936924f5e22e8efbc27873f62e8dfc6e410fcf9
  Author: Amir Ayupov <aaupov at fb.com>
  Date:   2024-11-08 (Fri, 08 Nov 2024)

  Changed paths:
    M bolt/include/bolt/Profile/YAMLProfileReader.h
    M bolt/lib/Profile/YAMLProfileReader.cpp

  Log Message:
  -----------
  [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.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list