[llvm] [BOLT][NFC] Make YamlProfileToFunction a DenseMap (PR #108712)

Maksim Panchenko via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 8 14:57:06 PST 2024


================
@@ -105,7 +105,7 @@ class YAMLProfileReader : public ProfileReaderBase {
   yaml::bolt::BinaryProfile YamlBP;
 
   /// Map a function ID from a YAML profile to a BinaryFunction object.
-  std::vector<BinaryFunction *> YamlProfileToFunction;
+  DenseMap<uint32_t, BinaryFunction *> YamlProfileToFunction;
----------------
maksfb wrote:

I'm curious if using `uint32_t` leads to more compact allocation compared to `uint64_t`?

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


More information about the llvm-commits mailing list