1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 12:41:49 +01:00

[TTI] Clean up includes (NFC).

Remove some unnecessary includes, replace some with forward
declarations.

This also exposed a few places that were missing some includes.
This commit is contained in:
Florian Hahn 2020-04-19 20:02:45 +01:00
parent 2bfba3d967
commit 3e13a16ca5
7 changed files with 21 additions and 16 deletions

View File

@ -21,11 +21,6 @@
#ifndef LLVM_ANALYSIS_TARGETTRANSFORMINFO_H #ifndef LLVM_ANALYSIS_TARGETTRANSFORMINFO_H
#define LLVM_ANALYSIS_TARGETTRANSFORMINFO_H #define LLVM_ANALYSIS_TARGETTRANSFORMINFO_H
#include "llvm/ADT/Optional.h"
#include "llvm/Analysis/AssumptionCache.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/ScalarEvolution.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/Operator.h" #include "llvm/IR/Operator.h"
#include "llvm/IR/PassManager.h" #include "llvm/IR/PassManager.h"
#include "llvm/Pass.h" #include "llvm/Pass.h"
@ -41,6 +36,7 @@ typedef unsigned ID;
class AssumptionCache; class AssumptionCache;
class BlockFrequencyInfo; class BlockFrequencyInfo;
class DominatorTree;
class BranchInst; class BranchInst;
class Function; class Function;
class GlobalValue; class GlobalValue;
@ -48,6 +44,7 @@ class IntrinsicInst;
class LoadInst; class LoadInst;
class LoopAccessInfo; class LoopAccessInfo;
class Loop; class Loop;
class LoopInfo;
class ProfileSummaryInfo; class ProfileSummaryInfo;
class SCEV; class SCEV;
class ScalarEvolution; class ScalarEvolution;
@ -57,6 +54,7 @@ class TargetLibraryInfo;
class Type; class Type;
class User; class User;
class Value; class Value;
template <typename T> class Optional;
/// Information about a load/store intrinsic defined by the target. /// Information about a load/store intrinsic defined by the target.
struct MemIntrinsicInfo { struct MemIntrinsicInfo {
@ -835,10 +833,10 @@ public:
}; };
/// \return The size of the cache level in bytes, if available. /// \return The size of the cache level in bytes, if available.
llvm::Optional<unsigned> getCacheSize(CacheLevel Level) const; Optional<unsigned> getCacheSize(CacheLevel Level) const;
/// \return The associativity of the cache level, if available. /// \return The associativity of the cache level, if available.
llvm::Optional<unsigned> getCacheAssociativity(CacheLevel Level) const; Optional<unsigned> getCacheAssociativity(CacheLevel Level) const;
/// \return How much before a load we should place the prefetch /// \return How much before a load we should place the prefetch
/// instruction. This is currently measured in number of /// instruction. This is currently measured in number of
@ -1301,9 +1299,8 @@ public:
virtual bool shouldConsiderAddressTypePromotion( virtual bool shouldConsiderAddressTypePromotion(
const Instruction &I, bool &AllowPromotionWithoutCommonHeader) = 0; const Instruction &I, bool &AllowPromotionWithoutCommonHeader) = 0;
virtual unsigned getCacheLineSize() const = 0; virtual unsigned getCacheLineSize() const = 0;
virtual llvm::Optional<unsigned> getCacheSize(CacheLevel Level) const = 0; virtual Optional<unsigned> getCacheSize(CacheLevel Level) const = 0;
virtual llvm::Optional<unsigned> virtual Optional<unsigned> getCacheAssociativity(CacheLevel Level) const = 0;
getCacheAssociativity(CacheLevel Level) const = 0;
/// \return How much before a load we should place the prefetch /// \return How much before a load we should place the prefetch
/// instruction. This is currently measured in number of /// instruction. This is currently measured in number of
@ -1679,11 +1676,10 @@ public:
I, AllowPromotionWithoutCommonHeader); I, AllowPromotionWithoutCommonHeader);
} }
unsigned getCacheLineSize() const override { return Impl.getCacheLineSize(); } unsigned getCacheLineSize() const override { return Impl.getCacheLineSize(); }
llvm::Optional<unsigned> getCacheSize(CacheLevel Level) const override { Optional<unsigned> getCacheSize(CacheLevel Level) const override {
return Impl.getCacheSize(Level); return Impl.getCacheSize(Level);
} }
llvm::Optional<unsigned> Optional<unsigned> getCacheAssociativity(CacheLevel Level) const override {
getCacheAssociativity(CacheLevel Level) const override {
return Impl.getCacheAssociativity(Level); return Impl.getCacheAssociativity(Level);
} }

View File

