[all-commits] [llvm/llvm-project] 8ad980: [memprof] Refactor getMemProfRecord (NFC) (#93138)

Kazu Hirata via All-commits all-commits at lists.llvm.org
Thu May 23 14:13:42 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8ad980d7dc7070aa9ccb226b92d5dfa3c75d8652
      https://github.com/llvm/llvm-project/commit/8ad980d7dc7070aa9ccb226b92d5dfa3c75d8652
  Author: Kazu Hirata <kazu at google.com>
  Date:   2024-05-23 (Thu, 23 May 2024)

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

  Log Message:
  -----------
  [memprof] Refactor getMemProfRecord (NFC) (#93138)

This patch refactors getMemProfRecord for readability while adding
consistency checks.

- This patch adds a switch statement on the MemProf version just like
  most places dealing with MemProf serialization/deserialization.

- This patch adds asserts to ensure that the exact set of data
  structures are available while ones we do not use are not present.
  That is, getMemProfRecord no longer determines the version based on
  the availability of MemProfCallStackTable.



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