[all-commits] [llvm/llvm-project] 8f7d30: [ProfileData] Sink the length checks (#95604)

Kazu Hirata via All-commits all-commits at lists.llvm.org
Fri Jun 14 15:48:27 PDT 2024


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

  Changed paths:
    M llvm/unittests/ProfileData/InstrProfTest.cpp

  Log Message:
  -----------
  [ProfileData] Sink the length checks (#95604)

The new API getValueArrayForSite returns ArrayRef<InstrProfValueData>,
packaging the array length and contents together.

This patch sinks the array length checks just before we check the
contents.  This way, we check both the array length and contents
immediately after calling getValueArrayForSite.



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