[llvm] [ProfileData] Add getValueArrayForSite (PR #95335)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 13 11:02:09 PDT 2024


================
@@ -869,14 +869,18 @@ struct InstrProfRecord {
   inline uint32_t getNumValueDataForSite(uint32_t ValueKind,
                                          uint32_t Site) const;
 
+  /// Return the array of profiled values at \p Site.
+  inline ArrayRef<InstrProfValueData> getValueForSite(uint32_t ValueKind,
+                                                      uint32_t Site) const;
+
   /// Return the array of profiled values at \p Site.
----------------
kazutakahirata wrote:

I wouldn't worry about the lifetime of profile data.  The profile data stays available at least during the entire duration of a pass.

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


More information about the llvm-commits mailing list