[llvm] [LLVM] Include simple_ilist.h in preference to ilist.h. NFC. (PR #96644)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 25 07:34:57 PDT 2024


https://github.com/jayfoad created https://github.com/llvm/llvm-project/pull/96644

Files that do not use iplist or ilist_traits do not need to include the
full ilist.h.


>From 8c3ab1af5af2cd4b62782a8624902d61a1c94e53 Mon Sep 17 00:00:00 2001
From: Jay Foad <jay.foad at amd.com>
Date: Tue, 25 Jun 2024 15:30:52 +0100
Subject: [PATCH] [LLVM] Include simple_ilist.h in preference to ilist.h. NFC.

Files that do not use iplist or ilist_traits do not need to include the
full ilist.h.
---
 llvm/include/llvm/Analysis/AliasSetTracker.h           | 2 +-
 llvm/include/llvm/CodeGen/MachineInstrBundleIterator.h | 1 -
 llvm/include/llvm/CodeGen/SlotIndexes.h                | 2 +-
 llvm/include/llvm/IR/BasicBlock.h                      | 2 +-
 llvm/include/llvm/IR/DebugProgramInstruction.h         | 2 +-
 llvm/include/llvm/Support/Recycler.h                   | 2 +-
 6 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/llvm/include/llvm/Analysis/AliasSetTracker.h b/llvm/include/llvm/Analysis/AliasSetTracker.h
index b8e8e7ef047f9..25a7a051085a3 100644
--- a/llvm/include/llvm/Analysis/AliasSetTracker.h
+++ b/llvm/include/llvm/Analysis/AliasSetTracker.h
@@ -20,8 +20,8 @@
 
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/SmallVector.h"
-#include "llvm/ADT/ilist.h"
 #include "llvm/ADT/ilist_node.h"
+#include "llvm/ADT/simple_ilist.h"
 #include "llvm/Analysis/MemoryLocation.h"
 #include "llvm/IR/Instruction.h"
 #include "llvm/IR/PassManager.h"
diff --git a/llvm/include/llvm/CodeGen/MachineInstrBundleIterator.h b/llvm/include/llvm/CodeGen/MachineInstrBundleIterator.h
index 250cb0d78a68f..a0cefb53039dc 100644
--- a/llvm/include/llvm/CodeGen/MachineInstrBundleIterator.h
+++ b/llvm/include/llvm/CodeGen/MachineInstrBundleIterator.h
@@ -13,7 +13,6 @@
 #ifndef LLVM_CODEGEN_MACHINEINSTRBUNDLEITERATOR_H
 #define LLVM_CODEGEN_MACHINEINSTRBUNDLEITERATOR_H
 
-#include "llvm/ADT/ilist.h"
 #include "llvm/ADT/simple_ilist.h"
 #include <cassert>
 #include <iterator>
diff --git a/llvm/include/llvm/CodeGen/SlotIndexes.h b/llvm/include/llvm/CodeGen/SlotIndexes.h
index 72f4a6876b6cb..e02a34fd3e6cf 100644
--- a/llvm/include/llvm/CodeGen/SlotIndexes.h
+++ b/llvm/include/llvm/CodeGen/SlotIndexes.h
@@ -22,7 +22,7 @@
 #include "llvm/ADT/IntervalMap.h"
 #include "llvm/ADT/PointerIntPair.h"
 #include "llvm/ADT/SmallVector.h"
-#include "llvm/ADT/ilist.h"
+#include "llvm/ADT/simple_ilist.h"
 #include "llvm/CodeGen/MachineBasicBlock.h"
 #include "llvm/CodeGen/MachineFunction.h"
 #include "llvm/CodeGen/MachineFunctionPass.h"
diff --git a/llvm/include/llvm/IR/BasicBlock.h b/llvm/include/llvm/IR/BasicBlock.h
index 80067f2652a2b..218e0cbeea4bb 100644
--- a/llvm/include/llvm/IR/BasicBlock.h
+++ b/llvm/include/llvm/IR/BasicBlock.h
@@ -16,10 +16,10 @@
 #include "llvm-c/Types.h"
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/Twine.h"
-#include "llvm/ADT/ilist.h"
 #include "llvm/ADT/ilist_node.h"
 #include "llvm/ADT/iterator.h"
 #include "llvm/ADT/iterator_range.h"
+#include "llvm/ADT/simple_ilist.h"
 #include "llvm/IR/DebugProgramInstruction.h"
 #include "llvm/IR/Instruction.h"
 #include "llvm/IR/SymbolTableListTraits.h"
diff --git a/llvm/include/llvm/IR/DebugProgramInstruction.h b/llvm/include/llvm/IR/DebugProgramInstruction.h
index ed8081a3cad19..1cbe3d32402e5 100644
--- a/llvm/include/llvm/IR/DebugProgramInstruction.h
+++ b/llvm/include/llvm/IR/DebugProgramInstruction.h
@@ -47,9 +47,9 @@
 #ifndef LLVM_IR_DEBUGPROGRAMINSTRUCTION_H
 #define LLVM_IR_DEBUGPROGRAMINSTRUCTION_H
 
-#include "llvm/ADT/ilist.h"
 #include "llvm/ADT/ilist_node.h"
 #include "llvm/ADT/iterator.h"
+#include "llvm/ADT/simple_ilist.h"
 #include "llvm/IR/DebugLoc.h"
 #include "llvm/IR/Instruction.h"
 #include "llvm/IR/SymbolTableListTraits.h"
diff --git a/llvm/include/llvm/Support/Recycler.h b/llvm/include/llvm/Support/Recycler.h
index bbd9ae321ae30..e2e5c7a3ff605 100644
--- a/llvm/include/llvm/Support/Recycler.h
+++ b/llvm/include/llvm/Support/Recycler.h
@@ -14,7 +14,7 @@
 #ifndef LLVM_SUPPORT_RECYCLER_H
 #define LLVM_SUPPORT_RECYCLER_H
 
-#include "llvm/ADT/ilist.h"
+#include "llvm/ADT/simple_ilist.h"
 #include "llvm/Support/Allocator.h"
 #include "llvm/Support/ErrorHandling.h"
 #include <cassert>



More information about the llvm-commits mailing list