forked from OSchip/llvm-project
[NFC] Reduce include files dependency.
1. Removed #include "...AliasAnalysis.h" in other headers and modules. 2. Cleaned up includes in AliasAnalysis.h. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D92489
This commit is contained in:
parent
415fab6f67
commit
2ce38b3f03
|
@ -42,8 +42,6 @@
|
|||
#include "llvm/ADT/Optional.h"
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
#include "llvm/Analysis/MemoryLocation.h"
|
||||
#include "llvm/Analysis/TargetLibraryInfo.h"
|
||||
#include "llvm/IR/Function.h"
|
||||
#include "llvm/IR/Instruction.h"
|
||||
#include "llvm/IR/Instructions.h"
|
||||
#include "llvm/IR/PassManager.h"
|
||||
|
@ -59,6 +57,7 @@ class AnalysisUsage;
|
|||
class BasicAAResult;
|
||||
class BasicBlock;
|
||||
class DominatorTree;
|
||||
class Function;
|
||||
class Value;
|
||||
|
||||
/// The possible results of an alias query.
|
||||
|
@ -1172,12 +1171,7 @@ public:
|
|||
ResultGetters.push_back(&getModuleAAResultImpl<AnalysisT>);
|
||||
}
|
||||
|
||||
Result run(Function &F, FunctionAnalysisManager &AM) {
|
||||
Result R(AM.getResult<TargetLibraryAnalysis>(F));
|
||||
for (auto &Getter : ResultGetters)
|
||||
(*Getter)(F, AM, R);
|
||||
return R;
|
||||
}
|
||||
Result run(Function &F, FunctionAnalysisManager &AM);
|
||||
|
||||
private:
|
||||
friend AnalysisInfoMixin<AAManager>;
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "llvm/ADT/DenseMapInfo.h"
|
||||
#include "llvm/ADT/ilist.h"
|
||||
#include "llvm/ADT/ilist_node.h"
|
||||
#include "llvm/Analysis/AliasAnalysis.h"
|
||||
#include "llvm/Analysis/MemoryLocation.h"
|
||||
#include "llvm/IR/Instruction.h"
|
||||
#include "llvm/IR/Metadata.h"
|
||||
#include "llvm/IR/PassManager.h"
|
||||
|
@ -34,6 +34,7 @@
|
|||
|
||||
namespace llvm {
|
||||
|
||||
class AAResults;
|
||||
class AliasSetTracker;
|
||||
class BasicBlock;
|
||||
class LoadInst;
|
||||
|
@ -46,6 +47,8 @@ class StoreInst;
|
|||
class VAArgInst;
|
||||
class Value;
|
||||
|
||||
enum AliasResult : uint8_t;
|
||||
|
||||
class AliasSet : public ilist_node<AliasSet> {
|
||||
friend class AliasSetTracker;
|
||||
|
||||
|
@ -294,7 +297,7 @@ private:
|
|||
void addPointer(AliasSetTracker &AST, PointerRec &Entry, LocationSize Size,
|
||||
const AAMDNodes &AAInfo, bool KnownMustAlias = false,
|
||||
bool SkipSizeUpdate = false);
|
||||
void addUnknownInst(Instruction *I, AliasAnalysis &AA);
|
||||
void addUnknownInst(Instruction *I, AAResults &AA);
|
||||
|
||||
void removeUnknownInst(AliasSetTracker &AST, Instruction *I) {
|
||||
bool WasEmpty = UnknownInsts.empty();
|
||||
|
@ -312,8 +315,8 @@ public:
|
|||
/// If the specified pointer "may" (or must) alias one of the members in the
|
||||
/// set return the appropriate AliasResult. Otherwise return NoAlias.
|
||||
AliasResult aliasesPointer(const Value *Ptr, LocationSize Size,
|
||||
const AAMDNodes &AAInfo, AliasAnalysis &AA) const;
|
||||
bool aliasesUnknownInst(const Instruction *Inst, AliasAnalysis &AA) const;
|
||||
const AAMDNodes &AAInfo, AAResults &AA) const;
|
||||
bool aliasesUnknownInst(const Instruction *Inst, AAResults &AA) const;
|
||||
};
|
||||
|
||||
inline raw_ostream& operator<<(raw_ostream &OS, const AliasSet &AS) {
|
||||
|
@ -339,7 +342,7 @@ class AliasSetTracker {
|
|||
/// handle.
|
||||
struct ASTCallbackVHDenseMapInfo : public DenseMapInfo<Value *> {};
|
||||
|
||||
AliasAnalysis &AA;
|
||||
AAResults &AA;
|
||||
MemorySSA *MSSA = nullptr;
|
||||
Loop *L = nullptr;
|
||||
ilist<AliasSet> AliasSets;
|
||||
|
@ -353,9 +356,9 @@ class AliasSetTracker {
|
|||
public:
|
||||
/// Create an empty collection of AliasSets, and use the specified alias
|
||||
/// analysis object to disambiguate load and store addresses.
|
||||
explicit AliasSetTracker(AliasAnalysis &aa) : AA(aa) {}
|
||||
explicit AliasSetTracker(AliasAnalysis &aa, MemorySSA *mssa, Loop *l)
|
||||
: AA(aa), MSSA(mssa), L(l) {}
|
||||
explicit AliasSetTracker(AAResults &AA) : AA(AA) {}
|
||||
explicit AliasSetTracker(AAResults &AA, MemorySSA *MSSA, Loop *L)
|
||||
: AA(AA), MSSA(MSSA), L(L) {}
|
||||
~AliasSetTracker() { clear(); }
|
||||
|
||||
/// These methods are used to add different types of instructions to the alias
|
||||
|
@ -394,7 +397,7 @@ public:
|
|||
AliasSet &getAliasSetFor(const MemoryLocation &MemLoc);
|
||||
|
||||
/// Return the underlying alias analysis object used by this tracker.
|
||||
AliasAnalysis &getAliasAnalysis() const { return AA; }
|
||||
AAResults &getAliasAnalysis() const { return AA; }
|
||||
|
||||
/// This method is used to remove a pointer value from the AliasSetTracker
|
||||
/// entirely. It should be used when an instruction is deleted from the
|
||||
|
|
|
@ -18,8 +18,6 @@
|
|||
#include "llvm/ADT/SmallPtrSet.h"
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
#include "llvm/Analysis/AliasAnalysis.h"
|
||||
#include "llvm/Analysis/AssumptionCache.h"
|
||||
#include "llvm/Analysis/MemoryLocation.h"
|
||||
#include "llvm/IR/InstrTypes.h"
|
||||
#include "llvm/IR/PassManager.h"
|
||||
#include "llvm/Pass.h"
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
#define LLVM_LIB_ANALYSIS_OBJCARCANALYSISUTILS_H
|
||||
|
||||
#include "llvm/ADT/Optional.h"
|
||||
#include "llvm/Analysis/AliasAnalysis.h"
|
||||
#include "llvm/Analysis/ObjCARCInstKind.h"
|
||||
#include "llvm/Analysis/ValueTracking.h"
|
||||
#include "llvm/IR/Constants.h"
|
||||
|
@ -31,6 +30,9 @@
|
|||
#include "llvm/IR/ValueHandle.h"
|
||||
|
||||
namespace llvm {
|
||||
|
||||
class AAResults;
|
||||
|
||||
namespace objcarc {
|
||||
|
||||
/// A handy option to enable/disable all ARC Optimizations.
|
||||
|
@ -161,24 +163,7 @@ inline bool IsPotentialRetainableObjPtr(const Value *Op) {
|
|||
return true;
|
||||
}
|
||||
|
||||
inline bool IsPotentialRetainableObjPtr(const Value *Op,
|
||||
AliasAnalysis &AA) {
|
||||
// First make the rudimentary check.
|
||||
if (!IsPotentialRetainableObjPtr(Op))
|
||||
return false;
|
||||
|
||||
// Objects in constant memory are not reference-counted.
|
||||
if (AA.pointsToConstantMemory(Op))
|
||||
return false;
|
||||
|
||||
// Pointers in constant memory are not pointing to reference-counted objects.
|
||||
if (const LoadInst *LI = dyn_cast<LoadInst>(Op))
|
||||
if (AA.pointsToConstantMemory(LI->getPointerOperand()))
|
||||
return false;
|
||||
|
||||
// Otherwise assume the worst.
|
||||
return true;
|
||||
}
|
||||
bool IsPotentialRetainableObjPtr(const Value *Op, AAResults &AA);
|
||||
|
||||
/// Helper for GetARCInstKind. Determines what kind of construct CS
|
||||
/// is.
|
||||
|
|
|
@ -40,8 +40,6 @@
|
|||
#ifndef LLVM_LIB_CODEGEN_MACHINEPIPELINER_H
|
||||
#define LLVM_LIB_CODEGEN_MACHINEPIPELINER_H
|
||||
|
||||
#include "llvm/Analysis/AliasAnalysis.h"
|
||||
|
||||
#include "llvm/CodeGen/MachineDominators.h"
|
||||
#include "llvm/CodeGen/MachineOptimizationRemarkEmitter.h"
|
||||
#include "llvm/CodeGen/RegisterClassInfo.h"
|
||||
|
@ -51,6 +49,7 @@
|
|||
|
||||
namespace llvm {
|
||||
|
||||
class AAResults;
|
||||
class NodeSet;
|
||||
class SMSchedule;
|
||||
|
||||
|
@ -92,15 +91,7 @@ public:
|
|||
|
||||
bool runOnMachineFunction(MachineFunction &MF) override;
|
||||
|
||||
void getAnalysisUsage(AnalysisUsage &AU) const override {
|
||||
AU.addRequired<AAResultsWrapperPass>();
|
||||
AU.addPreserved<AAResultsWrapperPass>();
|
||||
AU.addRequired<MachineLoopInfo>();
|
||||
AU.addRequired<MachineDominatorTree>();
|
||||
AU.addRequired<LiveIntervals>();
|
||||
AU.addRequired<MachineOptimizationRemarkEmitterPass>();
|
||||
MachineFunctionPass::getAnalysisUsage(AU);
|
||||
}
|
||||
void getAnalysisUsage(AnalysisUsage &AU) const override;
|
||||
|
||||
private:
|
||||
void preprocessPhiNodes(MachineBasicBlock &B);
|
||||
|
@ -285,7 +276,7 @@ public:
|
|||
static bool classof(const ScheduleDAGInstrs *DAG) { return true; }
|
||||
|
||||
private:
|
||||
void addLoopCarriedDependences(AliasAnalysis *AA);
|
||||
void addLoopCarriedDependences(AAResults *AA);
|
||||
void updatePhiDependences();
|
||||
void changeDependences();
|
||||
unsigned calculateResMII();
|
||||
|
|
|
@ -102,7 +102,6 @@
|
|||
#include "llvm/ADT/MapVector.h"
|
||||
#include "llvm/ADT/STLExtras.h"
|
||||
#include "llvm/ADT/SetVector.h"
|
||||
#include "llvm/Analysis/AliasAnalysis.h"
|
||||
#include "llvm/Analysis/AssumeBundleQueries.h"
|
||||
#include "llvm/Analysis/CFG.h"
|
||||
#include "llvm/Analysis/CGSCCPassManager.h"
|
||||
|
@ -128,6 +127,8 @@ struct AbstractAttribute;
|
|||
struct InformationCache;
|
||||
struct AAIsDead;
|
||||
|
||||
class AAManager;
|
||||
class AAResults;
|
||||
class Function;
|
||||
|
||||
/// The value passed to the line option that defines the maximal initialization
|
||||
|
@ -863,9 +864,7 @@ struct InformationCache {
|
|||
}
|
||||
|
||||
/// Return AliasAnalysis Result for function \p F.
|
||||
AAResults *getAAResultsForFunction(const Function &F) {
|
||||
return AG.getAnalysis<AAManager>(F);
|
||||
}
|
||||
AAResults *getAAResultsForFunction(const Function &F);
|
||||
|
||||
/// Return true if \p Arg is involved in a must-tail call, thus the argument
|
||||
/// of the caller or callee.
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
#include "llvm/ADT/SmallPtrSet.h"
|
||||
#include "llvm/ADT/SmallSet.h"
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
#include "llvm/Analysis/AliasAnalysis.h"
|
||||
#include "llvm/Analysis/BlockFrequencyInfo.h"
|
||||
#include "llvm/Analysis/BranchProbabilityInfo.h"
|
||||
#include "llvm/Analysis/DomTreeUpdater.h"
|
||||
|
@ -29,6 +28,7 @@
|
|||
|
||||
namespace llvm {
|
||||
|
||||
class AAResults;
|
||||
class BasicBlock;
|
||||
class BinaryOperator;
|
||||
class BranchInst;
|
||||
|
@ -41,6 +41,8 @@ class IntrinsicInst;
|
|||
class LazyValueInfo;
|
||||
class LoadInst;
|
||||
class PHINode;
|
||||
class SelectInst;
|
||||
class SwitchInst;
|
||||
class TargetLibraryInfo;
|
||||
class Value;
|
||||
|
||||
|
@ -77,7 +79,7 @@ enum ConstantPreference { WantInteger, WantBlockAddress };
|
|||
class JumpThreadingPass : public PassInfoMixin<JumpThreadingPass> {
|
||||
TargetLibraryInfo *TLI;
|
||||
LazyValueInfo *LVI;
|
||||
AliasAnalysis *AA;
|
||||
AAResults *AA;
|
||||
DomTreeUpdater *DTU;
|
||||
std::unique_ptr<BlockFrequencyInfo> BFI;
|
||||
std::unique_ptr<BranchProbabilityInfo> BPI;
|
||||
|
@ -97,10 +99,10 @@ public:
|
|||
JumpThreadingPass(bool InsertFreezeWhenUnfoldingSelect = false, int T = -1);
|
||||
|
||||
// Glue for old PM.
|
||||
bool runImpl(Function &F, TargetLibraryInfo *TLI_, LazyValueInfo *LVI_,
|
||||
AliasAnalysis *AA_, DomTreeUpdater *DTU_, bool HasProfileData_,
|
||||
std::unique_ptr<BlockFrequencyInfo> BFI_,
|
||||
std::unique_ptr<BranchProbabilityInfo> BPI_);
|
||||
bool runImpl(Function &F, TargetLibraryInfo *TLI, LazyValueInfo *LVI,
|
||||
AAResults *AA, DomTreeUpdater *DTU, bool HasProfileData,
|
||||
std::unique_ptr<BlockFrequencyInfo> BFI,
|
||||
std::unique_ptr<BranchProbabilityInfo> BPI);
|
||||
|
||||
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
#include "llvm/ADT/PostOrderIterator.h"
|
||||
#include "llvm/ADT/PriorityWorklist.h"
|
||||
#include "llvm/ADT/STLExtras.h"
|
||||
#include "llvm/Analysis/AliasAnalysis.h"
|
||||
#include "llvm/Analysis/AssumptionCache.h"
|
||||
#include "llvm/Analysis/BasicAliasAnalysis.h"
|
||||
#include "llvm/Analysis/BlockFrequencyInfo.h"
|
||||
#include "llvm/Analysis/GlobalsModRef.h"
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
#ifndef LLVM_TRANSFORMS_SCALAR_MEMCPYOPTIMIZER_H
|
||||
#define LLVM_TRANSFORMS_SCALAR_MEMCPYOPTIMIZER_H
|
||||
|
||||
#include "llvm/Analysis/AliasAnalysis.h"
|
||||
#include "llvm/IR/BasicBlock.h"
|
||||
#include "llvm/IR/PassManager.h"
|
||||
#include <cstdint>
|
||||
|
@ -22,11 +21,14 @@
|
|||
|
||||
namespace llvm {
|
||||
|
||||
class AAResults;
|
||||
class AssumptionCache;
|
||||
class CallBase;
|
||||
class CallInst;
|
||||
class DominatorTree;
|
||||
class Function;
|
||||
class Instruction;
|
||||
class LoadInst;
|
||||
class MemCpyInst;
|
||||
class MemMoveInst;
|
||||
class MemoryDependenceResults;
|
||||
|
@ -40,7 +42,7 @@ class Value;
|
|||
class MemCpyOptPass : public PassInfoMixin<MemCpyOptPass> {
|
||||
MemoryDependenceResults *MD = nullptr;
|
||||
TargetLibraryInfo *TLI = nullptr;
|
||||
AliasAnalysis *AA = nullptr;
|
||||
AAResults *AA = nullptr;
|
||||
AssumptionCache *AC = nullptr;
|
||||
DominatorTree *DT = nullptr;
|
||||
MemorySSA *MSSA = nullptr;
|
||||
|
@ -52,9 +54,9 @@ public:
|
|||
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
|
||||
|
||||
// Glue for the old PM.
|
||||
bool runImpl(Function &F, MemoryDependenceResults *MD_,
|
||||
TargetLibraryInfo *TLI_, AliasAnalysis *AA_,
|
||||
AssumptionCache *AC_, DominatorTree *DT_, MemorySSA *MSSA_);
|
||||
bool runImpl(Function &F, MemoryDependenceResults *MD, TargetLibraryInfo *TLI,
|
||||
AAResults *AA, AssumptionCache *AC, DominatorTree *DT,
|
||||
MemorySSA *MSSA);
|
||||
|
||||
private:
|
||||
// Helper functions
|
||||
|
|
|
@ -843,6 +843,13 @@ void AAResultsWrapperPass::getAnalysisUsage(AnalysisUsage &AU) const {
|
|||
AU.addUsedIfAvailable<ExternalAAWrapperPass>();
|
||||
}
|
||||
|
||||
AAManager::Result AAManager::run(Function &F, FunctionAnalysisManager &AM) {
|
||||
Result R(AM.getResult<TargetLibraryAnalysis>(F));
|
||||
for (auto &Getter : ResultGetters)
|
||||
(*Getter)(F, AM, R);
|
||||
return R;
|
||||
}
|
||||
|
||||
AAResults llvm::createLegacyPMAAResults(Pass &P, Function &F,
|
||||
BasicAAResult &BAR) {
|
||||
AAResults AAR(P.getAnalysis<TargetLibraryInfoWrapperPass>().getTLI(F));
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
|
||||
#include "llvm/Analysis/IVDescriptors.h"
|
||||
#include "llvm/ADT/ScopeExit.h"
|
||||
#include "llvm/Analysis/AliasAnalysis.h"
|
||||
#include "llvm/Analysis/BasicAliasAnalysis.h"
|
||||
#include "llvm/Analysis/DemandedBits.h"
|
||||
#include "llvm/Analysis/DomTreeUpdater.h"
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#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"
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/Analysis/ObjCARCAnalysisUtils.h"
|
||||
#include "llvm/Analysis/AliasAnalysis.h"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
|
||||
using namespace llvm;
|
||||
|
@ -23,3 +24,22 @@ bool llvm::objcarc::EnableARCOpts;
|
|||
static cl::opt<bool, true> EnableARCOptimizations(
|
||||
"enable-objc-arc-opts", cl::desc("enable/disable all ARC Optimizations"),
|
||||
cl::location(EnableARCOpts), cl::init(true), cl::Hidden);
|
||||
|
||||
bool llvm::objcarc::IsPotentialRetainableObjPtr(const Value *Op,
|
||||
AAResults &AA) {
|
||||
// First make the rudimentary check.
|
||||
if (!IsPotentialRetainableObjPtr(Op))
|
||||
return false;
|
||||
|
||||
// Objects in constant memory are not reference-counted.
|
||||
if (AA.pointsToConstantMemory(Op))
|
||||
return false;
|
||||
|
||||
// Pointers in constant memory are not pointing to reference-counted objects.
|
||||
if (const LoadInst *LI = dyn_cast<LoadInst>(Op))
|
||||
if (AA.pointsToConstantMemory(LI->getPointerOperand()))
|
||||
return false;
|
||||
|
||||
// Otherwise assume the worst.
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
|
||||
#include "llvm/CodeGen/LiveRangeEdit.h"
|
||||
#include "llvm/ADT/Statistic.h"
|
||||
#include "llvm/Analysis/AliasAnalysis.h"
|
||||
#include "llvm/CodeGen/CalcSpillWeights.h"
|
||||
#include "llvm/CodeGen/LiveIntervals.h"
|
||||
#include "llvm/CodeGen/MachineRegisterInfo.h"
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/CodeGen/MachineFunctionPass.h"
|
||||
#include "llvm/Analysis/AliasAnalysis.h"
|
||||
#include "llvm/Analysis/BasicAliasAnalysis.h"
|
||||
#include "llvm/Analysis/DominanceFrontier.h"
|
||||
#include "llvm/Analysis/GlobalsModRef.h"
|
||||
|
|
|
@ -442,6 +442,16 @@ bool MachinePipeliner::swingModuloScheduler(MachineLoop &L) {
|
|||
return SMS.hasNewSchedule();
|
||||
}
|
||||
|
||||
void MachinePipeliner::getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.addRequired<AAResultsWrapperPass>();
|
||||
AU.addPreserved<AAResultsWrapperPass>();
|
||||
AU.addRequired<MachineLoopInfo>();
|
||||
AU.addRequired<MachineDominatorTree>();
|
||||
AU.addRequired<LiveIntervals>();
|
||||
AU.addRequired<MachineOptimizationRemarkEmitterPass>();
|
||||
MachineFunctionPass::getAnalysisUsage(AU);
|
||||
}
|
||||
|
||||
void SwingSchedulerDAG::setMII(unsigned ResMII, unsigned RecMII) {
|
||||
if (II_setByPragma > 0)
|
||||
MII = II_setByPragma;
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include "llvm/ADT/Statistic.h"
|
||||
#include "llvm/Analysis/AliasAnalysis.h"
|
||||
#include "llvm/Analysis/MemoryLocation.h"
|
||||
#include "llvm/Analysis/TargetLibraryInfo.h"
|
||||
#include "llvm/Analysis/VectorUtils.h"
|
||||
#include "llvm/CodeGen/DAGCombine.h"
|
||||
#include "llvm/CodeGen/ISDOpcodes.h"
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/LTO/LTOBackend.h"
|
||||
#include "llvm/Analysis/AliasAnalysis.h"
|
||||
#include "llvm/Analysis/CGSCCPassManager.h"
|
||||
#include "llvm/Analysis/ModuleSummaryAnalysis.h"
|
||||
#include "llvm/Analysis/TargetLibraryInfo.h"
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include "llvm/Analysis/AssumptionCache.h"
|
||||
#include "llvm/Analysis/GlobalsModRef.h"
|
||||
#include "llvm/Analysis/LoopAccessAnalysis.h"
|
||||
#include "llvm/Analysis/TargetLibraryInfo.h"
|
||||
#include "llvm/CodeGen/TargetPassConfig.h"
|
||||
#include "llvm/IR/Instructions.h"
|
||||
#include "llvm/IR/IntrinsicsARM.h"
|
||||
|
|
|
@ -1909,6 +1909,10 @@ void InformationCache::initializeInformationCache(const Function &CF,
|
|||
InlineableFunctions.insert(&F);
|
||||
}
|
||||
|
||||
AAResults *InformationCache::getAAResultsForFunction(const Function &F) {
|
||||
return AG.getAnalysis<AAManager>(F);
|
||||
}
|
||||
|
||||
InformationCache::FunctionInfo::~FunctionInfo() {
|
||||
// The instruction vectors are allocated using a BumpPtrAllocator, we need to
|
||||
// manually destroy them.
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include "llvm/ADT/SCCIterator.h"
|
||||
#include "llvm/ADT/SmallPtrSet.h"
|
||||
#include "llvm/ADT/Statistic.h"
|
||||
#include "llvm/Analysis/AliasAnalysis.h"
|
||||
#include "llvm/Analysis/AssumeBundleQueries.h"
|
||||
#include "llvm/Analysis/AssumptionCache.h"
|
||||
#include "llvm/Analysis/CaptureTracking.h"
|
||||
|
|
|
@ -60,6 +60,7 @@
|
|||
#include "llvm/ADT/Triple.h"
|
||||
#include "llvm/ADT/iterator_range.h"
|
||||
#include "llvm/Analysis/AliasAnalysis.h"
|
||||
#include "llvm/Analysis/AssumptionCache.h"
|
||||
#include "llvm/Analysis/BasicAliasAnalysis.h"
|
||||
#include "llvm/Analysis/OptimizationRemarkEmitter.h"
|
||||
#include "llvm/Analysis/TypeMetadataUtils.h"
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include "llvm/Analysis/DomTreeUpdater.h"
|
||||
#include "llvm/Analysis/GlobalsModRef.h"
|
||||
#include "llvm/Analysis/OptimizationRemarkEmitter.h"
|
||||
#include "llvm/Analysis/TargetLibraryInfo.h"
|
||||
#include "llvm/IR/BasicBlock.h"
|
||||
#include "llvm/IR/DerivedTypes.h"
|
||||
#include "llvm/IR/Dominators.h"
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include "DependencyAnalysis.h"
|
||||
#include "ObjCARC.h"
|
||||
#include "ProvenanceAnalysis.h"
|
||||
#include "llvm/Analysis/AliasAnalysis.h"
|
||||
#include "llvm/IR/CFG.h"
|
||||
|
||||
using namespace llvm;
|
||||
|
|
|
@ -23,9 +23,7 @@
|
|||
#define LLVM_LIB_TRANSFORMS_OBJCARC_OBJCARC_H
|
||||
|
||||
#include "llvm/Analysis/ObjCARCAnalysisUtils.h"
|
||||
#include "llvm/Analysis/ObjCARCInstKind.h"
|
||||
#include "llvm/Transforms/Utils/Local.h"
|
||||
#include "llvm/Transforms/ObjCARC.h"
|
||||
|
||||
namespace llvm {
|
||||
namespace objcarc {
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include "ObjCARC.h"
|
||||
#include "ProvenanceAnalysis.h"
|
||||
#include "llvm/ADT/Statistic.h"
|
||||
#include "llvm/Analysis/AliasAnalysis.h"
|
||||
#include "llvm/Analysis/EHPersonalities.h"
|
||||
#include "llvm/IR/Dominators.h"
|
||||
#include "llvm/IR/InlineAsm.h"
|
||||
|
@ -62,7 +63,7 @@ namespace {
|
|||
|
||||
class ObjCARCContract {
|
||||
bool Changed;
|
||||
AliasAnalysis *AA;
|
||||
AAResults *AA;
|
||||
DominatorTree *DT;
|
||||
ProvenanceAnalysis PA;
|
||||
ARCRuntimeEntryPoints EP;
|
||||
|
@ -195,7 +196,7 @@ bool ObjCARCContract::contractAutorelease(Function &F, Instruction *Autorelease,
|
|||
static StoreInst *findSafeStoreForStoreStrongContraction(LoadInst *Load,
|
||||
Instruction *Release,
|
||||
ProvenanceAnalysis &PA,
|
||||
AliasAnalysis *AA) {
|
||||
AAResults *AA) {
|
||||
StoreInst *Store = nullptr;
|
||||
bool SawRelease = false;
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
|
||||
#include "llvm/Transforms/Scalar/LoopRotation.h"
|
||||
#include "llvm/ADT/Statistic.h"
|
||||
#include "llvm/Analysis/AssumptionCache.h"
|
||||
#include "llvm/Analysis/InstructionSimplify.h"
|
||||
#include "llvm/Analysis/LoopPass.h"
|
||||
#include "llvm/Analysis/MemorySSA.h"
|
||||
|
|
|
@ -75,6 +75,7 @@
|
|||
#include "llvm/Analysis/ScalarEvolution.h"
|
||||
#include "llvm/Analysis/ScalarEvolutionExpressions.h"
|
||||
#include "llvm/Analysis/ScalarEvolutionNormalization.h"
|
||||
#include "llvm/Analysis/TargetLibraryInfo.h"
|
||||
#include "llvm/Analysis/TargetTransformInfo.h"
|
||||
#include "llvm/Config/llvm-config.h"
|
||||
#include "llvm/IR/BasicBlock.h"
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include "llvm/Analysis/DemandedBits.h"
|
||||
#include "llvm/Analysis/GlobalsModRef.h"
|
||||
#include "llvm/Analysis/OptimizationRemarkEmitter.h"
|
||||
#include "llvm/Analysis/TargetLibraryInfo.h"
|
||||
#include "llvm/Analysis/VectorUtils.h"
|
||||
#include "llvm/IR/InstIterator.h"
|
||||
#include "llvm/IR/IntrinsicInst.h"
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
#include "PassPrinters.h"
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include "llvm/Analysis/AliasAnalysis.h"
|
||||
#include "llvm/Analysis/CGSCCPassManager.h"
|
||||
#include "llvm/Analysis/TargetLibraryInfo.h"
|
||||
#include "llvm/Bitcode/BitcodeWriterPass.h"
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include "llvm/Analysis/AliasSetTracker.h"
|
||||
#include "llvm/ADT/Triple.h"
|
||||
#include "llvm/Analysis/AliasAnalysis.h"
|
||||
#include "llvm/Analysis/TargetLibraryInfo.h"
|
||||
#include "llvm/Analysis/TypeBasedAliasAnalysis.h"
|
||||
#include "llvm/AsmParser/Parser.h"
|
||||
#include "llvm/IR/LLVMContext.h"
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
|
||||
#include "llvm/Analysis/BasicAliasAnalysis.h"
|
||||
#include "llvm/Analysis/AliasAnalysis.h"
|
||||
#include "llvm/Analysis/AssumptionCache.h"
|
||||
#include "llvm/Analysis/TargetLibraryInfo.h"
|
||||
#include "llvm/AsmParser/Parser.h"
|
||||
#include "llvm/IR/Dominators.h"
|
||||
#include "llvm/IR/IRBuilder.h"
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include "llvm/Analysis/DDG.h"
|
||||
#include "llvm/Analysis/AliasAnalysis.h"
|
||||
#include "llvm/Analysis/AssumptionCache.h"
|
||||
#include "llvm/Analysis/BasicAliasAnalysis.h"
|
||||
#include "llvm/Analysis/LoopInfo.h"
|
||||
#include "llvm/Analysis/ScalarEvolution.h"
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include "llvm/Analysis/GlobalsModRef.h"
|
||||
#include "llvm/ADT/Triple.h"
|
||||
#include "llvm/Analysis/CallGraph.h"
|
||||
#include "llvm/Analysis/TargetLibraryInfo.h"
|
||||
#include "llvm/AsmParser/Parser.h"
|
||||
#include "llvm/Support/SourceMgr.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
|
|
@ -7,8 +7,10 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
#include "llvm/Analysis/MemorySSA.h"
|
||||
#include "llvm/Analysis/AliasAnalysis.h"
|
||||
#include "llvm/Analysis/AssumptionCache.h"
|
||||
#include "llvm/Analysis/BasicAliasAnalysis.h"
|
||||
#include "llvm/Analysis/MemorySSAUpdater.h"
|
||||
#include "llvm/Analysis/TargetLibraryInfo.h"
|
||||
#include "llvm/IR/BasicBlock.h"
|
||||
#include "llvm/IR/DataLayout.h"
|
||||
#include "llvm/IR/Dominators.h"
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include "llvm/Analysis/DependenceAnalysis.h"
|
||||
#include "llvm/Analysis/LoopInfo.h"
|
||||
#include "llvm/Analysis/PostDominators.h"
|
||||
#include "llvm/Analysis/TargetLibraryInfo.h"
|
||||
#include "llvm/AsmParser/Parser.h"
|
||||
#include "llvm/IR/Dominators.h"
|
||||
#include "llvm/IR/LLVMContext.h"
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include "../lib/Transforms/Vectorize/VPlan.h"
|
||||
#include "../lib/Transforms/Vectorize/VPlanHCFGBuilder.h"
|
||||
#include "VPlanTestBase.h"
|
||||
#include "llvm/Analysis/TargetLibraryInfo.h"
|
||||
#include "llvm/Analysis/VectorUtils.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
|
|
|
@ -31,8 +31,8 @@ extern bool ModelReadOnlyScalars;
|
|||
/// Build the Polly IR (Scop and ScopStmt) on a Region.
|
||||
class ScopBuilder {
|
||||
|
||||
/// The AliasAnalysis to build AliasSetTracker.
|
||||
AliasAnalysis &AA;
|
||||
/// The AAResults to build AliasSetTracker.
|
||||
AAResults &AA;
|
||||
|
||||
/// Target data for element size computing.
|
||||
const DataLayout &DL;
|
||||
|
@ -823,7 +823,7 @@ class ScopBuilder {
|
|||
void buildSchedule(RegionNode *RN, LoopStackTy &LoopStack);
|
||||
|
||||
public:
|
||||
explicit ScopBuilder(Region *R, AssumptionCache &AC, AliasAnalysis &AA,
|
||||
explicit ScopBuilder(Region *R, AssumptionCache &AC, AAResults &AA,
|
||||
const DataLayout &DL, DominatorTree &DT, LoopInfo &LI,
|
||||
ScopDetection &SD, ScalarEvolution &SE,
|
||||
OptimizationRemarkEmitter &ORE);
|
||||
|
|
|
@ -48,7 +48,6 @@
|
|||
|
||||
#include "polly/ScopDetectionDiagnostic.h"
|
||||
#include "polly/Support/ScopHelper.h"
|
||||
#include "llvm/Analysis/AliasAnalysis.h"
|
||||
#include "llvm/Analysis/AliasSetTracker.h"
|
||||
#include "llvm/Analysis/RegionInfo.h"
|
||||
#include "llvm/Analysis/ScalarEvolutionExpressions.h"
|
||||
|
@ -58,6 +57,8 @@
|
|||
using namespace llvm;
|
||||
|
||||
namespace llvm {
|
||||
class AAResults;
|
||||
|
||||
void initializeScopDetectionWrapperPassPass(PassRegistry &);
|
||||
} // namespace llvm
|
||||
|
||||
|
@ -161,7 +162,7 @@ public:
|
|||
MapInsnToMemAcc InsnToMemAcc;
|
||||
|
||||
/// Initialize a DetectionContext from scratch.
|
||||
DetectionContext(Region &R, AliasAnalysis &AA, bool Verify)
|
||||
DetectionContext(Region &R, AAResults &AA, bool Verify)
|
||||
: CurRegion(R), AST(AA), Verifying(Verify), Log(&R) {}
|
||||
|
||||
/// Initialize a DetectionContext with the data from @p DC.
|
||||
|
@ -197,7 +198,7 @@ private:
|
|||
ScalarEvolution &SE;
|
||||
LoopInfo &LI;
|
||||
RegionInfo &RI;
|
||||
AliasAnalysis &AA;
|
||||
AAResults &AA;
|
||||
//@}
|
||||
|
||||
/// Map to remember detection contexts for all regions.
|
||||
|
@ -518,7 +519,7 @@ private:
|
|||
|
||||
public:
|
||||
ScopDetection(Function &F, const DominatorTree &DT, ScalarEvolution &SE,
|
||||
LoopInfo &LI, RegionInfo &RI, AliasAnalysis &AA,
|
||||
LoopInfo &LI, RegionInfo &RI, AAResults &AA,
|
||||
OptimizationRemarkEmitter &ORE);
|
||||
|
||||
/// Get the RegionInfo stored in this pass.
|
||||
|
|
|
@ -1901,7 +1901,7 @@ private:
|
|||
//@}
|
||||
|
||||
/// Initialize this ScopBuilder.
|
||||
void init(AliasAnalysis &AA, AssumptionCache &AC, DominatorTree &DT,
|
||||
void init(AAResults &AA, AssumptionCache &AC, DominatorTree &DT,
|
||||
LoopInfo &LI);
|
||||
|
||||
/// Add parameter constraints to @p C that imply a non-empty domain.
|
||||
|
@ -2737,15 +2737,15 @@ private:
|
|||
ScopDetection &SD;
|
||||
ScalarEvolution &SE;
|
||||
LoopInfo &LI;
|
||||
AliasAnalysis &AA;
|
||||
AAResults &AA;
|
||||
DominatorTree &DT;
|
||||
AssumptionCache &AC;
|
||||
OptimizationRemarkEmitter &ORE;
|
||||
|
||||
public:
|
||||
ScopInfo(const DataLayout &DL, ScopDetection &SD, ScalarEvolution &SE,
|
||||
LoopInfo &LI, AliasAnalysis &AA, DominatorTree &DT,
|
||||
AssumptionCache &AC, OptimizationRemarkEmitter &ORE);
|
||||
LoopInfo &LI, AAResults &AA, DominatorTree &DT, AssumptionCache &AC,
|
||||
OptimizationRemarkEmitter &ORE);
|
||||
|
||||
/// Get the Scop object for the given Region.
|
||||
///
|
||||
|
|
Loading…
Reference in New Issue