[llvm] [llvm-profdata] Clean up traverseAllValueSites (NFC) (PR #95467)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 13 13:36:00 PDT 2024


================
@@ -2695,30 +2695,30 @@ static void traverseAllValueSites(const InstrProfRecord &Func, uint32_t VK,
   uint32_t NS = Func.getNumValueSites(VK);
   Stats.TotalNumValueSites += NS;
   for (size_t I = 0; I < NS; ++I) {
-    uint32_t NV = Func.getNumValueDataForSite(VK, I);
-    std::unique_ptr<InstrProfValueData[]> VD = Func.getValueForSite(VK, I);
+    auto VD = Func.getValueArrayForSite(VK, I);
+    if (VD.empty())
----------------
kazutakahirata wrote:

Fixed in the latest iteration.

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


More information about the llvm-commits mailing list