[all-commits] [llvm/llvm-project] a906e3: [NFC][SampleFDO] Preparation to support multiple s...

wmi-11 via All-commits all-commits at lists.llvm.org
Wed Dec 16 22:29:10 PST 2020


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a906e3eccd1ed149ffc8bdf2540c7cff4171e3bd
      https://github.com/llvm/llvm-project/commit/a906e3eccd1ed149ffc8bdf2540c7cff4171e3bd
  Author: Wei Mi <wmi at google.com>
  Date:   2020-12-16 (Wed, 16 Dec 2020)

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

  Log Message:
  -----------
  [NFC][SampleFDO] Preparation to support multiple sections with the same type
in ExtBinary format.

Currently ExtBinary format doesn't support multiple sections with the same type
in the profile. We add the support in this patch. Previously we use the section
type to identify a section uniquely. Now we introduces a LayoutIndex in the
SecHdrTableEntry and use the LayoutIndex to locate the target section. The
allocations of NameTable and FuncOffsetTable are adjusted accordingly.

Currently it works as a NFC because it won't change anything for current layout.
The test for multiple sections support will be included in another patch where a
new type of profile containing multiple sections with the same type is
introduced.

Differential Revision: https://reviews.llvm.org/D93254




More information about the All-commits mailing list