[all-commits] [llvm/llvm-project] d38380: [CSSPGO] Fix redundant reading of profile metadata...

Lei Wang via All-commits all-commits at lists.llvm.org
Tue Mar 4 11:40:21 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d38380d3d808183652c1e9be34e3a2476ed6ea70
      https://github.com/llvm/llvm-project/commit/d38380d3d808183652c1e9be34e3a2476ed6ea70
  Author: Lei Wang <wlei at fb.com>
  Date:   2025-03-04 (Tue, 04 Mar 2025)

  Changed paths:
    M llvm/include/llvm/ProfileData/SampleProfReader.h
    M llvm/lib/ProfileData/SampleProfReader.cpp

  Log Message:
  -----------
  [CSSPGO] Fix redundant reading of profile metadata (#129609)

Fix a build speed regression due to repeated reading of profile
metadata. Before the function `readFuncMetadata(ProfileHasAttribute,
Profiles)` reads the metadata for all the functions(`Profiles`),
however, it's actually used for on-demand loading, it can be called for
multiple times, which leads to redundant reading that causes the build
speed regression. Now fix it to read the metadata only for the new
loaded functions(functions in the `FuncsToUse`).



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