|
Jlm
|

Public Member Functions | |
| LoadTracingInfo (rvsdg::SimpleNode &loadNode, OutputTracer &tracer, aa::AliasAnalysis &aliasAnalysis, rvsdg::RegionPredicateTrace ®ionPredicateTrace) | |
| bool | traceAllMemoryStateInputs () |
| std::optional< ValueOrigin > | getLastValueOriginBeforeNode (rvsdg::Node &node, bool loopBackEdgeMaybeTaken) |
| std::optional< ValueOrigin > | getLastValueOriginInRegion (rvsdg::Region ®ion, bool loopBackEdgeMaybeTaken) |
Public Attributes | |
| rvsdg::SimpleNode & | loadNode |
| rvsdg::Output * | loadedAddress |
| std::shared_ptr< const rvsdg::Type > | loadedType |
| size_t | loadedTypeSize |
| AliasQueryResponseCounter | storeAAResponses |
| AliasQueryResponseCounter | loadAAResponses |
| std::unordered_map< rvsdg::GammaNode *, rvsdg::Output * > | createdExitVars |
| std::unordered_map< rvsdg::ThetaNode *, rvsdg::ThetaNode::LoopVar > | createdLoopVars |
| std::queue< rvsdg::Input * > | unroutedLoopVarPosts |
Private Member Functions | |
| aa::AliasAnalysis::AliasQueryResponse | queryAliasAnalysisWithStore (rvsdg::SimpleNode &storeNode) |
| aa::AliasAnalysis::AliasQueryResponse | queryAliasAnalysisWithLoad (rvsdg::SimpleNode &otherLoadNode) |
| ValueOrigin | getLastValueOriginBeforeInput (rvsdg::Input &input, bool loopBackEdgeTaken) |
| ValueOrigin | getLastValueOriginBeforeInputInternal (rvsdg::Input &input, bool loopBackEdgeTaken) |
Private Attributes | |
| OutputTracer & | tracer |
| aa::AliasAnalysis & | aliasAnalysis |
| rvsdg::RegionPredicateTrace & | regionPredicateTrace |
| std::unordered_map< rvsdg::SimpleNode *, StoreNodeInfo > | storeNodeInfo |
| std::unordered_map< rvsdg::SimpleNode *, LoadNodeInfo > | loadNodeInfo |
| std::unordered_map< std::pair< rvsdg::Input *, bool >, ValueOrigin, util::Hash< std::pair< rvsdg::Input *, bool > > > | lastValueOriginBeforeInput |
| std::unordered_map< std::pair< rvsdg::Node *, bool >, ValueOrigin, util::Hash< std::pair< rvsdg::Node *, bool > > > | lastValueOriginBeforeNode |
| std::unordered_map< std::pair< rvsdg::Region *, bool >, ValueOrigin, util::Hash< std::pair< rvsdg::Region *, bool > > > | lastValueOriginInRegion |
| util::HashSet< rvsdg::Input * > | loopVarPostsToTrace |
Helper class holding info during tracing of the memory states going to a given load node. Can trace into structural nodes, and keep track of separate value origins for separate regions. If all branches lead to a value origin that can be forwarded, forwarding can be performed.
Definition at line 408 of file StoreValueForwarding.cpp.
|
inline |
Definition at line 411 of file StoreValueForwarding.cpp.
|
inlineprivate |
Attempts to trace the given memory state input back to a store node that can be forwarded. If a store node that may alias the load is encountered, unknown is returned. If structural nodes are encountered, all branches are traced. If any of the branches are not traceable, unknown is returned. If the branches lead to different store nodes, the structural node itself is returned.
During tracing, the class keeps track of the last store before nodes and region exits. If tracing different memory state chains lead to different "last store node before X", store forwarding is not possible, and unknown is returned to terminate early.
| input | the memory state input to trace from |
| loopBackEdgeTaken | true if any loop back edge has been traced on the way to this input |
Definition at line 591 of file StoreValueForwarding.cpp.
|
inlineprivate |
Definition at line 632 of file StoreValueForwarding.cpp.
|
inline |
After tracing has finished, provides the last value origin before the given node.
| node | the node to trace backwards from |
| loopBackEdgeMaybeTaken | if true, the function uses the most conservative value origin for the node, which does not make any assumptions about loop back-edges. If false, or if tracing never reached the node after following a back-edge, the value origin found under the assumption that no back-edges have been taken is used. |
Definition at line 480 of file StoreValueForwarding.cpp.
|
inline |
After tracing has finished, provides the last value origin before the end of a region. Note that this value origin may be outside the region, if the region does not clobber.
| region | the region whose results are traced backwards from |
| loopBackEdgeMaybeTaken | if true, the function uses the most conservative value origin for the region, which does not make any assumptions about loop back-edges. If false, or if tracing never reached the region after following a back-edge, the value origin found under the assumption that no back-edges have been taken is used. |
region, or nullopt if the region was never reached. Definition at line 507 of file StoreValueForwarding.cpp.
|
inlineprivate |
Performs a simple alias analysis query between the LoadTracingInfo's loadNode, and the other load node given as a parameter, to determine if they read from the same address.
| otherLoadNode | the LoadOperation node |
Definition at line 556 of file StoreValueForwarding.cpp.
|
inlineprivate |
Performs a simple alias analysis query between the loadNode and the given store node, to determine if they read and write from the same exact address, possibly interfere, or if the operations are guaranteed to be fully independent.
| storeNode | the StoreOperation node |
Definition at line 531 of file StoreValueForwarding.cpp.
|
inline |
Performs tracing of memory states to find value origin(s) that can be forwarded to the load. If tracing leads to nodes that may or may not clobber the load, or if different memory state inputs lead to different value origins, value forwarding is not possible, and false is returned. Different branches of structural nodes can lead to different value origins, as long as all memory states lead to the same store node in each branch.
Definition at line 437 of file StoreValueForwarding.cpp.
|
private |
Definition at line 928 of file StoreValueForwarding.cpp.
| std::unordered_map<rvsdg::GammaNode *, rvsdg::Output *> jlm::llvm::LoadTracingInfo::createdExitVars |
Definition at line 975 of file StoreValueForwarding.cpp.
| std::unordered_map<rvsdg::ThetaNode *, rvsdg::ThetaNode::LoopVar> jlm::llvm::LoadTracingInfo::createdLoopVars |
Definition at line 977 of file StoreValueForwarding.cpp.
|
private |
Definition at line 943 of file StoreValueForwarding.cpp.
|
private |
Definition at line 953 of file StoreValueForwarding.cpp.
|
private |
Definition at line 964 of file StoreValueForwarding.cpp.
| AliasQueryResponseCounter jlm::llvm::LoadTracingInfo::loadAAResponses |
Definition at line 922 of file StoreValueForwarding.cpp.
| rvsdg::Output* jlm::llvm::LoadTracingInfo::loadedAddress |
Definition at line 916 of file StoreValueForwarding.cpp.
| std::shared_ptr<const rvsdg::Type> jlm::llvm::LoadTracingInfo::loadedType |
Definition at line 917 of file StoreValueForwarding.cpp.
| size_t jlm::llvm::LoadTracingInfo::loadedTypeSize |
Definition at line 918 of file StoreValueForwarding.cpp.
| rvsdg::SimpleNode& jlm::llvm::LoadTracingInfo::loadNode |
Definition at line 915 of file StoreValueForwarding.cpp.
|
private |
Definition at line 934 of file StoreValueForwarding.cpp.
|
private |
Definition at line 969 of file StoreValueForwarding.cpp.
|
private |
Definition at line 929 of file StoreValueForwarding.cpp.
| AliasQueryResponseCounter jlm::llvm::LoadTracingInfo::storeAAResponses |
Definition at line 921 of file StoreValueForwarding.cpp.
|
private |
Definition at line 932 of file StoreValueForwarding.cpp.
|
private |
Definition at line 927 of file StoreValueForwarding.cpp.
| std::queue<rvsdg::Input *> jlm::llvm::LoadTracingInfo::unroutedLoopVarPosts |
Definition at line 979 of file StoreValueForwarding.cpp.