[all-commits] [llvm/llvm-project] b0ae92: [ProfileData] Add a variant of getValueProfDataFro...

Kazu Hirata via All-commits all-commits at lists.llvm.org
Sat Jun 22 00:40:57 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b0ae923ada836fa2c9114ac2c5afb39466f49fe0
      https://github.com/llvm/llvm-project/commit/b0ae923ada836fa2c9114ac2c5afb39466f49fe0
  Author: Kazu Hirata <kazu at google.com>
  Date:   2024-06-22 (Sat, 22 Jun 2024)

  Changed paths:
    M llvm/include/llvm/ProfileData/InstrProf.h
    M llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
    M llvm/lib/ProfileData/InstrProf.cpp

  Log Message:
  -----------
  [ProfileData] Add a variant of getValueProfDataFromInst (#95993)

This patch adds a variant of getValueProfDataFromInst that returns
std::vector<InstrProfValueData> instead of
std::unique<InstrProfValueData[]>.  The new return type carries the
length with it, so we can drop out parameter ActualNumValueData.
Also, the caller can directly feed the return value into a range-based
for loop as shown in the patch.

I'm planning to migrate other callers of getValueProfDataFromInst to
the new variant in follow-up patches.



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