[llvm] [NFC] Cleanup in ADT and Analysis headers. (PR #104484)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 15 12:17:07 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-directx
Author: Daniil Fukalov (dfukalov)
<details>
<summary>Changes</summary>
Remove unused directly includes and forward declarations in ADT and Analysis headers.
---
Patch is 38.19 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/104484.diff
69 Files Affected:
- (modified) llvm/include/llvm/ADT/APFixedPoint.h (-1)
- (modified) llvm/include/llvm/ADT/DynamicAPInt.h (+3-1)
- (modified) llvm/include/llvm/ADT/SlowDynamicAPInt.h (+1-1)
- (modified) llvm/include/llvm/ADT/SmallPtrSet.h (-1)
- (modified) llvm/include/llvm/ADT/SmallVector.h (-1)
- (modified) llvm/include/llvm/ADT/Statistic.h (-1)
- (modified) llvm/include/llvm/Analysis/AliasAnalysis.h (-5)
- (modified) llvm/include/llvm/Analysis/AliasSetTracker.h (+3-2)
- (modified) llvm/include/llvm/Analysis/AssumeBundleQueries.h (-1)
- (modified) llvm/include/llvm/Analysis/BlockFrequencyInfo.h (-1)
- (modified) llvm/include/llvm/Analysis/BranchProbabilityInfo.h (-1)
- (modified) llvm/include/llvm/Analysis/CGSCCPassManager.h (-1)
- (modified) llvm/include/llvm/Analysis/CallGraph.h (-1)
- (modified) llvm/include/llvm/Analysis/CaptureTracking.h (+1-1)
- (modified) llvm/include/llvm/Analysis/CodeMetrics.h (-1)
- (modified) llvm/include/llvm/Analysis/ConstraintSystem.h (-1)
- (modified) llvm/include/llvm/Analysis/CtxProfAnalysis.h (-2)
- (modified) llvm/include/llvm/Analysis/CycleAnalysis.h (-1)
- (modified) llvm/include/llvm/Analysis/DXILMetadataAnalysis.h (-1)
- (modified) llvm/include/llvm/Analysis/DXILResource.h (+4-2)
- (modified) llvm/include/llvm/Analysis/DomConditionCache.h (-2)
- (modified) llvm/include/llvm/Analysis/DomPrinter.h (-1)
- (modified) llvm/include/llvm/Analysis/DomTreeUpdater.h (-2)
- (modified) llvm/include/llvm/Analysis/DominanceFrontier.h (-1)
- (modified) llvm/include/llvm/Analysis/FunctionPropertiesAnalysis.h (+3-2)
- (modified) llvm/include/llvm/Analysis/IRSimilarityIdentifier.h (-1)
- (modified) llvm/include/llvm/Analysis/IVDescriptors.h (-1)
- (modified) llvm/include/llvm/Analysis/InlineAdvisor.h (-1)
- (modified) llvm/include/llvm/Analysis/InlineOrder.h (+1-1)
- (modified) llvm/include/llvm/Analysis/InstructionSimplify.h (-1)
- (modified) llvm/include/llvm/Analysis/InteractiveModelRunner.h (-3)
- (modified) llvm/include/llvm/Analysis/LazyBlockFrequencyInfo.h (+1-2)
- (modified) llvm/include/llvm/Analysis/LazyBranchProbabilityInfo.h (+1-2)
- (modified) llvm/include/llvm/Analysis/LazyCallGraph.h (-4)
- (modified) llvm/include/llvm/Analysis/LazyValueInfo.h (-2)
- (modified) llvm/include/llvm/Analysis/LoopAccessAnalysis.h (+2-6)
- (modified) llvm/include/llvm/Analysis/LoopInfo.h (-5)
- (modified) llvm/include/llvm/Analysis/MLInlineAdvisor.h (+1-2)
- (modified) llvm/include/llvm/Analysis/MemoryBuiltins.h (-1)
- (modified) llvm/include/llvm/Analysis/MemoryDependenceAnalysis.h (-1)
- (modified) llvm/include/llvm/Analysis/MemoryLocation.h (-1)
- (modified) llvm/include/llvm/Analysis/MemoryProfileInfo.h (-3)
- (modified) llvm/include/llvm/Analysis/MemorySSA.h (-4)
- (modified) llvm/include/llvm/Analysis/MustExecute.h (-1)
- (modified) llvm/include/llvm/Analysis/NoInferenceModelRunner.h (+2-2)
- (modified) llvm/include/llvm/Analysis/ObjCARCAliasAnalysis.h (-1)
- (modified) llvm/include/llvm/Analysis/OptimizationRemarkEmitter.h (+1-3)
- (modified) llvm/include/llvm/Analysis/ProfileSummaryInfo.h (+2-3)
- (modified) llvm/include/llvm/Analysis/PtrUseVisitor.h (-1)
- (modified) llvm/include/llvm/Analysis/RegionInfo.h (-2)
- (modified) llvm/include/llvm/Analysis/RegionPrinter.h (+2-2)
- (modified) llvm/include/llvm/Analysis/ReplayInlineAdvisor.h (-1)
- (modified) llvm/include/llvm/Analysis/ScalarEvolution.h (-4)
- (modified) llvm/include/llvm/Analysis/SyntheticCountsUtils.h (+1-1)
- (modified) llvm/include/llvm/Analysis/TargetLibraryInfo.h (-3)
- (modified) llvm/include/llvm/Analysis/TargetTransformInfo.h (+1-4)
- (modified) llvm/include/llvm/Analysis/UniformityAnalysis.h (+3-1)
- (modified) llvm/include/llvm/Analysis/ValueLattice.h (+1-4)
- (modified) llvm/include/llvm/Analysis/ValueTracking.h (+1-5)
- (modified) llvm/include/llvm/Analysis/VectorUtils.h (-2)
- (modified) llvm/lib/Analysis/InstructionSimplify.cpp (+1)
- (modified) llvm/lib/Analysis/MemoryProfileInfo.cpp (+1)
- (modified) llvm/lib/Analysis/ValueLattice.cpp (+1)
- (modified) llvm/lib/CodeGen/CodeGenPrepare.cpp (+1)
- (modified) llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp (+2-1)
- (modified) llvm/lib/Target/Hexagon/HexagonVectorCombine.cpp (+1-1)
- (modified) llvm/lib/Transforms/Utils/SizeOpts.cpp (+1)
- (modified) llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp (+1)
- (modified) llvm/unittests/Analysis/MemoryProfileInfoTest.cpp (+1)
``````````diff
diff --git a/llvm/include/llvm/ADT/APFixedPoint.h b/llvm/include/llvm/ADT/APFixedPoint.h
index 0c014e76aa7126..ae40db96e4818c 100644
--- a/llvm/include/llvm/ADT/APFixedPoint.h
+++ b/llvm/include/llvm/ADT/APFixedPoint.h
@@ -17,7 +17,6 @@
#define LLVM_ADT_APFIXEDPOINT_H
#include "llvm/ADT/APSInt.h"
-#include "llvm/ADT/DenseMapInfo.h"
#include "llvm/ADT/Hashing.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/Support/raw_ostream.h"
diff --git a/llvm/include/llvm/ADT/DynamicAPInt.h b/llvm/include/llvm/ADT/DynamicAPInt.h
index 4444d52527def1..ff958d48e77317 100644
--- a/llvm/include/llvm/ADT/DynamicAPInt.h
+++ b/llvm/include/llvm/ADT/DynamicAPInt.h
@@ -18,10 +18,12 @@
#include "llvm/ADT/SlowDynamicAPInt.h"
#include "llvm/Support/MathExtras.h"
-#include "llvm/Support/raw_ostream.h"
#include <numeric>
namespace llvm {
+
+class raw_ostream;
+
/// This class provides support for dynamic arbitrary-precision arithmetic.
///
/// Unlike APInt, this extends the precision as necessary to prevent overflows
diff --git a/llvm/include/llvm/ADT/SlowDynamicAPInt.h b/llvm/include/llvm/ADT/SlowDynamicAPInt.h
index cda5f39eb98c35..ec1021892cf4dd 100644
--- a/llvm/include/llvm/ADT/SlowDynamicAPInt.h
+++ b/llvm/include/llvm/ADT/SlowDynamicAPInt.h
@@ -19,10 +19,10 @@
#define LLVM_ADT_SLOWDYNAMICAPINT_H
#include "llvm/ADT/APInt.h"
-#include "llvm/Support/raw_ostream.h"
namespace llvm {
class DynamicAPInt;
+class raw_ostream;
} // namespace llvm
namespace llvm::detail {
diff --git a/llvm/include/llvm/ADT/SmallPtrSet.h b/llvm/include/llvm/ADT/SmallPtrSet.h
index 78383f495b6a58..e668df08c3e636 100644
--- a/llvm/include/llvm/ADT/SmallPtrSet.h
+++ b/llvm/include/llvm/ADT/SmallPtrSet.h
@@ -16,7 +16,6 @@
#define LLVM_ADT_SMALLPTRSET_H
#include "llvm/ADT/EpochTracker.h"
-#include "llvm/Support/Compiler.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/ReverseIteration.h"
#include "llvm/Support/type_traits.h"
diff --git a/llvm/include/llvm/ADT/SmallVector.h b/llvm/include/llvm/ADT/SmallVector.h
index 17444147b102a9..730f84ca038d60 100644
--- a/llvm/include/llvm/ADT/SmallVector.h
+++ b/llvm/include/llvm/ADT/SmallVector.h
@@ -15,7 +15,6 @@
#define LLVM_ADT_SMALLVECTOR_H
#include "llvm/Support/Compiler.h"
-#include "llvm/Support/type_traits.h"
#include <algorithm>
#include <cassert>
#include <cstddef>
diff --git a/llvm/include/llvm/ADT/Statistic.h b/llvm/include/llvm/ADT/Statistic.h
index 9475b6697031a4..a64cfce3ba44a0 100644
--- a/llvm/include/llvm/ADT/Statistic.h
+++ b/llvm/include/llvm/ADT/Statistic.h
@@ -27,7 +27,6 @@
#define LLVM_ADT_STATISTIC_H
#include "llvm/Config/llvm-config.h"
-#include "llvm/Support/Compiler.h"
#include <atomic>
#include <memory>
#include <vector>
diff --git a/llvm/include/llvm/Analysis/AliasAnalysis.h b/llvm/include/llvm/Analysis/AliasAnalysis.h
index 4140387a1f3410..1990172116582b 100644
--- a/llvm/include/llvm/Analysis/AliasAnalysis.h
+++ b/llvm/include/llvm/Analysis/AliasAnalysis.h
@@ -38,7 +38,6 @@
#define LLVM_ANALYSIS_ALIASANALYSIS_H
#include "llvm/ADT/DenseMap.h"
-#include "llvm/ADT/Sequence.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Analysis/MemoryLocation.h"
#include "llvm/IR/Function.h"
@@ -53,18 +52,14 @@
namespace llvm {
-class AnalysisUsage;
class AtomicCmpXchgInst;
class BasicBlock;
class CatchPadInst;
class CatchReturnInst;
class DominatorTree;
class FenceInst;
-class Function;
class LoopInfo;
-class PreservedAnalyses;
class TargetLibraryInfo;
-class Value;
/// The possible results of an alias query.
///
diff --git a/llvm/include/llvm/Analysis/AliasSetTracker.h b/llvm/include/llvm/Analysis/AliasSetTracker.h
index b8e8e7ef047f96..e5817d2409bc65 100644
--- a/llvm/include/llvm/Analysis/AliasSetTracker.h
+++ b/llvm/include/llvm/Analysis/AliasSetTracker.h
@@ -23,7 +23,6 @@
#include "llvm/ADT/ilist.h"
#include "llvm/ADT/ilist_node.h"
#include "llvm/Analysis/MemoryLocation.h"
-#include "llvm/IR/Instruction.h"
#include "llvm/IR/PassManager.h"
#include "llvm/IR/ValueHandle.h"
#include <cassert>
@@ -37,10 +36,12 @@ class AnyMemSetInst;
class AnyMemTransferInst;
class BasicBlock;
class BatchAAResults;
+class Function;
+class Instruction;
+class StoreInst;
class LoadInst;
enum class ModRefInfo : uint8_t;
class raw_ostream;
-class StoreInst;
class VAArgInst;
class Value;
diff --git a/llvm/include/llvm/Analysis/AssumeBundleQueries.h b/llvm/include/llvm/Analysis/AssumeBundleQueries.h
index df54fd2e9d655d..f7a893708758c5 100644
--- a/llvm/include/llvm/Analysis/AssumeBundleQueries.h
+++ b/llvm/include/llvm/Analysis/AssumeBundleQueries.h
@@ -21,7 +21,6 @@ namespace llvm {
class AssumptionCache;
class DominatorTree;
class Instruction;
-class Value;
/// Index of elements in the operand bundle.
/// If the element exist it is guaranteed to be what is specified in this enum
diff --git a/llvm/include/llvm/Analysis/BlockFrequencyInfo.h b/llvm/include/llvm/Analysis/BlockFrequencyInfo.h
index 179fd06addec87..5191a964403354 100644
--- a/llvm/include/llvm/Analysis/BlockFrequencyInfo.h
+++ b/llvm/include/llvm/Analysis/BlockFrequencyInfo.h
@@ -25,7 +25,6 @@ namespace llvm {
class BasicBlock;
class BranchProbabilityInfo;
-class Function;
class LoopInfo;
class Module;
class raw_ostream;
diff --git a/llvm/include/llvm/Analysis/BranchProbabilityInfo.h b/llvm/include/llvm/Analysis/BranchProbabilityInfo.h
index eab7fec6b6e08f..1ac5694b758fee 100644
--- a/llvm/include/llvm/Analysis/BranchProbabilityInfo.h
+++ b/llvm/include/llvm/Analysis/BranchProbabilityInfo.h
@@ -22,7 +22,6 @@
#include "llvm/IR/ValueHandle.h"
#include "llvm/Pass.h"
#include "llvm/Support/BranchProbability.h"
-#include <algorithm>
#include <cassert>
#include <cstdint>
#include <memory>
diff --git a/llvm/include/llvm/Analysis/CGSCCPassManager.h b/llvm/include/llvm/Analysis/CGSCCPassManager.h
index 406d3492136fcc..15b7f226fd8283 100644
--- a/llvm/include/llvm/Analysis/CGSCCPassManager.h
+++ b/llvm/include/llvm/Analysis/CGSCCPassManager.h
@@ -99,7 +99,6 @@
namespace llvm {
class Function;
-class Value;
template <typename T, unsigned int N> class SmallPriorityWorklist;
struct CGSCCUpdateResult;
diff --git a/llvm/include/llvm/Analysis/CallGraph.h b/llvm/include/llvm/Analysis/CallGraph.h
index 887743774175dc..f5ce2322b76d95 100644
--- a/llvm/include/llvm/Analysis/CallGraph.h
+++ b/llvm/include/llvm/Analysis/CallGraph.h
@@ -46,7 +46,6 @@
#define LLVM_ANALYSIS_CALLGRAPH_H
#include "llvm/IR/InstrTypes.h"
-#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/PassManager.h"
#include "llvm/IR/ValueHandle.h"
#include "llvm/Pass.h"
diff --git a/llvm/include/llvm/Analysis/CaptureTracking.h b/llvm/include/llvm/Analysis/CaptureTracking.h
index 2825399e2cc4dd..06a00d9ae78990 100644
--- a/llvm/include/llvm/Analysis/CaptureTracking.h
+++ b/llvm/include/llvm/Analysis/CaptureTracking.h
@@ -14,7 +14,6 @@
#define LLVM_ANALYSIS_CAPTURETRACKING_H
#include "llvm/ADT/DenseMap.h"
-#include "llvm/ADT/STLFunctionalExtras.h"
namespace llvm {
@@ -25,6 +24,7 @@ namespace llvm {
class DominatorTree;
class LoopInfo;
class Function;
+ template <typename Fn> class function_ref;
/// getDefaultMaxUsesToExploreForCaptureTracking - Return default value of
/// the maximal number of uses to explore before giving up. It is used by
diff --git a/llvm/include/llvm/Analysis/CodeMetrics.h b/llvm/include/llvm/Analysis/CodeMetrics.h
index d09018daf95488..a51d923eb44ed9 100644
--- a/llvm/include/llvm/Analysis/CodeMetrics.h
+++ b/llvm/include/llvm/Analysis/CodeMetrics.h
@@ -20,7 +20,6 @@
namespace llvm {
class AssumptionCache;
class BasicBlock;
-class Instruction;
class Loop;
class Function;
template <class T> class SmallPtrSetImpl;
diff --git a/llvm/include/llvm/Analysis/ConstraintSystem.h b/llvm/include/llvm/Analysis/ConstraintSystem.h
index 7b02b618f7cb44..449852343964ca 100644
--- a/llvm/include/llvm/Analysis/ConstraintSystem.h
+++ b/llvm/include/llvm/Analysis/ConstraintSystem.h
@@ -9,7 +9,6 @@
#ifndef LLVM_ANALYSIS_CONSTRAINTSYSTEM_H
#define LLVM_ANALYSIS_CONSTRAINTSYSTEM_H
-#include "llvm/ADT/APInt.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallVector.h"
diff --git a/llvm/include/llvm/Analysis/CtxProfAnalysis.h b/llvm/include/llvm/Analysis/CtxProfAnalysis.h
index f0e2aeb0f92f74..02159d130f4b20 100644
--- a/llvm/include/llvm/Analysis/CtxProfAnalysis.h
+++ b/llvm/include/llvm/Analysis/CtxProfAnalysis.h
@@ -9,8 +9,6 @@
#ifndef LLVM_ANALYSIS_CTXPROFANALYSIS_H
#define LLVM_ANALYSIS_CTXPROFANALYSIS_H
-#include "llvm/ADT/DenseMap.h"
-#include "llvm/IR/GlobalValue.h"
#include "llvm/IR/PassManager.h"
#include "llvm/ProfileData/PGOCtxProfReader.h"
diff --git a/llvm/include/llvm/Analysis/CycleAnalysis.h b/llvm/include/llvm/Analysis/CycleAnalysis.h
index ce939eff8ff8f3..6b45cece199913 100644
--- a/llvm/include/llvm/Analysis/CycleAnalysis.h
+++ b/llvm/include/llvm/Analysis/CycleAnalysis.h
@@ -17,7 +17,6 @@
#include "llvm/IR/CycleInfo.h"
#include "llvm/IR/PassManager.h"
-#include "llvm/IR/SSAContext.h"
#include "llvm/Pass.h"
namespace llvm {
diff --git a/llvm/include/llvm/Analysis/DXILMetadataAnalysis.h b/llvm/include/llvm/Analysis/DXILMetadataAnalysis.h
index e5c6ae5db559ee..f325828495458b 100644
--- a/llvm/include/llvm/Analysis/DXILMetadataAnalysis.h
+++ b/llvm/include/llvm/Analysis/DXILMetadataAnalysis.h
@@ -10,7 +10,6 @@
#define LLVM_ANALYSIS_DXILMETADATA_H
#include "llvm/IR/PassManager.h"
-#include "llvm/IR/Value.h"
#include "llvm/Pass.h"
#include "llvm/Support/VersionTuple.h"
#include "llvm/TargetParser/Triple.h"
diff --git a/llvm/include/llvm/Analysis/DXILResource.h b/llvm/include/llvm/Analysis/DXILResource.h
index 3ba0ae5de61d51..14cf03c9a3acee 100644
--- a/llvm/include/llvm/Analysis/DXILResource.h
+++ b/llvm/include/llvm/Analysis/DXILResource.h
@@ -10,15 +10,17 @@
#define LLVM_ANALYSIS_DXILRESOURCE_H
#include "llvm/ADT/MapVector.h"
+#include "llvm/ADT/StringRef.h"
#include "llvm/IR/PassManager.h"
-#include "llvm/IR/Value.h"
#include "llvm/Pass.h"
+#include "llvm/Support/Alignment.h"
#include "llvm/Support/DXILABI.h"
namespace llvm {
class CallInst;
+class LLVMContext;
class MDTuple;
-class TargetExtType;
+class Value;
namespace dxil {
diff --git a/llvm/include/llvm/Analysis/DomConditionCache.h b/llvm/include/llvm/Analysis/DomConditionCache.h
index 68e34f773af8ae..ac25803143f49e 100644
--- a/llvm/include/llvm/Analysis/DomConditionCache.h
+++ b/llvm/include/llvm/Analysis/DomConditionCache.h
@@ -19,9 +19,7 @@
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
-#include "llvm/ADT/DenseMapInfo.h"
#include "llvm/ADT/SmallVector.h"
-#include "llvm/IR/ValueHandle.h"
namespace llvm {
diff --git a/llvm/include/llvm/Analysis/DomPrinter.h b/llvm/include/llvm/Analysis/DomPrinter.h
index 83fe721346ab2e..80fdfcd56c366f 100644
--- a/llvm/include/llvm/Analysis/DomPrinter.h
+++ b/llvm/include/llvm/Analysis/DomPrinter.h
@@ -17,7 +17,6 @@
#include "llvm/Analysis/DOTGraphTraitsPass.h"
#include "llvm/Analysis/PostDominators.h"
#include "llvm/IR/Dominators.h"
-#include "llvm/IR/PassManager.h"
namespace llvm {
diff --git a/llvm/include/llvm/Analysis/DomTreeUpdater.h b/llvm/include/llvm/Analysis/DomTreeUpdater.h
index e07d2bf2b0df17..c120a6cc6ce5ab 100644
--- a/llvm/include/llvm/Analysis/DomTreeUpdater.h
+++ b/llvm/include/llvm/Analysis/DomTreeUpdater.h
@@ -14,12 +14,10 @@
#ifndef LLVM_ANALYSIS_DOMTREEUPDATER_H
#define LLVM_ANALYSIS_DOMTREEUPDATER_H
-#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/Analysis/GenericDomTreeUpdater.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/ValueHandle.h"
#include "llvm/Support/Compiler.h"
-#include <cstddef>
#include <functional>
#include <vector>
diff --git a/llvm/include/llvm/Analysis/DominanceFrontier.h b/llvm/include/llvm/Analysis/DominanceFrontier.h
index 1339b4869bc29b..8b3ab57ed4d07b 100644
--- a/llvm/include/llvm/Analysis/DominanceFrontier.h
+++ b/llvm/include/llvm/Analysis/DominanceFrontier.h
@@ -20,7 +20,6 @@
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/GraphTraits.h"
#include "llvm/ADT/SetVector.h"
-#include "llvm/Config/llvm-config.h"
#include "llvm/IR/PassManager.h"
#include "llvm/Pass.h"
#include "llvm/Support/GenericDomTree.h"
diff --git a/llvm/include/llvm/Analysis/FunctionPropertiesAnalysis.h b/llvm/include/llvm/Analysis/FunctionPropertiesAnalysis.h
index f5fbbdcb7143d7..ee447d3e4ebb6a 100644
--- a/llvm/include/llvm/Analysis/FunctionPropertiesAnalysis.h
+++ b/llvm/include/llvm/Analysis/FunctionPropertiesAnalysis.h
@@ -14,11 +14,12 @@
#ifndef LLVM_ANALYSIS_FUNCTIONPROPERTIESANALYSIS_H
#define LLVM_ANALYSIS_FUNCTIONPROPERTIESANALYSIS_H
-#include "llvm/ADT/iterator_range.h"
-#include "llvm/IR/InstrTypes.h"
+#include "llvm/ADT/DenseSet.h"
#include "llvm/IR/PassManager.h"
namespace llvm {
+class BasicBlock;
+class CallBase;
class DominatorTree;
class Function;
class LoopInfo;
diff --git a/llvm/include/llvm/Analysis/IRSimilarityIdentifier.h b/llvm/include/llvm/Analysis/IRSimilarityIdentifier.h
index 0d19de6edc2a77..9da465ddf75f9b 100644
--- a/llvm/include/llvm/Analysis/IRSimilarityIdentifier.h
+++ b/llvm/include/llvm/Analysis/IRSimilarityIdentifier.h
@@ -57,7 +57,6 @@
#include <optional>
namespace llvm {
-class Module;
namespace IRSimilarity {
diff --git a/llvm/include/llvm/Analysis/IVDescriptors.h b/llvm/include/llvm/Analysis/IVDescriptors.h
index 5c7b613ac48c40..379b114b79cdfa 100644
--- a/llvm/include/llvm/Analysis/IVDescriptors.h
+++ b/llvm/include/llvm/Analysis/IVDescriptors.h
@@ -23,7 +23,6 @@ namespace llvm {
class AssumptionCache;
class DemandedBits;
class DominatorTree;
-class Instruction;
class Loop;
class PredicatedScalarEvolution;
class ScalarEvolution;
diff --git a/llvm/include/llvm/Analysis/InlineAdvisor.h b/llvm/include/llvm/Analysis/InlineAdvisor.h
index 5f36ee6f68abbb..871a6e97861e29 100644
--- a/llvm/include/llvm/Analysis/InlineAdvisor.h
+++ b/llvm/include/llvm/Analysis/InlineAdvisor.h
@@ -12,7 +12,6 @@
#include "llvm/Analysis/CGSCCPassManager.h"
#include "llvm/Analysis/InlineCost.h"
#include "llvm/Analysis/LazyCallGraph.h"
-#include "llvm/Config/llvm-config.h"
#include "llvm/IR/PassManager.h"
#include <memory>
diff --git a/llvm/include/llvm/Analysis/InlineOrder.h b/llvm/include/llvm/Analysis/InlineOrder.h
index a1d25a25b8568f..2fa2d6091303ad 100644
--- a/llvm/include/llvm/Analysis/InlineOrder.h
+++ b/llvm/include/llvm/Analysis/InlineOrder.h
@@ -9,12 +9,12 @@
#ifndef LLVM_ANALYSIS_INLINEORDER_H
#define LLVM_ANALYSIS_INLINEORDER_H
-#include "llvm/ADT/STLFunctionalExtras.h"
#include "llvm/Analysis/InlineCost.h"
#include <utility>
namespace llvm {
class CallBase;
+template <typename Fn> class function_ref;
template <typename T> class InlineOrder {
public:
diff --git a/llvm/include/llvm/Analysis/InstructionSimplify.h b/llvm/include/llvm/Analysis/InstructionSimplify.h
index 053367a78bfcf0..cf7d3e044188a6 100644
--- a/llvm/include/llvm/Analysis/InstructionSimplify.h
+++ b/llvm/include/llvm/Analysis/InstructionSimplify.h
@@ -39,7 +39,6 @@ namespace llvm {
template <typename T, typename... TArgs> class AnalysisManager;
template <class T> class ArrayRef;
class AssumptionCache;
-class BinaryOperator;
class CallBase;
class DataLayout;
class DominatorTree;
diff --git a/llvm/include/llvm/Analysis/InteractiveModelRunner.h b/llvm/include/llvm/Analysis/InteractiveModelRunner.h
index 680dc4249d80b1..798a249b9e4302 100644
--- a/llvm/include/llvm/Analysis/InteractiveModelRunner.h
+++ b/llvm/include/llvm/Analysis/InteractiveModelRunner.h
@@ -13,9 +13,6 @@
#include "llvm/Analysis/MLModelRunner.h"
#include "llvm/Analysis/TensorSpec.h"
#include "llvm/Analysis/Utils/TrainingLogger.h"
-#include "llvm/Config/llvm-config.h"
-#include "llvm/Support/FileSystem.h"
-#include "llvm/Support/raw_ostream.h"
#include <system_error>
namespace llvm {
diff --git a/llvm/include/llvm/Analysis/LazyBlockFrequencyInfo.h b/llvm/include/llvm/Analysis/LazyBlockFrequencyInfo.h
index a6d8b76b12aea2..8ad3c6bafc26d3 100644
--- a/llvm/include/llvm/Analysis/LazyBlockFrequencyInfo.h
+++ b/llvm/include/llvm/Analysis/LazyBlockFrequencyInfo.h
@@ -21,7 +21,6 @@
#include "llvm/Pass.h"
namespace llvm {
-class AnalysisUsage;
class Function;
class LoopInfo;
@@ -125,5 +124,5 @@ class LazyBlockFrequencyInfoPass : public FunctionPass {
/// Helper for client passes to initialize dependent passes for LBFI.
void initializeLazyBFIPassPass(PassRegistry &Registry);
-}
+} // namespace llvm
#endif
diff --git a/llvm/include/llvm/Analysis/LazyBranchProbabilityInfo.h b/llvm/include/llvm/Analysis/LazyBranchProbabilityInfo.h
index bad7423616b453..fe1f7b25c0f159 100644
--- a/llvm/include/llvm/Analysis/LazyBranchProbabilityInfo.h
+++ b/llvm/include/llvm/Analysis/LazyBranchProbabilityInfo.h
@@ -20,7 +20,6 @@
#include "llvm/Pass.h"
namespace llvm {
-class AnalysisUsage;
class Function;
class LoopInfo;
class TargetLibraryInfo;
@@ -119,5 +118,5 @@ template <> struct BPIPassTrait<LazyBranchProbabilityInfoPass> {
return P->getBPI();
}
};
-}
+} // namespace llvm
#endif
diff --git a/llvm/include/llvm/Analysis/LazyCallGraph.h b/llvm/include/llvm/Analysis/LazyCallGraph.h
index a8bbf2c578af9b..e67a0388bcaa60 100644
--- a/llvm/include/llvm/Analysis/LazyCallGraph.h
+++ b/llvm/include/llvm/Analysis/LazyCallGraph.h
@@ -55,11 +55,8 @@
namespace llvm {
class Constant;
-class Function;
template <class GraphType> struct GraphTraits;
class Module;
-class TargetLibraryInfo;
-class Value;
/// A lazily constructed view of the call graph of a module.
///
@@ -111,7 +108,6 @@ class LazyCallGraph {
public:
class Node;
class EdgeSequence;
- class SCC;
class RefSCC;
/// A class used to represent edges in the call graph.
diff --git a/llvm/include/llvm/Analysis/LazyValueInfo.h b/llvm/include/llvm/Analysis/LazyValueInfo.h
index 3ca3e5a146e737..52c7f68361a5b9 100644
--- a/llvm/include/llvm/Analysis/LazyValueInfo.h
+++ b/llvm/include/llvm/Analysis/LazyValueInfo.h
@@ -22,11 +22,9 @@ namespace llvm {
class AssumptionCache;
class BasicBlock;
class Constant;
- class ConstantRange;
class DataLayout;
class DominatorTree;
class Instruction;
- class TargetLibraryInfo;
class Value;
class Use;
class LazyValueInfoImpl;
diff --git a/llvm/include/llvm/Analysis/LoopAccessAnalysis.h b/llvm/include/llvm/Analysis/LoopAccessAnalysis.h
index 1975d4aef9a6d7..87c70abba30fcd 100644
--- a/llvm/include/llvm/Analysis/LoopAccessAnalysis.h
+++ b/llvm/include/llvm/Analysis/LoopAccessAnalysis.h
@@ -15,8 +15,7 @@
#define LLVM_ANALYSIS_LOOPACCESSANALYSIS_H
#include "llvm/ADT/EquivalenceClasses.h"
-#include "llvm/Analysis/LoopAnalysisManager.h"
-#include "llvm/Analysis/ScalarEvolutionExpressions.h"
+#include "llvm/Analysis/ScalarEvolution.h"
#include "llvm/IR/DiagnosticInfo.h"
#include <optional>
#include <variant>
@@ -26,11 +25,8 @@ namespace llvm {
class AAResults;
class DataLayout;
class Loop;
-class LoopAccessInfo;
class raw_ostream;
-class SCEV;
-class SCEVUnionPredicate;
-class Value;
+class TargetTransformInfo;
/// Collection of parameters shared beetween the Loop Vectorizer and the
/// Loop Access Analysis.
diff --git a/llvm/include/llvm/Analysis/LoopInfo.h b/llvm/include/llvm/Analysis/LoopInfo.h
index 054206925483c5..748b7e11cbde92 100644
--- a/llvm/include/llvm/Analysis/LoopInfo.h
+++ b/llvm/include/llvm/Analysis/LoopInfo.h
@@ -14,13 +14,10 @@
#define LLVM_ANALYSIS_LOOPINFO_H
#include "llvm/ADT/GraphTraits.h"
-#include "llvm/ADT/SmallVector.h"
-#include "llvm/IR/CFG.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/PassManager.h"
#include "llvm/Pass.h"
#include "llvm/Support/GenericLoopInfo.h"
-#include <algorithm>
#include <optional>
#include <utility>
@@ -28,10 +25,8 @@ namespace llvm {
class DominatorTree;
class InductionDescriptor;
-class Instruction;
class LoopInfo;
class Loop;
-class MDNode;
class MemorySSAUpdater;
class ScalarEvolution;
class raw_ostream;
diff --git a/llvm/include/llvm/Analysis/MLInlineAdvisor.h b/llvm/include/llvm/Analysis/MLInlineAdvisor.h
index 7d726a246ca3cb..580dd5e95d7604 100644
--- a/llvm/include/llvm/Analysis/MLInlineAdvisor.h
+++ b/llvm/include/llvm/Analysis/MLInlineAdvisor.h
@@ -13,10 +13,8 @@
#include "llvm/Analysis/InlineAdvisor.h"
#include "llvm/Analysis/LazyCallGraph.h"
#include "llvm/Analysis/MLModelRunner.h"
-#include "llvm/Analysis/ProfileSummaryIn...
[truncated]
``````````
</details>
https://github.com/llvm/llvm-project/pull/104484
More information about the llvm-commits
mailing list