Polly 20.0.0git
|
Static Control Part. More...
#include <ScopInfo.h>
Classes | |
struct | ScopStatistics |
Public Types | |
using | MinMaxAccessTy = std::pair< isl::pw_multi_aff, isl::pw_multi_aff > |
Type to represent a pair of minimal/maximal access to an array. | |
using | MinMaxVectorTy = SmallVector< MinMaxAccessTy, 4 > |
Vector of minimal/maximal accesses to different arrays. | |
using | MinMaxVectorPairTy = std::pair< MinMaxVectorTy, MinMaxVectorTy > |
Pair of minimal/maximal access vectors representing read write and read only accesses. | |
using | MinMaxVectorPairVectorTy = SmallVector< MinMaxVectorPairTy, 4 > |
Vector of pair of minimal/maximal access vectors representing non read only and read only accesses for each alias group. | |
Private Types | |
using | StmtSet = std::list< ScopStmt > |
using | ArrayInfoMapTy = std::map< std::pair< AssertingVH< const Value >, MemoryKind >, std::unique_ptr< ScopArrayInfo > > |
using | ArrayNameMapTy = StringMap< std::unique_ptr< ScopArrayInfo > > |
using | ArrayInfoSetTy = SetVector< ScopArrayInfo * > |
Private Member Functions | |
Scop (Region &R, ScalarEvolution &SE, LoopInfo &LI, DominatorTree &DT, ScopDetection::DetectionContext &DC, OptimizationRemarkEmitter &ORE, int ID) | |
Scop constructor; invoked from ScopBuilder::buildScop. | |
MemoryAccess * | lookupBasePtrAccess (MemoryAccess *MA) |
Return the access for the base ptr of MA if any. | |
void | createParameterId (const SCEV *Param) |
Create an id for Param and store it in the ParameterIds map. | |
void | buildContext () |
Build the Context of the Scop. | |
void | addParameterBounds () |
Add the bounds of the parameters to the context. | |
void | simplifyContexts () |
Simplify the assumed and invalid context. | |
void | addScopStmt (BasicBlock *BB, StringRef Name, Loop *SurroundingLoop, std::vector< Instruction * > Instructions) |
Create a new SCoP statement for BB . | |
void | addScopStmt (Region *R, StringRef Name, Loop *SurroundingLoop, std::vector< Instruction * > EntryBlockInstructions) |
Create a new SCoP statement for R . | |
void | removeFromStmtMap (ScopStmt &Stmt) |
Removes Stmt from the StmtMap. | |
void | removeStmtNotInDomainMap () |
Removes all statements where the entry block of the statement does not have a corresponding domain in the domain map (or it is empty). | |
isl::union_map | getAccessesOfType (std::function< bool(MemoryAccess &)> Predicate) |
Collect all memory access relations of a given type. | |
Private Attributes | |
std::shared_ptr< isl_ctx > | IslCtx |
Isl context. | |
ScalarEvolution * | SE |
DominatorTree * | DT |
Region & | R |
The underlying Region. | |
std::optional< std::string > | name |
The name of the SCoP (identical to the regions name) | |
AccFuncVector | AccessFunctions |
bool | IsOptimized = false |
Flag to indicate that the scheduler actually optimized the SCoP. | |
bool | HasSingleExitEdge |
True if the underlying region has a single exiting block. | |
bool | HasErrorBlock = false |
Flag to remember if the SCoP contained an error block or not. | |
unsigned | MaxLoopDepth = 0 |
Max loop depth. | |
unsigned | CopyStmtsNum = 0 |
Number of copy statements. | |
StmtSet | Stmts |
The statements in this Scop. | |
ParameterSetTy | Parameters |
Parameters of this Scop. | |
DenseMap< const SCEV *, isl::id > | ParameterIds |
Mapping from parameters to their ids. | |
ScopDetection::DetectionContext & | DC |
The context of the SCoP created during SCoP detection. | |
OptimizationRemarkEmitter & | ORE |
OptimizationRemarkEmitter object for displaying diagnostic remarks. | |
DenseMap< BasicBlock *, std::vector< ScopStmt * > > | StmtMap |
A map from basic blocks to vector of SCoP statements. | |
DenseMap< Instruction *, ScopStmt * > | InstStmtMap |
A map from instructions to SCoP statements. | |
DenseMap< BasicBlock *, isl::set > | DomainMap |
A map from basic blocks to their domains. | |
isl::set | Context |
Constraints on parameters. | |
SCEVAffinator | Affinator |
The affinator used to translate SCEVs to isl expressions. | |
ArrayInfoMapTy | ScopArrayInfoMap |
A map to remember ScopArrayInfo objects for all base pointers. | |
ArrayNameMapTy | ScopArrayNameMap |
A map to remember ScopArrayInfo objects for all names of memory references. | |
ArrayInfoSetTy | ScopArrayInfoSet |
A set to remember ScopArrayInfo objects. | |
isl::set | AssumedContext |
The assumptions under which this scop was built. | |
isl::set | InvalidContext |
The restrictions under which this SCoP was built. | |
isl::set | DefinedBehaviorContext |
The context under which the SCoP must have defined behavior. | |
isl::schedule | Schedule |
The schedule of the SCoP. | |
bool | HasDisableHeuristicsHint = false |
Is this Scop marked as not to be transformed by an optimization heuristic? | |
bool | ScheduleModified = false |
Whether the schedule has been modified after derived from the CFG by ScopBuilder. | |
MinMaxVectorPairVectorTy | MinMaxAliasGroups |
The set of minimal/maximal accesses for each alias group. | |
ValueToValueMap | InvEquivClassVMap |
Mapping from invariant loads to the representing invariant load of their equivalence class. | |
InvariantEquivClassesTy | InvariantEquivClasses |
List of invariant accesses. | |
long | ArrayIdx = 0 |
The smallest array index not yet assigned. | |
long | StmtIdx = 0 |
The smallest statement index not yet assigned. | |
const int | ID |
A number that uniquely represents a Scop within its function. | |
DenseMap< Value *, MemoryAccess * > | ValueDefAccs |
Map of values to the MemoryAccess that writes its definition. | |
DenseMap< PHINode *, MemoryAccess * > | PHIReadAccs |
Map of values to the MemoryAccess that reads a PHI. | |
DenseMap< const ScopArrayInfo *, SmallVector< MemoryAccess *, 4 > > | ValueUseAccs |
List of all uses (i.e. | |
DenseMap< const ScopArrayInfo *, SmallVector< MemoryAccess *, 4 > > | PHIIncomingAccs |
List of all incoming values (write MemoryAccess) of a MemoryKind::PHI or MemoryKind::ExitPHI scalar. | |
Friends | |
class | ScopBuilder |
Helper functions for printing the Scop. | |
using | array_iterator = ArrayInfoSetTy::iterator |
using | const_array_iterator = ArrayInfoSetTy::const_iterator |
using | array_range = iterator_range< ArrayInfoSetTy::iterator > |
using | const_array_range = iterator_range< ArrayInfoSetTy::const_iterator > |
void | printContext (raw_ostream &OS) const |
void | printArrayInfo (raw_ostream &OS) const |
void | printStatements (raw_ostream &OS, bool PrintInstructions) const |
void | printAliasAssumptions (raw_ostream &OS) const |
Scop (const Scop &)=delete | |
Scop & | operator= (const Scop &)=delete |
~Scop () | |
unsigned | getCopyStmtsNum () |
Get the count of copy statements added to this Scop. | |
ScopStmt * | addScopStmt (isl::map SourceRel, isl::map TargetRel, isl::set Domain) |
Create a new copy statement. | |
void | addAccessFunction (MemoryAccess *Access) |
Add the access function to all MemoryAccess objects of the Scop created in this pass. | |
void | addAccessData (MemoryAccess *Access) |
Add metadata for Access . | |
void | addInvariantEquivClass (const InvariantEquivClassTy &InvariantEquivClass) |
Add new invariant access equivalence class. | |
void | addInvariantLoadMapping (const Value *LoadInst, Value *ClassRep) |
Add mapping from invariant loads to the representing invariant load of their equivalence class. | |
void | removeAccessData (MemoryAccess *Access) |
Remove the metadata stored for Access . | |
ScalarEvolution * | getSE () const |
Return the scalar evolution. | |
DominatorTree * | getDT () const |
Return the dominator tree. | |
LoopInfo * | getLI () const |
Return the LoopInfo used for this Scop. | |
size_t | getNumParams () const |
Get the count of parameters used in this Scop. | |
bool | isParam (const SCEV *Param) const |
Return whether given SCEV is used as the parameter in this Scop. | |
void | addParams (const ParameterSetTy &NewParameters) |
Take a list of parameters and add the new ones to the scop. | |
iterator_range< ParameterSetTy::iterator > | parameters () const |
Return an iterator range containing the scop parameters. | |
iterator_range< InvariantEquivClassesTy::iterator > | invariantEquivClasses () |
Return an iterator range containing invariant accesses. | |
iterator_range< AccFuncVector::iterator > | access_functions () |
Return an iterator range containing all the MemoryAccess objects of the Scop. | |
bool | isEmpty () const |
Return whether this scop is empty, i.e. | |
StringRef | getName () |
array_iterator | array_begin () |
array_iterator | array_end () |
const_array_iterator | array_begin () const |
const_array_iterator | array_end () const |
array_range | arrays () |
const_array_range | arrays () const |
isl::id | getIdForParam (const SCEV *Parameter) const |
Return the isl_id that represents a certain parameter. | |
const Region & | getRegion () const |
Get the maximum region of this static control part. | |
Region & | getRegion () |
Function & | getFunction () const |
Return the function this SCoP is in. | |
bool | contains (const Loop *L) const |
Check if L is contained in the SCoP. | |
bool | contains (const BasicBlock *BB) const |
Check if BB is contained in the SCoP. | |
bool | contains (const Instruction *I) const |
Check if I is contained in the SCoP. | |
BasicBlock * | getExit () const |
Return the unique exit block of the SCoP. | |
BasicBlock * | getExitingBlock () const |
Return the unique exiting block of the SCoP if any. | |
BasicBlock * | getEntry () const |
Return the unique entry block of the SCoP. | |
BasicBlock * | getEnteringBlock () const |
Return the unique entering block of the SCoP if any. | |
bool | isExit (BasicBlock *BB) const |
Return true if BB is the exit block of the SCoP. | |
Region::block_range | blocks () const |
Return a range of all basic blocks in the SCoP. | |
bool | isDominatedBy (const DominatorTree &DT, BasicBlock *BB) const |
Return true if and only if BB dominates the SCoP. | |
unsigned | getMaxLoopDepth () const |
Get the maximum depth of the loop. | |
InvariantEquivClassTy * | lookupInvariantEquivClass (Value *Val) |
Return the invariant equivalence class for Val if any. | |
InvariantEquivClassesTy & | getInvariantAccesses () |
Return the set of invariant accesses. | |
bool | hasInvariantAccesses () |
Check if the scop has any invariant access. | |
void | markAsOptimized () |
Mark the SCoP as optimized by the scheduler. | |
bool | isOptimized () const |
Check if the SCoP has been optimized by the scheduler. | |
int | getID () const |
Return the ID of the Scop. | |
std::pair< std::string, std::string > | getEntryExitStr () const |
Get the name of the entry and exit blocks of this Scop. | |
std::string | getNameStr () const |
Get the name of this Scop. | |
isl::set | getContext () const |
Get the constraint on parameter of this Scop. | |
isl::set | getDefinedBehaviorContext () const |
Return the context where execution behavior is defined. | |
isl::set | getBestKnownDefinedBehaviorContext () const |
Return the define behavior context, or if not available, its approximation from all other contexts. | |
isl::space | getParamSpace () const |
Return space of isl context parameters. | |
isl::space | getFullParamSpace () const |
Return the full space of parameters. | |
isl::set | getAssumedContext () const |
Get the assumed context for this Scop. | |
bool | hasFeasibleRuntimeContext () const |
Return true if the optimized SCoP can be executed. | |
bool | isEffectiveAssumption (isl::set Set, AssumptionSign Sign) |
Check if the assumption in Set is trivial or not. | |
bool | trackAssumption (AssumptionKind Kind, isl::set Set, DebugLoc Loc, AssumptionSign Sign, BasicBlock *BB) |
Track and report an assumption. | |
void | intersectDefinedBehavior (isl::set Set, AssumptionSign Sign) |
Add the conditions from Set (or subtract them if Sign is AS_RESTRICTION) to the defined behaviour context. | |
void | addAssumption (AssumptionKind Kind, isl::set Set, DebugLoc Loc, AssumptionSign Sign, BasicBlock *BB, bool RTC=true) |
Add assumptions to assumed context. | |
void | invalidate (AssumptionKind Kind, DebugLoc Loc, BasicBlock *BB=nullptr) |
Mark the scop as invalid. | |
isl::set | getInvalidContext () const |
Get the invalid context for this Scop. | |
bool | hasTrivialInvalidContext () const |
Return true if and only if the InvalidContext is trivial (=empty). | |
const MinMaxVectorPairVectorTy & | getAliasGroups () const |
Return all alias groups for this SCoP. | |
void | addAliasGroup (MinMaxVectorTy &MinMaxAccessesReadWrite, MinMaxVectorTy &MinMaxAccessesReadOnly) |
void | removeStmts (function_ref< bool(ScopStmt &)> ShouldDelete, bool AfterHoisting=true) |
Remove statements from the list of scop statements. | |
std::string | getContextStr () const |
Get an isl string representing the context. | |
std::string | getAssumedContextStr () const |
Get an isl string representing the assumed context. | |
std::string | getInvalidContextStr () const |
Get an isl string representing the invalid context. | |
ArrayRef< ScopStmt * > | getStmtListFor (BasicBlock *BB) const |
Return the list of ScopStmts that represent the given BB . | |
ScopStmt * | getIncomingStmtFor (const Use &U) const |
Get the statement to put a PHI WRITE into. | |
ScopStmt * | getLastStmtFor (BasicBlock *BB) const |
Return the last statement representing BB . | |
ArrayRef< ScopStmt * > | getStmtListFor (Region *R) const |
Return the ScopStmts that represents the Region R , or nullptr if it is not represented by any statement in this Scop. | |
ArrayRef< ScopStmt * > | getStmtListFor (RegionNode *RN) const |
Return the ScopStmts that represents RN ; can return nullptr if the RegionNode is not within the SCoP or has been removed due to simplifications. | |
ScopStmt * | getStmtFor (Instruction *Inst) const |
Return the ScopStmt an instruction belongs to, or nullptr if it does not belong to any statement in this Scop. | |
size_t | getSize () const |
Return the number of statements in the SCoP. | |
static void | incrementNumberOfAliasingAssumptions (unsigned Step) |
Increment actual number of aliasing assumptions taken. | |
Statements Iterators | |
These iterators iterate over all statements of this Scop. | |
using | iterator = StmtSet::iterator |
using | const_iterator = StmtSet::const_iterator |
using | reverse_iterator = StmtSet::reverse_iterator |
using | const_reverse_iterator = StmtSet::const_reverse_iterator |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
reverse_iterator | rbegin () |
reverse_iterator | rend () |
const_reverse_iterator | rbegin () const |
const_reverse_iterator | rend () const |
const InvariantLoadsSetTy & | getRequiredInvariantLoads () const |
Return the set of required invariant loads. | |
void | addRequiredInvariantLoad (LoadInst *LI) |
Add LI to the set of required invariant loads. | |
const BoxedLoopsSetTy & | getBoxedLoops () const |
Return the set of boxed (thus overapproximated) loops. | |
bool | isNonAffineSubRegion (const Region *R) |
Return true if and only if R is a non-affine subregion. | |
const MapInsnToMemAcc & | getInsnToMemAccMap () const |
ScopArrayInfo * | getOrCreateScopArrayInfo (Value *BasePtr, Type *ElementType, ArrayRef< const SCEV * > Sizes, MemoryKind Kind, const char *BaseName=nullptr) |
Return the (possibly new) ScopArrayInfo object for Access . | |
ScopArrayInfo * | createScopArrayInfo (Type *ElementType, const std::string &BaseName, const std::vector< unsigned > &Sizes) |
Create an array and return the corresponding ScopArrayInfo object. | |
ScopArrayInfo * | getScopArrayInfoOrNull (Value *BasePtr, MemoryKind Kind) |
Return the cached ScopArrayInfo object for BasePtr . | |
ScopArrayInfo * | getScopArrayInfo (Value *BasePtr, MemoryKind Kind) |
Return the cached ScopArrayInfo object for BasePtr . | |
void | invalidateScopArrayInfo (Value *BasePtr, MemoryKind Kind) |
Invalidate ScopArrayInfo object for base address. | |
void | setContext (isl::set NewContext) |
Set new isl context. | |
void | updateMaxLoopDepth (unsigned Depth) |
Update maximal loop depth. | |
void | realignParams () |
Align the parameters in the statement to the scop context. | |
bool | isProfitable (bool ScalarsAreUnprofitable) const |
Return true if this SCoP can be profitably optimized. | |
bool | hasErrorBlock () const |
Return true if the SCoP contained at least one error block. | |
void | notifyErrorBlock () |
Notify SCoP that it contains an error block. | |
bool | hasSingleExitEdge () const |
Return true if the underlying region has a single exiting block. | |
void | print (raw_ostream &OS, bool PrintInstructions) const |
Print the static control part. | |
void | dump () const |
Print the ScopStmt to stderr. | |
isl::ctx | getIslCtx () const |
Get the isl context of this static control part. | |
const std::shared_ptr< isl_ctx > & | getSharedIslCtx () const |
Directly return the shared_ptr of the context. | |
PWACtx | getPwAff (const SCEV *E, BasicBlock *BB=nullptr, bool NonNegative=false, RecordedAssumptionsTy *RecordedAssumptions=nullptr) |
Compute the isl representation for the SCEV E . | |
isl::pw_aff | getPwAffOnly (const SCEV *E, BasicBlock *BB=nullptr, RecordedAssumptionsTy *RecordedAssumptions=nullptr) |
Compute the isl representation for the SCEV E . | |
bool | hasNSWAddRecForLoop (Loop *L) |
Check if an <nsw> AddRec for the loop L is cached. | |
isl::set | getDomainConditions (const ScopStmt *Stmt) const |
Return the domain of Stmt . | |
isl::set | getDomainConditions (BasicBlock *BB) const |
Return the domain of BB . | |
isl::set & | getOrInitEmptyDomain (BasicBlock *BB) |
Return the domain of BB . If it does not exist, create an empty one. | |
bool | isDomainDefined (BasicBlock *BB) const |
Check if domain is determined for BB . | |
void | setDomain (BasicBlock *BB, isl::set &Domain) |
Set domain for BB . | |
isl::union_set | getDomains () const |
Get a union set containing the iteration domains of all statements. | |
isl::union_map | getMayWrites () |
Get a union map of all may-writes performed in the SCoP. | |
isl::union_map | getMustWrites () |
Get a union map of all must-writes performed in the SCoP. | |
isl::union_map | getWrites () |
Get a union map of all writes performed in the SCoP. | |
isl::union_map | getReads () |
Get a union map of all reads performed in the SCoP. | |
isl::union_map | getAccesses () |
Get a union map of all memory accesses performed in the SCoP. | |
isl::union_map | getAccesses (ScopArrayInfo *Array) |
Get a union map of all memory accesses performed in the SCoP. | |
isl::union_map | getSchedule () const |
Get the schedule of all the statements in the SCoP. | |
isl::schedule | getScheduleTree () const |
Get a schedule tree describing the schedule of all statements. | |
void | setSchedule (isl::union_map NewSchedule) |
Update the current schedule. | |
void | setScheduleTree (isl::schedule NewSchedule) |
Update the current schedule. | |
bool | isOriginalSchedule () const |
Whether the schedule is the original schedule as derived from the CFG by ScopBuilder. | |
bool | restrictDomains (isl::union_set Domain) |
Intersects the domains of all statements in the SCoP. | |
int | getRelativeLoopDepth (const Loop *L) const |
Get the depth of a loop relative to the outermost loop in the Scop. | |
ScopArrayInfo * | getArrayInfoByName (const std::string BaseName) |
Find the ScopArrayInfo associated with an isl Id that has name Name . | |
void | simplifySCoP (bool AfterHoisting) |
Simplify the SCoP representation. | |
long | getNextArrayIdx () |
Get the next free array index. | |
long | getNextStmtIdx () |
Get the next free statement index. | |
const SCEV * | getRepresentingInvariantLoadSCEV (const SCEV *S) const |
Get the representing SCEV for S if applicable, otherwise S . | |
MemoryAccess * | getValueDef (const ScopArrayInfo *SAI) const |
Return the MemoryAccess that writes an llvm::Value, represented by a ScopArrayInfo. | |
ArrayRef< MemoryAccess * > | getValueUses (const ScopArrayInfo *SAI) const |
Return all MemoryAccesses that us an llvm::Value, represented by a ScopArrayInfo. | |
MemoryAccess * | getPHIRead (const ScopArrayInfo *SAI) const |
Return the MemoryAccess that represents an llvm::PHINode. | |
ArrayRef< MemoryAccess * > | getPHIIncomings (const ScopArrayInfo *SAI) const |
Return all MemoryAccesses for all incoming statements of a PHINode, represented by a ScopArrayInfo. | |
bool | isEscaping (Instruction *Inst) |
Return whether Inst has a use outside of this SCoP. | |
ScopStatistics | getStatistics () const |
Collect statistic about this SCoP. | |
bool | hasDisableHeuristicsHint () const |
Is this Scop marked as not to be transformed by an optimization heuristic? In this case, only user-directed transformations are allowed. | |
void | markDisableHeuristics () |
Mark this Scop to not apply an optimization heuristic. | |
Static Control Part.
A Scop is the polyhedral representation of a control flow region detected by the Scop detection. It is generated by translating the LLVM-IR and abstracting its effects.
A Scop consists of a set of:
Definition at line 1630 of file ScopInfo.h.
using polly::Scop::array_iterator = ArrayInfoSetTy::iterator |
Definition at line 2053 of file ScopInfo.h.
using polly::Scop::array_range = iterator_range<ArrayInfoSetTy::iterator> |
Definition at line 2055 of file ScopInfo.h.
|
private |
Definition at line 1722 of file ScopInfo.h.
|
private |
Definition at line 1728 of file ScopInfo.h.
|
private |
Definition at line 1726 of file ScopInfo.h.
using polly::Scop::const_array_iterator = ArrayInfoSetTy::const_iterator |
Definition at line 2054 of file ScopInfo.h.
using polly::Scop::const_array_range = iterator_range<ArrayInfoSetTy::const_iterator> |
Definition at line 2056 of file ScopInfo.h.
using polly::Scop::const_iterator = StmtSet::const_iterator |
Definition at line 2350 of file ScopInfo.h.
using polly::Scop::const_reverse_iterator = StmtSet::const_reverse_iterator |
Definition at line 2358 of file ScopInfo.h.
using polly::Scop::iterator = StmtSet::iterator |
Definition at line 2349 of file ScopInfo.h.
using polly::Scop::MinMaxAccessTy = std::pair<isl::pw_multi_aff, isl::pw_multi_aff> |
Type to represent a pair of minimal/maximal access to an array.
Definition at line 1633 of file ScopInfo.h.
using polly::Scop::MinMaxVectorPairTy = std::pair<MinMaxVectorTy, MinMaxVectorTy> |
Pair of minimal/maximal access vectors representing read write and read only accesses.
Definition at line 1640 of file ScopInfo.h.
using polly::Scop::MinMaxVectorPairVectorTy = SmallVector<MinMaxVectorPairTy, 4> |
Vector of pair of minimal/maximal access vectors representing non read only and read only accesses for each alias group.
Definition at line 1644 of file ScopInfo.h.
using polly::Scop::MinMaxVectorTy = SmallVector<MinMaxAccessTy, 4> |
Vector of minimal/maximal accesses to different arrays.
Definition at line 1636 of file ScopInfo.h.
using polly::Scop::reverse_iterator = StmtSet::reverse_iterator |
Definition at line 2357 of file ScopInfo.h.
|
private |
Definition at line 1689 of file ScopInfo.h.
|
private |
Scop constructor; invoked from ScopBuilder::buildScop.
Definition at line 1608 of file ScopInfo.cpp.
References buildContext(), getIslCtx(), ISL_ARG_ALL, isl_ctx_parse_options(), ISL_ON_ERROR_ABORT, isl_options_set_on_error(), isl_options_set_schedule_serialize_sccs(), IslArgs(), IslCtx, and IslOnErrorAbort().
|
delete |
|
default |
|
inline |
Return an iterator range containing all the MemoryAccess objects of the Scop.
Definition at line 2039 of file ScopInfo.h.
References AccessFunctions.
void Scop::addAccessData | ( | MemoryAccess * | Access | ) |
Add metadata for Access
.
Definition at line 2419 of file ScopInfo.cpp.
References assert, polly::MemoryAccess::getOriginalScopArrayInfo(), polly::MemoryAccess::isOriginalAnyPHIKind(), polly::MemoryAccess::isOriginalValueKind(), polly::MemoryAccess::isRead(), polly::MemoryAccess::isWrite(), PHIIncomingAccs, and ValueUseAccs.
Referenced by polly::ScopStmt::ensureValueRead().
|
inline |
Add the access function to all MemoryAccess objects of the Scop created in this pass.
Definition at line 1972 of file ScopInfo.h.
References AccessFunctions, assert, polly::MemoryAccess::getAccessInstruction(), polly::MemoryAccess::getAccessValue(), polly::MemoryAccess::isOriginalPHIKind(), polly::MemoryAccess::isOriginalValueKind(), polly::MemoryAccess::isRead(), polly::MemoryAccess::isWrite(), polly::PHI, PHIReadAccs, and ValueDefAccs.
Referenced by polly::ScopStmt::ensureValueRead(), and polly::ScopStmt::ScopStmt().
|
inline |
Definition at line 2283 of file ScopInfo.h.
References MinMaxAliasGroups.
void Scop::addAssumption | ( | AssumptionKind | Kind, |
isl::set | Set, | ||
DebugLoc | Loc, | ||
AssumptionSign | Sign, | ||
BasicBlock * | BB, | ||
bool | RTC = true |
||
) |
Add assumptions to assumed context.
The assumptions added will be assumed to hold during the execution of the scop. However, as they are generally not statically provable, at code generation time run-time checks will be generated that ensure the assumptions hold.
WARNING: We currently exploit in simplifyAssumedContext the knowledge that assumptions do not change the set of statement instances executed.
Kind | The assumption kind describing the underlying cause. |
Set | The relations between parameters that are assumed to hold. |
Loc | The location in the source that caused this assumption. |
Sign | Enum to indicate if the assumptions in Set are positive (needed/assumptions) or negative (invalid/restrictions). |
BB | The block in which this assumption was taken. Used to calculate hotness when emitting remark. |
RTC | Does the assumption require a runtime check? |
Definition at line 2014 of file ScopInfo.cpp.
References polly::AS_ASSUMPTION, AssumedContext, isl::set::coalesce(), getContext(), isl::set::gist_params(), isl::set::intersect(), intersectDefinedBehavior(), InvalidContext, trackAssumption(), and isl::set::unite().
Referenced by invalidate().
|
inline |
Add new invariant access equivalence class.
Definition at line 1993 of file ScopInfo.h.
References InvariantEquivClasses.
|
inline |
Add mapping from invariant loads to the representing invariant load of their equivalence class.
Definition at line 1999 of file ScopInfo.h.
References InvEquivClassVMap.
|
private |
Add the bounds of the parameters to the context.
Definition at line 1506 of file ScopInfo.cpp.
References addRangeBoundsToSet(), polly::AS_ASSUMPTION, Context, intersectDefinedBehavior(), isl::param, Parameters, and SE.
Referenced by realignParams().
void Scop::addParams | ( | const ParameterSetTy & | NewParameters | ) |
Take a list of parameters and add the new ones to the scop.
Definition at line 1477 of file ScopInfo.cpp.
References createParameterId(), polly::extractConstantFactor(), getRepresentingInvariantLoadSCEV(), Parameters, and SE.
|
inline |
Add LI
to the set of required invariant loads.
Definition at line 2372 of file ScopInfo.h.
References DC, and polly::ScopDetection::DetectionContext::RequiredILS.
|
private |
Create a new SCoP statement for BB
.
A new statement for BB
will be created and added to the statement vector and map.
BB | The basic block we build the statement for. |
Name | The name of the new statement. |
SurroundingLoop | The loop the created statement is contained in. |
Instructions | The instructions in the statement. |
Definition at line 2304 of file ScopInfo.cpp.
References assert, InstStmtMap, StmtMap, and Stmts.
Create a new copy statement.
A new statement will be created and added to the statement vector.
SourceRel | The source location. |
TargetRel | The target location. |
Domain | The original domain under which the copy statement would be executed. |
Definition at line 2341 of file ScopInfo.cpp.
References assert, CopyStmtsNum, Domain, isl::map::domain(), and Stmts.
|
private |
Create a new SCoP statement for R
.
A new statement for R
will be created and added to the statement vector and map.
R | The region we build the statement for. |
Name | The name of the new statement. |
SurroundingLoop | The loop the created statement is contained in. |
EntryBlockInstructions | The (interesting) instructions in the entry block of the region statement. |
Definition at line 2317 of file ScopInfo.cpp.
References assert, InstStmtMap, R, StmtMap, and Stmts.
|
inline |
|
inline |
Definition at line 2062 of file ScopInfo.h.
References ScopArrayInfoSet.
|
inline |
|
inline |
Definition at line 2066 of file ScopInfo.h.
References ScopArrayInfoSet.
|
inline |
Definition at line 2070 of file ScopInfo.h.
References array_begin(), and array_end().
Referenced by getArrayInfoByName(), and printArrayInfo().
|
inline |
Definition at line 2074 of file ScopInfo.h.
References array_begin(), and array_end().
|
inline |
Definition at line 2352 of file ScopInfo.h.
References Stmts.
|
inline |
Definition at line 2354 of file ScopInfo.h.
References Stmts.
|
inline |
Return a range of all basic blocks in the SCoP.
Definition at line 2119 of file ScopInfo.h.
References R.
|
private |
Build the Context of the Scop.
Definition at line 1498 of file ScopInfo.cpp.
References AssumedContext, Context, DefinedBehaviorContext, isl::set::empty(), getIslCtx(), InvalidContext, isl::space::params_alloc(), and isl::set::universe().
Referenced by Scop().
|
inline |
|
inline |
|
inline |
Check if L
is contained in the SCoP.
Definition at line 2095 of file ScopInfo.h.
References R.
Referenced by polly::addReferencesFromStmt(), and isEscaping().
|
private |
Create an id for Param
and store it in the ParameterIds map.
Definition at line 1444 of file ScopInfo.cpp.
References isl::id::alloc(), assert, polly::getIslCompatibleName(), getIslCtx(), getNumParams(), ParameterIds, Parameters, polly::UseInstructionNames, and polly::Value.
Referenced by addParams().
ScopArrayInfo * Scop::createScopArrayInfo | ( | Type * | ElementType, |
const std::string & | BaseName, | ||
const std::vector< unsigned > & | Sizes | ||
) |
Create an array and return the corresponding ScopArrayInfo object.
ElementType | The type of the elements stored in this array. |
BaseName | The name of this memory reference. |
Sizes | The sizes of dimensions. |
Definition at line 1768 of file ScopInfo.cpp.
References polly::Array, polly::getConstant(), getContext(), getOrCreateScopArrayInfo(), getSE(), and size.
LLVM_DUMP_METHOD void Scop::dump | ( | ) | const |
|
inline |
Definition at line 2353 of file ScopInfo.h.
References Stmts.
|
inline |
Definition at line 2355 of file ScopInfo.h.
References Stmts.
isl::union_map Scop::getAccesses | ( | ) |
Get a union map of all memory accesses performed in the SCoP.
Definition at line 2251 of file ScopInfo.cpp.
References getAccessesOfType().
isl::union_map Scop::getAccesses | ( | ScopArrayInfo * | Array | ) |
Get a union map of all memory accesses performed in the SCoP.
Array | The array to which the accesses should belong. |
Definition at line 2255 of file ScopInfo.cpp.
References polly::Array, getAccessesOfType(), and polly::MemoryAccess::getScopArrayInfo().
|
private |
Collect all memory access relations of a given type.
Predicate | A predicate function that returns true if an access is of a given type. |
Definition at line 2217 of file ScopInfo.cpp.
References isl::union_map::coalesce(), Domain, isl::union_map::empty(), getIslCtx(), isl::map::intersect_domain(), and isl::union_map::unite().
Referenced by getAccesses(), getMayWrites(), getMustWrites(), getReads(), and getWrites().
|
inline |
Return all alias groups for this SCoP.
Definition at line 2279 of file ScopInfo.h.
References MinMaxAliasGroups.
Referenced by benefitsFromPolly().
ScopArrayInfo * Scop::getArrayInfoByName | ( | const std::string | BaseName | ) |
Find the ScopArrayInfo associated with an isl Id that has name Name
.
Definition at line 2411 of file ScopInfo.cpp.
References arrays().
isl::set Scop::getAssumedContext | ( | ) | const |
Get the assumed context for this Scop.
Definition at line 1849 of file ScopInfo.cpp.
References assert, AssumedContext, and isl::set::is_null().
Referenced by hasFeasibleRuntimeContext().
std::string Scop::getAssumedContextStr | ( | ) | const |
Get an isl string representing the assumed context.
Definition at line 1800 of file ScopInfo.cpp.
References assert, AssumedContext, and isl::set::is_null().
|
inline |
Return the define behavior context, or if not available, its approximation from all other contexts.
Definition at line 2171 of file ScopInfo.h.
References AssumedContext, Context, DefinedBehaviorContext, isl::set::intersect_params(), InvalidContext, isl::set::is_null(), and isl::set::subtract().
Referenced by polly::MemoryAccess::setNewAccessRelation().
|
inline |
Return the set of boxed (thus overapproximated) loops.
Definition at line 2375 of file ScopInfo.h.
References polly::ScopDetection::DetectionContext::BoxedLoopsSet, and DC.
Referenced by getStatistics().
isl::set Scop::getContext | ( | ) | const |
Get the constraint on parameter of this Scop.
Definition at line 1832 of file ScopInfo.cpp.
References Context.
Referenced by addAssumption(), polly::IslNodeBuilder::createNewAccesses(), createScopArrayInfo(), polly::BlockGenerator::generateConditionalExecution(), polly::BlockGenerator::generateScalarLoads(), getContextStr(), getParamSpace(), getStatistics(), polly::MemoryAccess::realignParams(), polly::ScopStmt::realignParams(), and realignParams().
std::string Scop::getContextStr | ( | ) | const |
Get an isl string representing the context.
Definition at line 1796 of file ScopInfo.cpp.
References getContext().
|
inline |
Get the count of copy statements added to this Scop.
Definition at line 1957 of file ScopInfo.h.
References CopyStmtsNum.
Referenced by polly::ScopStmt::ScopStmt().
|
inline |
Return the context where execution behavior is defined.
Might return nullptr.
Definition at line 2167 of file ScopInfo.h.
References DefinedBehaviorContext.
isl::set Scop::getDomainConditions | ( | BasicBlock * | BB | ) | const |
Return the domain of BB
.
BB | The block for which the conditions should be returned. |
Definition at line 1596 of file ScopInfo.cpp.
References DomainMap, getDomainConditions(), and R.
Return the domain of Stmt
.
Stmt | The statement for which the conditions should be returned. |
Definition at line 1592 of file ScopInfo.cpp.
References getDomainConditions(), and polly::ScopStmt::getEntryBlock().
Referenced by getDomainConditions().
isl::union_set Scop::getDomains | ( | ) | const |
Get a union set containing the iteration domains of all statements.
Definition at line 2200 of file ScopInfo.cpp.
References Domain, polly::ScopStmt::getDomain(), getIslCtx(), isl_space_params_alloc(), isl_union_set_add_set(), isl_union_set_empty(), isl::manage(), and isl::set::release().
Referenced by getScheduleTree(), hasFeasibleRuntimeContext(), and setSchedule().
|
inline |
|
inline |
Return the unique entering block of the SCoP if any.
Definition at line 2113 of file ScopInfo.h.
References R.
|
inline |
Return the unique entry block of the SCoP.
Definition at line 2110 of file ScopInfo.h.
References R.
Referenced by isDominatedBy().
std::pair< std::string, std::string > Scop::getEntryExitStr | ( | ) | const |
Get the name of the entry and exit blocks of this Scop.
These along with the function name can uniquely identify a Scop.
Definition at line 1815 of file ScopInfo.cpp.
References R.
Referenced by getNameStr().
|
inline |
Return the unique exit block of the SCoP.
Definition at line 2104 of file ScopInfo.h.
References R.
Referenced by isExit().
|
inline |
Return the unique exiting block of the SCoP if any.
Definition at line 2107 of file ScopInfo.h.
References R.
isl::space Scop::getFullParamSpace | ( | ) | const |
Return the full space of parameters.
getParamSpace will only return the parameters of the context that are actually constrained, whereas getFullParamSpace will return all
Definition at line 1836 of file ScopInfo.cpp.
References getIdForParam(), getIslCtx(), isl::param, ParameterIds, Parameters, isl::space::params_alloc(), and isl::space::set_dim_id().
Referenced by realignParams().
|
inline |
Return the function this SCoP is in.
Definition at line 2092 of file ScopInfo.h.
Referenced by getOrCreateScopArrayInfo(), and print().
|
inline |
isl::id Scop::getIdForParam | ( | const SCEV * | Parameter | ) | const |
Return the isl_id that represents a certain parameter.
Parameter | A SCEV that was recognized as a Parameter. |
Definition at line 1488 of file ScopInfo.cpp.
References getRepresentingInvariantLoadSCEV(), and ParameterIds.
Referenced by getFullParamSpace().
ScopStmt * Scop::getIncomingStmtFor | ( | const Use & | U | ) | const |
Get the statement to put a PHI WRITE into.
U | The operand of a PHINode. |
Definition at line 2363 of file ScopInfo.cpp.
References getLastStmtFor(), getStmtFor(), and polly::PHI.
|
inline |
Definition at line 2382 of file ScopInfo.h.
References DC, and polly::ScopDetection::DetectionContext::InsnToMemAcc.
isl::set Scop::getInvalidContext | ( | ) | const |
Get the invalid context for this Scop.
Definition at line 2058 of file ScopInfo.cpp.
References InvalidContext.
Referenced by hasFeasibleRuntimeContext().
std::string Scop::getInvalidContextStr | ( | ) | const |
Get an isl string representing the invalid context.
Definition at line 1805 of file ScopInfo.cpp.
References InvalidContext.
|
inline |
Return the set of invariant accesses.
Definition at line 2133 of file ScopInfo.h.
References InvariantEquivClasses.
isl::ctx Scop::getIslCtx | ( | ) | const |
Get the isl context of this static control part.
Definition at line 2173 of file ScopInfo.cpp.
References IslCtx.
Referenced by buildContext(), polly::IslNodeBuilder::createNewAccesses(), createParameterId(), getAccessesOfType(), getDomains(), getFullParamSpace(), polly::ScopStmt::getIslCtx(), getOrCreateScopArrayInfo(), polly::MemoryAccess::MemoryAccess(), and Scop().
ScopStmt * Scop::getLastStmtFor | ( | BasicBlock * | BB | ) | const |
Return the last statement representing BB
.
Of the sequence of statements that represent a BB
, this is the last one to be executed. It is typically used to determine which instruction to add a MemoryKind::PHI WRITE to. For this purpose, it is not strictly required to be executed last, only that the incoming value is available in it.
Definition at line 2380 of file ScopInfo.cpp.
References getStmtListFor().
Referenced by getIncomingStmtFor().
|
inline |
Return the LoopInfo used for this Scop.
Definition at line 2013 of file ScopInfo.h.
References Affinator, and polly::SCEVAffinator::getLI().
Referenced by findReferencesInStmt(), and getStatistics().
|
inline |
Get the maximum depth of the loop.
Definition at line 2127 of file ScopInfo.h.
References MaxLoopDepth.
Referenced by print().
isl::union_map Scop::getMayWrites | ( | ) |
Get a union map of all may-writes performed in the SCoP.
Definition at line 2239 of file ScopInfo.cpp.
References getAccessesOfType(), and polly::MemoryAccess::isMayWrite().
isl::union_map Scop::getMustWrites | ( | ) |
Get a union map of all must-writes performed in the SCoP.
Definition at line 2235 of file ScopInfo.cpp.
References getAccessesOfType(), and polly::MemoryAccess::isMustWrite().
|
inline |
Definition at line 2047 of file ScopInfo.h.
std::string Scop::getNameStr | ( | ) | const |
Get the name of this Scop.
Definition at line 1809 of file ScopInfo.cpp.
References getEntryExitStr().
Referenced by print().
|
inline |
Get the next free array index.
This function returns a unique index which can be used to identify an array.
Definition at line 2602 of file ScopInfo.h.
References ArrayIdx.
|
inline |
Get the next free statement index.
This function returns a unique index which can be used to identify a statement.
Definition at line 2608 of file ScopInfo.h.
References StmtIdx.
|
inline |
Get the count of parameters used in this Scop.
Definition at line 2018 of file ScopInfo.h.
References Parameters.
Referenced by createParameterId().
ScopArrayInfo * Scop::getOrCreateScopArrayInfo | ( | Value * | BasePtr, |
Type * | ElementType, | ||
ArrayRef< const SCEV * > | Sizes, | ||
MemoryKind | Kind, | ||
const char * | BaseName = nullptr |
||
) |
Return the (possibly new) ScopArrayInfo object for Access
.
ElementType | The type of the elements stored in this array. |
Kind | The kind of the array info object. |
BaseName | The optional name of this memory reference. |
Definition at line 1744 of file ScopInfo.cpp.
References assert, polly::DELINEARIZATION, getFunction(), getIslCtx(), invalidate(), ScopArrayInfoMap, ScopArrayInfoSet, and ScopArrayNameMap.
Referenced by createScopArrayInfo(), and polly::ScopStmt::ensureValueRead().
|
inline |
Return the domain of BB
. If it does not exist, create an empty one.
Definition at line 2520 of file ScopInfo.h.
References DomainMap.
isl::space Scop::getParamSpace | ( | ) | const |
Return space of isl context parameters.
Returns the set of context parameters that are currently constrained. In case the full set of parameters is needed, see @getFullParamSpace.
Definition at line 1834 of file ScopInfo.cpp.
References isl::set::get_space(), and getContext().
Referenced by invalidate(), and simplifyContexts().
ArrayRef< MemoryAccess * > Scop::getPHIIncomings | ( | const ScopArrayInfo * | SAI | ) | const |
Return all MemoryAccesses for all incoming statements of a PHINode, represented by a ScopArrayInfo.
Definition at line 2472 of file ScopInfo.cpp.
References assert, polly::ScopArrayInfo::isExitPHIKind(), polly::ScopArrayInfo::isPHIKind(), and PHIIncomingAccs.
MemoryAccess * Scop::getPHIRead | ( | const ScopArrayInfo * | SAI | ) | const |
Return the MemoryAccess that represents an llvm::PHINode.
ExitPHIs's PHINode is not within the SCoPs. This function returns nullptr for them.
Definition at line 2462 of file ScopInfo.cpp.
References assert, polly::ScopArrayInfo::getBasePtr(), polly::ScopArrayInfo::isExitPHIKind(), polly::ScopArrayInfo::isPHIKind(), polly::PHI, and PHIReadAccs.
__isl_give PWACtx Scop::getPwAff | ( | const SCEV * | E, |
BasicBlock * | BB = nullptr , |
||
bool | NonNegative = false , |
||
RecordedAssumptionsTy * | RecordedAssumptions = nullptr |
||
) |
Compute the isl representation for the SCEV E
.
E | The SCEV that should be translated. |
BB | An (optional) basic block in which the isl_pw_aff is computed. SCEVs known to not reference any loops in the SCoP can be passed without a BB . |
NonNegative | Flag to indicate the E has to be non-negative. |
Note that this function will always return a valid isl_pw_aff. However, if the translation of E
was deemed to complex the SCoP is invalidated and a dummy value of appropriate dimension is returned. This allows to bail for complex cases without "error handling code" needed on the users side.
Definition at line 2175 of file ScopInfo.cpp.
References Affinator, polly::COMPLEXITY, polly::SCEVAffinator::getPwAff(), invalidate(), SE, and polly::SCEVAffinator::takeNonNegativeAssumption().
Referenced by getPwAffOnly().
isl::pw_aff Scop::getPwAffOnly | ( | const SCEV * | E, |
BasicBlock * | BB = nullptr , |
||
RecordedAssumptionsTy * | RecordedAssumptions = nullptr |
||
) |
Compute the isl representation for the SCEV E
.
This function is like
Definition at line 2210 of file ScopInfo.cpp.
References getPwAff().
isl::union_map Scop::getReads | ( | ) |
Get a union map of all reads performed in the SCoP.
Definition at line 2247 of file ScopInfo.cpp.
References getAccessesOfType(), and polly::MemoryAccess::isRead().
|
inline |
Definition at line 2089 of file ScopInfo.h.
References R.
|
inline |
Get the maximum region of this static control part.
Definition at line 2088 of file ScopInfo.h.
References R.
Referenced by polly::ScopBuilder::collectSurroundingLoops(), and polly::IslNodeBuilder::createNewAccesses().
int Scop::getRelativeLoopDepth | ( | const Loop * | L | ) | const |
Get the depth of a loop relative to the outermost loop in the Scop.
This will return 0 if L
is an outermost loop in the SCoP >0 for other loops in the SCoP -1 if L
is nullptr or there is no outermost loop in the SCoP
Definition at line 2397 of file ScopInfo.cpp.
const SCEV * Scop::getRepresentingInvariantLoadSCEV | ( | const SCEV * | S | ) | const |
Get the representing SCEV for S
if applicable, otherwise S
.
Invariant loads of the same location are put in an equivalence class and only one of them is chosen as a representing element that will be modeled as a parameter. The others have to be normalized, i.e., replaced by the representing element of their equivalence class, in order to get the correct parameter value, e.g., in the SCEVAffinator.
S | The SCEV to normalize. |
S
if none. Definition at line 1433 of file ScopInfo.cpp.
References InvEquivClassVMap, and SE.
Referenced by addParams(), and getIdForParam().
|
inline |
Return the set of required invariant loads.
Definition at line 2367 of file ScopInfo.h.
References DC, and polly::ScopDetection::DetectionContext::RequiredILS.
isl::union_map Scop::getSchedule | ( | ) | const |
Get the schedule of all the statements in the SCoP.
Definition at line 2260 of file ScopInfo.cpp.
References getScheduleTree().
Referenced by polly::ScopStmt::getSchedule().
isl::schedule Scop::getScheduleTree | ( | ) | const |
Get a schedule tree describing the schedule of all statements.
Definition at line 2265 of file ScopInfo.cpp.
References getDomains(), isl::schedule::intersect_domain(), and Schedule.
Referenced by getSchedule().
ScopArrayInfo * Scop::getScopArrayInfo | ( | Value * | BasePtr, |
MemoryKind | Kind | ||
) |
Return the cached ScopArrayInfo object for BasePtr
.
BasePtr | The base pointer the object has been stored for. |
Kind | The kind of array info object. |
Definition at line 1790 of file ScopInfo.cpp.
References assert, and getScopArrayInfoOrNull().
ScopArrayInfo * Scop::getScopArrayInfoOrNull | ( | Value * | BasePtr, |
MemoryKind | Kind | ||
) |
Return the cached ScopArrayInfo object for BasePtr
.
BasePtr | The base pointer the object has been stored for. |
Kind | The kind of array info object. |
Definition at line 1785 of file ScopInfo.cpp.
References ScopArrayInfoMap.
Referenced by getScopArrayInfo().
ScalarEvolution * Scop::getSE | ( | ) | const |
Return the scalar evolution.
Definition at line 2302 of file ScopInfo.cpp.
References SE.
Referenced by polly::MemoryAccess::computeBoundsOnAccessRelation(), createScopArrayInfo(), and polly::IslNodeBuilder::createSubstitutions().
|
inline |
Directly return the shared_ptr of the context.
Definition at line 2480 of file ScopInfo.h.
References IslCtx.
Referenced by runIslAst().
|
inline |
Return the number of statements in the SCoP.
Definition at line 2343 of file ScopInfo.h.
References Stmts.
Scop::ScopStatistics Scop::getStatistics | ( | ) | const |
Collect statistic about this SCoP.
These are most commonly used for LLVM's static counters (Statistic.h) in various places. If statistics are disabled, only zeros are returned to avoid the overhead.
Definition at line 2503 of file ScopInfo.cpp.
References polly::ScopDetection::countBeneficialLoops(), Domain, getBoxedLoops(), getContext(), polly::ScopStmt::getDomain(), getLI(), polly::ScopStmt::getNumIterators(), isl::set::intersect_params(), isl::set::is_singleton(), polly::Scop::ScopStatistics::NumAffineLoops, polly::Scop::ScopStatistics::NumBoxedLoops, polly::Scop::ScopStatistics::NumPHIWrites, polly::Scop::ScopStatistics::NumPHIWritesInLoops, polly::Scop::ScopStatistics::NumSingletonWrites, polly::Scop::ScopStatistics::NumSingletonWritesInLoops, polly::Scop::ScopStatistics::NumValueWrites, polly::Scop::ScopStatistics::NumValueWritesInLoops, R, and SE.
|
inline |
Return the ScopStmt an instruction belongs to, or nullptr if it does not belong to any statement in this Scop.
Definition at line 2338 of file ScopInfo.h.
References InstStmtMap.
Referenced by getIncomingStmtFor(), and lookupBasePtrAccess().
ArrayRef< ScopStmt * > Scop::getStmtListFor | ( | BasicBlock * | BB | ) | const |
Return the list of ScopStmts that represent the given BB
.
Definition at line 2356 of file ScopInfo.cpp.
References StmtMap.
Referenced by getLastStmtFor(), and getStmtListFor().
ArrayRef< ScopStmt * > Scop::getStmtListFor | ( | Region * | R | ) | const |
Return the ScopStmts that represents the Region R
, or nullptr if it is not represented by any statement in this Scop.
Definition at line 2393 of file ScopInfo.cpp.
References getStmtListFor(), and R.
ArrayRef< ScopStmt * > Scop::getStmtListFor | ( | RegionNode * | RN | ) | const |
Return the ScopStmts that represents RN
; can return nullptr if the RegionNode is not within the SCoP or has been removed due to simplifications.
Definition at line 2387 of file ScopInfo.cpp.
References getStmtListFor().
MemoryAccess * Scop::getValueDef | ( | const ScopArrayInfo * | SAI | ) | const |
Return the MemoryAccess that writes an llvm::Value, represented by a ScopArrayInfo.
There can be at most one such MemoryAccess per llvm::Value in the SCoP. Zero is possible for read-only values.
Definition at line 2444 of file ScopInfo.cpp.
References assert, polly::ScopArrayInfo::getBasePtr(), polly::ScopArrayInfo::isValueKind(), and ValueDefAccs.
ArrayRef< MemoryAccess * > Scop::getValueUses | ( | const ScopArrayInfo * | SAI | ) | const |
Return all MemoryAccesses that us an llvm::Value, represented by a ScopArrayInfo.
Definition at line 2454 of file ScopInfo.cpp.
References assert, polly::ScopArrayInfo::isValueKind(), and ValueUseAccs.
isl::union_map Scop::getWrites | ( | ) |
Get a union map of all writes performed in the SCoP.
Definition at line 2243 of file ScopInfo.cpp.
References getAccessesOfType(), and polly::MemoryAccess::isWrite().
|
inline |
Is this Scop marked as not to be transformed by an optimization heuristic? In this case, only user-directed transformations are allowed.
Definition at line 2668 of file ScopInfo.h.
References HasDisableHeuristicsHint.
|
inline |
Return true if the SCoP contained at least one error block.
Definition at line 2454 of file ScopInfo.h.
References HasErrorBlock.
bool Scop::hasFeasibleRuntimeContext | ( | ) | const |
Return true if the optimized SCoP can be executed.
In addition to the runtime check context this will also utilize the domain constraints to decide it the optimized version can actually be executed.
Definition at line 1882 of file ScopInfo.cpp.
References Context, getAssumedContext(), getDomains(), getInvalidContext(), isl::set::intersect_params(), isl::set::is_empty(), isl::boolean::is_false(), isl::set::is_subset(), params, and Stmts.
|
inline |
Check if the scop has any invariant access.
Definition at line 2138 of file ScopInfo.h.
References InvariantEquivClasses.
|
inline |
Check if an <nsw> AddRec for the loop L is cached.
Definition at line 2507 of file ScopInfo.h.
References Affinator, and polly::SCEVAffinator::hasNSWAddRecForLoop().
|
inline |
Return true if the underlying region has a single exiting block.
Definition at line 2460 of file ScopInfo.h.
References HasSingleExitEdge.
Referenced by isEscaping().
|
inline |
Return true if and only if the InvalidContext is trivial (=empty).
Definition at line 2276 of file ScopInfo.h.
References InvalidContext, and isl::set::is_empty().
|
static |
Increment actual number of aliasing assumptions taken.
Step | Number of new aliasing assumptions which should be added to the number of already taken assumptions. |
Definition at line 2499 of file ScopInfo.cpp.
Referenced by polly::ScopBuilder::buildAliasChecks().
void Scop::intersectDefinedBehavior | ( | isl::set | Set, |
AssumptionSign | Sign | ||
) |
Add the conditions from Set
(or subtract them if Sign
is AS_RESTRICTION) to the defined behaviour context.
Definition at line 2033 of file ScopInfo.cpp.
References polly::AS_ASSUMPTION, DefinedBehaviorContext, isl::set::intersect(), isl::set::is_null(), MaxDisjunktsInDefinedBehaviourContext, isl::set::n_basic_set(), isl::size::release(), simplify, and isl::set::subtract().
Referenced by addAssumption(), and addParameterBounds().
void Scop::invalidate | ( | AssumptionKind | Kind, |
DebugLoc | Loc, | ||
BasicBlock * | BB = nullptr |
||
) |
Mark the scop as invalid.
This method adds an assumption to the scop that is always invalid. As a result, the scop will not be optimized later on. This function is commonly called when a condition makes it impossible (or too compile time expensive) to process this scop any further.
Kind | The assumption kind describing the underlying cause. |
Loc | The location in the source that triggered . |
BB | The BasicBlock where it was triggered. |
Definition at line 2053 of file ScopInfo.cpp.
References addAssumption(), polly::AS_ASSUMPTION, isl::set::empty(), getParamSpace(), and POLLY_DEBUG.
Referenced by getOrCreateScopArrayInfo(), and getPwAff().
|
inline |
Invalidate ScopArrayInfo object for base address.
BasePtr | The base pointer of the ScopArrayInfo object to invalidate. |
Kind | The Kind of the ScopArrayInfo object. |
Definition at line 2425 of file ScopInfo.h.
References ScopArrayInfoMap, and ScopArrayInfoSet.
|
inline |
Return an iterator range containing invariant accesses.
Definition at line 2032 of file ScopInfo.h.
References InvariantEquivClasses.
|
inline |
Check if domain is determined for BB
.
Definition at line 2523 of file ScopInfo.h.
References DomainMap.
bool Scop::isDominatedBy | ( | const DominatorTree & | DT, |
BasicBlock * | BB | ||
) | const |
Return true if and only if BB
dominates the SCoP.
Definition at line 1494 of file ScopInfo.cpp.
References DT, and getEntry().
bool Scop::isEffectiveAssumption | ( | isl::set | Set, |
AssumptionSign | Sign | ||
) |
Check if the assumption in Set
is trivial or not.
Set | The relations between parameters that are assumed to hold. |
Sign | Enum to indicate if the assumptions in Set are positive (needed/assumptions) or negative (invalid/restrictions). |
Set
is not trivial. Definition at line 1934 of file ScopInfo.cpp.
References polly::AS_ASSUMPTION, AssumedContext, Context, InvalidContext, isl::set::is_disjoint(), and isl::set::is_subset().
Referenced by trackAssumption().
|
inline |
Return whether this scop is empty, i.e.
contains no statements that could be executed.
Definition at line 2045 of file ScopInfo.h.
References Stmts.
Referenced by isProfitable().
bool Scop::isEscaping | ( | Instruction * | Inst | ) |
Return whether Inst
has a use outside of this SCoP.
Definition at line 2480 of file ScopInfo.cpp.
References assert, contains(), polly::getUseBlock(), hasSingleExitEdge(), and isExit().
|
inline |
Return true if BB
is the exit block of the SCoP.
Definition at line 2116 of file ScopInfo.h.
References getExit().
Referenced by isEscaping().
|
inline |
Return true if and only if R
is a non-affine subregion.
Definition at line 2378 of file ScopInfo.h.
References DC, polly::ScopDetection::DetectionContext::NonAffineSubRegionSet, and R.
|
inline |
Check if the SCoP has been optimized by the scheduler.
Definition at line 2144 of file ScopInfo.h.
References IsOptimized.
Referenced by benefitsFromPolly().
|
inline |
Whether the schedule is the original schedule as derived from the CFG by ScopBuilder.
Definition at line 2572 of file ScopInfo.h.
References ScheduleModified.
|
inline |
Return whether given SCEV is used as the parameter in this Scop.
Definition at line 2021 of file ScopInfo.h.
References Parameters.
bool Scop::isProfitable | ( | bool | ScalarsAreUnprofitable | ) | const |
Return true if this SCoP can be profitably optimized.
ScalarsAreUnprofitable | Never consider statements with scalar writes as profitably optimizable. |
Definition at line 1854 of file ScopInfo.cpp.
References isEmpty(), and polly::PollyProcessUnprofitable.
|
private |
Return the access for the base ptr of MA
if any.
Definition at line 1894 of file ScopInfo.cpp.
References polly::MemoryAccess::getOriginalBaseAddr(), getStmtFor(), and polly::Value.
InvariantEquivClassTy * Scop::lookupInvariantEquivClass | ( | Value * | Val | ) |
Return the invariant equivalence class for Val
if any.
Definition at line 1721 of file ScopInfo.cpp.
References InvariantEquivClasses, InvEquivClassVMap, SE, and polly::Value.
Referenced by polly::MemoryAccess::setNewAccessRelation().
|
inline |
Mark the SCoP as optimized by the scheduler.
Definition at line 2141 of file ScopInfo.h.
References IsOptimized.
|
inline |
Mark this Scop to not apply an optimization heuristic.
Definition at line 2671 of file ScopInfo.h.
References HasDisableHeuristicsHint.
|
inline |
Notify SCoP that it contains an error block.
Definition at line 2457 of file ScopInfo.h.
References HasErrorBlock.
|
inline |
Return an iterator range containing the scop parameters.
Definition at line 2027 of file ScopInfo.h.
References Parameters.
void Scop::print | ( | raw_ostream & | OS, |
bool | PrintInstructions | ||
) | const |
Print the static control part.
OS | The output stream the static control part is printed to. |
PrintInstructions | Whether to print the statement's instructions as well. |
Definition at line 2147 of file ScopInfo.cpp.
References getFunction(), getMaxLoopDepth(), getNameStr(), InvariantEquivClasses, printAliasAssumptions(), printArrayInfo(), printContext(), and printStatements().
Referenced by dump().
|
private |
|
private |
Definition at line 2131 of file ScopInfo.cpp.
References polly::Array, and arrays().
Referenced by print().
|
private |
Definition at line 2060 of file ScopInfo.cpp.
References AssumedContext, Context, DefinedBehaviorContext, InvalidContext, isl::set::is_null(), and Parameters.
Referenced by print().
|
private |
Definition at line 2120 of file ScopInfo.cpp.
References polly::ScopStmt::print().
Referenced by print().
|
inline |
Definition at line 2360 of file ScopInfo.h.
References Stmts.
|
inline |
Definition at line 2362 of file ScopInfo.h.
References Stmts.
void Scop::realignParams | ( | ) |
Align the parameters in the statement to the scop context.
Definition at line 1515 of file ScopInfo.cpp.
References addParameterBounds(), isl::set::align_params(), isl::schedule::align_params(), AssumedContext, Context, getContext(), getFullParamSpace(), isl::schedule::gist_domain_params(), InvalidContext, PollyIgnoreParamBounds(), polly::ScopStmt::realignParams(), and Schedule.
void Scop::removeAccessData | ( | MemoryAccess * | Access | ) |
Remove the metadata stored for Access
.
Definition at line 2429 of file ScopInfo.cpp.
References polly::MemoryAccess::getAccessInstruction(), polly::MemoryAccess::getAccessValue(), polly::MemoryAccess::getScopArrayInfo(), polly::MemoryAccess::isOriginalAnyPHIKind(), polly::MemoryAccess::isOriginalPHIKind(), polly::MemoryAccess::isOriginalValueKind(), polly::MemoryAccess::isRead(), polly::MemoryAccess::isWrite(), polly::PHI, PHIIncomingAccs, PHIReadAccs, ValueDefAccs, and ValueUseAccs.
Referenced by polly::ScopStmt::removeMemoryAccess(), and polly::ScopStmt::removeSingleMemoryAccess().
|
private |
Removes Stmt
from the StmtMap.
Definition at line 1642 of file ScopInfo.cpp.
References polly::ScopStmt::getBasicBlock(), polly::ScopStmt::getEntryBlock(), polly::ScopStmt::getInstructions(), polly::ScopStmt::getRegion(), InstStmtMap, polly::ScopStmt::isRegionStmt(), and StmtMap.
Referenced by removeStmts().
|
private |
Removes all statements where the entry block of the statement does not have a corresponding domain in the domain map (or it is empty).
Definition at line 1685 of file ScopInfo.cpp.
References Domain, DomainMap, polly::ScopStmt::getEntryBlock(), if(), and removeStmts().
void Scop::removeStmts | ( | function_ref< bool(ScopStmt &)> | ShouldDelete, |
bool | AfterHoisting = true |
||
) |
Remove statements from the list of scop statements.
ShouldDelete | A function that returns true if the statement passed to it should be deleted. |
AfterHoisting | If true, also remove from data access lists. These lists are filled during ScopBuilder::buildAccessRelations. Therefore, if this method is called before buildAccessRelations, false must be passed. |
Definition at line 1665 of file ScopInfo.cpp.
References removeFromStmtMap(), and Stmts.
Referenced by removeStmtNotInDomainMap(), and simplifySCoP().
|
inline |
Definition at line 2361 of file ScopInfo.h.
References Stmts.
|
inline |
Definition at line 2363 of file ScopInfo.h.
References Stmts.
bool Scop::restrictDomains | ( | isl::union_set | Domain | ) |
Intersects the domains of all statements in the SCoP.
Definition at line 2281 of file ScopInfo.cpp.
References isl::union_set::coalesce(), Domain, isl::set::empty(), polly::ScopStmt::getDomain(), polly::ScopStmt::getDomainSpace(), isl::union_set::intersect(), isl::union_set::is_empty(), isl::union_set::is_subset(), and polly::ScopStmt::restrictDomain().
void Scop::setContext | ( | isl::set | NewContext | ) |
Set new isl context.
Scop class implement.
Definition at line 1364 of file ScopInfo.cpp.
References isl::set::align_params(), Context, and isl::set::get_space().
|
inline |
void Scop::setSchedule | ( | isl::union_map | NewSchedule | ) |
Update the current schedule.
NewSchedule The new schedule (given as a flat union-map).
Definition at line 2269 of file ScopInfo.cpp.
References isl::schedule::from_domain(), isl::multi_union_pw_aff::from_union_map(), getDomains(), Schedule, and ScheduleModified.
void Scop::setScheduleTree | ( | isl::schedule | NewSchedule | ) |
Update the current schedule.
NewSchedule The new schedule (given as schedule tree).
Definition at line 2276 of file ScopInfo.cpp.
References Schedule, and ScheduleModified.
|
private |
Simplify the assumed and invalid context.
Definition at line 1557 of file ScopInfo.cpp.
References isl::set::align_params(), AssumedContext, DefinedBehaviorContext, getParamSpace(), InvalidContext, simplify, and simplifyAssumptionContext().
void Scop::simplifySCoP | ( | bool | AfterHoisting | ) |
Simplify the SCoP representation.
AfterHoisting | Whether it is called after invariant load hoisting. When true, also removes statements without side-effects. |
Definition at line 1694 of file ScopInfo.cpp.
References polly::hasDebugCall(), polly::ScopStmt::isEmpty(), and removeStmts().
bool Scop::trackAssumption | ( | AssumptionKind | Kind, |
isl::set | Set, | ||
DebugLoc | Loc, | ||
AssumptionSign | Sign, | ||
BasicBlock * | BB | ||
) |
Track and report an assumption.
Use 'clang -Rpass-analysis=polly-scops' or 'opt -pass-remarks-analysis=polly-scops' to output the assumptions.
Kind | The assumption kind describing the underlying cause. |
Set | The relations between parameters that are assumed to hold. |
Loc | The location in the source that caused this assumption. |
Sign | Enum to indicate if the assumptions in Set are positive (needed/assumptions) or negative (invalid/restrictions). |
BB | The block in which this assumption was taken. Used to calculate hotness when emitting remark. |
Definition at line 1951 of file ScopInfo.cpp.
References polly::ALIASING, polly::AS_ASSUMPTION, polly::AS_RESTRICTION, polly::COMPLEXITY, DEBUG_TYPE, polly::DELINEARIZATION, polly::ERRORBLOCK, isl::set::get_space(), polly::INBOUNDS, polly::INFINITELOOP, polly::INVARIANTLOAD, isl::set::is_empty(), isl::set::is_equal(), isEffectiveAssumption(), ORE, PollyRemarksMinimal(), polly::PROFITABLE, R, toString(), isl::set::universe(), polly::UNSIGNED, and polly::WRAPPING.
Referenced by addAssumption().
|
inline |
Update maximal loop depth.
If Depth
is smaller than current value, then maximal loop depth is not updated.
Definition at line 2438 of file ScopInfo.h.
References MaxLoopDepth.
|
friend |
Definition at line 1647 of file ScopInfo.h.
|
private |
Definition at line 1672 of file ScopInfo.h.
Referenced by access_functions(), and addAccessFunction().
|
private |
The affinator used to translate SCEVs to isl expressions.
Definition at line 1720 of file ScopInfo.h.
Referenced by getLI(), getPwAff(), and hasNSWAddRecForLoop().
|
private |
The smallest array index not yet assigned.
Definition at line 1844 of file ScopInfo.h.
Referenced by getNextArrayIdx().
|
private |
The assumptions under which this scop was built.
When constructing a scop sometimes the exact representation of a statement or condition would be very complex, but there is a common case which is a lot simpler, but which is only valid under certain assumptions. The assumed context records the assumptions taken during the construction of this scop and that need to be code generated as a run-time test.
Definition at line 1752 of file ScopInfo.h.
Referenced by addAssumption(), buildContext(), getAssumedContext(), getAssumedContextStr(), getBestKnownDefinedBehaviorContext(), isEffectiveAssumption(), printContext(), realignParams(), and simplifyContexts().
|
private |
Constraints on parameters.
Definition at line 1717 of file ScopInfo.h.
Referenced by addParameterBounds(), buildContext(), getBestKnownDefinedBehaviorContext(), getContext(), hasFeasibleRuntimeContext(), isEffectiveAssumption(), printContext(), realignParams(), and setContext().
|
private |
Number of copy statements.
Definition at line 1687 of file ScopInfo.h.
Referenced by addScopStmt(), and getCopyStmtsNum().
|
private |
The context of the SCoP created during SCoP detection.
Definition at line 1701 of file ScopInfo.h.
Referenced by addRequiredInvariantLoad(), getBoxedLoops(), getInsnToMemAccMap(), getRequiredInvariantLoads(), and isNonAffineSubRegion().
|
private |
The context under which the SCoP must have defined behavior.
Optimizer and code generator can assume that the SCoP will only be executed with parameter values within this context. This might be either because we can prove that other values are impossible or explicitly have undefined behavior, such as due to no-wrap flags. If this becomes too complex, can also be nullptr.
In contrast to Scop::AssumedContext and Scop::InvalidContext, these do not need to be checked at runtime.
Scop::Context on the other side is an overapproximation and does not include all requirements, but is always defined. However, there is still no guarantee that there is no undefined behavior in DefinedBehaviorContext.
Definition at line 1776 of file ScopInfo.h.
Referenced by buildContext(), getBestKnownDefinedBehaviorContext(), getDefinedBehaviorContext(), intersectDefinedBehavior(), printContext(), and simplifyContexts().
|
private |
A map from basic blocks to their domains.
Definition at line 1714 of file ScopInfo.h.
Referenced by getDomainConditions(), getOrInitEmptyDomain(), isDomainDefined(), removeStmtNotInDomainMap(), and setDomain().
|
private |
Definition at line 1661 of file ScopInfo.h.
Referenced by getDT(), and isDominatedBy().
|
private |
Is this Scop marked as not to be transformed by an optimization heuristic?
Definition at line 1815 of file ScopInfo.h.
Referenced by hasDisableHeuristicsHint(), and markDisableHeuristics().
|
private |
Flag to remember if the SCoP contained an error block or not.
Definition at line 1681 of file ScopInfo.h.
Referenced by hasErrorBlock(), and notifyErrorBlock().
|
private |
True if the underlying region has a single exiting block.
Definition at line 1678 of file ScopInfo.h.
Referenced by hasSingleExitEdge().
|
private |
A number that uniquely represents a Scop within its function.
Definition at line 1850 of file ScopInfo.h.
Referenced by getID().
|
private |
A map from instructions to SCoP statements.
Definition at line 1711 of file ScopInfo.h.
Referenced by addScopStmt(), getStmtFor(), and removeFromStmtMap().
|
private |
The restrictions under which this SCoP was built.
The invalid context is similar to the assumed context as it contains constraints over the parameters. However, while we need the constraints in the assumed context to be "true" the constraints in the invalid context need to be "false". Otherwise they behave the same.
Definition at line 1760 of file ScopInfo.h.
Referenced by addAssumption(), buildContext(), getBestKnownDefinedBehaviorContext(), getInvalidContext(), getInvalidContextStr(), hasTrivialInvalidContext(), isEffectiveAssumption(), printContext(), realignParams(), and simplifyContexts().
|
private |
List of invariant accesses.
Definition at line 1841 of file ScopInfo.h.
Referenced by addInvariantEquivClass(), getInvariantAccesses(), hasInvariantAccesses(), invariantEquivClasses(), lookupInvariantEquivClass(), and print().
|
private |
Mapping from invariant loads to the representing invariant load of their equivalence class.
Definition at line 1838 of file ScopInfo.h.
Referenced by addInvariantLoadMapping(), getRepresentingInvariantLoadSCEV(), and lookupInvariantEquivClass().
|
private |
Isl context.
We need a shared_ptr with reference counter to delete the context when all isl objects are deleted. We will distribute the shared_ptr to all objects that use the context to create isl objects, and increase the reference counter. By doing this, we guarantee that the context is deleted when we delete the last object that creates isl objects with the context. This declaration needs to be the first in class to gracefully destroy all isl objects before the context.
Definition at line 1658 of file ScopInfo.h.
Referenced by getIslCtx(), getSharedIslCtx(), and Scop().
|
private |
Flag to indicate that the scheduler actually optimized the SCoP.
Definition at line 1675 of file ScopInfo.h.
Referenced by isOptimized(), and markAsOptimized().
|
private |
Max loop depth.
Definition at line 1684 of file ScopInfo.h.
Referenced by getMaxLoopDepth(), and updateMaxLoopDepth().
|
private |
The set of minimal/maximal accesses for each alias group.
When building runtime alias checks we look at all memory instructions and build so called alias groups. Each group contains a set of accesses to different base arrays which might alias with each other. However, between alias groups there is no aliasing possible.
In a program with int and float pointers annotated with tbaa information we would probably generate two alias groups, one for the int pointers and one for the float pointers.
During code generation we will create a runtime alias check for each alias group to ensure the SCoP is executed in an alias free environment.
Definition at line 1834 of file ScopInfo.h.
Referenced by addAliasGroup(), getAliasGroups(), and printAliasAssumptions().
|
private |
The name of the SCoP (identical to the regions name)
Definition at line 1667 of file ScopInfo.h.
Referenced by getName().
|
private |
OptimizationRemarkEmitter object for displaying diagnostic remarks.
Definition at line 1704 of file ScopInfo.h.
Referenced by trackAssumption().
|
private |
Mapping from parameters to their ids.
Definition at line 1698 of file ScopInfo.h.
Referenced by createParameterId(), getFullParamSpace(), and getIdForParam().
|
private |
Parameters of this Scop.
Definition at line 1695 of file ScopInfo.h.
Referenced by addParameterBounds(), addParams(), createParameterId(), getFullParamSpace(), getNumParams(), isParam(), parameters(), and printContext().
|
private |
List of all incoming values (write MemoryAccess) of a MemoryKind::PHI or MemoryKind::ExitPHI scalar.
Definition at line 1867 of file ScopInfo.h.
Referenced by addAccessData(), getPHIIncomings(), and removeAccessData().
|
private |
Map of values to the MemoryAccess that reads a PHI.
Definition at line 1858 of file ScopInfo.h.
Referenced by addAccessFunction(), getPHIRead(), and removeAccessData().
|
private |
The underlying Region.
Definition at line 1664 of file ScopInfo.h.
Referenced by addScopStmt(), blocks(), contains(), getDomainConditions(), getEnteringBlock(), getEntry(), getEntryExitStr(), getExit(), getExitingBlock(), getFunction(), getName(), getRegion(), getRelativeLoopDepth(), getStatistics(), getStmtListFor(), isNonAffineSubRegion(), and trackAssumption().
|
private |
The schedule of the SCoP.
The schedule of the SCoP describes the execution order of the statements in the scop by assigning each statement instance a possibly multi-dimensional execution time. The schedule is stored as a tree of schedule nodes.
The most common nodes in a schedule tree are so-called band nodes. Band nodes map statement instances into a multi dimensional schedule space. This space can be seen as a multi-dimensional clock.
Example:
<S,(5,4)> may be mapped to (5,4) by this schedule:
s0 = i (Year of execution) s1 = j (Day of execution)
or to (9, 20) by this schedule:
s0 = i + j (Year of execution) s1 = 20 (Day of execution)
The order statement instances are executed is defined by the schedule vectors they are mapped to. A statement instance <A, (i, j, ..)> is executed before a statement instance <B, (i', ..)>, if the schedule vector of A is lexicographic smaller than the schedule vector of B.
Besides band nodes, schedule trees contain additional nodes that specify a textual ordering between two subtrees or filter nodes that filter the set of statement instances that will be scheduled in a subtree. There are also several other nodes. A full description of the different nodes in a schedule tree is given in the isl manual.
Definition at line 1812 of file ScopInfo.h.
Referenced by getScheduleTree(), realignParams(), setSchedule(), and setScheduleTree().
|
private |
Whether the schedule has been modified after derived from the CFG by ScopBuilder.
Definition at line 1819 of file ScopInfo.h.
Referenced by isOriginalSchedule(), setSchedule(), and setScheduleTree().
|
private |
A map to remember ScopArrayInfo objects for all base pointers.
As PHI nodes may have two array info objects associated, we add a flag that distinguishes between the PHI node specific ArrayInfo object and the normal one.
Definition at line 1735 of file ScopInfo.h.
Referenced by getOrCreateScopArrayInfo(), getScopArrayInfoOrNull(), and invalidateScopArrayInfo().
|
private |
A set to remember ScopArrayInfo objects.
Definition at line 1743 of file ScopInfo.h.
Referenced by array_begin(), array_end(), getOrCreateScopArrayInfo(), and invalidateScopArrayInfo().
|
private |
A map to remember ScopArrayInfo objects for all names of memory references.
Definition at line 1739 of file ScopInfo.h.
Referenced by getOrCreateScopArrayInfo().
|
private |
Definition at line 1660 of file ScopInfo.h.
Referenced by addParameterBounds(), addParams(), getPwAff(), getRepresentingInvariantLoadSCEV(), getSE(), getStatistics(), and lookupInvariantEquivClass().
|
private |
The smallest statement index not yet assigned.
Definition at line 1847 of file ScopInfo.h.
Referenced by getNextStmtIdx().
|
private |
A map from basic blocks to vector of SCoP statements.
Currently this vector comprises only of a single statement.
Definition at line 1708 of file ScopInfo.h.
Referenced by addScopStmt(), getStmtListFor(), and removeFromStmtMap().
|
private |
The statements in this Scop.
Definition at line 1692 of file ScopInfo.h.
Referenced by addScopStmt(), begin(), end(), getSize(), hasFeasibleRuntimeContext(), isEmpty(), rbegin(), removeStmts(), and rend().
|
private |
Map of values to the MemoryAccess that writes its definition.
There must be at most one definition per llvm::Instruction in a SCoP.
Definition at line 1855 of file ScopInfo.h.
Referenced by addAccessFunction(), getValueDef(), and removeAccessData().
|
private |
List of all uses (i.e.
read MemoryAccesses) for a MemoryKind::Value scalar.
Definition at line 1862 of file ScopInfo.h.
Referenced by addAccessData(), getValueUses(), and removeAccessData().