Polly 20.0.0git
|
Base class for algorithms based on zones, like DeLICM. More...
#include <ZoneAlgo.h>
Public Member Functions | |
Scop * | getScop () const |
Return the SCoP this object is analyzing. | |
isl::union_map | computeKnownFromMustWrites () const |
A reaching definition zone is known to have the definition's written value if the definition is a MUST_WRITE. | |
isl::union_map | computeKnownFromLoad () const |
A reaching definition zone is known to be the same value as any load that reads from that array element in that period. | |
isl::union_map | computeKnown (bool FromWrite, bool FromRead) const |
Compute which value an array element stores at every instant. | |
Protected Member Functions | |
ZoneAlgorithm (const char *PassName, Scop *S, llvm::LoopInfo *LI) | |
Prepare the object before computing the zones of S . | |
isl::union_set | makeEmptyUnionSet () const |
isl::union_map | makeEmptyUnionMap () const |
isl::union_map | computePerPHI (const polly::ScopArrayInfo *SAI) |
For each 'execution' of a PHINode, get the incoming block that was executed before. | |
void | collectCompatibleElts () |
Find the array elements that can be used for zone analysis. | |
isl::map | getScatterFor (ScopStmt *Stmt) const |
Get the schedule for Stmt . | |
isl::map | getScatterFor (MemoryAccess *MA) const |
Get the schedule of MA's parent statement. | |
isl::union_map | getScatterFor (isl::union_set Domain) const |
Get the schedule for the statement instances of Domain . | |
isl::map | getScatterFor (isl::set Domain) const |
Get the schedule for the statement instances of Domain . | |
isl::set | getDomainFor (ScopStmt *Stmt) const |
Get the domain of Stmt . | |
isl::set | getDomainFor (MemoryAccess *MA) const |
Get the domain MA's parent statement. | |
isl::map | getAccessRelationFor (MemoryAccess *MA) const |
Get the access relation of MA . | |
isl::map | getDefToTarget (ScopStmt *DefStmt, ScopStmt *TargetStmt) |
Get a domain translation map from a (scalar) definition to the statement where the definition is being moved to. | |
isl::map | getScalarReachingDefinition (ScopStmt *Stmt) |
Get the reaching definition of a scalar defined in Stmt . | |
isl::map | getScalarReachingDefinition (isl::set DomainDef) |
Get the reaching definition of a scalar defined in DefDomain . | |
isl::map | makeUnknownForDomain (ScopStmt *Stmt) const |
Create a statement-to-unknown value mapping. | |
isl::id | makeValueId (llvm::Value *V) |
Create an isl_id that represents V . | |
isl::space | makeValueSpace (llvm::Value *V) |
Create the space for an llvm::Value that is available everywhere. | |
isl::set | makeValueSet (llvm::Value *V) |
Create a set with the llvm::Value V which is available everywhere. | |
isl::map | makeValInst (llvm::Value *Val, ScopStmt *UserStmt, llvm::Loop *Scope, bool IsCertain=true) |
Create a mapping from a statement instance to the instance of an llvm::Value that can be used in there. | |
isl::union_map | makeNormalizedValInst (llvm::Value *Val, ScopStmt *UserStmt, llvm::Loop *Scope, bool IsCertain=true) |
Create and normalize a ValInst. | |
bool | isCompatibleAccess (MemoryAccess *MA) |
Return whether MA can be used for transformations (e.g. | |
void | computeCommon () |
Compute the different zones. | |
void | computeNormalizedPHIs () |
Compute the normalization map that replaces PHIs by their incoming values. | |
void | printAccesses (llvm::raw_ostream &OS, int Indent=0) const |
Print the current state of all MemoryAccesses to . | |
bool | isNormalizable (MemoryAccess *MA) |
Is MA a PHI READ access that can be normalized? | |
isl::boolean | isNormalized (isl::map Map) |
isl::boolean | isNormalized (isl::union_map Map) |
Protected Attributes | |
const char * | PassName |
The name of the pass this is used from. Used for optimization remarks. | |
std::shared_ptr< isl_ctx > | IslCtx |
Hold a reference to the isl_ctx to avoid it being freed before we released all of the isl objects. | |
llvm::DenseMap< ScopStmt *, isl::map > | ScalarReachDefZone |
Cached reaching definitions for each ScopStmt. | |
Scop * | S |
The analyzed Scop. | |
llvm::LoopInfo * | LI |
LoopInfo analysis used to determine whether values are synthesizable. | |
isl::space | ParamSpace |
Parameter space that does not need realignment. | |
isl::space | ScatterSpace |
Space the schedule maps to. | |
isl::union_map | Schedule |
Cached version of the schedule and domains. | |
isl::union_map | AllReads |
Combined access relations of all MemoryKind::Array READ accesses. | |
isl::union_map | AllReadValInst |
The loaded values (llvm::LoadInst) of all reads. | |
isl::union_map | AllMayWrites |
Combined access relations of all MemoryKind::Array, MAY_WRITE accesses. | |
isl::union_map | AllMustWrites |
Combined access relations of all MemoryKind::Array, MUST_WRITE accesses. | |
isl::union_map | AllWrites |
Combined access relations of all MK_Array write accesses (union of AllMayWrites and AllMustWrites). | |
isl::union_map | AllWriteValInst |
The value instances written to array elements of all write accesses. | |
isl::union_map | WriteReachDefZone |
All reaching definitions for MemoryKind::Array writes. | |
llvm::DenseMap< llvm::Value *, isl::id > | ValueIds |
Map llvm::Values to an isl identifier. | |
isl::union_set | CompatibleElts |
Set of array elements that can be reliably used for zone analysis. | |
llvm::SmallPtrSet< llvm::PHINode *, 4 > | RecursivePHIs |
List of PHIs that may transitively refer to themselves. | |
llvm::DenseSet< llvm::PHINode * > | ComputedPHIs |
PHIs that have been computed. | |
isl::union_map | NormalizeMap |
For computed PHIs, contains the ValInst they stand for. | |
llvm::SmallDenseMap< llvm::PHINode *, isl::union_map > | PerPHIMaps |
Cache for computePerPHI(const ScopArrayInfo *) | |
llvm::DenseMap< std::pair< ScopStmt *, ScopStmt * >, isl::map > | DefToTargetCache |
A cache for getDefToTarget(). | |
Private Member Functions | |
void | collectIncompatibleElts (ScopStmt *Stmt, isl::union_set &IncompatibleElts, isl::union_set &AllElts) |
Find the array elements that violate the zone analysis assumptions. | |
void | addArrayReadAccess (MemoryAccess *MA) |
isl::union_map | getWrittenValue (MemoryAccess *MA, isl::map AccRel) |
Return the ValInst write by a (must-)write access. | |
void | addArrayWriteAccess (MemoryAccess *MA) |
isl::map | computeUseToDefFlowDependency (ScopStmt *UseStmt, ScopStmt *DefStmt) |
For an llvm::Value defined in DefStmt , compute the RAW dependency for a use in every instance of UseStmt . | |
Base class for algorithms based on zones, like DeLICM.
Definition at line 44 of file ZoneAlgo.h.
|
protected |
Prepare the object before computing the zones of S
.
PassName | Name of the pass using this analysis. |
S | The SCoP to process. |
LI | LoopInfo analysis used to determine synthesizable values. |
Definition at line 263 of file ZoneAlgo.cpp.
References isl::union_map::get_space(), polly::getScatterSpace(), isl::union_map::intersect_domain(), ParamSpace, ScatterSpace, and Schedule.
|
private |
Definition at line 392 of file ZoneAlgo.cpp.
References AllReads, AllReadValInst, isl::map::apply_domain(), assert, CompatibleElts, isl::map::curry(), isl::map::domain_map(), polly::MemoryAccess::getAccessInstruction(), getAccessRelationFor(), polly::MemoryAccess::getStatement(), polly::intersectRange(), polly::ScopStmt::isBlockStmt(), polly::MemoryAccess::isLatestArrayKind(), polly::MemoryAccess::isRead(), LI, makeValInst(), and isl::union_map::unite().
Referenced by computeCommon().
|
private |
Definition at line 448 of file ZoneAlgo.cpp.
References AllMayWrites, AllMustWrites, AllWriteValInst, isl::union_map::apply_domain(), assert, CompatibleElts, isl::map::curry(), isl::map::domain_map(), getAccessRelationFor(), polly::MemoryAccess::getStatement(), getWrittenValue(), polly::intersectRange(), isl::union_map::is_null(), polly::MemoryAccess::isLatestArrayKind(), polly::MemoryAccess::isMayWrite(), polly::MemoryAccess::isMustWrite(), polly::MemoryAccess::isWrite(), makeUnknownForDomain(), and isl::union_map::unite().
Referenced by computeCommon().
|
protected |
Find the array elements that can be used for zone analysis.
Definition at line 599 of file ZoneAlgo.cpp.
References collectIncompatibleElts(), CompatibleElts, isl::union_set::get(), isl_union_set_n_set(), makeEmptyUnionSet(), and isl::union_set::subtract().
|
private |
Find the array elements that violate the zone analysis assumptions.
What violates our assumptions:
Scalar reads implicitly always occur before other accesses therefore never violate the first condition. There is also at most one write to a scalar, satisfying the second condition.
Stmt | The statement to be analyzed. | |
[out] | IncompatibleElts | Receives the elements that are not zone-analysis compatible. |
[out] | AllElts | receives all encountered elements. |
Definition at line 323 of file ZoneAlgo.cpp.
References isl::map::get_space(), getAccessRelationFor(), polly::ScopStmt::isRegionStmt(), makeEmptyUnionMap(), onlySameValueWrites(), PassName, POLLY_DEBUG, isl::space::range(), Stores, isl::union_set::unite(), and isl::set::universe().
Referenced by collectCompatibleElts().
|
protected |
Compute the different zones.
Definition at line 965 of file ZoneAlgo.cpp.
References addArrayReadAccess(), addArrayWriteAccess(), AllMayWrites, AllMustWrites, AllReads, AllReadValInst, AllWrites, AllWriteValInst, ComputedPHIs, computeReachingDefinition(), makeEmptyUnionMap(), NormalizeMap, Schedule, simplify, isl::union_map::unite(), and WriteReachDefZone.
isl::union_map ZoneAlgorithm::computeKnown | ( | bool | FromWrite, |
bool | FromRead | ||
) | const |
Compute which value an array element stores at every instant.
FromWrite | Use stores as source of information. |
FromRead | Use loads as source of information. |
Definition at line 1161 of file ZoneAlgo.cpp.
References computeKnownFromLoad(), computeKnownFromMustWrites(), makeEmptyUnionMap(), simplify, and isl::union_map::unite().
isl::union_map ZoneAlgorithm::computeKnownFromLoad | ( | ) | const |
A reaching definition zone is known to be the same value as any load that reads from that array element in that period.
Definition at line 1113 of file ZoneAlgo.cpp.
References AllReads, AllReadValInst, AllWrites, isl::union_map::apply_domain(), isl::union_map::apply_range(), isl::union_map::curry(), polly::distributeDomain(), isl::union_map::domain(), isl::union_map::domain_map(), isl::union_map::from_domain(), isl::union_map::from_domain_and_range(), isl::union_map::range(), isl::union_map::range_product(), isl::union_map::reverse(), ScatterSpace, Schedule, isl::union_set::subtract(), isl::union_map::unite(), isl::union_set::unite(), isl::set::universe(), isl::union_map::wrap(), and WriteReachDefZone.
Referenced by computeKnown().
isl::union_map ZoneAlgorithm::computeKnownFromMustWrites | ( | ) | const |
A reaching definition zone is known to have the definition's written value if the definition is a MUST_WRITE.
Definition at line 1102 of file ZoneAlgo.cpp.
References AllWriteValInst, isl::union_map::apply_range(), isl::union_map::curry(), polly::distributeDomain(), polly::filterKnownValInst(), and WriteReachDefZone.
Referenced by computeKnown().
|
protected |
Compute the normalization map that replaces PHIs by their incoming values.
Definition at line 999 of file ZoneAlgo.cpp.
References isl::union_map::apply_domain(), isl::union_map::apply_range(), assert, ComputedPHIs, computePerPHI(), polly::ScopStmt::getSurroundingLoop(), isl::boolean::is_false(), isl::union_map::is_null(), isl::union_map::is_single_valued(), isNormalizable(), isNormalized(), isRecursivePHI(), makeEmptyUnionMap(), makeValInst(), NormalizeMap, normalizeValInst(), polly::PHI, RecursivePHIs, simplify, isl::union_map::unite(), and polly::Value.
|
protected |
For each 'execution' of a PHINode, get the incoming block that was executed before.
For each PHI instance we can directly determine which was the incoming block, and hence derive which value the PHI has.
SAI | The ScopArrayInfo representing the PHI's storage. |
Definition at line 537 of file ZoneAlgo.cpp.
References isl::union_map::apply_range(), assert, polly::beforeScatter(), polly::ScopArrayInfo::getBasePtr(), getScatterFor(), isl::map::intersect_params(), isl::map::intersect_range(), isl::boolean::is_false(), isl::union_map::is_injective(), isl::set::is_null(), isl::union_map::is_single_valued(), polly::ScopArrayInfo::isPHIKind(), isl::map::lexmax(), makeEmptyUnionMap(), PerPHIMaps, polly::PHI, isl::union_map::range(), isl::union_map::reverse(), ScatterSpace, polly::singleton(), and isl::union_map::unite().
Referenced by computeNormalizedPHIs().
|
private |
For an llvm::Value defined in DefStmt
, compute the RAW dependency for a use in every instance of UseStmt
.
UseStmt | Statement a scalar is used in. |
DefStmt | Statement a scalar is defined in. |
Definition at line 484 of file ZoneAlgo.cpp.
References isl::map::apply_range(), polly::convertZoneToTimepoints(), getScalarReachingDefinition(), getScatterFor(), and isl::in.
Referenced by getDefToTarget().
|
protected |
Get the access relation of MA
.
The domain of the result is as narrow as possible.
Definition at line 647 of file ZoneAlgo.cpp.
References Domain, getDomainFor(), polly::MemoryAccess::getLatestAccessRelation(), and isl::map::intersect_domain().
Referenced by addArrayReadAccess(), addArrayWriteAccess(), and collectIncompatibleElts().
Get a domain translation map from a (scalar) definition to the statement where the definition is being moved to.
TargetStmt
can also be seen at an llvm::Use of an llvm::Value in DefStmt
. In addition, we allow transitive uses:
DefStmt -> MiddleStmt -> TargetStmt
where an operand tree of instructions in DefStmt and MiddleStmt are to be moved to TargetStmt. To be generally correct, we also need to know all the intermediate statements. However, we make use of the fact that ForwardOpTree currently does not support a move from a loop body across its header such that only the first definition and the target statement are relevant.
DefStmt | Statement from where a definition might be moved from. |
TargetStmt | Statement where the definition is potentially being moved to (should contain a use of that definition). |
Definition at line 653 of file ZoneAlgo.cpp.
References assert, computeUseToDefFlowDependency(), DefToTargetCache, isl::map::equate(), isl::map::from_domain_and_range(), getDomainFor(), polly::ScopStmt::getSurroundingLoop(), isl::map::identity(), isl::in, isl::map::is_null(), isInsideLoop(), isl::out, polly::rangeIslSize(), isl::map::reverse(), simplify, isl::set::tuple_dim(), and unsignedFromIslSize().
Referenced by makeValInst().
|
protected |
Get the domain MA's
parent statement.
Definition at line 643 of file ZoneAlgo.cpp.
References getDomainFor(), and polly::MemoryAccess::getStatement().
Get the domain of Stmt
.
Definition at line 639 of file ZoneAlgo.cpp.
References polly::ScopStmt::getDomain(), and isl::set::remove_redundancies().
Referenced by getAccessRelationFor(), getDefToTarget(), getDomainFor(), getScalarReachingDefinition(), makeUnknownForDomain(), and makeValInst().
Get the reaching definition of a scalar defined in DefDomain
.
DomainDef | { DomainDef[] } The write statements to get the reaching definition for. |
Definition at line 719 of file ZoneAlgo.cpp.
References isl::set::get_tuple_id(), getScalarReachingDefinition(), and isl_id_get_user().
Get the reaching definition of a scalar defined in Stmt
.
Note that this does not depend on the llvm::Instruction, only on the statement it is defined in. Therefore the same computation can be reused.
Stmt | The statement in which a scalar is defined. |
Definition at line 707 of file ZoneAlgo.cpp.
References computeScalarReachingDefinition(), Domain, getDomainFor(), ScalarReachDefZone, Schedule, and simplify.
Referenced by computeUseToDefFlowDependency(), and getScalarReachingDefinition().
Get the schedule for the statement instances of Domain
.
Definition at line 630 of file ZoneAlgo.cpp.
References assert, Domain, getScatterFor(), isl_bool_true, ScatterSpace, and polly::singleton().
|
protected |
Get the schedule for the statement instances of Domain
.
Definition at line 626 of file ZoneAlgo.cpp.
References Domain, isl::union_map::intersect_domain(), and Schedule.
|
protected |
Get the schedule of MA's
parent statement.
Definition at line 622 of file ZoneAlgo.cpp.
References getScatterFor(), and polly::MemoryAccess::getStatement().
Get the schedule for Stmt
.
The domain of the result is as narrow as possible.
Definition at line 616 of file ZoneAlgo.cpp.
References isl::union_map::extract_map(), polly::ScopStmt::getDomainSpace(), isl::space::map_from_domain_and_range(), ScatterSpace, and Schedule.
Referenced by computePerPHI(), computeUseToDefFlowDependency(), and getScatterFor().
|
inline |
|
private |
Return the ValInst write by a (must-)write access.
Returns the 'unknown' ValInst if there is no single ValInst[] the array element written to will have.
Definition at line 416 of file ZoneAlgo.cpp.
References polly::MemoryAccess::getAccessInstruction(), polly::MemoryAccess::getAccessValue(), polly::ScopArrayInfo::getElementType(), polly::MemoryAccess::getLatestScopArrayInfo(), polly::MemoryAccess::getStatement(), polly::ScopStmt::getSurroundingLoop(), isl::map::is_single_valued(), isl::boolean::is_true(), polly::MemoryAccess::isMustWrite(), polly::MemoryAccess::isOriginalArrayKind(), LI, makeNormalizedValInst(), and polly::Value.
Referenced by addArrayWriteAccess().
|
protected |
Return whether MA
can be used for transformations (e.g.
OpTree load forwarding, DeLICM mapping).
Definition at line 890 of file ZoneAlgo.cpp.
References polly::MemoryAccess::getAccessInstruction(), and polly::MemoryAccess::isLatestArrayKind().
|
protected |
Is MA
a PHI READ access that can be normalized?
Definition at line 899 of file ZoneAlgo.cpp.
References assert, polly::MemoryAccess::getAccessInstruction(), polly::MemoryAccess::getOriginalScopArrayInfo(), polly::MemoryAccess::isOriginalPHIKind(), polly::MemoryAccess::isRead(), polly::PHI, and RecursivePHIs.
Referenced by computeNormalizedPHIs(), and isNormalized().
|
protected |
Determine whether the argument does not map to any computed PHI. Those should have been replaced by their incoming values.
Definition at line 927 of file ZoneAlgo.cpp.
References isl::map::get_space(), isl::space::get_tuple_id(), isl::id::get_user(), isl::in, isl::id::is_null(), isl::boolean::is_true(), isl::space::is_wrapping(), isNormalizable(), isl::out, polly::PHI, isl::space::range(), isl::space::unwrap(), and polly::Value.
Referenced by computeNormalizedPHIs(), and isNormalized().
|
protected |
Definition at line 954 of file ZoneAlgo.cpp.
References isl::union_map::get_map_list(), isl::boolean::is_true(), and isNormalized().
|
protected |
Definition at line 595 of file ZoneAlgo.cpp.
References isl::space::ctx(), isl::union_map::empty(), and ParamSpace.
Referenced by collectIncompatibleElts(), computeCommon(), computeKnown(), computeNormalizedPHIs(), and computePerPHI().
|
protected |
Definition at line 591 of file ZoneAlgo.cpp.
References isl::space::ctx(), isl::union_set::empty(), and ParamSpace.
Referenced by collectCompatibleElts().
|
protected |
Create and normalize a ValInst.
Definition at line 880 of file ZoneAlgo.cpp.
References ComputedPHIs, makeValInst(), NormalizeMap, and normalizeValInst().
Referenced by getWrittenValue().
Create a statement-to-unknown value mapping.
Stmt | The statement whose instances are mapped to unknown. |
Definition at line 728 of file ZoneAlgo.cpp.
References getDomainFor().
Referenced by addArrayWriteAccess(), and makeValInst().
|
protected |
Create a mapping from a statement instance to the instance of an llvm::Value that can be used in there.
Although LLVM IR uses single static assignment, llvm::Values can have different contents in loops, when they get redefined in the last iteration. This function tries to get the statement instance of the previous definition, relative to a user.
Example: for (int i = 0; i < N; i += 1) { DEF: int v = A[i]; USE: use(v); }
The value instance used by statement instance USE[i] is DEF[i]. Hence, makeValInst returns:
{ USE[i] -> [DEF[i] -> v[]] : 0 <= i < N }
Val | The value to get the instance of. |
UserStmt | The statement that uses Val . Can be nullptr. |
Scope | Loop the using instruction resides in. |
IsCertain | Pass true if the definition of Val is a MUST_WRITE or false if the write is conditional. |
Definition at line 755 of file ZoneAlgo.cpp.
References polly::VirtualUse::Block, polly::VirtualUse::Constant, polly::VirtualUse::create(), isl::map::from_domain_and_range(), getDefToTarget(), getDomainFor(), polly::VirtualUse::Hoisted, isl::map::identity(), polly::VirtualUse::Inter, polly::VirtualUse::Intra, isl_id_alloc(), makeUnknownForDomain(), makeValueSet(), isl::manage(), polly::VirtualUse::ReadOnly, isl::map::reverse(), isl::set, simplify, and polly::VirtualUse::Synthesizable.
Referenced by addArrayReadAccess(), computeNormalizedPHIs(), and makeNormalizedValInst().
|
protected |
Create an isl_id that represents V
.
Definition at line 732 of file ZoneAlgo.cpp.
References isl::id::alloc(), polly::getIslCompatibleName(), IslCtx, polly::UseInstructionNames, and ValueIds.
Referenced by makeValueSpace().
|
protected |
Create a set with the llvm::Value V
which is available everywhere.
Definition at line 750 of file ZoneAlgo.cpp.
References makeValueSpace(), and isl::set::universe().
Referenced by makeValInst().
|
protected |
Create the space for an llvm::Value that is available everywhere.
Definition at line 745 of file ZoneAlgo.cpp.
References makeValueId(), ParamSpace, isl::set, isl::space::set_from_params(), and isl::space::set_tuple_id().
Referenced by makeValueSet().
|
protected |
Print the current state of all MemoryAccesses to .
Definition at line 1092 of file ZoneAlgo.cpp.
|
protected |
Combined access relations of all MemoryKind::Array, MAY_WRITE accesses.
{ DomainMayWrite[] -> Element[] }
Definition at line 87 of file ZoneAlgo.h.
Referenced by addArrayWriteAccess(), and computeCommon().
|
protected |
Combined access relations of all MemoryKind::Array, MUST_WRITE accesses.
{ DomainMustWrite[] -> Element[] }
Definition at line 91 of file ZoneAlgo.h.
Referenced by addArrayWriteAccess(), and computeCommon().
|
protected |
Combined access relations of all MemoryKind::Array READ accesses.
{ DomainRead[] -> Element[] }
Definition at line 79 of file ZoneAlgo.h.
Referenced by addArrayReadAccess(), computeCommon(), and computeKnownFromLoad().
|
protected |
The loaded values (llvm::LoadInst) of all reads.
{ [Element[] -> DomainRead[]] -> ValInst[] }
Definition at line 83 of file ZoneAlgo.h.
Referenced by addArrayReadAccess(), computeCommon(), and computeKnownFromLoad().
|
protected |
Combined access relations of all MK_Array write accesses (union of AllMayWrites and AllMustWrites).
{ DomainWrite[] -> Element[] }
Definition at line 96 of file ZoneAlgo.h.
Referenced by computeCommon(), and computeKnownFromLoad().
|
protected |
The value instances written to array elements of all write accesses.
{ [Element[] -> DomainWrite[]] -> ValInst[] }
Definition at line 100 of file ZoneAlgo.h.
Referenced by addArrayWriteAccess(), computeCommon(), and computeKnownFromMustWrites().
|
protected |
Set of array elements that can be reliably used for zone analysis.
{ Element[] }
Definition at line 113 of file ZoneAlgo.h.
Referenced by addArrayReadAccess(), addArrayWriteAccess(), and collectCompatibleElts().
|
protected |
PHIs that have been computed.
Computed PHIs are replaced by their incoming values using NormalizeMap.
Definition at line 125 of file ZoneAlgo.h.
Referenced by computeCommon(), computeNormalizedPHIs(), and makeNormalizedValInst().
|
protected |
A cache for getDefToTarget().
Definition at line 157 of file ZoneAlgo.h.
Referenced by getDefToTarget().
|
protected |
Hold a reference to the isl_ctx to avoid it being freed before we released all of the isl objects.
This must be declared before any other member that holds an isl object. This guarantees that the shared_ptr and its isl_ctx is destructed last, after all other members free'd the isl objects they were holding.
Definition at line 55 of file ZoneAlgo.h.
Referenced by makeValueId().
|
protected |
LoopInfo analysis used to determine whether values are synthesizable.
Definition at line 66 of file ZoneAlgo.h.
Referenced by addArrayReadAccess(), and getWrittenValue().
|
protected |
For computed PHIs, contains the ValInst they stand for.
To show an example, assume the following PHINode:
Stmt: phi = phi double [val1, bb1], [val2, bb2]
It's ValInst is:
{ [Stmt[i] -> phi[]] }
The value phi will be either val1 or val2, depending on whether in iteration i bb1 or bb2 has been executed before. In SCoPs, this can be determined at compile-time, and the result stored in NormalizeMap. For the previous example, it could be:
{ [Stmt[i] -> phi[]] -> [Stmt[0] -> val1[]]; [Stmt[i] -> phi[]] -> [Stmt[i] -> val2[]] : i > 0 }
Only ValInsts in ComputedPHIs are present in this map. Other values are assumed to represent themselves. This is to avoid adding lots of identity entries to this map.
{ PHIValInst[] -> IncomingValInst[] }
Definition at line 151 of file ZoneAlgo.h.
Referenced by computeCommon(), computeNormalizedPHIs(), and makeNormalizedValInst().
|
protected |
Parameter space that does not need realignment.
Definition at line 69 of file ZoneAlgo.h.
Referenced by makeEmptyUnionMap(), makeEmptyUnionSet(), makeValueSpace(), and ZoneAlgorithm().
|
protected |
The name of the pass this is used from. Used for optimization remarks.
Definition at line 47 of file ZoneAlgo.h.
Referenced by collectIncompatibleElts().
|
protected |
Cache for computePerPHI(const ScopArrayInfo *)
Definition at line 154 of file ZoneAlgo.h.
Referenced by computePerPHI().
|
protected |
List of PHIs that may transitively refer to themselves.
Computing them would require a polyhedral transitive closure operation, for which isl may only return an approximation. For correctness, we always require an exact result. Hence, we exclude such PHIs.
Definition at line 120 of file ZoneAlgo.h.
Referenced by computeNormalizedPHIs(), and isNormalizable().
|
protected |
Cached reaching definitions for each ScopStmt.
Use getScalarReachingDefinition() to get its contents.
Definition at line 60 of file ZoneAlgo.h.
Referenced by getScalarReachingDefinition().
|
protected |
Space the schedule maps to.
Definition at line 72 of file ZoneAlgo.h.
Referenced by computeKnownFromLoad(), computePerPHI(), getScatterFor(), and ZoneAlgorithm().
|
protected |
Cached version of the schedule and domains.
Definition at line 75 of file ZoneAlgo.h.
Referenced by computeCommon(), computeKnownFromLoad(), getScalarReachingDefinition(), getScatterFor(), and ZoneAlgorithm().
|
protected |
Map llvm::Values to an isl identifier.
Used with -polly-use-llvm-names=false as an alternative method to get unique ids that do not depend on pointer values.
Definition at line 109 of file ZoneAlgo.h.
Referenced by makeValueId().
|
protected |
All reaching definitions for MemoryKind::Array writes.
{ [Element[] -> Zone[]] -> DomainWrite[] }
Definition at line 104 of file ZoneAlgo.h.
Referenced by computeCommon(), computeKnownFromLoad(), and computeKnownFromMustWrites().