22#ifndef POLLY_DEPENDENCE_INFO_H
23#define POLLY_DEPENDENCE_INFO_H
133 void print(llvm::raw_ostream &OS)
const;
226 : PassInfoMixin<DependenceInfoPrinterPass> {
310 void print(raw_ostream &OS,
const Module *
M =
nullptr)
const override;
336 llvm::PassRegistry &);
polly dump Polly Dump Function
polly dump Polly Dump Module
Dependences::StatementToIslMapTy StatementToIslMapTy
static RegisterPass< ScopPrinterWrapperPass > M("dot-scops", "Polly - Print Scops of function")
bool runOnFunction(Function &F) override
Compute the dependence information on-the-fly for the function.
void getAnalysisUsage(AnalysisUsage &AU) const override
Register all analyses and transformation required.
ScopToDepsMapTy ScopToDepsMap
Scop to Dependence map for the current function.
const Dependences & recomputeDependences(Scop *S, Dependences::AnalysisLevel Level)
Recompute dependences from schedule and memory accesses.
DenseMap< Scop *, std::unique_ptr< Dependences > > ScopToDepsMapTy
DependenceInfoWrapperPass()
Construct a new DependenceInfoWrapper pass.
const Dependences & getDependences(Scop *S, Dependences::AnalysisLevel Level)
Return the dependence information for the given SCoP.
void releaseMemory() override
Release the internal memory.
void print(raw_ostream &OS, const Module *M=nullptr) const override
Print the dependences for the current function to OS.
void printScop(raw_ostream &OS, Scop &) const override
Print the dependences for the given SCoP to OS.
void getAnalysisUsage(AnalysisUsage &AU) const override
Register all analyses and transformation required.
const Dependences & getDependences(Dependences::AnalysisLevel Level)
Return the dependence information for the current SCoP.
void releaseMemory() override
Release the internal memory.
const Dependences & recomputeDependences(Dependences::AnalysisLevel Level)
Recompute dependences from schedule and memory accesses.
std::unique_ptr< Dependences > D[Dependences::NumAnalysisLevels]
Dependences struct for the current SCoP.
bool runOnScop(Scop &S) override
Compute the dependence information for the SCoP S.
void abandonDependences()
Invalidate the dependence information and recompute it when needed again.
DependenceInfo()
Construct a new DependenceInfo pass.
The accumulated dependence information for a SCoP.
void setReductionDependences(MemoryAccess *MA, __isl_take isl_map *Deps)
Set the reduction dependences for MA to Deps.
DenseMap< ScopStmt *, isl::map > StatementToIslMapTy
Map type to associate statements with schedules.
~Dependences()
Destructor that will free internal objects.
isl_union_map * TC_RED
The (reverse) transitive closure of reduction dependences.
void addPrivatizationDependences()
Calculate and add at the privatization dependences.
friend struct DependenceInfoPrinterPass
bool isParallel(__isl_keep isl_union_map *Schedule, __isl_take isl_union_map *Deps, __isl_give isl_pw_aff **MinDistancePtr=nullptr) const
Check if a partial schedule is parallel wrt to Deps.
const AnalysisLevel Level
Granularity of this dependence analysis.
friend class DependenceInfo
void print(llvm::raw_ostream &OS) const
Print the stored dependence information.
const ReductionDependencesMapTy & getReductionDependences() const
Return all reduction dependences.
void calculateDependences(Scop &S)
Calculate the dependences for a certain SCoP S.
bool hasValidDependences() const
Report if valid dependences are available.
isl_union_map * RED
The special reduction dependences.
isl_union_map * RAW
The different basic kinds of dependences we calculate.
void dump() const
Dump the dependence information stored to the dbgs stream.
AnalysisLevel getDependenceLevel()
Return the granularity of this dependence analysis.
const std::shared_ptr< isl_ctx > & getSharedIslCtx() const
isl::union_map getDependences(int Kinds) const
Get the dependences of type Kinds.
bool isValidSchedule(Scop &S, const StatementToIslMapTy &NewSchedules) const
Check if a new schedule is valid.
friend struct DependenceAnalysis
Allow the DependenceInfo access to private members and methods.
void releaseMemory()
Free the objects associated with this Dependences struct.
Type
The type of the dependences.
std::shared_ptr< isl_ctx > IslCtx
Isl context from the SCoP.
Dependences(const std::shared_ptr< isl_ctx > &IslCtx, AnalysisLevel Level)
Create an empty dependences struct.
friend class DependenceInfoWrapperPass
DenseMap< MemoryAccess *, isl_map * > ReductionDependencesMapTy
Map type for reduction dependences.
ReductionDependencesMapTy ReductionDependences
Mapping from memory accesses to their reduction dependences.
Represent memory accesses in statements.
void initializeDependenceInfoWrapperPassPass(llvm::PassRegistry &)
void initializeDependenceInfoPrinterLegacyPassPass(llvm::PassRegistry &)
void initializeDependenceInfoPass(llvm::PassRegistry &)
void initializeDependenceInfoPrinterLegacyFunctionPassPass(llvm::PassRegistry &)
llvm::Pass * createDependenceInfoPass()
llvm::Pass * createDependenceInfoWrapperPassPass()
llvm::Pass * createDependenceInfoPrinterLegacyPass(llvm::raw_ostream &OS)
llvm::Pass * createDependenceInfoPrinterLegacyFunctionPass(llvm::raw_ostream &OS)
AnalysisManager< Scop, ScopStandardAnalysisResults & > ScopAnalysisManager
const Dependences & getDependences(Dependences::AnalysisLevel Level)
Return the dependence information for the current SCoP.
std::unique_ptr< Dependences > D[Dependences::NumAnalysisLevels]
const Dependences & recomputeDependences(Dependences::AnalysisLevel Level)
Recompute dependences from schedule and memory accesses.
void abandonDependences()
Invalidate the dependence information and recompute it when needed again.
Result run(Scop &S, ScopAnalysisManager &SAM, ScopStandardAnalysisResults &SAR)
DependenceInfoPrinterPass(raw_ostream &OS)
PreservedAnalyses run(Scop &S, ScopAnalysisManager &, ScopStandardAnalysisResults &, SPMUpdater &)