|
FreeTensor
|
#include <deps.h>
Public Member Functions | |
| FindDeps | mode (FindDepsMode m) |
| FindDeps | type (DepType t) |
| FindDeps | direction (const std::vector< FindDepsDir > &d) |
| FindDeps | filterEarlier (const FindDepsAccPtFilter &f) |
| FindDeps | filterLater (const FindDepsAccPtFilter &f) |
| FindDeps | filter (const FindDepsFilter &f) |
| FindDeps | filterSubAST (const ID &subAST) |
| FindDeps | ignoreReductionWAW (bool flag) |
| FindDeps | eraseOutsideVarDef (bool flag) |
| FindDeps | noProjectOutPrivateAxis (bool flag) |
| FindDeps | scope2CoordCallback (std::function< void(const ID &, const std::unordered_map< ID, std::vector< IterAxis > > &)> callback) |
| void | operator() (const Stmt &op, const std::function< void(const Dependence &)> &found) |
| void | operator() (const Stmt &op, const FindDepsCallback &found) |
| bool | exists (const Stmt &op) |
| FindDeps | filterAccess (const std::function< bool(const AccessPointBase &)> &f) |
| FindDeps | filterAccess (const FindDepsAccFilter &f) |
Find dependences in an AST satisfiying given conditions
Conditions can be set with member functions, and finally FindDeps can be run via operator(), e.g. FindDeps().direction(...).filter(...)(...)
|
inline |
Check only for given directions on loops or parallel scopes
The direction array is in reduce_or [ reduce_and [ axis, mode ]] format.
E.g. 1, {{{L1, Same}, {L2, Normal}}} means dependences should happen inside one iteration of L1, AND happen along L2.
E.g. 2, {{{L1, Same}}, {{L2, Normal}}} means dependences should happen inside one iteration of L1, OR happen along L2.
Defaults to no restriction
|
inline |
Ignore all dependences outside the VarDef
Defaults to true
| bool freetensor::FindDeps::exists | ( | const Stmt & | op | ) |
Helper function to run FindDeps
Only to check whether there is a dependence satisfying given conditions, but not cared about what dependence it is
| op | : AST root |
|
inline |
Configure an additional callback to select which dependences to check
Please use filterAccess, filterEarlier or filterLater if possbile, for better performance
Defaults to no filter
|
inline |
|
inline |
Configure an additional callback to select the accesses to check
filterAccess is preferred over filterEarlier, filterLater and filter for performance
Defaults to no filter
Pass a normal function to be called sequentially, or pass a SyncFunc object to deciede whether to be called in parallel
|
inline |
Configure an additional callback to select the dependent (earlier) access to check
filterEarlier is perferred over filter for performance
Defaults to no filter
|
inline |
Configure an additional callback to select the depending (later) access to check
filterLater is perferred over filter for performance
Defaults to no filter
Help function to analyze a sub-AST only
|
inline |
Ignore WAW dependences between two ReduceTo nodes. This kind of dependences are false dependences if running serially
Defaults to true
|
inline |
Configure whether one access should depending on / be dependent by ALL INSTANCES of another access
Possible values are:
earlier statement / expression is dependent by laterlater statement is depending on earlierDefaults to no restriction
Note: killing test is insensitive to loop-invariant, which means there will be false nagative
|
inline |
Disable the projectOutPrivateAxis optimization. If you want to further check Presburger maps or sets in the found callback, you must set it to true
Defaults to false
| void freetensor::FindDeps::operator() | ( | const Stmt & | op, |
| const FindDepsCallback & | found | ||
| ) |
Run FindDeps, with specified synchronize/unsynchronize
| op | : AST root |
| found | : callback |
|
inline |
Run FindDeps, synchronized as default
| op | : AST root |
| found | : callback |
|
inline |
Check only for WAW, RAW and / or RAW dependences
Defaults to no restriction