[llvm] [memprof] Tidy up #includes (NFC) (PR #154684)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 21 00:00:40 PDT 2025


https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/154684

We've reorganized some code within memprof, but #indludes haven't
quite followed the code that moved.


>From caf691f2a716640108ae028fb25e04144525dae4 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Wed, 20 Aug 2025 23:36:23 -0700
Subject: [PATCH] [memprof] Tidy up #includes (NFC)

We've reorganized some code within memprof, but #indludes haven't
quite followed the code that moved.
---
 llvm/include/llvm/ProfileData/IndexedMemProfData.h | 5 ++---
 llvm/include/llvm/ProfileData/MemProf.h            | 6 +-----
 llvm/include/llvm/ProfileData/MemProfRadixTree.h   | 3 +++
 3 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/llvm/include/llvm/ProfileData/IndexedMemProfData.h b/llvm/include/llvm/ProfileData/IndexedMemProfData.h
index dae0928d50ca7..09c24483619ad 100644
--- a/llvm/include/llvm/ProfileData/IndexedMemProfData.h
+++ b/llvm/include/llvm/ProfileData/IndexedMemProfData.h
@@ -18,10 +18,9 @@
 #include "llvm/ProfileData/DataAccessProf.h"
 #include "llvm/ProfileData/InstrProf.h"
 #include "llvm/ProfileData/MemProf.h"
+#include "llvm/Support/BLAKE3.h"
 #include "llvm/Support/Compiler.h"
-
-#include <functional>
-#include <optional>
+#include "llvm/Support/HashBuilder.h"
 
 namespace llvm {
 namespace memprof {
diff --git a/llvm/include/llvm/ProfileData/MemProf.h b/llvm/include/llvm/ProfileData/MemProf.h
index 9df4efd8e0853..e4bc9ee6f6ad1 100644
--- a/llvm/include/llvm/ProfileData/MemProf.h
+++ b/llvm/include/llvm/ProfileData/MemProf.h
@@ -14,24 +14,20 @@
 #ifndef LLVM_PROFILEDATA_MEMPROF_H
 #define LLVM_PROFILEDATA_MEMPROF_H
 
-#include "llvm/ADT/BitVector.h"
-#include "llvm/ADT/MapVector.h"
+#include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/STLForwardCompat.h"
 #include "llvm/ADT/STLFunctionalExtras.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/ADT/StringRef.h"
 #include "llvm/IR/GlobalValue.h"
 #include "llvm/ProfileData/MemProfData.inc"
-#include "llvm/Support/BLAKE3.h"
 #include "llvm/Support/Compiler.h"
 #include "llvm/Support/Endian.h"
 #include "llvm/Support/EndianStream.h"
-#include "llvm/Support/HashBuilder.h"
 #include "llvm/Support/raw_ostream.h"
 
 #include <bitset>
 #include <cstdint>
-#include <optional>
 
 namespace llvm {
 namespace yaml {
diff --git a/llvm/include/llvm/ProfileData/MemProfRadixTree.h b/llvm/include/llvm/ProfileData/MemProfRadixTree.h
index 35df7a8f16a6e..de1ddf86d8135 100644
--- a/llvm/include/llvm/ProfileData/MemProfRadixTree.h
+++ b/llvm/include/llvm/ProfileData/MemProfRadixTree.h
@@ -13,10 +13,13 @@
 #ifndef LLVM_PROFILEDATA_MEMPROFRADIXTREE_H
 #define LLVM_PROFILEDATA_MEMPROFRADIXTREE_H
 
+#include "llvm/ADT/BitVector.h"
 #include "llvm/ProfileData/IndexedMemProfData.h"
 #include "llvm/ProfileData/MemProf.h"
 #include "llvm/Support/Compiler.h"
 
+#include <optional>
+
 namespace llvm {
 namespace memprof {
 namespace detail {



More information about the llvm-commits mailing list