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

Amir Ayupov via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 8 15:07:02 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;
----------------
aaupov wrote:

I don't think it does: DenseMap stores objects in buckets where bucket is a KV pair where the second element (pointer) would force the alignment to be 8b.

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


More information about the llvm-commits mailing list