@ -21,6 +21,8 @@
namespace llvm { namespace llvm {
template <typename T> class DomTreeNodeBase;
using DomTreeNode = DomTreeNodeBase<BasicBlock>;
class AliasSet; class AliasSet;
class AliasSetTracker; class AliasSetTracker;
class BasicBlock; class BasicBlock;

View File

@ -28,6 +28,7 @@
#include "llvm/IR/BasicBlock.h" #include "llvm/IR/BasicBlock.h"
#include "llvm/IR/Constants.h" #include "llvm/IR/Constants.h"
#include "llvm/IR/DerivedTypes.h" #include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/Function.h" #include "llvm/IR/Function.h"
#include "llvm/IR/IRBuilder.h" #include "llvm/IR/IRBuilder.h"
#include "llvm/IR/InstVisitor.h" #include "llvm/IR/InstVisitor.h"
@ -40,10 +41,10 @@
#include "llvm/IR/Operator.h" #include "llvm/IR/Operator.h"
#include "llvm/IR/Type.h" #include "llvm/IR/Type.h"
#include "llvm/IR/Value.h" #include "llvm/IR/Value.h"
#include "llvm/Transforms/Utils/IntegerDivision.h"
#include "llvm/InitializePasses.h" #include "llvm/InitializePasses.h"
#include "llvm/Pass.h" #include "llvm/Pass.h"
#include "llvm/Support/Casting.h" #include "llvm/Support/Casting.h"
#include "llvm/Transforms/Utils/IntegerDivision.h"
#include <cassert> #include <cassert>
#include <iterator> #include <iterator>

View File

@ -15,26 +15,27 @@
#include "ARM.h" #include "ARM.h"
#include "ARMBaseInstrInfo.h" #include "ARMBaseInstrInfo.h"
#include "ARMSubtarget.h" #include "ARMSubtarget.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/TargetTransformInfo.h" #include "llvm/Analysis/TargetTransformInfo.h"
#include "llvm/CodeGen/TargetLowering.h" #include "llvm/CodeGen/TargetLowering.h"
#include "llvm/CodeGen/TargetPassConfig.h" #include "llvm/CodeGen/TargetPassConfig.h"
#include "llvm/CodeGen/TargetSubtargetInfo.h" #include "llvm/CodeGen/TargetSubtargetInfo.h"
#include "llvm/InitializePasses.h"
#include "llvm/IR/BasicBlock.h" #include "llvm/IR/BasicBlock.h"
#include "llvm/IR/Constant.h" #include "llvm/IR/Constant.h"
#include "llvm/IR/Constants.h" #include "llvm/IR/Constants.h"
#include "llvm/IR/DerivedTypes.h" #include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Function.h" #include "llvm/IR/Function.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/InstrTypes.h" #include "llvm/IR/InstrTypes.h"
#include "llvm/IR/Instruction.h" #include "llvm/IR/Instruction.h"
#include "llvm/IR/Instructions.h" #include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h" #include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Intrinsics.h" #include "llvm/IR/Intrinsics.h"
#include "llvm/IR/IntrinsicsARM.h" #include "llvm/IR/IntrinsicsARM.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/PatternMatch.h" #include "llvm/IR/PatternMatch.h"
#include "llvm/IR/Type.h" #include "llvm/IR/Type.h"
#include "llvm/IR/Value.h" #include "llvm/IR/Value.h"
#include "llvm/InitializePasses.h"
#include "llvm/Pass.h" #include "llvm/Pass.h"
#include "llvm/Support/Casting.h" #include "llvm/Support/Casting.h"
#include "llvm/Transforms/Utils/Local.h" #include "llvm/Transforms/Utils/Local.h"

View File

@ -18,6 +18,7 @@
#include "llvm/Analysis/CaptureTracking.h" #include "llvm/Analysis/CaptureTracking.h"
#include "llvm/Analysis/LazyValueInfo.h" #include "llvm/Analysis/LazyValueInfo.h"
#include "llvm/Analysis/MemoryBuiltins.h" #include "llvm/Analysis/MemoryBuiltins.h"
#include "llvm/Analysis/ScalarEvolution.h"
#include "llvm/Analysis/ValueTracking.h" #include "llvm/Analysis/ValueTracking.h"
#include "llvm/IR/IRBuilder.h" #include "llvm/IR/IRBuilder.h"
#include "llvm/IR/IntrinsicInst.h" #include "llvm/IR/IntrinsicInst.h"

View File

@ -11,6 +11,7 @@
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
#include "llvm/Transforms/Scalar/WarnMissedTransforms.h" #include "llvm/Transforms/Scalar/WarnMissedTransforms.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/OptimizationRemarkEmitter.h" #include "llvm/Analysis/OptimizationRemarkEmitter.h"
#include "llvm/InitializePasses.h" #include "llvm/InitializePasses.h"
#include "llvm/Transforms/Utils/LoopUtils.h" #include "llvm/Transforms/Utils/LoopUtils.h"

View File

@ -7,7 +7,10 @@
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
#include "llvm/Transforms/Utils/LoopUtils.h" #include "llvm/Transforms/Utils/LoopUtils.h"
#include "llvm/Analysis/AssumptionCache.h"
#include "llvm/Analysis/ScalarEvolution.h"
#include "llvm/AsmParser/Parser.h" #include "llvm/AsmParser/Parser.h"
#include "llvm/IR/Dominators.h"
#include "llvm/Support/SourceMgr.h" #include "llvm/Support/SourceMgr.h"
#include "gtest/gtest.h" #include "gtest/gtest.h"