No public description

PiperOrigin-RevId: 697645735
diff --git a/build/source_list.bzl b/build/source_list.bzl
index 9c9ed2b..a27b05a 100644
--- a/build/source_list.bzl
+++ b/build/source_list.bzl
@@ -29,7 +29,6 @@
     "common/platform/api/quiche_logging.h",
     "common/platform/api/quiche_lower_case_string.h",
     "common/platform/api/quiche_mem_slice.h",
-    "common/platform/api/quiche_prefetch.h",
     "common/platform/api/quiche_reference_counted.h",
     "common/platform/api/quiche_server_stats.h",
     "common/platform/api/quiche_stack_trace.h",
@@ -1449,7 +1448,6 @@
     "common/platform/default/quiche_platform_impl/quiche_logging_impl.h",
     "common/platform/default/quiche_platform_impl/quiche_lower_case_string_impl.h",
     "common/platform/default/quiche_platform_impl/quiche_mem_slice_impl.h",
-    "common/platform/default/quiche_platform_impl/quiche_prefetch_impl.h",
     "common/platform/default/quiche_platform_impl/quiche_reference_counted_impl.h",
     "common/platform/default/quiche_platform_impl/quiche_server_stats_impl.h",
     "common/platform/default/quiche_platform_impl/quiche_stack_trace_impl.h",
diff --git a/build/source_list.gni b/build/source_list.gni
index 4d0b463..17315d7 100644
--- a/build/source_list.gni
+++ b/build/source_list.gni
@@ -29,7 +29,6 @@
     "src/quiche/common/platform/api/quiche_logging.h",
     "src/quiche/common/platform/api/quiche_lower_case_string.h",
     "src/quiche/common/platform/api/quiche_mem_slice.h",
-    "src/quiche/common/platform/api/quiche_prefetch.h",
     "src/quiche/common/platform/api/quiche_reference_counted.h",
     "src/quiche/common/platform/api/quiche_server_stats.h",
     "src/quiche/common/platform/api/quiche_stack_trace.h",
@@ -1453,7 +1452,6 @@
     "src/quiche/common/platform/default/quiche_platform_impl/quiche_logging_impl.h",
     "src/quiche/common/platform/default/quiche_platform_impl/quiche_lower_case_string_impl.h",
     "src/quiche/common/platform/default/quiche_platform_impl/quiche_mem_slice_impl.h",
-    "src/quiche/common/platform/default/quiche_platform_impl/quiche_prefetch_impl.h",
     "src/quiche/common/platform/default/quiche_platform_impl/quiche_reference_counted_impl.h",
     "src/quiche/common/platform/default/quiche_platform_impl/quiche_server_stats_impl.h",
     "src/quiche/common/platform/default/quiche_platform_impl/quiche_stack_trace_impl.h",
diff --git a/build/source_list.json b/build/source_list.json
index abb2a45..5ea661c 100644
--- a/build/source_list.json
+++ b/build/source_list.json
@@ -28,7 +28,6 @@
     "quiche/common/platform/api/quiche_logging.h",
     "quiche/common/platform/api/quiche_lower_case_string.h",
     "quiche/common/platform/api/quiche_mem_slice.h",
-    "quiche/common/platform/api/quiche_prefetch.h",
     "quiche/common/platform/api/quiche_reference_counted.h",
     "quiche/common/platform/api/quiche_server_stats.h",
     "quiche/common/platform/api/quiche_stack_trace.h",
@@ -1452,7 +1451,6 @@
     "quiche/common/platform/default/quiche_platform_impl/quiche_logging_impl.h",
     "quiche/common/platform/default/quiche_platform_impl/quiche_lower_case_string_impl.h",
     "quiche/common/platform/default/quiche_platform_impl/quiche_mem_slice_impl.h",
-    "quiche/common/platform/default/quiche_platform_impl/quiche_prefetch_impl.h",
     "quiche/common/platform/default/quiche_platform_impl/quiche_reference_counted_impl.h",
     "quiche/common/platform/default/quiche_platform_impl/quiche_server_stats_impl.h",
     "quiche/common/platform/default/quiche_platform_impl/quiche_stack_trace_impl.h",
