[all-commits] [llvm/llvm-project] 769c7a: [InstrProf] Fix bug when merging empty profile wit...

Ellis Hoag via All-commits all-commits at lists.llvm.org
Mon Dec 12 09:23:41 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 769c7ad2b1b9bca7e13cf6211e9d61439f6df8d6
      https://github.com/llvm/llvm-project/commit/769c7ad2b1b9bca7e13cf6211e9d61439f6df8d6
  Author: Ellis Hoag <ellis.sparky.hoag at gmail.com>
  Date:   2022-12-12 (Mon, 12 Dec 2022)

  Changed paths:
    M llvm/test/tools/llvm-profdata/merge-incompatible.test
    M llvm/test/tools/llvm-profdata/merge_empty_profile.test
    M llvm/tools/llvm-profdata/llvm-profdata.cpp

  Log Message:
  -----------
  [InstrProf] Fix bug when merging empty profile with multiple threads

When merging profiles with multiple threads, the `mergeWriterContexts()` function is used to merge profile data between writers. This must be in sync with `loadInput()` which merges profiles to a single writer. This diff merges the profile kind correctly in `mergeWriterContexts()` to fix a subtle bug.

Reviewed By: phosek

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




More information about the All-commits mailing list