Index: llvm/include/llvm/Analysis/AliasSetTracker.h =================================================================== --- llvm/include/llvm/Analysis/AliasSetTracker.h +++ llvm/include/llvm/Analysis/AliasSetTracker.h @@ -26,7 +26,6 @@ #include "llvm/IR/ValueHandle.h" #include #include -#include #include #include Index: llvm/include/llvm/Analysis/AssumeBundleQueries.h =================================================================== --- llvm/include/llvm/Analysis/AssumeBundleQueries.h +++ llvm/include/llvm/Analysis/AssumeBundleQueries.h @@ -15,12 +15,13 @@ #define LLVM_ANALYSIS_ASSUMEBUNDLEQUERIES_H #include "llvm/ADT/DenseMap.h" -#include "llvm/IR/Instructions.h" #include "llvm/IR/IntrinsicInst.h" 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 Index: llvm/include/llvm/Analysis/BasicAliasAnalysis.h =================================================================== --- llvm/include/llvm/Analysis/BasicAliasAnalysis.h +++ llvm/include/llvm/Analysis/BasicAliasAnalysis.h @@ -18,8 +18,6 @@ #include "llvm/Analysis/AliasAnalysis.h" #include "llvm/IR/PassManager.h" #include "llvm/Pass.h" -#include -#include #include #include Index: llvm/include/llvm/Analysis/CFGPrinter.h =================================================================== --- llvm/include/llvm/Analysis/CFGPrinter.h +++ llvm/include/llvm/Analysis/CFGPrinter.h @@ -18,7 +18,6 @@ #ifndef LLVM_ANALYSIS_CFGPRINTER_H #define LLVM_ANALYSIS_CFGPRINTER_H -#include "llvm/ADT/STLExtras.h" #include "llvm/Analysis/BlockFrequencyInfo.h" #include "llvm/Analysis/BranchProbabilityInfo.h" #include "llvm/Analysis/HeatUtils.h" @@ -27,10 +26,11 @@ #include "llvm/IR/Function.h" #include "llvm/IR/Instructions.h" #include "llvm/IR/PassManager.h" +#include "llvm/Support/DOTGraphTraits.h" #include "llvm/Support/FormatVariadic.h" -#include "llvm/Support/GraphWriter.h" namespace llvm { +template struct GraphTraits; class CFGViewerPass : public PassInfoMixin { public: PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM); Index: llvm/include/llvm/Analysis/CFLAndersAliasAnalysis.h =================================================================== --- llvm/include/llvm/Analysis/CFLAndersAliasAnalysis.h +++ llvm/include/llvm/Analysis/CFLAndersAliasAnalysis.h @@ -15,7 +15,6 @@ #define LLVM_ANALYSIS_CFLANDERSALIASANALYSIS_H #include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/Optional.h" #include "llvm/Analysis/AliasAnalysis.h" #include "llvm/Analysis/CFLAliasAnalysisUtils.h" #include "llvm/IR/PassManager.h" @@ -25,6 +24,7 @@ namespace llvm { +template class Optional; class Function; class MemoryLocation; class TargetLibraryInfo; Index: llvm/include/llvm/Analysis/CFLSteensAliasAnalysis.h =================================================================== --- llvm/include/llvm/Analysis/CFLSteensAliasAnalysis.h +++ llvm/include/llvm/Analysis/CFLSteensAliasAnalysis.h @@ -15,7 +15,6 @@ #define LLVM_ANALYSIS_CFLSTEENSALIASANALYSIS_H #include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/Optional.h" #include "llvm/Analysis/AliasAnalysis.h" #include "llvm/Analysis/CFLAliasAnalysisUtils.h" #include "llvm/Analysis/MemoryLocation.h" Index: llvm/include/llvm/Analysis/CGSCCPassManager.h =================================================================== --- llvm/include/llvm/Analysis/CGSCCPassManager.h +++ llvm/include/llvm/Analysis/CGSCCPassManager.h @@ -89,20 +89,20 @@ #define LLVM_ANALYSIS_CGSCCPASSMANAGER_H #include "llvm/ADT/MapVector.h" -#include "llvm/ADT/PriorityWorklist.h" #include "llvm/Analysis/LazyCallGraph.h" -#include "llvm/IR/Function.h" -#include "llvm/IR/InstIterator.h" #include "llvm/IR/PassManager.h" #include "llvm/IR/ValueHandle.h" #include "llvm/Support/raw_ostream.h" -#include #include #include namespace llvm { +class Function; +class Value; +template class SmallPriorityWorklist; struct CGSCCUpdateResult; + class Module; // Allow debug logging in this inline function. Index: llvm/include/llvm/Analysis/CallGraph.h =================================================================== --- llvm/include/llvm/Analysis/CallGraph.h +++ llvm/include/llvm/Analysis/CallGraph.h @@ -45,7 +45,6 @@ #ifndef LLVM_ANALYSIS_CALLGRAPH_H #define LLVM_ANALYSIS_CALLGRAPH_H -#include "llvm/ADT/GraphTraits.h" #include "llvm/IR/InstrTypes.h" #include "llvm/IR/Intrinsics.h" #include "llvm/IR/PassManager.h" @@ -59,6 +58,7 @@ namespace llvm { +template struct GraphTraits; class CallGraphNode; class Function; class Module; Index: llvm/include/llvm/Analysis/ConstantFolding.h =================================================================== --- llvm/include/llvm/Analysis/ConstantFolding.h +++ llvm/include/llvm/Analysis/ConstantFolding.h @@ -24,7 +24,6 @@ template class ArrayRef; class CallBase; class Constant; -class ConstantExpr; class DSOLocalEquivalent; class DataLayout; class Function; Index: llvm/include/llvm/Analysis/DDG.h =================================================================== --- llvm/include/llvm/Analysis/DDG.h +++ llvm/include/llvm/Analysis/DDG.h @@ -18,9 +18,11 @@ #include "llvm/Analysis/DependenceAnalysis.h" #include "llvm/Analysis/DependenceGraphBuilder.h" #include "llvm/Analysis/LoopAnalysisManager.h" -#include "llvm/IR/Instructions.h" namespace llvm { +class Function; +class Loop; +class LoopInfo; class DDGNode; class DDGEdge; using DDGNodeBase = DGNode; Index: llvm/include/llvm/Analysis/DDGPrinter.h =================================================================== --- llvm/include/llvm/Analysis/DDGPrinter.h +++ llvm/include/llvm/Analysis/DDGPrinter.h @@ -16,10 +16,11 @@ #define LLVM_ANALYSIS_DDGPRINTER_H #include "llvm/Analysis/DDG.h" -#include "llvm/Pass.h" #include "llvm/Support/DOTGraphTraits.h" namespace llvm { +class LPMUpdater; +class Loop; //===--------------------------------------------------------------------===// // Implementation of DDG DOT Printer for a loop. Index: llvm/include/llvm/Analysis/DOTGraphTraitsPass.h =================================================================== --- llvm/include/llvm/Analysis/DOTGraphTraitsPass.h +++ llvm/include/llvm/Analysis/DOTGraphTraitsPass.h @@ -14,6 +14,8 @@ #define LLVM_ANALYSIS_DOTGRAPHTRAITSPASS_H #include "llvm/Analysis/CFGPrinter.h" +#include "llvm/Support/FileSystem.h" +#include "llvm/Support/GraphWriter.h" namespace llvm { Index: llvm/include/llvm/Analysis/Delinearization.h =================================================================== --- llvm/include/llvm/Analysis/Delinearization.h +++ llvm/include/llvm/Analysis/Delinearization.h @@ -16,11 +16,11 @@ #ifndef LLVM_ANALYSIS_DELINEARIZATION_H #define LLVM_ANALYSIS_DELINEARIZATION_H -#include "llvm/ADT/SmallVector.h" #include "llvm/IR/PassManager.h" -#include "llvm/Support/raw_ostream.h" namespace llvm { +class raw_ostream; +template class SmallVectorImpl; class GetElementPtrInst; class ScalarEvolution; class SCEV; Index: llvm/include/llvm/Analysis/DivergenceAnalysis.h =================================================================== --- llvm/include/llvm/Analysis/DivergenceAnalysis.h +++ llvm/include/llvm/Analysis/DivergenceAnalysis.h @@ -17,9 +17,7 @@ #include "llvm/ADT/DenseSet.h" #include "llvm/Analysis/SyncDependenceAnalysis.h" -#include "llvm/IR/Function.h" #include "llvm/IR/PassManager.h" -#include "llvm/Pass.h" #include namespace llvm { Index: llvm/include/llvm/Analysis/FunctionPropertiesAnalysis.h =================================================================== --- llvm/include/llvm/Analysis/FunctionPropertiesAnalysis.h +++ llvm/include/llvm/Analysis/FunctionPropertiesAnalysis.h @@ -14,11 +14,11 @@ #ifndef LLVM_ANALYSIS_FUNCTIONPROPERTIESANALYSIS_H #define LLVM_ANALYSIS_FUNCTIONPROPERTIESANALYSIS_H -#include "llvm/Analysis/LoopInfo.h" #include "llvm/IR/PassManager.h" namespace llvm { class Function; +class LoopInfo; class FunctionPropertiesInfo { public: Index: llvm/include/llvm/Analysis/GlobalsModRef.h =================================================================== --- llvm/include/llvm/Analysis/GlobalsModRef.h +++ llvm/include/llvm/Analysis/GlobalsModRef.h @@ -14,7 +14,6 @@ #define LLVM_ANALYSIS_GLOBALSMODREF_H #include "llvm/Analysis/AliasAnalysis.h" -#include "llvm/IR/Constants.h" #include "llvm/IR/ValueHandle.h" #include "llvm/Pass.h" #include Index: llvm/include/llvm/Analysis/IVDescriptors.h =================================================================== --- llvm/include/llvm/Analysis/IVDescriptors.h +++ llvm/include/llvm/Analysis/IVDescriptors.h @@ -17,7 +17,6 @@ #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallVector.h" #include "llvm/IR/IntrinsicInst.h" -#include "llvm/IR/Operator.h" #include "llvm/IR/ValueHandle.h" namespace llvm { Index: llvm/include/llvm/Analysis/IVUsers.h =================================================================== --- llvm/include/llvm/Analysis/IVUsers.h +++ llvm/include/llvm/Analysis/IVUsers.h @@ -23,8 +23,6 @@ class AssumptionCache; class DominatorTree; -class Instruction; -class Value; class ScalarEvolution; class SCEV; class IVUsers; Index: llvm/include/llvm/Analysis/InlineAdvisor.h =================================================================== --- llvm/include/llvm/Analysis/InlineAdvisor.h +++ llvm/include/llvm/Analysis/InlineAdvisor.h @@ -11,17 +11,17 @@ #include "llvm/Analysis/InlineCost.h" #include "llvm/Analysis/LazyCallGraph.h" -#include "llvm/Analysis/Utils/ImportedFunctionsInliningStatistics.h" #include "llvm/Config/llvm-config.h" #include "llvm/IR/PassManager.h" #include -#include namespace llvm { class BasicBlock; class CallBase; class Function; class Module; +class OptimizationRemark; +class ImportedFunctionsInliningStatistics; class OptimizationRemarkEmitter; struct ReplayInlinerSettings; Index: llvm/include/llvm/Analysis/InlineCost.h =================================================================== --- llvm/include/llvm/Analysis/InlineCost.h +++ llvm/include/llvm/Analysis/InlineCost.h @@ -13,13 +13,17 @@ #ifndef LLVM_ANALYSIS_INLINECOST_H #define LLVM_ANALYSIS_INLINECOST_H -#include "llvm/Analysis/AssumptionCache.h" +#include "llvm/ADT/APInt.h" +#include "llvm/ADT/Optional.h" +#include "llvm/ADT/STLFunctionalExtras.h" #include "llvm/Analysis/InlineModelFeatureMaps.h" -#include "llvm/Analysis/OptimizationRemarkEmitter.h" +#include "llvm/IR/PassManager.h" #include #include namespace llvm { +class AssumptionCache; +class OptimizationRemarkEmitter; class BlockFrequencyInfo; class CallBase; class DataLayout; Index: llvm/include/llvm/Analysis/LoopCacheAnalysis.h =================================================================== --- llvm/include/llvm/Analysis/LoopCacheAnalysis.h +++ llvm/include/llvm/Analysis/LoopCacheAnalysis.h @@ -16,7 +16,6 @@ #include "llvm/Analysis/LoopAnalysisManager.h" #include "llvm/IR/PassManager.h" -#include "llvm/Support/raw_ostream.h" namespace llvm { @@ -24,6 +23,9 @@ class DependenceInfo; class Instruction; class LPMUpdater; +class raw_ostream; +class LoopInfo; +class Loop; class ScalarEvolution; class SCEV; class TargetTransformInfo; Index: llvm/include/llvm/Analysis/LoopPass.h =================================================================== --- llvm/include/llvm/Analysis/LoopPass.h +++ llvm/include/llvm/Analysis/LoopPass.h @@ -14,13 +14,14 @@ #ifndef LLVM_ANALYSIS_LOOPPASS_H #define LLVM_ANALYSIS_LOOPPASS_H -#include "llvm/Analysis/LoopInfo.h" #include "llvm/IR/LegacyPassManagers.h" #include "llvm/Pass.h" #include namespace llvm { +class Loop; +class LoopInfo; class LPPassManager; class Function; Index: llvm/include/llvm/Analysis/LoopUnrollAnalyzer.h =================================================================== --- llvm/include/llvm/Analysis/LoopUnrollAnalyzer.h +++ llvm/include/llvm/Analysis/LoopUnrollAnalyzer.h @@ -15,8 +15,9 @@ #ifndef LLVM_ANALYSIS_LOOPUNROLLANALYZER_H #define LLVM_ANALYSIS_LOOPUNROLLANALYZER_H -#include "llvm/Analysis/InstructionSimplify.h" -#include "llvm/Analysis/ScalarEvolutionExpressions.h" +#include "llvm/ADT/APInt.h" +#include "llvm/ADT/DenseMap.h" +#include "llvm/Analysis/ScalarEvolution.h" #include "llvm/IR/InstVisitor.h" // This class is used to get an estimate of the optimization effects that we Index: llvm/include/llvm/Analysis/MLInlineAdvisor.h =================================================================== --- llvm/include/llvm/Analysis/MLInlineAdvisor.h +++ llvm/include/llvm/Analysis/MLInlineAdvisor.h @@ -19,6 +19,7 @@ #include namespace llvm { +class DiagnosticInfoOptimizationBase; class Module; class MLInlineAdvice; Index: llvm/include/llvm/Analysis/MemorySSA.h =================================================================== --- llvm/include/llvm/Analysis/MemorySSA.h +++ llvm/include/llvm/Analysis/MemorySSA.h @@ -73,7 +73,6 @@ #define LLVM_ANALYSIS_MEMORYSSA_H #include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/GraphTraits.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/ilist_node.h" @@ -95,6 +94,7 @@ namespace llvm { +template struct GraphTraits; class BasicBlock; class Function; class Instruction; Index: llvm/include/llvm/Analysis/MemorySSAUpdater.h =================================================================== --- llvm/include/llvm/Analysis/MemorySSAUpdater.h +++ llvm/include/llvm/Analysis/MemorySSAUpdater.h @@ -31,7 +31,6 @@ #ifndef LLVM_ANALYSIS_MEMORYSSAUPDATER_H #define LLVM_ANALYSIS_MEMORYSSAUPDATER_H -#include "llvm/ADT/SetVector.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallSet.h" #include "llvm/ADT/SmallVector.h" @@ -39,7 +38,6 @@ #include "llvm/IR/ValueHandle.h" #include "llvm/IR/ValueMap.h" #include "llvm/Support/CFGDiff.h" -#include namespace llvm { @@ -47,6 +45,7 @@ class DominatorTree; class Instruction; class LoopBlocksRPO; +template class SmallSetVector; using ValueToValueMapTy = ValueMap; using PhiToDefMap = SmallDenseMap; Index: llvm/include/llvm/Analysis/PhiValues.h =================================================================== --- llvm/include/llvm/Analysis/PhiValues.h +++ llvm/include/llvm/Analysis/PhiValues.h @@ -22,7 +22,6 @@ #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/DenseSet.h" #include "llvm/ADT/SetVector.h" -#include "llvm/ADT/SmallVector.h" #include "llvm/IR/PassManager.h" #include "llvm/IR/ValueHandle.h" #include "llvm/Pass.h" Index: llvm/include/llvm/Analysis/PtrUseVisitor.h =================================================================== --- llvm/include/llvm/Analysis/PtrUseVisitor.h +++ llvm/include/llvm/Analysis/PtrUseVisitor.h @@ -29,7 +29,6 @@ #include "llvm/IR/DerivedTypes.h" #include "llvm/IR/InstVisitor.h" #include "llvm/IR/IntrinsicInst.h" -#include #include #include Index: llvm/include/llvm/Analysis/ReplayInlineAdvisor.h =================================================================== --- llvm/include/llvm/Analysis/ReplayInlineAdvisor.h +++ llvm/include/llvm/Analysis/ReplayInlineAdvisor.h @@ -11,11 +11,11 @@ #include "llvm/ADT/StringSet.h" #include "llvm/Analysis/InlineAdvisor.h" -#include "llvm/IR/LLVMContext.h" namespace llvm { class CallBase; class Function; +class LLVMContext; class Module; struct CallSiteFormat { Index: llvm/include/llvm/Analysis/ScalarEvolution.h =================================================================== --- llvm/include/llvm/Analysis/ScalarEvolution.h +++ llvm/include/llvm/Analysis/ScalarEvolution.h @@ -33,12 +33,10 @@ #include "llvm/IR/ConstantRange.h" #include "llvm/IR/InstrTypes.h" #include "llvm/IR/Instructions.h" -#include "llvm/IR/Operator.h" #include "llvm/IR/PassManager.h" #include "llvm/IR/ValueHandle.h" #include "llvm/IR/ValueMap.h" #include "llvm/Pass.h" -#include #include #include #include @@ -46,6 +44,7 @@ namespace llvm { +class OverflowingBinaryOperator; class AssumptionCache; class BasicBlock; class Constant; Index: llvm/include/llvm/Analysis/ScalarEvolutionAliasAnalysis.h =================================================================== --- llvm/include/llvm/Analysis/ScalarEvolutionAliasAnalysis.h +++ llvm/include/llvm/Analysis/ScalarEvolutionAliasAnalysis.h @@ -14,12 +14,13 @@ #define LLVM_ANALYSIS_SCALAREVOLUTIONALIASANALYSIS_H #include "llvm/Analysis/AliasAnalysis.h" -#include "llvm/Analysis/ScalarEvolutionExpressions.h" #include "llvm/Pass.h" namespace llvm { class Function; +class ScalarEvolution; +class SCEV; /// A simple alias analysis implementation that uses ScalarEvolution to answer /// queries. Index: llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h =================================================================== --- llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h +++ llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h @@ -18,6 +18,7 @@ #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/iterator_range.h" #include "llvm/Analysis/ScalarEvolution.h" +#include "llvm/IR/Constants.h" #include "llvm/IR/ValueHandle.h" #include "llvm/Support/Casting.h" #include "llvm/Support/ErrorHandling.h" Index: llvm/include/llvm/Analysis/ScalarEvolutionNormalization.h =================================================================== --- llvm/include/llvm/Analysis/ScalarEvolutionNormalization.h +++ llvm/include/llvm/Analysis/ScalarEvolutionNormalization.h @@ -35,7 +35,7 @@ #ifndef LLVM_ANALYSIS_SCALAREVOLUTIONNORMALIZATION_H #define LLVM_ANALYSIS_SCALAREVOLUTIONNORMALIZATION_H -#include "llvm/ADT/STLExtras.h" +#include "llvm/ADT/STLFunctionalExtras.h" #include "llvm/ADT/SmallPtrSet.h" namespace llvm { Index: llvm/include/llvm/Analysis/StackLifetime.h =================================================================== --- llvm/include/llvm/Analysis/StackLifetime.h +++ llvm/include/llvm/Analysis/StackLifetime.h @@ -16,7 +16,6 @@ #include "llvm/ADT/StringExtras.h" #include "llvm/IR/PassManager.h" #include "llvm/Support/raw_ostream.h" -#include #include namespace llvm { Index: llvm/include/llvm/Analysis/SyncDependenceAnalysis.h =================================================================== --- llvm/include/llvm/Analysis/SyncDependenceAnalysis.h +++ llvm/include/llvm/Analysis/SyncDependenceAnalysis.h @@ -16,11 +16,11 @@ #ifndef LLVM_ANALYSIS_SYNCDEPENDENCEANALYSIS_H #define LLVM_ANALYSIS_SYNCDEPENDENCEANALYSIS_H -#include "llvm/ADT/PostOrderIterator.h" #include "llvm/ADT/SmallPtrSet.h" #include #include #include +#include namespace llvm { Index: llvm/include/llvm/Analysis/SyntheticCountsUtils.h =================================================================== --- llvm/include/llvm/Analysis/SyntheticCountsUtils.h +++ llvm/include/llvm/Analysis/SyntheticCountsUtils.h @@ -13,7 +13,7 @@ #ifndef LLVM_ANALYSIS_SYNTHETICCOUNTSUTILS_H #define LLVM_ANALYSIS_SYNTHETICCOUNTSUTILS_H -#include "llvm/ADT/STLExtras.h" +#include "llvm/ADT/STLFunctionalExtras.h" #include "llvm/Analysis/CallGraph.h" #include "llvm/Support/ScaledNumber.h" Index: llvm/include/llvm/Analysis/TargetTransformInfo.h =================================================================== --- llvm/include/llvm/Analysis/TargetTransformInfo.h +++ llvm/include/llvm/Analysis/TargetTransformInfo.h @@ -21,8 +21,8 @@ #ifndef LLVM_ANALYSIS_TARGETTRANSFORMINFO_H #define LLVM_ANALYSIS_TARGETTRANSFORMINFO_H +#include "llvm/IR/FMF.h" #include "llvm/IR/InstrTypes.h" -#include "llvm/IR/Operator.h" #include "llvm/IR/PassManager.h" #include "llvm/Pass.h" #include "llvm/Support/AtomicOrdering.h" Index: llvm/include/llvm/Analysis/TypeMetadataUtils.h =================================================================== --- llvm/include/llvm/Analysis/TypeMetadataUtils.h +++ llvm/include/llvm/Analysis/TypeMetadataUtils.h @@ -14,11 +14,11 @@ #ifndef LLVM_ANALYSIS_TYPEMETADATAUTILS_H #define LLVM_ANALYSIS_TYPEMETADATAUTILS_H -#include "llvm/ADT/SmallVector.h" #include namespace llvm { +template class SmallVectorImpl; class CallBase; class CallInst; class Constant; Index: llvm/include/llvm/Analysis/ValueTracking.h =================================================================== --- llvm/include/llvm/Analysis/ValueTracking.h +++ llvm/include/llvm/Analysis/ValueTracking.h @@ -21,12 +21,12 @@ #include "llvm/IR/DataLayout.h" #include "llvm/IR/InstrTypes.h" #include "llvm/IR/Intrinsics.h" -#include "llvm/IR/Operator.h" #include #include namespace llvm { +class Operator; class AddOperator; class AllocaInst; class APInt; Index: llvm/include/llvm/Transforms/IPO/Attributor.h =================================================================== --- llvm/include/llvm/Transforms/IPO/Attributor.h +++ llvm/include/llvm/Transforms/IPO/Attributor.h @@ -116,6 +116,7 @@ #include "llvm/Analysis/TargetLibraryInfo.h" #include "llvm/IR/AbstractCallSite.h" #include "llvm/IR/ConstantRange.h" +#include "llvm/IR/InstIterator.h" #include "llvm/IR/PassManager.h" #include "llvm/Support/Allocator.h" #include "llvm/Support/Casting.h" Index: llvm/lib/Analysis/AliasAnalysis.cpp =================================================================== --- llvm/lib/Analysis/AliasAnalysis.cpp +++ llvm/lib/Analysis/AliasAnalysis.cpp @@ -42,7 +42,6 @@ #include "llvm/IR/BasicBlock.h" #include "llvm/IR/Instruction.h" #include "llvm/IR/Instructions.h" -#include "llvm/IR/Module.h" #include "llvm/IR/Type.h" #include "llvm/IR/Value.h" #include "llvm/InitializePasses.h" Index: llvm/lib/Analysis/AliasAnalysisEvaluator.cpp =================================================================== --- llvm/lib/Analysis/AliasAnalysisEvaluator.cpp +++ llvm/lib/Analysis/AliasAnalysisEvaluator.cpp @@ -11,7 +11,6 @@ #include "llvm/Analysis/AliasAnalysis.h" #include "llvm/IR/Constants.h" #include "llvm/IR/DataLayout.h" -#include "llvm/IR/DerivedTypes.h" #include "llvm/IR/Function.h" #include "llvm/IR/InstIterator.h" #include "llvm/IR/Instructions.h" @@ -19,7 +18,6 @@ #include "llvm/InitializePasses.h" #include "llvm/Pass.h" #include "llvm/Support/CommandLine.h" -#include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" using namespace llvm; Index: llvm/lib/Analysis/AliasSetTracker.cpp =================================================================== --- llvm/lib/Analysis/AliasSetTracker.cpp +++ llvm/lib/Analysis/AliasSetTracker.cpp @@ -13,16 +13,12 @@ #include "llvm/Analysis/AliasSetTracker.h" #include "llvm/Analysis/AliasAnalysis.h" #include "llvm/Analysis/GuardUtils.h" -#include "llvm/Analysis/LoopInfo.h" #include "llvm/Analysis/MemoryLocation.h" #include "llvm/Config/llvm-config.h" -#include "llvm/IR/Constants.h" -#include "llvm/IR/DataLayout.h" #include "llvm/IR/Function.h" #include "llvm/IR/InstIterator.h" #include "llvm/IR/Instructions.h" #include "llvm/IR/IntrinsicInst.h" -#include "llvm/IR/Module.h" #include "llvm/IR/PassManager.h" #include "llvm/IR/PatternMatch.h" #include "llvm/IR/Value.h" Index: llvm/lib/Analysis/AssumeBundleQueries.cpp =================================================================== --- llvm/lib/Analysis/AssumeBundleQueries.cpp +++ llvm/lib/Analysis/AssumeBundleQueries.cpp @@ -10,8 +10,8 @@ #include "llvm/ADT/Statistic.h" #include "llvm/Analysis/AssumptionCache.h" #include "llvm/Analysis/ValueTracking.h" -#include "llvm/IR/Function.h" -#include "llvm/IR/InstIterator.h" +#include "llvm/IR/Instruction.h" +#include "llvm/IR/Instructions.h" #include "llvm/IR/IntrinsicInst.h" #include "llvm/IR/PatternMatch.h" #include "llvm/Support/DebugCounter.h" Index: llvm/lib/Analysis/AssumptionCache.cpp =================================================================== --- llvm/lib/Analysis/AssumptionCache.cpp +++ llvm/lib/Analysis/AssumptionCache.cpp @@ -11,18 +11,17 @@ // //===----------------------------------------------------------------------===// -#include "llvm/Analysis/AssumeBundleQueries.h" #include "llvm/Analysis/AssumptionCache.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallVector.h" +#include "llvm/Analysis/AssumeBundleQueries.h" #include "llvm/Analysis/TargetTransformInfo.h" #include "llvm/IR/BasicBlock.h" #include "llvm/IR/Function.h" #include "llvm/IR/InstrTypes.h" #include "llvm/IR/Instruction.h" #include "llvm/IR/Instructions.h" -#include "llvm/IR/Intrinsics.h" #include "llvm/IR/PassManager.h" #include "llvm/IR/PatternMatch.h" #include "llvm/InitializePasses.h" @@ -31,7 +30,6 @@ #include "llvm/Support/CommandLine.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/raw_ostream.h" -#include #include #include Index: llvm/lib/Analysis/BasicAliasAnalysis.cpp =================================================================== --- llvm/lib/Analysis/BasicAliasAnalysis.cpp +++ llvm/lib/Analysis/BasicAliasAnalysis.cpp @@ -22,7 +22,6 @@ #include "llvm/Analysis/AssumptionCache.h" #include "llvm/Analysis/CFG.h" #include "llvm/Analysis/CaptureTracking.h" -#include "llvm/Analysis/InstructionSimplify.h" #include "llvm/Analysis/MemoryBuiltins.h" #include "llvm/Analysis/MemoryLocation.h" #include "llvm/Analysis/PhiValues.h" @@ -45,7 +44,6 @@ #include "llvm/IR/Instructions.h" #include "llvm/IR/IntrinsicInst.h" #include "llvm/IR/Intrinsics.h" -#include "llvm/IR/Metadata.h" #include "llvm/IR/Operator.h" #include "llvm/IR/Type.h" #include "llvm/IR/User.h" Index: llvm/lib/Analysis/BlockFrequencyInfo.cpp =================================================================== --- llvm/lib/Analysis/BlockFrequencyInfo.cpp +++ llvm/lib/Analysis/BlockFrequencyInfo.cpp @@ -25,7 +25,6 @@ #include "llvm/Support/CommandLine.h" #include "llvm/Support/GraphWriter.h" #include "llvm/Support/raw_ostream.h" -#include #include #include Index: llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp =================================================================== --- llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp +++ llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp @@ -13,7 +13,6 @@ #include "llvm/Analysis/BlockFrequencyInfoImpl.h" #include "llvm/ADT/APInt.h" #include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/GraphTraits.h" #include "llvm/ADT/None.h" #include "llvm/ADT/SCCIterator.h" #include "llvm/Config/llvm-config.h" @@ -22,8 +21,8 @@ #include "llvm/Support/BranchProbability.h" #include "llvm/Support/Compiler.h" #include "llvm/Support/Debug.h" -#include "llvm/Support/ScaledNumber.h" #include "llvm/Support/MathExtras.h" +#include "llvm/Support/ScaledNumber.h" #include "llvm/Support/raw_ostream.h" #include #include Index: llvm/lib/Analysis/CFGPrinter.cpp =================================================================== --- llvm/lib/Analysis/CFGPrinter.cpp +++ llvm/lib/Analysis/CFGPrinter.cpp @@ -23,7 +23,7 @@ #include "llvm/Pass.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/FileSystem.h" -#include +#include "llvm/Support/GraphWriter.h" using namespace llvm; Index: llvm/lib/Analysis/CGSCCPassManager.cpp =================================================================== --- llvm/lib/Analysis/CGSCCPassManager.cpp +++ llvm/lib/Analysis/CGSCCPassManager.cpp @@ -9,6 +9,7 @@ #include "llvm/Analysis/CGSCCPassManager.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/Optional.h" +#include "llvm/ADT/PriorityWorklist.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SetVector.h" #include "llvm/ADT/SmallPtrSet.h" @@ -27,7 +28,6 @@ #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/TimeProfiler.h" #include "llvm/Support/raw_ostream.h" -#include #include #include Index: llvm/lib/Analysis/CallGraph.cpp =================================================================== --- llvm/lib/Analysis/CallGraph.cpp +++ llvm/lib/Analysis/CallGraph.cpp @@ -21,7 +21,6 @@ #include "llvm/Support/Compiler.h" #include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" -#include #include using namespace llvm; Index: llvm/lib/Analysis/CallGraphSCCPass.cpp =================================================================== --- llvm/lib/Analysis/CallGraphSCCPass.cpp +++ llvm/lib/Analysis/CallGraphSCCPass.cpp @@ -28,7 +28,6 @@ #include "llvm/IR/OptBisect.h" #include "llvm/IR/PassTimingInfo.h" #include "llvm/IR/PrintPasses.h" -#include "llvm/IR/StructuralHash.h" #include "llvm/Pass.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" @@ -39,6 +38,10 @@ #include #include +#ifdef EXPENSIVE_CHECKS +#include "llvm/IR/StructuralHash.h" +#endif + using namespace llvm; #define DEBUG_TYPE "cgscc-passmgr" Index: llvm/lib/Analysis/CallPrinter.cpp =================================================================== --- llvm/lib/Analysis/CallPrinter.cpp +++ llvm/lib/Analysis/CallPrinter.cpp @@ -14,18 +14,23 @@ //===----------------------------------------------------------------------===// #include "llvm/Analysis/CallPrinter.h" +#include "llvm/ADT/DenseMap.h" +#include "llvm/ADT/SmallSet.h" #include "llvm/Analysis/BlockFrequencyInfo.h" -#include "llvm/Analysis/BranchProbabilityInfo.h" #include "llvm/Analysis/CallGraph.h" -#include "llvm/Analysis/DOTGraphTraitsPass.h" #include "llvm/Analysis/HeatUtils.h" -#include "llvm/Support/CommandLine.h" +#include "llvm/IR/Instructions.h" #include "llvm/InitializePasses.h" -#include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/SmallSet.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/DOTGraphTraits.h" +#include "llvm/Support/GraphWriter.h" using namespace llvm; +namespace llvm { +template struct GraphTraits; +} + // This option shows static (relative) call counts. // FIXME: // Need to show real counts when profile data is available Index: llvm/lib/Analysis/CodeMetrics.cpp =================================================================== --- llvm/lib/Analysis/CodeMetrics.cpp +++ llvm/lib/Analysis/CodeMetrics.cpp @@ -15,7 +15,6 @@ #include "llvm/Analysis/AssumptionCache.h" #include "llvm/Analysis/LoopInfo.h" #include "llvm/Analysis/TargetTransformInfo.h" -#include "llvm/Analysis/ValueTracking.h" #include "llvm/IR/Function.h" #include "llvm/Support/Debug.h" #include "llvm/Support/InstructionCost.h" Index: llvm/lib/Analysis/ConstantFolding.cpp =================================================================== --- llvm/lib/Analysis/ConstantFolding.cpp +++ llvm/lib/Analysis/ConstantFolding.cpp @@ -57,7 +57,6 @@ #include #include #include -#include #include using namespace llvm; Index: llvm/lib/Analysis/ConstraintSystem.cpp =================================================================== --- llvm/lib/Analysis/ConstraintSystem.cpp +++ llvm/lib/Analysis/ConstraintSystem.cpp @@ -12,7 +12,6 @@ #include "llvm/ADT/StringExtras.h" #include "llvm/Support/Debug.h" -#include #include using namespace llvm; Index: llvm/lib/Analysis/CostModel.cpp =================================================================== --- llvm/lib/Analysis/CostModel.cpp +++ llvm/lib/Analysis/CostModel.cpp @@ -17,7 +17,6 @@ //===----------------------------------------------------------------------===// #include "llvm/Analysis/CostModel.h" -#include "llvm/ADT/STLExtras.h" #include "llvm/Analysis/Passes.h" #include "llvm/Analysis/TargetTransformInfo.h" #include "llvm/IR/Function.h" @@ -25,7 +24,6 @@ #include "llvm/InitializePasses.h" #include "llvm/Pass.h" #include "llvm/Support/CommandLine.h" -#include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" using namespace llvm; Index: llvm/lib/Analysis/CycleAnalysis.cpp =================================================================== --- llvm/lib/Analysis/CycleAnalysis.cpp +++ llvm/lib/Analysis/CycleAnalysis.cpp @@ -8,11 +8,15 @@ #include "llvm/Analysis/CycleAnalysis.h" #include "llvm/ADT/GenericCycleImpl.h" -#include "llvm/IR/CFG.h" +#include "llvm/IR/CFG.h" // for successors found by ADL in GenericCycleImpl.h #include "llvm/InitializePasses.h" using namespace llvm; +namespace llvm { +class Module; +} + template class llvm::GenericCycleInfo; template class llvm::GenericCycle; Index: llvm/lib/Analysis/Delinearization.cpp =================================================================== --- llvm/lib/Analysis/Delinearization.cpp +++ llvm/lib/Analysis/Delinearization.cpp @@ -24,9 +24,7 @@ #include "llvm/IR/Function.h" #include "llvm/IR/InstIterator.h" #include "llvm/IR/Instructions.h" -#include "llvm/IR/LLVMContext.h" #include "llvm/IR/PassManager.h" -#include "llvm/IR/Type.h" #include "llvm/InitializePasses.h" #include "llvm/Pass.h" #include "llvm/Support/Debug.h" Index: llvm/lib/Analysis/DemandedBits.cpp =================================================================== --- llvm/lib/Analysis/DemandedBits.cpp +++ llvm/lib/Analysis/DemandedBits.cpp @@ -21,19 +21,13 @@ #include "llvm/Analysis/DemandedBits.h" #include "llvm/ADT/APInt.h" #include "llvm/ADT/SetVector.h" -#include "llvm/ADT/StringExtras.h" #include "llvm/Analysis/AssumptionCache.h" #include "llvm/Analysis/ValueTracking.h" -#include "llvm/IR/BasicBlock.h" -#include "llvm/IR/Constants.h" #include "llvm/IR/DataLayout.h" -#include "llvm/IR/DerivedTypes.h" #include "llvm/IR/Dominators.h" #include "llvm/IR/InstIterator.h" -#include "llvm/IR/InstrTypes.h" #include "llvm/IR/Instruction.h" #include "llvm/IR/IntrinsicInst.h" -#include "llvm/IR/Intrinsics.h" #include "llvm/IR/Module.h" #include "llvm/IR/Operator.h" #include "llvm/IR/PassManager.h" Index: llvm/lib/Analysis/DependenceAnalysis.cpp =================================================================== --- llvm/lib/Analysis/DependenceAnalysis.cpp +++ llvm/lib/Analysis/DependenceAnalysis.cpp @@ -50,7 +50,6 @@ //===----------------------------------------------------------------------===// #include "llvm/Analysis/DependenceAnalysis.h" -#include "llvm/ADT/STLExtras.h" #include "llvm/ADT/Statistic.h" #include "llvm/Analysis/AliasAnalysis.h" #include "llvm/Analysis/Delinearization.h" @@ -58,10 +57,8 @@ #include "llvm/Analysis/ScalarEvolution.h" #include "llvm/Analysis/ScalarEvolutionExpressions.h" #include "llvm/Analysis/ValueTracking.h" -#include "llvm/Config/llvm-config.h" #include "llvm/IR/InstIterator.h" #include "llvm/IR/Module.h" -#include "llvm/IR/Operator.h" #include "llvm/InitializePasses.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" Index: llvm/lib/Analysis/DivergenceAnalysis.cpp =================================================================== --- llvm/lib/Analysis/DivergenceAnalysis.cpp +++ llvm/lib/Analysis/DivergenceAnalysis.cpp @@ -73,15 +73,14 @@ //===----------------------------------------------------------------------===// #include "llvm/Analysis/DivergenceAnalysis.h" +#include "llvm/ADT/PostOrderIterator.h" #include "llvm/Analysis/CFG.h" #include "llvm/Analysis/LoopInfo.h" -#include "llvm/Analysis/Passes.h" #include "llvm/Analysis/PostDominators.h" #include "llvm/Analysis/TargetTransformInfo.h" #include "llvm/IR/Dominators.h" #include "llvm/IR/InstIterator.h" #include "llvm/IR/Instructions.h" -#include "llvm/IR/IntrinsicInst.h" #include "llvm/IR/Value.h" #include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" Index: llvm/lib/Analysis/DominanceFrontier.cpp =================================================================== --- llvm/lib/Analysis/DominanceFrontier.cpp +++ llvm/lib/Analysis/DominanceFrontier.cpp @@ -15,7 +15,6 @@ #include "llvm/InitializePasses.h" #include "llvm/Pass.h" #include "llvm/Support/Compiler.h" -#include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" using namespace llvm; Index: llvm/lib/Analysis/FunctionPropertiesAnalysis.cpp =================================================================== --- llvm/lib/Analysis/FunctionPropertiesAnalysis.cpp +++ llvm/lib/Analysis/FunctionPropertiesAnalysis.cpp @@ -12,6 +12,7 @@ //===----------------------------------------------------------------------===// #include "llvm/Analysis/FunctionPropertiesAnalysis.h" +#include "llvm/Analysis/LoopInfo.h" #include "llvm/IR/Instructions.h" using namespace llvm; Index: llvm/lib/Analysis/GlobalsModRef.cpp =================================================================== --- llvm/lib/Analysis/GlobalsModRef.cpp +++ llvm/lib/Analysis/GlobalsModRef.cpp @@ -21,7 +21,6 @@ #include "llvm/Analysis/MemoryBuiltins.h" #include "llvm/Analysis/TargetLibraryInfo.h" #include "llvm/Analysis/ValueTracking.h" -#include "llvm/IR/DerivedTypes.h" #include "llvm/IR/InstIterator.h" #include "llvm/IR/Instructions.h" #include "llvm/IR/IntrinsicInst.h" Index: llvm/lib/Analysis/IVDescriptors.cpp =================================================================== --- llvm/lib/Analysis/IVDescriptors.cpp +++ llvm/lib/Analysis/IVDescriptors.cpp @@ -11,26 +11,16 @@ //===----------------------------------------------------------------------===// #include "llvm/Analysis/IVDescriptors.h" -#include "llvm/ADT/ScopeExit.h" -#include "llvm/Analysis/BasicAliasAnalysis.h" #include "llvm/Analysis/DemandedBits.h" -#include "llvm/Analysis/DomTreeUpdater.h" -#include "llvm/Analysis/GlobalsModRef.h" -#include "llvm/Analysis/InstructionSimplify.h" #include "llvm/Analysis/LoopInfo.h" -#include "llvm/Analysis/LoopPass.h" -#include "llvm/Analysis/MustExecute.h" #include "llvm/Analysis/ScalarEvolution.h" -#include "llvm/Analysis/ScalarEvolutionAliasAnalysis.h" #include "llvm/Analysis/ScalarEvolutionExpressions.h" -#include "llvm/Analysis/TargetTransformInfo.h" #include "llvm/Analysis/ValueTracking.h" #include "llvm/IR/Dominators.h" #include "llvm/IR/Instructions.h" #include "llvm/IR/Module.h" #include "llvm/IR/PatternMatch.h" #include "llvm/IR/ValueHandle.h" -#include "llvm/Pass.h" #include "llvm/Support/Debug.h" #include "llvm/Support/KnownBits.h" Index: llvm/lib/Analysis/IVUsers.cpp =================================================================== --- llvm/lib/Analysis/IVUsers.cpp +++ llvm/lib/Analysis/IVUsers.cpp @@ -12,25 +12,21 @@ //===----------------------------------------------------------------------===// #include "llvm/Analysis/IVUsers.h" -#include "llvm/ADT/STLExtras.h" #include "llvm/Analysis/AssumptionCache.h" #include "llvm/Analysis/CodeMetrics.h" #include "llvm/Analysis/LoopAnalysisManager.h" +#include "llvm/Analysis/LoopInfo.h" #include "llvm/Analysis/LoopPass.h" #include "llvm/Analysis/ScalarEvolutionExpressions.h" #include "llvm/Analysis/ValueTracking.h" #include "llvm/Config/llvm-config.h" -#include "llvm/IR/Constants.h" #include "llvm/IR/DataLayout.h" -#include "llvm/IR/DerivedTypes.h" #include "llvm/IR/Dominators.h" #include "llvm/IR/Instructions.h" #include "llvm/IR/Module.h" -#include "llvm/IR/Type.h" #include "llvm/InitializePasses.h" #include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" -#include using namespace llvm; #define DEBUG_TYPE "iv-users" Index: llvm/lib/Analysis/IndirectCallPromotionAnalysis.cpp =================================================================== --- llvm/lib/Analysis/IndirectCallPromotionAnalysis.cpp +++ llvm/lib/Analysis/IndirectCallPromotionAnalysis.cpp @@ -13,12 +13,7 @@ //===----------------------------------------------------------------------===// #include "llvm/Analysis/IndirectCallPromotionAnalysis.h" -#include "llvm/ADT/STLExtras.h" -#include "llvm/Analysis/IndirectCallVisitor.h" -#include "llvm/IR/InstIterator.h" -#include "llvm/IR/InstVisitor.h" -#include "llvm/IR/Instructions.h" -#include "llvm/IR/IntrinsicInst.h" +#include "llvm/IR/Instruction.h" #include "llvm/ProfileData/InstrProf.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" Index: llvm/lib/Analysis/InlineAdvisor.cpp =================================================================== --- llvm/lib/Analysis/InlineAdvisor.cpp +++ llvm/lib/Analysis/InlineAdvisor.cpp @@ -13,14 +13,15 @@ #include "llvm/Analysis/InlineAdvisor.h" #include "llvm/ADT/Statistic.h" +#include "llvm/Analysis/AssumptionCache.h" #include "llvm/Analysis/InlineCost.h" #include "llvm/Analysis/OptimizationRemarkEmitter.h" #include "llvm/Analysis/ProfileSummaryInfo.h" #include "llvm/Analysis/ReplayInlineAdvisor.h" #include "llvm/Analysis/TargetLibraryInfo.h" #include "llvm/Analysis/TargetTransformInfo.h" +#include "llvm/Analysis/Utils/ImportedFunctionsInliningStatistics.h" #include "llvm/IR/DebugInfoMetadata.h" -#include "llvm/IR/Instructions.h" #include "llvm/IR/PassManager.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/raw_ostream.h" Index: llvm/lib/Analysis/InlineCost.cpp =================================================================== --- llvm/lib/Analysis/InlineCost.cpp +++ llvm/lib/Analysis/InlineCost.cpp @@ -18,11 +18,11 @@ #include "llvm/ADT/Statistic.h" #include "llvm/Analysis/AssumptionCache.h" #include "llvm/Analysis/BlockFrequencyInfo.h" -#include "llvm/Analysis/CFG.h" #include "llvm/Analysis/CodeMetrics.h" #include "llvm/Analysis/ConstantFolding.h" #include "llvm/Analysis/InstructionSimplify.h" #include "llvm/Analysis/LoopInfo.h" +#include "llvm/Analysis/OptimizationRemarkEmitter.h" #include "llvm/Analysis/ProfileSummaryInfo.h" #include "llvm/Analysis/TargetLibraryInfo.h" #include "llvm/Analysis/TargetTransformInfo.h" Index: llvm/lib/Analysis/InlineSizeEstimatorAnalysis.cpp =================================================================== --- llvm/lib/Analysis/InlineSizeEstimatorAnalysis.cpp +++ llvm/lib/Analysis/InlineSizeEstimatorAnalysis.cpp @@ -15,22 +15,10 @@ #ifdef LLVM_HAVE_TF_API #include "llvm/Analysis/Utils/TFUtils.h" #endif -#include "llvm/Analysis/LoopInfo.h" -#include "llvm/Analysis/TargetLibraryInfo.h" -#include "llvm/Analysis/TargetTransformInfo.h" -#include "llvm/IR/BasicBlock.h" -#include "llvm/IR/Dominators.h" #include "llvm/IR/Function.h" -#include "llvm/IR/Instructions.h" #include "llvm/IR/PassManager.h" -#include "llvm/MC/MCAsmLayout.h" -#include "llvm/Support/Casting.h" -#include "llvm/Support/CommandLine.h" #include "llvm/Support/raw_ostream.h" -#include -#include - using namespace llvm; AnalysisKey InlineSizeEstimatorAnalysis::Key; Index: llvm/lib/Analysis/InstructionSimplify.cpp =================================================================== --- llvm/lib/Analysis/InstructionSimplify.cpp +++ llvm/lib/Analysis/InstructionSimplify.cpp @@ -20,7 +20,6 @@ #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SetVector.h" -#include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/Statistic.h" #include "llvm/Analysis/AliasAnalysis.h" #include "llvm/Analysis/AssumptionCache.h" @@ -36,13 +35,10 @@ #include "llvm/IR/ConstantRange.h" #include "llvm/IR/DataLayout.h" #include "llvm/IR/Dominators.h" -#include "llvm/IR/GetElementPtrTypeIterator.h" -#include "llvm/IR/GlobalAlias.h" #include "llvm/IR/InstrTypes.h" #include "llvm/IR/Instructions.h" #include "llvm/IR/Operator.h" #include "llvm/IR/PatternMatch.h" -#include "llvm/IR/ValueHandle.h" #include "llvm/Support/KnownBits.h" #include using namespace llvm; Index: llvm/lib/Analysis/Interval.cpp =================================================================== --- llvm/lib/Analysis/Interval.cpp +++ llvm/lib/Analysis/Interval.cpp @@ -13,7 +13,6 @@ #include "llvm/Analysis/Interval.h" #include "llvm/IR/BasicBlock.h" -#include "llvm/IR/CFG.h" #include "llvm/Support/raw_ostream.h" using namespace llvm; Index: llvm/lib/Analysis/LazyCallGraph.cpp =================================================================== --- llvm/lib/Analysis/LazyCallGraph.cpp +++ llvm/lib/Analysis/LazyCallGraph.cpp @@ -9,14 +9,13 @@ #include "llvm/Analysis/LazyCallGraph.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/STLExtras.h" -#include "llvm/ADT/ScopeExit.h" #include "llvm/ADT/Sequence.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/iterator_range.h" #include "llvm/Analysis/TargetLibraryInfo.h" -#include "llvm/Analysis/VectorUtils.h" #include "llvm/Config/llvm-config.h" +#include "llvm/IR/Constants.h" #include "llvm/IR/Function.h" #include "llvm/IR/GlobalVariable.h" #include "llvm/IR/InstIterator.h" @@ -30,7 +29,6 @@ #include "llvm/Support/raw_ostream.h" #include #include -#include #include #include #include Index: llvm/lib/Analysis/LazyValueInfo.cpp =================================================================== --- llvm/lib/Analysis/LazyValueInfo.cpp +++ llvm/lib/Analysis/LazyValueInfo.cpp @@ -38,7 +38,6 @@ #include "llvm/Support/FormattedStream.h" #include "llvm/Support/KnownBits.h" #include "llvm/Support/raw_ostream.h" -#include using namespace llvm; using namespace PatternMatch; Index: llvm/lib/Analysis/Lint.cpp =================================================================== --- llvm/lib/Analysis/Lint.cpp +++ llvm/lib/Analysis/Lint.cpp @@ -44,7 +44,6 @@ #include "llvm/Analysis/InstructionSimplify.h" #include "llvm/Analysis/Loads.h" #include "llvm/Analysis/MemoryLocation.h" -#include "llvm/Analysis/Passes.h" #include "llvm/Analysis/TargetLibraryInfo.h" #include "llvm/Analysis/ValueTracking.h" #include "llvm/IR/Argument.h" @@ -69,9 +68,7 @@ #include "llvm/InitializePasses.h" #include "llvm/Pass.h" #include "llvm/Support/Casting.h" -#include "llvm/Support/Debug.h" #include "llvm/Support/KnownBits.h" -#include "llvm/Support/MathExtras.h" #include "llvm/Support/raw_ostream.h" #include #include Index: llvm/lib/Analysis/Loads.cpp =================================================================== --- llvm/lib/Analysis/Loads.cpp +++ llvm/lib/Analysis/Loads.cpp @@ -13,19 +13,14 @@ #include "llvm/Analysis/Loads.h" #include "llvm/Analysis/AliasAnalysis.h" #include "llvm/Analysis/AssumeBundleQueries.h" -#include "llvm/Analysis/CaptureTracking.h" #include "llvm/Analysis/LoopInfo.h" #include "llvm/Analysis/MemoryBuiltins.h" #include "llvm/Analysis/MemoryLocation.h" #include "llvm/Analysis/ScalarEvolution.h" #include "llvm/Analysis/ScalarEvolutionExpressions.h" -#include "llvm/Analysis/TargetLibraryInfo.h" #include "llvm/Analysis/ValueTracking.h" #include "llvm/IR/DataLayout.h" -#include "llvm/IR/GlobalAlias.h" -#include "llvm/IR/GlobalVariable.h" #include "llvm/IR/IntrinsicInst.h" -#include "llvm/IR/LLVMContext.h" #include "llvm/IR/Module.h" #include "llvm/IR/Operator.h" Index: llvm/lib/Analysis/LoopAccessAnalysis.cpp =================================================================== --- llvm/lib/Analysis/LoopAccessAnalysis.cpp +++ llvm/lib/Analysis/LoopAccessAnalysis.cpp @@ -60,7 +60,6 @@ #include #include #include -#include #include #include #include Index: llvm/lib/Analysis/LoopAnalysisManager.cpp =================================================================== --- llvm/lib/Analysis/LoopAnalysisManager.cpp +++ llvm/lib/Analysis/LoopAnalysisManager.cpp @@ -8,12 +8,9 @@ #include "llvm/Analysis/LoopAnalysisManager.h" #include "llvm/Analysis/AssumptionCache.h" -#include "llvm/Analysis/BasicAliasAnalysis.h" -#include "llvm/Analysis/GlobalsModRef.h" #include "llvm/Analysis/LoopInfo.h" #include "llvm/Analysis/MemorySSA.h" #include "llvm/Analysis/ScalarEvolution.h" -#include "llvm/Analysis/ScalarEvolutionAliasAnalysis.h" #include "llvm/IR/Dominators.h" #include "llvm/IR/PassManagerImpl.h" Index: llvm/lib/Analysis/LoopInfo.cpp =================================================================== --- llvm/lib/Analysis/LoopInfo.cpp +++ llvm/lib/Analysis/LoopInfo.cpp @@ -14,7 +14,6 @@ //===----------------------------------------------------------------------===// #include "llvm/Analysis/LoopInfo.h" -#include "llvm/ADT/DepthFirstIterator.h" #include "llvm/ADT/ScopeExit.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/Analysis/IVDescriptors.h" @@ -30,7 +29,6 @@ #include "llvm/IR/Constants.h" #include "llvm/IR/DebugLoc.h" #include "llvm/IR/Dominators.h" -#include "llvm/IR/IRPrintingPasses.h" #include "llvm/IR/Instructions.h" #include "llvm/IR/LLVMContext.h" #include "llvm/IR/Metadata.h" @@ -38,9 +36,7 @@ #include "llvm/IR/PrintPasses.h" #include "llvm/InitializePasses.h" #include "llvm/Support/CommandLine.h" -#include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" -#include using namespace llvm; // Explicitly instantiate methods in LoopInfoImpl.h for IR-level Loops. Index: llvm/lib/Analysis/LoopNestAnalysis.cpp =================================================================== --- llvm/lib/Analysis/LoopNestAnalysis.cpp +++ llvm/lib/Analysis/LoopNestAnalysis.cpp @@ -13,8 +13,7 @@ #include "llvm/Analysis/LoopNestAnalysis.h" #include "llvm/ADT/BreadthFirstIterator.h" -#include "llvm/ADT/Statistic.h" -#include "llvm/Analysis/PostDominators.h" +#include "llvm/ADT/DepthFirstIterator.h" #include "llvm/Analysis/ValueTracking.h" using namespace llvm; Index: llvm/lib/Analysis/LoopPass.cpp =================================================================== --- llvm/lib/Analysis/LoopPass.cpp +++ llvm/lib/Analysis/LoopPass.cpp @@ -13,14 +13,12 @@ //===----------------------------------------------------------------------===// #include "llvm/Analysis/LoopPass.h" -#include "llvm/Analysis/LoopAnalysisManager.h" +#include "llvm/Analysis/LoopInfo.h" #include "llvm/IR/Dominators.h" #include "llvm/IR/LLVMContext.h" #include "llvm/IR/OptBisect.h" -#include "llvm/IR/PassManager.h" #include "llvm/IR/PassTimingInfo.h" #include "llvm/IR/PrintPasses.h" -#include "llvm/IR/StructuralHash.h" #include "llvm/InitializePasses.h" #include "llvm/Support/Debug.h" #include "llvm/Support/TimeProfiler.h" Index: llvm/lib/Analysis/LoopUnrollAnalyzer.cpp =================================================================== --- llvm/lib/Analysis/LoopUnrollAnalyzer.cpp +++ llvm/lib/Analysis/LoopUnrollAnalyzer.cpp @@ -13,7 +13,10 @@ //===----------------------------------------------------------------------===// #include "llvm/Analysis/LoopUnrollAnalyzer.h" +#include "llvm/Analysis/InstructionSimplify.h" #include "llvm/Analysis/LoopInfo.h" +#include "llvm/Analysis/ScalarEvolutionExpressions.h" +#include "llvm/IR/Operator.h" using namespace llvm; Index: llvm/lib/Analysis/MLInlineAdvisor.cpp =================================================================== --- llvm/lib/Analysis/MLInlineAdvisor.cpp +++ llvm/lib/Analysis/MLInlineAdvisor.cpp @@ -13,6 +13,7 @@ //===----------------------------------------------------------------------===// #include "llvm/Analysis/MLInlineAdvisor.h" #include "llvm/ADT/SCCIterator.h" +#include "llvm/Analysis/AssumptionCache.h" #include "llvm/Analysis/CallGraph.h" #include "llvm/Analysis/FunctionPropertiesAnalysis.h" #include "llvm/Analysis/InlineCost.h" @@ -20,19 +21,10 @@ #include "llvm/Analysis/LazyCallGraph.h" #include "llvm/Analysis/MLModelRunner.h" #include "llvm/Analysis/OptimizationRemarkEmitter.h" -#include "llvm/Analysis/ReleaseModeModelRunner.h" -#include "llvm/Analysis/TargetLibraryInfo.h" #include "llvm/Analysis/TargetTransformInfo.h" -#include "llvm/Config/config.h" #include "llvm/IR/InstIterator.h" -#include "llvm/IR/Instructions.h" #include "llvm/IR/PassManager.h" #include "llvm/Support/CommandLine.h" -#include "llvm/Support/Path.h" - -#include -#include -#include using namespace llvm; Index: llvm/lib/Analysis/MemDepPrinter.cpp =================================================================== --- llvm/lib/Analysis/MemDepPrinter.cpp +++ llvm/lib/Analysis/MemDepPrinter.cpp @@ -15,7 +15,6 @@ #include "llvm/Analysis/Passes.h" #include "llvm/IR/InstIterator.h" #include "llvm/IR/Instructions.h" -#include "llvm/IR/LLVMContext.h" #include "llvm/InitializePasses.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/raw_ostream.h" Index: llvm/lib/Analysis/MemDerefPrinter.cpp =================================================================== --- llvm/lib/Analysis/MemDerefPrinter.cpp +++ llvm/lib/Analysis/MemDerefPrinter.cpp @@ -9,14 +9,11 @@ #include "llvm/Analysis/MemDerefPrinter.h" #include "llvm/Analysis/Loads.h" #include "llvm/Analysis/Passes.h" -#include "llvm/IR/DataLayout.h" #include "llvm/IR/InstIterator.h" #include "llvm/IR/Instructions.h" -#include "llvm/IR/LLVMContext.h" #include "llvm/IR/Module.h" #include "llvm/InitializePasses.h" #include "llvm/Pass.h" -#include "llvm/Support/ErrorHandling.h" #include "llvm/Support/raw_ostream.h" using namespace llvm; Index: llvm/lib/Analysis/MemoryBuiltins.cpp =================================================================== --- llvm/lib/Analysis/MemoryBuiltins.cpp +++ llvm/lib/Analysis/MemoryBuiltins.cpp @@ -17,7 +17,6 @@ #include "llvm/ADT/Optional.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/Statistic.h" -#include "llvm/ADT/StringRef.h" #include "llvm/Analysis/TargetFolder.h" #include "llvm/Analysis/TargetLibraryInfo.h" #include "llvm/Analysis/Utils/Local.h" Index: llvm/lib/Analysis/MemoryDependenceAnalysis.cpp =================================================================== --- llvm/lib/Analysis/MemoryDependenceAnalysis.cpp +++ llvm/lib/Analysis/MemoryDependenceAnalysis.cpp @@ -27,11 +27,7 @@ #include "llvm/Analysis/PhiValues.h" #include "llvm/Analysis/TargetLibraryInfo.h" #include "llvm/Analysis/ValueTracking.h" -#include "llvm/IR/Attributes.h" #include "llvm/IR/BasicBlock.h" -#include "llvm/IR/Constants.h" -#include "llvm/IR/DataLayout.h" -#include "llvm/IR/DerivedTypes.h" #include "llvm/IR/Dominators.h" #include "llvm/IR/Function.h" #include "llvm/IR/InstrTypes.h" @@ -44,7 +40,6 @@ #include "llvm/IR/PredIteratorCache.h" #include "llvm/IR/Type.h" #include "llvm/IR/Use.h" -#include "llvm/IR/User.h" #include "llvm/IR/Value.h" #include "llvm/InitializePasses.h" #include "llvm/Pass.h" @@ -53,10 +48,8 @@ #include "llvm/Support/CommandLine.h" #include "llvm/Support/Compiler.h" #include "llvm/Support/Debug.h" -#include "llvm/Support/MathExtras.h" #include #include -#include #include #include Index: llvm/lib/Analysis/MemoryLocation.cpp =================================================================== --- llvm/lib/Analysis/MemoryLocation.cpp +++ llvm/lib/Analysis/MemoryLocation.cpp @@ -8,12 +8,10 @@ #include "llvm/Analysis/MemoryLocation.h" #include "llvm/Analysis/TargetLibraryInfo.h" -#include "llvm/IR/BasicBlock.h" #include "llvm/IR/DataLayout.h" #include "llvm/IR/Instructions.h" #include "llvm/IR/IntrinsicInst.h" #include "llvm/IR/IntrinsicsARM.h" -#include "llvm/IR/LLVMContext.h" #include "llvm/IR/Module.h" #include "llvm/IR/Type.h" using namespace llvm; Index: llvm/lib/Analysis/MemorySSA.cpp =================================================================== --- llvm/lib/Analysis/MemorySSA.cpp +++ llvm/lib/Analysis/MemorySSA.cpp @@ -36,7 +36,6 @@ #include "llvm/IR/Instruction.h" #include "llvm/IR/Instructions.h" #include "llvm/IR/IntrinsicInst.h" -#include "llvm/IR/Intrinsics.h" #include "llvm/IR/LLVMContext.h" #include "llvm/IR/Operator.h" #include "llvm/IR/PassManager.h" @@ -50,10 +49,10 @@ #include "llvm/Support/Debug.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/FormattedStream.h" +#include "llvm/Support/GraphWriter.h" #include "llvm/Support/raw_ostream.h" #include #include -#include #include #include #include Index: llvm/lib/Analysis/MemorySSAUpdater.cpp =================================================================== --- llvm/lib/Analysis/MemorySSAUpdater.cpp +++ llvm/lib/Analysis/MemorySSAUpdater.cpp @@ -10,22 +10,15 @@ // //===----------------------------------------------------------------===// #include "llvm/Analysis/MemorySSAUpdater.h" -#include "llvm/Analysis/LoopIterator.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SetVector.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/Analysis/IteratedDominanceFrontier.h" +#include "llvm/Analysis/LoopIterator.h" #include "llvm/Analysis/MemorySSA.h" #include "llvm/IR/BasicBlock.h" -#include "llvm/IR/DataLayout.h" #include "llvm/IR/Dominators.h" -#include "llvm/IR/GlobalVariable.h" -#include "llvm/IR/IRBuilder.h" -#include "llvm/IR/LLVMContext.h" -#include "llvm/IR/Metadata.h" -#include "llvm/IR/Module.h" #include "llvm/Support/Debug.h" -#include "llvm/Support/FormattedStream.h" #include #define DEBUG_TYPE "memoryssa" Index: llvm/lib/Analysis/ModuleDebugInfoPrinter.cpp =================================================================== --- llvm/lib/Analysis/ModuleDebugInfoPrinter.cpp +++ llvm/lib/Analysis/ModuleDebugInfoPrinter.cpp @@ -15,7 +15,6 @@ //===----------------------------------------------------------------------===// #include "llvm/Analysis/ModuleDebugInfoPrinter.h" -#include "llvm/ADT/Statistic.h" #include "llvm/Analysis/Passes.h" #include "llvm/BinaryFormat/Dwarf.h" #include "llvm/IR/DebugInfo.h" Index: llvm/lib/Analysis/ModuleSummaryAnalysis.cpp =================================================================== --- llvm/lib/Analysis/ModuleSummaryAnalysis.cpp +++ llvm/lib/Analysis/ModuleSummaryAnalysis.cpp @@ -38,7 +38,6 @@ #include "llvm/IR/GlobalVariable.h" #include "llvm/IR/Instructions.h" #include "llvm/IR/IntrinsicInst.h" -#include "llvm/IR/Intrinsics.h" #include "llvm/IR/Metadata.h" #include "llvm/IR/Module.h" #include "llvm/IR/ModuleSummaryIndex.h" Index: llvm/lib/Analysis/MustExecute.cpp =================================================================== --- llvm/lib/Analysis/MustExecute.cpp +++ llvm/lib/Analysis/MustExecute.cpp @@ -16,14 +16,11 @@ #include "llvm/Analysis/PostDominators.h" #include "llvm/Analysis/ValueTracking.h" #include "llvm/IR/AssemblyAnnotationWriter.h" -#include "llvm/IR/DataLayout.h" #include "llvm/IR/Dominators.h" #include "llvm/IR/InstIterator.h" -#include "llvm/IR/LLVMContext.h" #include "llvm/IR/Module.h" #include "llvm/IR/PassManager.h" #include "llvm/InitializePasses.h" -#include "llvm/Support/ErrorHandling.h" #include "llvm/Support/FormattedStream.h" #include "llvm/Support/raw_ostream.h" Index: llvm/lib/Analysis/ObjCARCAliasAnalysis.cpp =================================================================== --- llvm/lib/Analysis/ObjCARCAliasAnalysis.cpp +++ llvm/lib/Analysis/ObjCARCAliasAnalysis.cpp @@ -26,8 +26,6 @@ #include "llvm/Analysis/ObjCARCAnalysisUtils.h" #include "llvm/Analysis/Passes.h" #include "llvm/IR/Function.h" -#include "llvm/IR/Instruction.h" -#include "llvm/IR/Value.h" #include "llvm/InitializePasses.h" #include "llvm/Pass.h" Index: llvm/lib/Analysis/OverflowInstAnalysis.cpp =================================================================== --- llvm/lib/Analysis/OverflowInstAnalysis.cpp +++ llvm/lib/Analysis/OverflowInstAnalysis.cpp @@ -12,7 +12,6 @@ //===----------------------------------------------------------------------===// #include "llvm/Analysis/OverflowInstAnalysis.h" -#include "llvm/IR/Constants.h" #include "llvm/IR/Instructions.h" #include "llvm/IR/PatternMatch.h" Index: llvm/lib/Analysis/PHITransAddr.cpp =================================================================== --- llvm/lib/Analysis/PHITransAddr.cpp +++ llvm/lib/Analysis/PHITransAddr.cpp @@ -17,7 +17,6 @@ #include "llvm/IR/Constants.h" #include "llvm/IR/Dominators.h" #include "llvm/IR/Instructions.h" -#include "llvm/Support/Debug.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/raw_ostream.h" using namespace llvm; Index: llvm/lib/Analysis/ProfileSummaryInfo.cpp =================================================================== --- llvm/lib/Analysis/ProfileSummaryInfo.cpp +++ llvm/lib/Analysis/ProfileSummaryInfo.cpp @@ -15,7 +15,6 @@ #include "llvm/Analysis/BlockFrequencyInfo.h" #include "llvm/IR/BasicBlock.h" #include "llvm/IR/Instructions.h" -#include "llvm/IR/Metadata.h" #include "llvm/IR/Module.h" #include "llvm/IR/ProfileSummary.h" #include "llvm/InitializePasses.h" Index: llvm/lib/Analysis/PtrUseVisitor.cpp =================================================================== --- llvm/lib/Analysis/PtrUseVisitor.cpp +++ llvm/lib/Analysis/PtrUseVisitor.cpp @@ -14,7 +14,6 @@ #include "llvm/Analysis/PtrUseVisitor.h" #include "llvm/IR/Instruction.h" #include "llvm/IR/Instructions.h" -#include using namespace llvm; Index: llvm/lib/Analysis/RegionPass.cpp =================================================================== --- llvm/lib/Analysis/RegionPass.cpp +++ llvm/lib/Analysis/RegionPass.cpp @@ -18,10 +18,12 @@ #include "llvm/IR/OptBisect.h" #include "llvm/IR/PassTimingInfo.h" #include "llvm/IR/PrintPasses.h" -#include "llvm/IR/StructuralHash.h" #include "llvm/Support/Debug.h" #include "llvm/Support/Timer.h" #include "llvm/Support/raw_ostream.h" +#ifdef EXPENSIVE_CHECKS +#include "llvm/IR/StructuralHash.h" +#endif using namespace llvm; #define DEBUG_TYPE "regionpassmgr" Index: llvm/lib/Analysis/RegionPrinter.cpp =================================================================== --- llvm/lib/Analysis/RegionPrinter.cpp +++ llvm/lib/Analysis/RegionPrinter.cpp @@ -10,15 +10,11 @@ #include "llvm/Analysis/RegionPrinter.h" #include "llvm/ADT/DepthFirstIterator.h" -#include "llvm/ADT/PostOrderIterator.h" -#include "llvm/ADT/Statistic.h" #include "llvm/Analysis/DOTGraphTraitsPass.h" -#include "llvm/Analysis/Passes.h" #include "llvm/Analysis/RegionInfo.h" #include "llvm/Analysis/RegionIterator.h" #include "llvm/InitializePasses.h" #include "llvm/Support/CommandLine.h" -#include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" #ifndef NDEBUG #include "llvm/IR/LegacyPassManager.h" Index: llvm/lib/Analysis/ReplayInlineAdvisor.cpp =================================================================== --- llvm/lib/Analysis/ReplayInlineAdvisor.cpp +++ llvm/lib/Analysis/ReplayInlineAdvisor.cpp @@ -14,9 +14,9 @@ //===----------------------------------------------------------------------===// #include "llvm/Analysis/ReplayInlineAdvisor.h" -#include "llvm/IR/DebugInfoMetadata.h" -#include "llvm/IR/Instructions.h" +#include "llvm/Analysis/OptimizationRemarkEmitter.h" #include "llvm/Support/LineIterator.h" +#include "llvm/Support/MemoryBuffer.h" #include using namespace llvm; Index: llvm/lib/Analysis/ScalarEvolution.cpp =================================================================== --- llvm/lib/Analysis/ScalarEvolution.cpp +++ llvm/lib/Analysis/ScalarEvolution.cpp @@ -79,7 +79,6 @@ #include "llvm/Analysis/ConstantFolding.h" #include "llvm/Analysis/InstructionSimplify.h" #include "llvm/Analysis/LoopInfo.h" -#include "llvm/Analysis/ScalarEvolutionDivision.h" #include "llvm/Analysis/ScalarEvolutionExpressions.h" #include "llvm/Analysis/TargetLibraryInfo.h" #include "llvm/Analysis/ValueTracking.h" @@ -96,7 +95,6 @@ #include "llvm/IR/Function.h" #include "llvm/IR/GlobalAlias.h" #include "llvm/IR/GlobalValue.h" -#include "llvm/IR/GlobalVariable.h" #include "llvm/IR/InstIterator.h" #include "llvm/IR/InstrTypes.h" #include "llvm/IR/Instruction.h" @@ -104,7 +102,6 @@ #include "llvm/IR/IntrinsicInst.h" #include "llvm/IR/Intrinsics.h" #include "llvm/IR/LLVMContext.h" -#include "llvm/IR/Metadata.h" #include "llvm/IR/Operator.h" #include "llvm/IR/PatternMatch.h" #include "llvm/IR/Type.h" @@ -125,7 +122,6 @@ #include #include #include -#include #include #include #include Index: llvm/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp =================================================================== --- llvm/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp +++ llvm/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp @@ -20,6 +20,7 @@ #include "llvm/Analysis/ScalarEvolutionAliasAnalysis.h" #include "llvm/Analysis/ScalarEvolution.h" +#include "llvm/Analysis/ScalarEvolutionExpressions.h" #include "llvm/InitializePasses.h" using namespace llvm; Index: llvm/lib/Analysis/ScalarEvolutionDivision.cpp =================================================================== --- llvm/lib/Analysis/ScalarEvolutionDivision.cpp +++ llvm/lib/Analysis/ScalarEvolutionDivision.cpp @@ -15,9 +15,7 @@ #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/SmallVector.h" #include "llvm/Analysis/ScalarEvolution.h" -#include "llvm/IR/Constants.h" #include "llvm/Support/Casting.h" -#include "llvm/Support/ErrorHandling.h" #include #include Index: llvm/lib/Analysis/ScalarEvolutionNormalization.cpp =================================================================== --- llvm/lib/Analysis/ScalarEvolutionNormalization.cpp +++ llvm/lib/Analysis/ScalarEvolutionNormalization.cpp @@ -12,7 +12,6 @@ //===----------------------------------------------------------------------===// #include "llvm/Analysis/ScalarEvolutionNormalization.h" -#include "llvm/Analysis/LoopInfo.h" #include "llvm/Analysis/ScalarEvolutionExpressions.h" using namespace llvm; Index: llvm/lib/Analysis/ScopedNoAliasAA.cpp =================================================================== --- llvm/lib/Analysis/ScopedNoAliasAA.cpp +++ llvm/lib/Analysis/ScopedNoAliasAA.cpp @@ -36,7 +36,6 @@ #include "llvm/ADT/SmallPtrSet.h" #include "llvm/Analysis/MemoryLocation.h" #include "llvm/IR/InstrTypes.h" -#include "llvm/IR/Instruction.h" #include "llvm/IR/LLVMContext.h" #include "llvm/IR/Metadata.h" #include "llvm/InitializePasses.h" Index: llvm/lib/Analysis/StackLifetime.cpp =================================================================== --- llvm/lib/Analysis/StackLifetime.cpp +++ llvm/lib/Analysis/StackLifetime.cpp @@ -19,17 +19,12 @@ #include "llvm/IR/InstIterator.h" #include "llvm/IR/Instructions.h" #include "llvm/IR/IntrinsicInst.h" -#include "llvm/IR/Intrinsics.h" -#include "llvm/IR/User.h" #include "llvm/IR/Value.h" -#include "llvm/Pass.h" #include "llvm/Support/Casting.h" -#include "llvm/Support/CommandLine.h" #include "llvm/Support/Compiler.h" #include "llvm/Support/Debug.h" #include "llvm/Support/FormattedStream.h" #include -#include #include using namespace llvm; Index: llvm/lib/Analysis/StackSafetyAnalysis.cpp =================================================================== --- llvm/lib/Analysis/StackSafetyAnalysis.cpp +++ llvm/lib/Analysis/StackSafetyAnalysis.cpp @@ -15,7 +15,6 @@ #include "llvm/ADT/Statistic.h" #include "llvm/Analysis/ModuleSummaryAnalysis.h" #include "llvm/Analysis/ScalarEvolution.h" -#include "llvm/Analysis/ScalarEvolutionExpressions.h" #include "llvm/Analysis/StackLifetime.h" #include "llvm/IR/ConstantRange.h" #include "llvm/IR/DerivedTypes.h" Index: llvm/lib/Analysis/SyncDependenceAnalysis.cpp =================================================================== --- llvm/lib/Analysis/SyncDependenceAnalysis.cpp +++ llvm/lib/Analysis/SyncDependenceAnalysis.cpp @@ -118,18 +118,14 @@ //===----------------------------------------------------------------------===// #include "llvm/Analysis/SyncDependenceAnalysis.h" -#include "llvm/ADT/PostOrderIterator.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/Analysis/LoopInfo.h" -#include "llvm/Analysis/PostDominators.h" #include "llvm/IR/BasicBlock.h" #include "llvm/IR/CFG.h" #include "llvm/IR/Dominators.h" #include "llvm/IR/Function.h" #include -#include -#include #define DEBUG_TYPE "sync-dependence" Index: llvm/lib/Analysis/SyntheticCountsUtils.cpp =================================================================== --- llvm/lib/Analysis/SyntheticCountsUtils.cpp +++ llvm/lib/Analysis/SyntheticCountsUtils.cpp @@ -14,9 +14,6 @@ #include "llvm/ADT/DenseSet.h" #include "llvm/ADT/SCCIterator.h" #include "llvm/Analysis/CallGraph.h" -#include "llvm/IR/Function.h" -#include "llvm/IR/InstIterator.h" -#include "llvm/IR/Instructions.h" #include "llvm/IR/ModuleSummaryIndex.h" using namespace llvm; Index: llvm/lib/Analysis/TargetTransformInfo.cpp =================================================================== --- llvm/lib/Analysis/TargetTransformInfo.cpp +++ llvm/lib/Analysis/TargetTransformInfo.cpp @@ -11,7 +11,6 @@ #include "llvm/Analysis/LoopIterator.h" #include "llvm/Analysis/TargetTransformInfoImpl.h" #include "llvm/IR/CFG.h" -#include "llvm/IR/DataLayout.h" #include "llvm/IR/Dominators.h" #include "llvm/IR/Instruction.h" #include "llvm/IR/Instructions.h" Index: llvm/lib/Analysis/TypeBasedAliasAnalysis.cpp =================================================================== --- llvm/lib/Analysis/TypeBasedAliasAnalysis.cpp +++ llvm/lib/Analysis/TypeBasedAliasAnalysis.cpp @@ -112,7 +112,6 @@ #include "llvm/IR/Constants.h" #include "llvm/IR/DerivedTypes.h" #include "llvm/IR/InstrTypes.h" -#include "llvm/IR/Instruction.h" #include "llvm/IR/LLVMContext.h" #include "llvm/IR/Metadata.h" #include "llvm/InitializePasses.h" Index: llvm/lib/Analysis/TypeMetadataUtils.cpp =================================================================== --- llvm/lib/Analysis/TypeMetadataUtils.cpp +++ llvm/lib/Analysis/TypeMetadataUtils.cpp @@ -16,7 +16,6 @@ #include "llvm/IR/Dominators.h" #include "llvm/IR/Instructions.h" #include "llvm/IR/IntrinsicInst.h" -#include "llvm/IR/Intrinsics.h" #include "llvm/IR/Module.h" using namespace llvm; Index: llvm/lib/Analysis/VFABIDemangling.cpp =================================================================== --- llvm/lib/Analysis/VFABIDemangling.cpp +++ llvm/lib/Analysis/VFABIDemangling.cpp @@ -6,8 +6,6 @@ // //===----------------------------------------------------------------------===// -#include "llvm/ADT/SmallSet.h" -#include "llvm/ADT/SmallString.h" #include "llvm/Analysis/VectorUtils.h" using namespace llvm; Index: llvm/lib/Analysis/ValueTracking.cpp =================================================================== --- llvm/lib/Analysis/ValueTracking.cpp +++ llvm/lib/Analysis/ValueTracking.cpp @@ -70,10 +70,8 @@ #include "llvm/Support/KnownBits.h" #include "llvm/Support/MathExtras.h" #include -#include #include #include -#include #include using namespace llvm; Index: llvm/lib/Transforms/Coroutines/CoroSplit.cpp =================================================================== --- llvm/lib/Transforms/Coroutines/CoroSplit.cpp +++ llvm/lib/Transforms/Coroutines/CoroSplit.cpp @@ -22,6 +22,7 @@ #include "CoroInstr.h" #include "CoroInternal.h" #include "llvm/ADT/DenseMap.h" +#include "llvm/ADT/PriorityWorklist.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringRef.h" Index: llvm/lib/Transforms/IPO/AlwaysInliner.cpp =================================================================== --- llvm/lib/Transforms/IPO/AlwaysInliner.cpp +++ llvm/lib/Transforms/IPO/AlwaysInliner.cpp @@ -16,6 +16,7 @@ #include "llvm/Analysis/AliasAnalysis.h" #include "llvm/Analysis/AssumptionCache.h" #include "llvm/Analysis/InlineCost.h" +#include "llvm/Analysis/OptimizationRemarkEmitter.h" #include "llvm/Analysis/ProfileSummaryInfo.h" #include "llvm/Analysis/TargetLibraryInfo.h" #include "llvm/IR/CallingConv.h" Index: llvm/lib/Transforms/IPO/InlineSimple.cpp =================================================================== --- llvm/lib/Transforms/IPO/InlineSimple.cpp +++ llvm/lib/Transforms/IPO/InlineSimple.cpp @@ -12,6 +12,7 @@ #include "llvm/Analysis/AssumptionCache.h" #include "llvm/Analysis/InlineCost.h" +#include "llvm/Analysis/OptimizationRemarkEmitter.h" #include "llvm/Analysis/ProfileSummaryInfo.h" #include "llvm/Analysis/TargetLibraryInfo.h" #include "llvm/Analysis/TargetTransformInfo.h" Index: llvm/lib/Transforms/IPO/Inliner.cpp =================================================================== --- llvm/lib/Transforms/IPO/Inliner.cpp +++ llvm/lib/Transforms/IPO/Inliner.cpp @@ -16,6 +16,7 @@ #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/None.h" #include "llvm/ADT/Optional.h" +#include "llvm/ADT/PriorityWorklist.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/ScopeExit.h" #include "llvm/ADT/SetVector.h" Index: llvm/lib/Transforms/IPO/PartialInlining.cpp =================================================================== --- llvm/lib/Transforms/IPO/PartialInlining.cpp +++ llvm/lib/Transforms/IPO/PartialInlining.cpp @@ -40,6 +40,7 @@ #include "llvm/IR/IntrinsicInst.h" #include "llvm/IR/Intrinsics.h" #include "llvm/IR/Module.h" +#include "llvm/IR/Operator.h" #include "llvm/IR/User.h" #include "llvm/InitializePasses.h" #include "llvm/Pass.h" Index: llvm/lib/Transforms/Scalar/LoopPassManager.cpp =================================================================== --- llvm/lib/Transforms/Scalar/LoopPassManager.cpp +++ llvm/lib/Transforms/Scalar/LoopPassManager.cpp @@ -13,6 +13,7 @@ #include "llvm/Analysis/BranchProbabilityInfo.h" #include "llvm/Analysis/GlobalsModRef.h" #include "llvm/Analysis/MemorySSA.h" +#include "llvm/Analysis/ScalarEvolution.h" #include "llvm/Analysis/ScalarEvolutionAliasAnalysis.h" #include "llvm/Analysis/TargetLibraryInfo.h" #include "llvm/Support/Debug.h" Index: llvm/lib/Transforms/Vectorize/VPlan.h =================================================================== --- llvm/lib/Transforms/Vectorize/VPlan.h +++ llvm/lib/Transforms/Vectorize/VPlan.h @@ -40,6 +40,7 @@ #include "llvm/ADT/ilist_node.h" #include "llvm/Analysis/VectorUtils.h" #include "llvm/IR/DebugLoc.h" +#include "llvm/IR/FMF.h" #include "llvm/Support/InstructionCost.h" #include #include Index: llvm/tools/llvm-reduce/ReducerWorkItem.cpp =================================================================== --- llvm/tools/llvm-reduce/ReducerWorkItem.cpp +++ llvm/tools/llvm-reduce/ReducerWorkItem.cpp @@ -16,6 +16,7 @@ #include "llvm/CodeGen/TargetInstrInfo.h" #include "llvm/IR/Verifier.h" #include "llvm/IRReader/IRReader.h" +#include "llvm/Support/SourceMgr.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Transforms/Utils/Cloning.h" Index: llvm/unittests/Analysis/FunctionPropertiesAnalysisTest.cpp =================================================================== --- llvm/unittests/Analysis/FunctionPropertiesAnalysisTest.cpp +++ llvm/unittests/Analysis/FunctionPropertiesAnalysisTest.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// #include "llvm/Analysis/FunctionPropertiesAnalysis.h" +#include "llvm/Analysis/LoopInfo.h" #include "llvm/AsmParser/Parser.h" #include "llvm/IR/Dominators.h" #include "llvm/IR/Instructions.h" @@ -90,4 +91,4 @@ EXPECT_EQ(BranchesFeatures.MaxLoopDepth, 0); EXPECT_EQ(BranchesFeatures.TopLevelLoopCount, 0); } -} // end anonymous namespace \ No newline at end of file +} // end anonymous namespace Index: llvm/unittests/Analysis/InlineCostTest.cpp =================================================================== --- llvm/unittests/Analysis/InlineCostTest.cpp +++ llvm/unittests/Analysis/InlineCostTest.cpp @@ -7,11 +7,13 @@ //===----------------------------------------------------------------------===// #include "llvm/Analysis/InlineCost.h" +#include "llvm/Analysis/AssumptionCache.h" #include "llvm/Analysis/TargetTransformInfo.h" #include "llvm/AsmParser/Parser.h" #include "llvm/IR/Instructions.h" #include "llvm/IR/LLVMContext.h" #include "llvm/IR/Module.h" +#include "llvm/Support/SourceMgr.h" #include "gtest/gtest.h" namespace { Index: llvm/unittests/Analysis/LoopInfoTest.cpp =================================================================== --- llvm/unittests/Analysis/LoopInfoTest.cpp +++ llvm/unittests/Analysis/LoopInfoTest.cpp @@ -11,6 +11,7 @@ #include "llvm/Analysis/ScalarEvolution.h" #include "llvm/Analysis/TargetLibraryInfo.h" #include "llvm/AsmParser/Parser.h" +#include "llvm/IR/Constants.h" #include "llvm/IR/Dominators.h" #include "llvm/Support/SourceMgr.h" #include "gtest/gtest.h" Index: llvm/unittests/Passes/PluginsTest.cpp =================================================================== --- llvm/unittests/Passes/PluginsTest.cpp +++ llvm/unittests/Passes/PluginsTest.cpp @@ -16,6 +16,7 @@ #include "llvm/Support/FileSystem.h" #include "llvm/Support/ManagedStatic.h" #include "llvm/Support/Path.h" +#include "llvm/Support/SourceMgr.h" #include "llvm/Testing/Support/Error.h" #include "llvm/Transforms/Scalar/LoopPassManager.h" #include "gtest/gtest.h" Index: llvm/unittests/Transforms/Utils/CloningTest.cpp =================================================================== --- llvm/unittests/Transforms/Utils/CloningTest.cpp +++ llvm/unittests/Transforms/Utils/CloningTest.cpp @@ -25,6 +25,7 @@ #include "llvm/IR/LLVMContext.h" #include "llvm/IR/Module.h" #include "llvm/IR/Verifier.h" +#include "llvm/Support/SourceMgr.h" #include "gtest/gtest.h" using namespace llvm;