diff --git a/quiche/common/platform/api/quiche_prefetch.h b/quiche/common/platform/api/quiche_prefetch.h
deleted file mode 100644
index 706a709..0000000
--- a/quiche/common/platform/api/quiche_prefetch.h
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2017 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef QUICHE_COMMON_PLATFORM_API_QUICHE_PREFETCH_H_
-#define QUICHE_COMMON_PLATFORM_API_QUICHE_PREFETCH_H_
-
-#include "quiche_platform_impl/quiche_prefetch_impl.h"
-
-namespace quiche {
-
-// Move data into the cache before it is read, or "prefetch" it.
-//
-// The value of `addr` is the address of the memory to prefetch. If
-// the target and compiler support it, data prefetch instructions are
-// generated. If the prefetch is done some time before the memory is
-// read, it may be in the cache by the time the read occurs.
-//
-// The function names specify the temporal locality heuristic applied,
-// using the names of Intel prefetch instructions:
-//
-//   T0 - high degree of temporal locality; data should be left in as
-//        many levels of the cache possible
-//   T1 - moderate degree of temporal locality
-//   T2 - low degree of temporal locality
-//   Nta - no temporal locality, data need not be left in the cache
-//         after the read
-//
-// Incorrect or gratuitous use of these functions can degrade
-// performance, so use them only when representative benchmarks show
-// an improvement.
-
-inline void QuichePrefetchT0(const void* addr) {
-  return QuichePrefetchT0Impl(addr);
-}
-
-}  // namespace quiche
-
-#endif  // QUICHE_COMMON_PLATFORM_API_QUICHE_PREFETCH_H_
diff --git a/quiche/common/platform/default/quiche_platform_impl/quiche_prefetch_impl.h b/quiche/common/platform/default/quiche_platform_impl/quiche_prefetch_impl.h
deleted file mode 100644
index 8945481..0000000
--- a/quiche/common/platform/default/quiche_platform_impl/quiche_prefetch_impl.h
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright 2021 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef QUICHE_COMMON_PLATFORM_DEFAULT_QUICHE_PLATFORM_IMPL_QUICHE_PREFETCH_IMPL_H_
-#define QUICHE_COMMON_PLATFORM_DEFAULT_QUICHE_PLATFORM_IMPL_QUICHE_PREFETCH_IMPL_H_
-
-#if defined(_MSC_VER)
-#include <intrin.h>
-#endif
-
-namespace quiche {
-
-inline void QuichePrefetchT0Impl(const void* addr) {
-#if !defined(DISABLE_BUILTIN_PREFETCH)
-#if defined(__GNUC__) || (defined(_M_ARM64) && defined(__clang__))
-  __builtin_prefetch(addr, 0, 3);
-#elif defined(_MSC_VER)
-  _mm_prefetch(reinterpret_cast<const char*>(addr), _MM_HINT_T0);
-#else
-  (void*)addr;
-#endif
-#endif  // !defined(DISABLE_BUILTIN_PREFETCH)
-}
-
-}  // namespace quiche
-
-#endif  // QUICHE_COMMON_PLATFORM_DEFAULT_QUICHE_PLATFORM_IMPL_QUICHE_PREFETCH_IMPL_H_
diff --git a/quiche/common/quiche_buffer_allocator.cc b/quiche/common/quiche_buffer_allocator.cc
index b431a35..196a664 100644
--- a/quiche/common/quiche_buffer_allocator.cc
+++ b/quiche/common/quiche_buffer_allocator.cc
@@ -7,9 +7,9 @@
 #include <algorithm>
 #include <cstring>
 
+#include "absl/base/prefetch.h"
 #include "quiche/common/platform/api/quiche_bug_tracker.h"
 #include "quiche/common/platform/api/quiche_logging.h"
-#include "quiche/common/platform/api/quiche_prefetch.h"
 
 namespace quiche {
 
@@ -47,9 +47,9 @@
     char* next_base = static_cast<char*>(iov[iovnum + 1].iov_base);
     // Prefetch 2 cachelines worth of data to get the prefetcher started; leave
     // it to the hardware prefetcher after that.
-    quiche::QuichePrefetchT0(next_base);
+    absl::PrefetchToLocalCache(next_base);
     if (iov[iovnum + 1].iov_len >= 64) {
-      quiche::QuichePrefetchT0(next_base + ABSL_CACHELINE_SIZE);
+      absl::PrefetchToLocalCache(next_base + ABSL_CACHELINE_SIZE);
     }
   }