[all-commits] [llvm/llvm-project] 7476c2: [ProfileData] Remove swapToHostOrder (#94665)

Kazu Hirata via All-commits all-commits at lists.llvm.org
Thu Jun 6 13:26:15 PDT 2024


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

  Changed paths:
    M llvm/include/llvm/Support/Endian.h
    M llvm/lib/ProfileData/InstrProf.cpp

  Log Message:
  -----------
  [ProfileData] Remove swapToHostOrder (#94665)

This patch removes swapToHostOrder in favor of
llvm::support::endian::readNext as swapToHostOrder is too thin a
wrapper around readNext.

Note that there are two variants of readNext:

- readNext<type, endian, align>(ptr)
- readNext<type, align>(ptr, endian)

swapToHostOrder uses the former, but this patch switches to the latter.

While we are at it, this patch teaches readNext to default to
unaligned just as I did in:

  commit 568368a43e5b4adb3c5d105a0eff3e0c13c0af8c
  Author: Kazu Hirata <kazu at google.com>
  Date:   Mon Apr 15 19:05:30 2024 -0700



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