[clang] [llvm] [polly] [IR] Don't include Module.h in Analysis.h (NFC) (PR #97023)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 28 01:03:22 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-amdgpu
Author: Nikita Popov (nikic)
<details>
<summary>Changes</summary>
Replace it with a forward declaration instead. Analysis.h is pulled in by all passes, but not all passes need to access the module.
---
Patch is 53.62 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/97023.diff
107 Files Affected:
- (modified) clang/lib/Interpreter/DeviceOffload.cpp (+1)
- (modified) llvm/include/llvm/Analysis/TargetTransformInfo.h (+1)
- (modified) llvm/include/llvm/Analysis/VectorUtils.h (+1)
- (modified) llvm/include/llvm/IR/Analysis.h (+3-1)
- (modified) llvm/include/llvm/Transforms/IPO/Attributor.h (+1)
- (modified) llvm/include/llvm/Transforms/Utils/Debugify.h (+2-1)
- (modified) llvm/lib/Analysis/CallPrinter.cpp (+1)
- (modified) llvm/lib/Analysis/InlineAdvisor.cpp (+1)
- (modified) llvm/lib/Analysis/LazyValueInfo.cpp (+1)
- (modified) llvm/lib/Analysis/LoopInfo.cpp (+1)
- (modified) llvm/lib/Analysis/LoopPass.cpp (+1)
- (modified) llvm/lib/Analysis/MLInlineAdvisor.cpp (+1)
- (modified) llvm/lib/Analysis/StructuralHash.cpp (+1)
- (modified) llvm/lib/Analysis/TargetLibraryInfo.cpp (+1)
- (modified) llvm/lib/Analysis/TypeBasedAliasAnalysis.cpp (+1)
- (modified) llvm/lib/CodeGen/AsmPrinter/AIXException.cpp (+1)
- (modified) llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp (+1)
- (modified) llvm/lib/CodeGen/AsmPrinter/WinCFGuard.cpp (+1)
- (modified) llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp (+1)
- (modified) llvm/lib/CodeGen/CFGuardLongjmp.cpp (+1)
- (modified) llvm/lib/CodeGen/EHContGuardCatchret.cpp (+1)
- (modified) llvm/lib/CodeGen/GCMetadata.cpp (+1)
- (modified) llvm/lib/CodeGen/KCFI.cpp (+1)
- (modified) llvm/lib/CodeGen/MachineCheckDebugify.cpp (+1)
- (modified) llvm/lib/CodeGen/MachineFunctionPass.cpp (+1)
- (modified) llvm/lib/CodeGen/MachineModuleSlotTracker.cpp (+1)
- (modified) llvm/lib/CodeGen/RegAllocBase.cpp (+1)
- (modified) llvm/lib/CodeGen/RegAllocEvictionAdvisor.cpp (+1)
- (modified) llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (+1)
- (modified) llvm/lib/CodeGen/WinEHPrepare.cpp (+1)
- (modified) llvm/lib/ExecutionEngine/Orc/JITTargetMachineBuilder.cpp (+1)
- (modified) llvm/lib/IR/PassManager.cpp (+1)
- (modified) llvm/lib/LTO/UpdateCompilerUsed.cpp (+2-1)
- (modified) llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp (+1)
- (modified) llvm/lib/Target/AArch64/AArch64FastISel.cpp (+1)
- (modified) llvm/lib/Target/AArch64/AArch64InstrInfo.cpp (+1)
- (modified) llvm/lib/Target/AArch64/AArch64TargetObjectFile.cpp (+1)
- (modified) llvm/lib/Target/AMDGPU/AMDGPUAliasAnalysis.h (+1)
- (modified) llvm/lib/Target/AMDGPU/AMDGPUMachineModuleInfo.cpp (+1)
- (modified) llvm/lib/Target/AMDGPU/R600OpenCLImageTypeLoweringPass.cpp (+1)
- (modified) llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp (+1)
- (modified) llvm/lib/Target/ARM/ARMInstrInfo.cpp (+1)
- (modified) llvm/lib/Target/ARM/ARMMachineFunctionInfo.cpp (+1)
- (modified) llvm/lib/Target/ARM/Thumb1InstrInfo.cpp (+1)
- (modified) llvm/lib/Target/ARM/Thumb2InstrInfo.cpp (+1)
- (modified) llvm/lib/Target/AVR/AVRAsmPrinter.cpp (+1)
- (modified) llvm/lib/Target/BPF/BPFAsmPrinter.cpp (+1)
- (modified) llvm/lib/Target/BPF/BPFMISimplifyPatchable.cpp (+1)
- (modified) llvm/lib/Target/BPF/BTFDebug.cpp (+1)
- (modified) llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp (+1)
- (modified) llvm/lib/Target/Mips/MipsAsmPrinter.cpp (+1)
- (modified) llvm/lib/Target/Mips/MipsISelLowering.cpp (+1)
- (modified) llvm/lib/Target/PowerPC/PPCMCInstLower.cpp (+1)
- (modified) llvm/lib/Target/PowerPC/PPCSubtarget.cpp (+2)
- (modified) llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp (+1)
- (modified) llvm/lib/Target/RISCV/RISCVInstrInfo.cpp (+1)
- (modified) llvm/lib/Target/RISCV/RISCVTargetObjectFile.cpp (+1)
- (modified) llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp (+1)
- (modified) llvm/lib/Target/SystemZ/SystemZISelLowering.cpp (+1)
- (modified) llvm/lib/Target/Target.cpp (+1)
- (modified) llvm/lib/Target/TargetMachine.cpp (+1)
- (modified) llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp (+1)
- (modified) llvm/lib/Target/WebAssembly/WebAssemblyMCLowerPrePass.cpp (+1)
- (modified) llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp (+1)
- (modified) llvm/lib/Target/X86/X86FrameLowering.cpp (+1)
- (modified) llvm/lib/Target/X86/X86ISelDAGToDAG.cpp (+1)
- (modified) llvm/lib/Target/X86/X86IndirectBranchTracking.cpp (+1)
- (modified) llvm/lib/Target/X86/X86InsertPrefetch.cpp (+1)
- (modified) llvm/lib/Target/X86/X86InstrInfo.cpp (+1)
- (modified) llvm/lib/Target/X86/X86PreTileConfig.cpp (+1)
- (modified) llvm/lib/Target/X86/X86ReturnThunks.cpp (+1)
- (modified) llvm/lib/Target/X86/X86Subtarget.cpp (+1)
- (modified) llvm/lib/Transforms/IPO/CalledValuePropagation.cpp (+1)
- (modified) llvm/lib/Transforms/Instrumentation/LowerAllowCheckPass.cpp (+1)
- (modified) llvm/lib/Transforms/Instrumentation/PGOForceFunctionAttrs.cpp (+1)
- (modified) llvm/lib/Transforms/Scalar/ConstantHoisting.cpp (+1)
- (modified) llvm/lib/Transforms/Scalar/MakeGuardsExplicit.cpp (+1)
- (modified) llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp (+1)
- (modified) llvm/lib/Transforms/Utils/CanonicalizeAliases.cpp (+1)
- (modified) llvm/lib/Transforms/Utils/DemoteRegToStack.cpp (+1)
- (modified) llvm/lib/Transforms/Utils/LowerGlobalDtors.cpp (+1)
- (modified) llvm/unittests/Analysis/AssumeBundleQueriesTest.cpp (+4-3)
- (modified) llvm/unittests/Analysis/DDGTest.cpp (+1)
- (modified) llvm/unittests/Analysis/GlobalsModRefTest.cpp (+1)
- (modified) llvm/unittests/Analysis/IVDescriptorsTest.cpp (+1)
- (modified) llvm/unittests/Analysis/LoopInfoTest.cpp (+1)
- (modified) llvm/unittests/Analysis/LoopNestTest.cpp (+1)
- (modified) llvm/unittests/CodeGen/AArch64SelectionDAGTest.cpp (+1)
- (modified) llvm/unittests/CodeGen/AMDGPUMetadataTest.cpp (+1)
- (modified) llvm/unittests/CodeGen/MLRegAllocDevelopmentFeatures.cpp (+1)
- (modified) llvm/unittests/CodeGen/SelectionDAGAddressAnalysisTest.cpp (+1)
- (modified) llvm/unittests/CodeGen/SelectionDAGPatternMatchTest.cpp (+1)
- (modified) llvm/unittests/MI/LiveIntervalTest.cpp (+1)
- (modified) llvm/unittests/MIR/MachineMetadata.cpp (+1)
- (modified) llvm/unittests/Target/AArch64/InstSizes.cpp (+1)
- (modified) llvm/unittests/Target/ARM/InstSizes.cpp (+1)
- (modified) llvm/unittests/Target/LoongArch/InstSizes.cpp (+1)
- (modified) llvm/unittests/Target/RISCV/RISCVInstrInfoTest.cpp (+1)
- (modified) llvm/unittests/Target/WebAssembly/WebAssemblyExceptionInfoTest.cpp (+1)
- (modified) llvm/unittests/Target/X86/MachineSizeOptsTest.cpp (+1)
- (modified) llvm/unittests/Transforms/Utils/BasicBlockUtilsTest.cpp (+1)
- (modified) llvm/unittests/Transforms/Utils/LoopRotationUtilsTest.cpp (+1)
- (modified) llvm/unittests/Transforms/Utils/LoopUtilsTest.cpp (+1)
- (modified) llvm/unittests/Transforms/Utils/UnrollLoopTest.cpp (+1)
- (modified) polly/lib/Analysis/ScopBuilder.cpp (+2-2)
- (modified) polly/lib/Support/SCEVAffinator.cpp (+2-1)
- (modified) polly/lib/Transform/DeLICM.cpp (+1)
``````````diff
diff --git a/clang/lib/Interpreter/DeviceOffload.cpp b/clang/lib/Interpreter/DeviceOffload.cpp
index fb42964e4936f..07c9e3005e5fd 100644
--- a/clang/lib/Interpreter/DeviceOffload.cpp
+++ b/clang/lib/Interpreter/DeviceOffload.cpp
@@ -17,6 +17,7 @@
#include "clang/Frontend/CompilerInstance.h"
#include "llvm/IR/LegacyPassManager.h"
+#include "llvm/IR/Module.h"
#include "llvm/MC/TargetRegistry.h"
#include "llvm/Target/TargetMachine.h"
diff --git a/llvm/include/llvm/Analysis/TargetTransformInfo.h b/llvm/include/llvm/Analysis/TargetTransformInfo.h
index f5c0127e1d422..dcdd9f82cde8e 100644
--- a/llvm/include/llvm/Analysis/TargetTransformInfo.h
+++ b/llvm/include/llvm/Analysis/TargetTransformInfo.h
@@ -21,6 +21,7 @@
#ifndef LLVM_ANALYSIS_TARGETTRANSFORMINFO_H
#define LLVM_ANALYSIS_TARGETTRANSFORMINFO_H
+#include "llvm/ADT/APInt.h"
#include "llvm/ADT/SmallBitVector.h"
#include "llvm/IR/FMF.h"
#include "llvm/IR/InstrTypes.h"
diff --git a/llvm/include/llvm/Analysis/VectorUtils.h b/llvm/include/llvm/Analysis/VectorUtils.h
index 132571c694d4e..3c9495c1b372c 100644
--- a/llvm/include/llvm/Analysis/VectorUtils.h
+++ b/llvm/include/llvm/Analysis/VectorUtils.h
@@ -16,6 +16,7 @@
#include "llvm/ADT/MapVector.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Analysis/LoopAccessAnalysis.h"
+#include "llvm/IR/Module.h"
#include "llvm/IR/VFABIDemangler.h"
#include "llvm/Support/CheckedArithmetic.h"
diff --git a/llvm/include/llvm/IR/Analysis.h b/llvm/include/llvm/IR/Analysis.h
index da250c031396b..ea7e2c3d0a08b 100644
--- a/llvm/include/llvm/IR/Analysis.h
+++ b/llvm/include/llvm/IR/Analysis.h
@@ -14,9 +14,11 @@
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/IR/Function.h"
-#include "llvm/IR/Module.h"
namespace llvm {
+
+class Module;
+
/// A special type used by analysis passes to provide an address that
/// identifies that particular analysis pass type.
///
diff --git a/llvm/include/llvm/Transforms/IPO/Attributor.h b/llvm/include/llvm/Transforms/IPO/Attributor.h
index 6ba04dbc31db3..f70fd02ca573c 100644
--- a/llvm/include/llvm/Transforms/IPO/Attributor.h
+++ b/llvm/include/llvm/Transforms/IPO/Attributor.h
@@ -123,6 +123,7 @@
#include "llvm/IR/InstIterator.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Instructions.h"
+#include "llvm/IR/Module.h"
#include "llvm/IR/PassManager.h"
#include "llvm/IR/Value.h"
#include "llvm/Support/Alignment.h"
diff --git a/llvm/include/llvm/Transforms/Utils/Debugify.h b/llvm/include/llvm/Transforms/Utils/Debugify.h
index 7981b9ec70364..10c8c5897b943 100644
--- a/llvm/include/llvm/Transforms/Utils/Debugify.h
+++ b/llvm/include/llvm/Transforms/Utils/Debugify.h
@@ -19,8 +19,9 @@
#include "llvm/Bitcode/BitcodeWriterPass.h"
#include "llvm/IR/IRPrintingPasses.h"
#include "llvm/IR/LegacyPassManager.h"
-#include "llvm/IR/PassManager.h"
+#include "llvm/IR/Module.h"
#include "llvm/IR/PassInstrumentation.h"
+#include "llvm/IR/PassManager.h"
#include "llvm/IR/ValueHandle.h"
#include "llvm/Pass.h"
diff --git a/llvm/lib/Analysis/CallPrinter.cpp b/llvm/lib/Analysis/CallPrinter.cpp
index effa25f276dd2..672dae1642cb3 100644
--- a/llvm/lib/Analysis/CallPrinter.cpp
+++ b/llvm/lib/Analysis/CallPrinter.cpp
@@ -20,6 +20,7 @@
#include "llvm/Analysis/CallGraph.h"
#include "llvm/Analysis/HeatUtils.h"
#include "llvm/IR/Instructions.h"
+#include "llvm/IR/Module.h"
#include "llvm/InitializePasses.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/DOTGraphTraits.h"
diff --git a/llvm/lib/Analysis/InlineAdvisor.cpp b/llvm/lib/Analysis/InlineAdvisor.cpp
index 71dfcbc9b7bb7..c6907cb128bb4 100644
--- a/llvm/lib/Analysis/InlineAdvisor.cpp
+++ b/llvm/lib/Analysis/InlineAdvisor.cpp
@@ -23,6 +23,7 @@
#include "llvm/Analysis/TargetTransformInfo.h"
#include "llvm/Analysis/Utils/ImportedFunctionsInliningStatistics.h"
#include "llvm/IR/DebugInfoMetadata.h"
+#include "llvm/IR/Module.h"
#include "llvm/IR/PassManager.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/raw_ostream.h"
diff --git a/llvm/lib/Analysis/LazyValueInfo.cpp b/llvm/lib/Analysis/LazyValueInfo.cpp
index ef4d14dbe6045..d8b03eaa3928f 100644
--- a/llvm/lib/Analysis/LazyValueInfo.cpp
+++ b/llvm/lib/Analysis/LazyValueInfo.cpp
@@ -31,6 +31,7 @@
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/LLVMContext.h"
+#include "llvm/IR/Module.h"
#include "llvm/IR/PatternMatch.h"
#include "llvm/IR/ValueHandle.h"
#include "llvm/InitializePasses.h"
diff --git a/llvm/lib/Analysis/LoopInfo.cpp b/llvm/lib/Analysis/LoopInfo.cpp
index 6f89a01aea931..6bb5f001e9bd1 100644
--- a/llvm/lib/Analysis/LoopInfo.cpp
+++ b/llvm/lib/Analysis/LoopInfo.cpp
@@ -31,6 +31,7 @@
#include "llvm/IR/Instructions.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Metadata.h"
+#include "llvm/IR/Module.h"
#include "llvm/IR/PassManager.h"
#include "llvm/IR/PrintPasses.h"
#include "llvm/InitializePasses.h"
diff --git a/llvm/lib/Analysis/LoopPass.cpp b/llvm/lib/Analysis/LoopPass.cpp
index 2159c45a8e5c5..3dc9e75b6168f 100644
--- a/llvm/lib/Analysis/LoopPass.cpp
+++ b/llvm/lib/Analysis/LoopPass.cpp
@@ -16,6 +16,7 @@
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/LLVMContext.h"
+#include "llvm/IR/Module.h"
#include "llvm/IR/OptBisect.h"
#include "llvm/IR/PassTimingInfo.h"
#include "llvm/IR/PrintPasses.h"
diff --git a/llvm/lib/Analysis/MLInlineAdvisor.cpp b/llvm/lib/Analysis/MLInlineAdvisor.cpp
index ec6f3780fe2e4..f4a782b4f168b 100644
--- a/llvm/lib/Analysis/MLInlineAdvisor.cpp
+++ b/llvm/lib/Analysis/MLInlineAdvisor.cpp
@@ -29,6 +29,7 @@
#include "llvm/Analysis/TargetTransformInfo.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/InstIterator.h"
+#include "llvm/IR/Module.h"
#include "llvm/IR/PassManager.h"
#include "llvm/Support/CommandLine.h"
diff --git a/llvm/lib/Analysis/StructuralHash.cpp b/llvm/lib/Analysis/StructuralHash.cpp
index 244ed5d55f3f8..24985f0a9d314 100644
--- a/llvm/lib/Analysis/StructuralHash.cpp
+++ b/llvm/lib/Analysis/StructuralHash.cpp
@@ -12,6 +12,7 @@
//===----------------------------------------------------------------------===//
#include "llvm/Analysis/StructuralHash.h"
+#include "llvm/IR/Module.h"
#include "llvm/IR/StructuralHash.h"
#include "llvm/Support/CommandLine.h"
diff --git a/llvm/lib/Analysis/TargetLibraryInfo.cpp b/llvm/lib/Analysis/TargetLibraryInfo.cpp
index 6b760fbde5bba..bf53f562ec419 100644
--- a/llvm/lib/Analysis/TargetLibraryInfo.cpp
+++ b/llvm/lib/Analysis/TargetLibraryInfo.cpp
@@ -14,6 +14,7 @@
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/IR/Constants.h"
+#include "llvm/IR/Module.h"
#include "llvm/InitializePasses.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/TargetParser/Triple.h"
diff --git a/llvm/lib/Analysis/TypeBasedAliasAnalysis.cpp b/llvm/lib/Analysis/TypeBasedAliasAnalysis.cpp
index a9d5743bdaac0..e1cb63a9ab8f9 100644
--- a/llvm/lib/Analysis/TypeBasedAliasAnalysis.cpp
+++ b/llvm/lib/Analysis/TypeBasedAliasAnalysis.cpp
@@ -110,6 +110,7 @@
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/MemoryLocation.h"
#include "llvm/IR/Constants.h"
+#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/InstrTypes.h"
#include "llvm/IR/LLVMContext.h"
diff --git a/llvm/lib/CodeGen/AsmPrinter/AIXException.cpp b/llvm/lib/CodeGen/AsmPrinter/AIXException.cpp
index 82b5ccdc70ea1..5d7c97adcacad 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AIXException.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AIXException.cpp
@@ -14,6 +14,7 @@
#include "llvm/CodeGen/AsmPrinter.h"
#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
+#include "llvm/IR/Module.h"
#include "llvm/MC/MCSectionXCOFF.h"
#include "llvm/MC/MCStreamer.h"
#include "llvm/Target/TargetLoweringObjectFile.h"
diff --git a/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp b/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
index 24cd1b15a5736..25d4bbddd9851 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
@@ -18,6 +18,7 @@
#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/CodeGen/TargetSubtargetInfo.h"
#include "llvm/IR/DebugInfo.h"
+#include "llvm/IR/Module.h"
#include "llvm/MC/MCStreamer.h"
#include "llvm/Support/CommandLine.h"
diff --git a/llvm/lib/CodeGen/AsmPrinter/WinCFGuard.cpp b/llvm/lib/CodeGen/AsmPrinter/WinCFGuard.cpp
index cd18703b359e1..1a1e6f0117e2b 100644
--- a/llvm/lib/CodeGen/AsmPrinter/WinCFGuard.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/WinCFGuard.cpp
@@ -17,6 +17,7 @@
#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/InstrTypes.h"
+#include "llvm/IR/Module.h"
#include "llvm/MC/MCObjectFileInfo.h"
#include "llvm/MC/MCStreamer.h"
diff --git a/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp b/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
index 0eef93f1128a6..cbec482d4cdc5 100644
--- a/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
+++ b/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
@@ -23,6 +23,7 @@
#include "llvm/IR/Function.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/IntrinsicInst.h"
+#include "llvm/IR/Module.h"
#include "llvm/IR/PassManager.h"
#include "llvm/IR/PrintPasses.h"
#include "llvm/InitializePasses.h"
diff --git a/llvm/lib/CodeGen/CFGuardLongjmp.cpp b/llvm/lib/CodeGen/CFGuardLongjmp.cpp
index c3bf938551110..b5d88a7432b17 100644
--- a/llvm/lib/CodeGen/CFGuardLongjmp.cpp
+++ b/llvm/lib/CodeGen/CFGuardLongjmp.cpp
@@ -21,6 +21,7 @@
#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/CodeGen/MachineOperand.h"
#include "llvm/CodeGen/Passes.h"
+#include "llvm/IR/Module.h"
#include "llvm/InitializePasses.h"
using namespace llvm;
diff --git a/llvm/lib/CodeGen/EHContGuardCatchret.cpp b/llvm/lib/CodeGen/EHContGuardCatchret.cpp
index b26aa792bb937..f7c6580a73da5 100644
--- a/llvm/lib/CodeGen/EHContGuardCatchret.cpp
+++ b/llvm/lib/CodeGen/EHContGuardCatchret.cpp
@@ -19,6 +19,7 @@
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/CodeGen/Passes.h"
+#include "llvm/IR/Module.h"
#include "llvm/InitializePasses.h"
using namespace llvm;
diff --git a/llvm/lib/CodeGen/GCMetadata.cpp b/llvm/lib/CodeGen/GCMetadata.cpp
index cad7d1f1137bb..e1af457c9b9d7 100644
--- a/llvm/lib/CodeGen/GCMetadata.cpp
+++ b/llvm/lib/CodeGen/GCMetadata.cpp
@@ -14,6 +14,7 @@
#include "llvm/ADT/StringExtras.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/IR/Function.h"
+#include "llvm/IR/Module.h"
#include "llvm/InitializePasses.h"
#include "llvm/MC/MCSymbol.h"
#include "llvm/Pass.h"
diff --git a/llvm/lib/CodeGen/KCFI.cpp b/llvm/lib/CodeGen/KCFI.cpp
index bffa02ca8afd0..91c6ac2618279 100644
--- a/llvm/lib/CodeGen/KCFI.cpp
+++ b/llvm/lib/CodeGen/KCFI.cpp
@@ -21,6 +21,7 @@
#include "llvm/CodeGen/TargetInstrInfo.h"
#include "llvm/CodeGen/TargetLowering.h"
#include "llvm/CodeGen/TargetSubtargetInfo.h"
+#include "llvm/IR/Module.h"
#include "llvm/InitializePasses.h"
using namespace llvm;
diff --git a/llvm/lib/CodeGen/MachineCheckDebugify.cpp b/llvm/lib/CodeGen/MachineCheckDebugify.cpp
index 874f726d29471..9b703d5401cb9 100644
--- a/llvm/lib/CodeGen/MachineCheckDebugify.cpp
+++ b/llvm/lib/CodeGen/MachineCheckDebugify.cpp
@@ -18,6 +18,7 @@
#include "llvm/CodeGen/Passes.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DebugInfoMetadata.h"
+#include "llvm/IR/Module.h"
#include "llvm/InitializePasses.h"
#include "llvm/Pass.h"
diff --git a/llvm/lib/CodeGen/MachineFunctionPass.cpp b/llvm/lib/CodeGen/MachineFunctionPass.cpp
index d57a912f418b7..62ac3e32d24d9 100644
--- a/llvm/lib/CodeGen/MachineFunctionPass.cpp
+++ b/llvm/lib/CodeGen/MachineFunctionPass.cpp
@@ -26,6 +26,7 @@
#include "llvm/CodeGen/Passes.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/Function.h"
+#include "llvm/IR/Module.h"
#include "llvm/IR/PrintPasses.h"
using namespace llvm;
diff --git a/llvm/lib/CodeGen/MachineModuleSlotTracker.cpp b/llvm/lib/CodeGen/MachineModuleSlotTracker.cpp
index aa63411df9651..965539ddaca8d 100644
--- a/llvm/lib/CodeGen/MachineModuleSlotTracker.cpp
+++ b/llvm/lib/CodeGen/MachineModuleSlotTracker.cpp
@@ -9,6 +9,7 @@
#include "llvm/CodeGen/MachineModuleSlotTracker.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineModuleInfo.h"
+#include "llvm/IR/Module.h"
using namespace llvm;
diff --git a/llvm/lib/CodeGen/RegAllocBase.cpp b/llvm/lib/CodeGen/RegAllocBase.cpp
index 71288469b8f0f..648036e5d89da 100644
--- a/llvm/lib/CodeGen/RegAllocBase.cpp
+++ b/llvm/lib/CodeGen/RegAllocBase.cpp
@@ -23,6 +23,7 @@
#include "llvm/CodeGen/Spiller.h"
#include "llvm/CodeGen/TargetRegisterInfo.h"
#include "llvm/CodeGen/VirtRegMap.h"
+#include "llvm/IR/Module.h"
#include "llvm/Pass.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
diff --git a/llvm/lib/CodeGen/RegAllocEvictionAdvisor.cpp b/llvm/lib/CodeGen/RegAllocEvictionAdvisor.cpp
index 47ad9c168b923..a1dccc4d59723 100644
--- a/llvm/lib/CodeGen/RegAllocEvictionAdvisor.cpp
+++ b/llvm/lib/CodeGen/RegAllocEvictionAdvisor.cpp
@@ -17,6 +17,7 @@
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/RegisterClassInfo.h"
#include "llvm/CodeGen/VirtRegMap.h"
+#include "llvm/IR/Module.h"
#include "llvm/InitializePasses.h"
#include "llvm/Pass.h"
#include "llvm/Support/CommandLine.h"
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 796481501c74e..e5a34bccff8e1 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -78,6 +78,7 @@
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/IntrinsicsWebAssembly.h"
#include "llvm/IR/Metadata.h"
+#include "llvm/IR/Module.h"
#include "llvm/IR/PrintPasses.h"
#include "llvm/IR/Statepoint.h"
#include "llvm/IR/Type.h"
diff --git a/llvm/lib/CodeGen/WinEHPrepare.cpp b/llvm/lib/CodeGen/WinEHPrepare.cpp
index b4f8678963f1d..c58c67b70fe3c 100644
--- a/llvm/lib/CodeGen/WinEHPrepare.cpp
+++ b/llvm/lib/CodeGen/WinEHPrepare.cpp
@@ -25,6 +25,7 @@
#include "llvm/IR/Constants.h"
#include "llvm/IR/EHPersonalities.h"
#include "llvm/IR/Instructions.h"
+#include "llvm/IR/Module.h"
#include "llvm/IR/Verifier.h"
#include "llvm/InitializePasses.h"
#include "llvm/Pass.h"
diff --git a/llvm/lib/ExecutionEngine/Orc/JITTargetMachineBuilder.cpp b/llvm/lib/ExecutionEngine/Orc/JITTargetMachineBuilder.cpp
index 17a96dee1000b..540728ea0fd99 100644
--- a/llvm/lib/ExecutionEngine/Orc/JITTargetMachineBuilder.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/JITTargetMachineBuilder.cpp
@@ -8,6 +8,7 @@
#include "llvm/ExecutionEngine/Orc/JITTargetMachineBuilder.h"
+#include "llvm/ADT/StringMap.h"
#include "llvm/MC/TargetRegistry.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/TargetParser/Host.h"
diff --git a/llvm/lib/IR/PassManager.cpp b/llvm/lib/IR/PassManager.cpp
index 64a6effe5c0db..bf8f7906d3368 100644
--- a/llvm/lib/IR/PassManager.cpp
+++ b/llvm/lib/IR/PassManager.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
#include "llvm/IR/PassManager.h"
+#include "llvm/IR/Module.h"
#include "llvm/IR/PassManagerImpl.h"
#include <optional>
diff --git a/llvm/lib/LTO/UpdateCompilerUsed.cpp b/llvm/lib/LTO/UpdateCompilerUsed.cpp
index 8dff5418dedba..2882ea9d14b23 100644
--- a/llvm/lib/LTO/UpdateCompilerUsed.cpp
+++ b/llvm/lib/LTO/UpdateCompilerUsed.cpp
@@ -15,8 +15,9 @@
#include "llvm/CodeGen/TargetLowering.h"
#include "llvm/CodeGen/TargetSubtargetInfo.h"
#include "llvm/IR/Mangler.h"
-#include "llvm/Transforms/Utils/ModuleUtils.h"
+#include "llvm/IR/Module.h"
#include "llvm/Target/TargetMachine.h"
+#include "llvm/Transforms/Utils/ModuleUtils.h"
using namespace llvm;
diff --git a/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp b/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
index 00b8d7bd257e4..64d41d4147644 100644
--- a/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
+++ b/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
@@ -43,6 +43,7 @@
#include "llvm/CodeGen/TargetRegisterInfo.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DebugInfoMetadata.h"
+#include "llvm/IR/Module.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCInst.h"
diff --git a/llvm/lib/Target/AArch64/AArch64FastISel.cpp b/llvm/lib/Target/AArch64/AArch64FastISel.cpp
index 56fd15f23363d..e3c5a143b2889 100644
--- a/llvm/lib/Target/AArch64/AArch64FastISel.cpp
+++ b/llvm/lib/Target/AArch64/AArch64FastISel.cpp
@@ -55,6 +55,7 @@
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/IntrinsicsAArch64.h"
+#include "llvm/IR/Module.h"
#include "llvm/IR/Operator.h"
#include "llvm/IR/Type.h"
#include "llvm/IR/User.h"
diff --git a/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp b/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
index ee397db3fba6d..93278a2ba0d09 100644
--- a/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
+++ b/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
@@ -40,6 +40,7 @@
#include "llvm/IR/DebugInfoMetadata.h"
#include "llvm/IR/DebugLoc.h"
#include "llvm/IR/GlobalValue.h"
+#include "llvm/IR/Module.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCInst.h"
#include "llvm/MC/MCInstBuilder.h"
diff --git a/llvm/lib/Target/AArch64/AArch64TargetObjectFile.cpp b/llvm/lib/Target/AArch64/AArch64TargetObjectFile.cpp
index 1c1e87d723ac7..3c0facd586732 100644
--- a/llvm/lib/Target/AArch64/AArch64TargetObjectFile.cpp
+++ b/llvm/lib/Target/AArch64/AArch64TargetObjectFile.cpp
@@ -13,6 +13,7 @@
#include "llvm/BinaryFormat/Dwarf.h"
#include "llvm/CodeGen/MachineModuleInfoImpls.h"
#include "llvm/IR/Mangler.h"
+#include "llvm/IR/Module.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCStreamer.h"
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUAliasAnalysis.h b/llvm/lib/Target/AMDGPU/AMDGPUAliasAnalysis.h
index 05fd411b35e54..aa0e9974667b7 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUAliasAnalysis.h
+++ b/llvm/lib/Target/AMDGPU/AMDGPUAliasAnalysis.h
@@ -13,6 +13,7 @@
#define LLVM_LIB_TARGET_AMDGPU_AMDGPUALIASANALYSIS_H
#include "llvm/Analysis/AliasAnalysis.h"
+#include "llvm/IR/Module.h"
namespace llvm {
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUMachineModuleInfo.cpp b/llvm/lib/Target/AMDGPU/AMDGPUMachineModuleInfo.cpp
index 2d48be9ea542a..5354ccf65b1cc 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUMachineModuleInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUMachineModuleInfo.cpp
@@ -13,6 +13,7 @@
//===----------------------------------------------------------------------===//
#include "AMDGPUMachineModuleInfo.h"
+#include "llvm/IR/Module.h"
#include "llvm/MC/MCSymbol.h"
namespace llvm {
diff --git a/llvm/lib/Target/AMDGPU/R600OpenCLImageTypeLoweringPass.cpp b/llvm/lib/Target/AMDGPU/R600OpenCLImageTypeLoweringPass.cpp
index 195dc4f9a0f41..c1a5e3b593748 100644
--- a/llvm/lib/Target/AMDGPU/R600OpenCLImageTypeLoweringPass.cpp
+++ b/llvm/lib/Target/AMDGPU/R600OpenCLImageTypeLoweringPass.cpp
@@ -31,6 +31,7 @@
#include "llvm/IR/Function.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Metadata.h"
+#include "llvm/IR/Module.h"
#include "llvm/Pass.h"
#include "llvm/Transforms/Utils/Cloning.h"
diff --git a/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp b/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
index e81e6bb697588..bf6bb8c295efe 100644
--- a/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
+++ b/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
@@ -49,6 +49,7 @@
#include "llvm/IR/DebugLoc.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/GlobalValue.h"
+#include "llvm/IR/Module.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCInstrDesc.h"
#include "llvm/MC/MCInstrItineraries.h"
diff --git a/llvm/lib/Target/ARM/ARMInstrInfo.cpp b/llvm/lib/Target/ARM/ARMInstrInfo.cpp
index ccc883f646a62..66d273e7ca9dd 100644
--- a/llvm/lib/Target/ARM/ARMInstrInfo.cpp
+++ b/llvm/lib/Target/ARM/ARMInstrInfo.cpp
@@ -24,6 +24,7 @@
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/GlobalVariable.h"
+#include "llvm/IR/Module.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCInst.h"
using namespace llvm;
diff --git a/llvm/lib/Target/ARM/ARMMachineFunctionInfo.cpp b/llvm/lib/Target/ARM/ARMMachineFunctionInfo.cpp
index 54207562dbaeb..75f5d80b2e0d2 100644
--- a/llvm/lib/Targe...
[truncated]
``````````
</details>
https://github.com/llvm/llvm-project/pull/97023
More information about the cfe-commits
mailing list