[clang] [llvm] [polly] Revert "[IR] Don't include Module.h in Analysis.h (NFC) (#97023)" (PR #97129)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 28 17:18:17 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlgo
@llvm/pr-subscribers-backend-amdgpu
Author: None (ZijunZhaoCCK)
<details>
<summary>Changes</summary>
This reverts commit 4169338e75cdce73d34063532db598c95ee82ae4.
This will causes incomplete type errors.
```/[tmpfs/src/git/out/llvm-project/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp:1022](https://cs.corp.google.com/piper///depot/google3/tmpfs/src/git/out/llvm-project/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp?l=1022):18: error: member access into incomplete type 'Module'
1022 | Function *F = M->getFunction(Name);
| ^
/[tmpfs/src/git/out/llvm-project/llvm/include/llvm/IR/Value.h:47](https://cs.corp.google.com/piper///depot/google3/tmpfs/src/git/out/llvm-project/llvm/include/llvm/IR/Value.h?l=47):7: note: forward declaration of 'llvm::Module'
47 | class Module;
| ^
/[tmpfs/src/git/out/llvm-project/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp:1026](https://cs.corp.google.com/piper///depot/google3/tmpfs/src/git/out/llvm-project/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp?l=1026):48: error: member access into incomplete type 'Module'
1026 | PointerType *ResTy = PointerType::getUnqual(M->getContext());
| ^
/[tmpfs/src/git/out/llvm-project/llvm/include/llvm/IR/Value.h:47](https://cs.corp.google.com/piper///depot/google3/tmpfs/src/git/out/llvm-project/llvm/include/llvm/IR/Value.h?l=47):7: note: forward declaration of 'llvm::Module'
47 | class Module;
| ^
/[tmpfs/src/git/out/llvm-project/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp:1029](https://cs.corp.google.com/piper///depot/google3/tmpfs/src/git/out/llvm-project/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp?l=1029):24: error: member access into incomplete type 'Module'
1029 | llvm::AttrBuilder B(M->getContext());
| ^
/[tmpfs/src/git/out/llvm-project/llvm/include/llvm/IR/Value.h:47](https://cs.corp.google.com/piper///depot/google3/tmpfs/src/git/out/llvm-project/llvm/include/llvm/IR/Value.h?l=47):7: note: forward declaration of 'llvm::Module'
47 | class Module;```
---
Patch is 53.68 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/97129.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 (+2-3)
- (modified) llvm/include/llvm/Transforms/IPO/Attributor.h (-1)
- (modified) llvm/include/llvm/Transforms/Utils/Debugify.h (+1-2)
- (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 (+1-2)
- (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 (+3-4)
- (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 (+1-2)
- (modified) polly/lib/Transform/DeLICM.cpp (-1)
``````````diff
diff --git a/clang/lib/Interpreter/DeviceOffload.cpp b/clang/lib/Interpreter/DeviceOffload.cpp
index 07c9e3005e5fd..fb42964e4936f 100644
--- a/clang/lib/Interpreter/DeviceOffload.cpp
+++ b/clang/lib/Interpreter/DeviceOffload.cpp
@@ -17,7 +17,6 @@
#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 dcdd9f82cde8e..f5c0127e1d422 100644
--- a/llvm/include/llvm/Analysis/TargetTransformInfo.h
+++ b/llvm/include/llvm/Analysis/TargetTransformInfo.h
@@ -21,7 +21,6 @@
#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 3c9495c1b372c..132571c694d4e 100644
--- a/llvm/include/llvm/Analysis/VectorUtils.h
+++ b/llvm/include/llvm/Analysis/VectorUtils.h
@@ -16,7 +16,6 @@
#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 6c80c771d40b4..4aaf7968e2897 100644
--- a/llvm/include/llvm/IR/Analysis.h
+++ b/llvm/include/llvm/IR/Analysis.h
@@ -13,12 +13,11 @@
#define LLVM_IR_ANALYSIS_H
#include "llvm/ADT/SmallPtrSet.h"
+#include "llvm/IR/Function.h"
+#include "llvm/IR/Module.h"
namespace llvm {
-class Function;
-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 f70fd02ca573c..6ba04dbc31db3 100644
--- a/llvm/include/llvm/Transforms/IPO/Attributor.h
+++ b/llvm/include/llvm/Transforms/IPO/Attributor.h
@@ -123,7 +123,6 @@
#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 10c8c5897b943..7981b9ec70364 100644
--- a/llvm/include/llvm/Transforms/Utils/Debugify.h
+++ b/llvm/include/llvm/Transforms/Utils/Debugify.h
@@ -19,9 +19,8 @@
#include "llvm/Bitcode/BitcodeWriterPass.h"
#include "llvm/IR/IRPrintingPasses.h"
#include "llvm/IR/LegacyPassManager.h"
-#include "llvm/IR/Module.h"
-#include "llvm/IR/PassInstrumentation.h"
#include "llvm/IR/PassManager.h"
+#include "llvm/IR/PassInstrumentation.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 672dae1642cb3..effa25f276dd2 100644
--- a/llvm/lib/Analysis/CallPrinter.cpp
+++ b/llvm/lib/Analysis/CallPrinter.cpp
@@ -20,7 +20,6 @@
#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 c6907cb128bb4..71dfcbc9b7bb7 100644
--- a/llvm/lib/Analysis/InlineAdvisor.cpp
+++ b/llvm/lib/Analysis/InlineAdvisor.cpp
@@ -23,7 +23,6 @@
#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 d8b03eaa3928f..ef4d14dbe6045 100644
--- a/llvm/lib/Analysis/LazyValueInfo.cpp
+++ b/llvm/lib/Analysis/LazyValueInfo.cpp
@@ -31,7 +31,6 @@
#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 6bb5f001e9bd1..6f89a01aea931 100644
--- a/llvm/lib/Analysis/LoopInfo.cpp
+++ b/llvm/lib/Analysis/LoopInfo.cpp
@@ -31,7 +31,6 @@
#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 3dc9e75b6168f..2159c45a8e5c5 100644
--- a/llvm/lib/Analysis/LoopPass.cpp
+++ b/llvm/lib/Analysis/LoopPass.cpp
@@ -16,7 +16,6 @@
#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 f4a782b4f168b..ec6f3780fe2e4 100644
--- a/llvm/lib/Analysis/MLInlineAdvisor.cpp
+++ b/llvm/lib/Analysis/MLInlineAdvisor.cpp
@@ -29,7 +29,6 @@
#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 24985f0a9d314..244ed5d55f3f8 100644
--- a/llvm/lib/Analysis/StructuralHash.cpp
+++ b/llvm/lib/Analysis/StructuralHash.cpp
@@ -12,7 +12,6 @@
//===----------------------------------------------------------------------===//
#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 bf53f562ec419..6b760fbde5bba 100644
--- a/llvm/lib/Analysis/TargetLibraryInfo.cpp
+++ b/llvm/lib/Analysis/TargetLibraryInfo.cpp
@@ -14,7 +14,6 @@
#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 e1cb63a9ab8f9..a9d5743bdaac0 100644
--- a/llvm/lib/Analysis/TypeBasedAliasAnalysis.cpp
+++ b/llvm/lib/Analysis/TypeBasedAliasAnalysis.cpp
@@ -110,7 +110,6 @@
#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 5d7c97adcacad..82b5ccdc70ea1 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AIXException.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AIXException.cpp
@@ -14,7 +14,6 @@
#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 25d4bbddd9851..24cd1b15a5736 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
@@ -18,7 +18,6 @@
#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 1a1e6f0117e2b..cd18703b359e1 100644
--- a/llvm/lib/CodeGen/AsmPrinter/WinCFGuard.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/WinCFGuard.cpp
@@ -17,7 +17,6 @@
#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 cbec482d4cdc5..0eef93f1128a6 100644
--- a/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
+++ b/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
@@ -23,7 +23,6 @@
#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 b5d88a7432b17..c3bf938551110 100644
--- a/llvm/lib/CodeGen/CFGuardLongjmp.cpp
+++ b/llvm/lib/CodeGen/CFGuardLongjmp.cpp
@@ -21,7 +21,6 @@
#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 f7c6580a73da5..b26aa792bb937 100644
--- a/llvm/lib/CodeGen/EHContGuardCatchret.cpp
+++ b/llvm/lib/CodeGen/EHContGuardCatchret.cpp
@@ -19,7 +19,6 @@
#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 e1af457c9b9d7..cad7d1f1137bb 100644
--- a/llvm/lib/CodeGen/GCMetadata.cpp
+++ b/llvm/lib/CodeGen/GCMetadata.cpp
@@ -14,7 +14,6 @@
#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 91c6ac2618279..bffa02ca8afd0 100644
--- a/llvm/lib/CodeGen/KCFI.cpp
+++ b/llvm/lib/CodeGen/KCFI.cpp
@@ -21,7 +21,6 @@
#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 9b703d5401cb9..874f726d29471 100644
--- a/llvm/lib/CodeGen/MachineCheckDebugify.cpp
+++ b/llvm/lib/CodeGen/MachineCheckDebugify.cpp
@@ -18,7 +18,6 @@
#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 62ac3e32d24d9..d57a912f418b7 100644
--- a/llvm/lib/CodeGen/MachineFunctionPass.cpp
+++ b/llvm/lib/CodeGen/MachineFunctionPass.cpp
@@ -26,7 +26,6 @@
#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 965539ddaca8d..aa63411df9651 100644
--- a/llvm/lib/CodeGen/MachineModuleSlotTracker.cpp
+++ b/llvm/lib/CodeGen/MachineModuleSlotTracker.cpp
@@ -9,7 +9,6 @@
#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 648036e5d89da..71288469b8f0f 100644
--- a/llvm/lib/CodeGen/RegAllocBase.cpp
+++ b/llvm/lib/CodeGen/RegAllocBase.cpp
@@ -23,7 +23,6 @@
#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 a1dccc4d59723..47ad9c168b923 100644
--- a/llvm/lib/CodeGen/RegAllocEvictionAdvisor.cpp
+++ b/llvm/lib/CodeGen/RegAllocEvictionAdvisor.cpp
@@ -17,7 +17,6 @@
#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 e5a34bccff8e1..796481501c74e 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -78,7 +78,6 @@
#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 c58c67b70fe3c..b4f8678963f1d 100644
--- a/llvm/lib/CodeGen/WinEHPrepare.cpp
+++ b/llvm/lib/CodeGen/WinEHPrepare.cpp
@@ -25,7 +25,6 @@
#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 540728ea0fd99..17a96dee1000b 100644
--- a/llvm/lib/ExecutionEngine/Orc/JITTargetMachineBuilder.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/JITTargetMachineBuilder.cpp
@@ -8,7 +8,6 @@
#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 bf8f7906d3368..64a6effe5c0db 100644
--- a/llvm/lib/IR/PassManager.cpp
+++ b/llvm/lib/IR/PassManager.cpp
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#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 2882ea9d14b23..8dff5418dedba 100644
--- a/llvm/lib/LTO/UpdateCompilerUsed.cpp
+++ b/llvm/lib/LTO/UpdateCompilerUsed.cpp
@@ -15,9 +15,8 @@
#include "llvm/CodeGen/TargetLowering.h"
#include "llvm/CodeGen/TargetSubtargetInfo.h"
#include "llvm/IR/Mangler.h"
-#include "llvm/IR/Module.h"
-#include "llvm/Target/TargetMachine.h"
#include "llvm/Transforms/Utils/ModuleUtils.h"
+#include "llvm/Target/TargetMachine.h"
using namespace llvm;
diff --git a/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp b/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
index 64d41d4147644..00b8d7bd257e4 100644
--- a/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
+++ b/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
@@ -43,7 +43,6 @@
#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 e3c5a143b2889..56fd15f23363d 100644
--- a/llvm/lib/Target/AArch64/AArch64FastISel.cpp
+++ b/llvm/lib/Target/AArch64/AArch64FastISel.cpp
@@ -55,7 +55,6 @@
#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 93278a2ba0d09..ee397db3fba6d 100644
--- a/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
+++ b/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
@@ -40,7 +40,6 @@
#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 3c0facd586732..1c1e87d723ac7 100644
--- a/llvm/lib/Target/AArch64/AArch64TargetObjectFile.cpp
+++ b/llvm/lib/Target/AArch64/AArch64TargetObjectFile.cpp
@@ -13,7 +13,6 @@
#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 aa0e9974667b7..05fd411b35e54 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUAliasAnalysis.h
+++ b/llvm/lib/Target/AMDGPU/AMDGPUAliasAnalysis.h
@@ -13,7 +13,6 @@
#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 5354ccf65b1cc..2d48be9ea542a 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUMachineModuleInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUMachineModuleInfo.cpp
@@ -13,7 +13,6 @@
//===----------------------------------------------------------------------===//
#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 c1a5e3b593748..195dc4f9a0f41 100644
--- a/llvm/lib/Target/AMDGPU/R600OpenCLImageTypeLoweringPass.cpp
+++ b/llvm/lib/Target/AMDGPU/R600OpenCLImageTypeLoweringPass.cpp
@@ -31,7 +31,6 @@
#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 bf6bb8c295efe..e81e6bb697588 100644
--- a/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
+++ b/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
@@ -49,7 +49,6 @@
#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 66d273e7ca9dd..ccc883f646a62 100644
--- a/llvm/lib/Target/ARM/ARMInstrInfo.cpp
+++ b/llvm/lib/Target/ARM/ARMInstrInfo.cpp
@@ -24,7 +24,6 @@
#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 75f5d80b2e...
[truncated]
``````````
</details>
https://github.com/llvm/llvm-project/pull/97129
More information about the llvm-commits
mailing list