22#ifndef POLLY_DEPENDENCE_INFO_H
23#define POLLY_DEPENDENCE_INFO_H
25#include "llvm/ADT/DenseMap.h"
142 void print(llvm::raw_ostream &OS)
const;
Dependences::StatementToIslMapTy StatementToIslMapTy
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.
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.
Dependences::AnalysisLevel OptAnalysisLevel
DependenceAnalysis::Result runDependenceAnalysis(Scop &S)
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.