|
Jlm
|

Public Member Functions | |
| LoadTracingInfo (rvsdg::SimpleNode &loadNode, OutputTracer &tracer, aa::AliasAnalysis &aliasAnalysis, rvsdg::AlternativeRegionPredicateTracer ®ionPredicateTracer) | |
| 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::AlternativeRegionPredicateTracer & | regionPredicateTracer |
| 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 414 of file StoreValueForwarding.cpp.
|
inline |
Definition at line 417 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 597 of file StoreValueForwarding.cpp.
|
inlineprivate |
Definition at line 638 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 486 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 513 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 562 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 537 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 443 of file StoreValueForwarding.cpp.
|
private |
Definition at line 935 of file StoreValueForwarding.cpp.
| std::unordered_map<rvsdg::GammaNode *, rvsdg::Output *> jlm::llvm::LoadTracingInfo::createdExitVars |
Definition at line 982 of file StoreValueForwarding.cpp.
| std::unordered_map<rvsdg::ThetaNode *, rvsdg::ThetaNode::LoopVar> jlm::llvm::LoadTracingInfo::createdLoopVars |
Definition at line 984 of file StoreValueForwarding.cpp.
|
private |
Definition at line 950 of file StoreValueForwarding.cpp.
|
private |
Definition at line 960 of file StoreValueForwarding.cpp.
|
private |
Definition at line 971 of file StoreValueForwarding.cpp.
| AliasQueryResponseCounter jlm::llvm::LoadTracingInfo::loadAAResponses |
Definition at line 929 of file StoreValueForwarding.cpp.
| rvsdg::Output* jlm::llvm::LoadTracingInfo::loadedAddress |
Definition at line 923 of file StoreValueForwarding.cpp.
| std::shared_ptr<const rvsdg::Type> jlm::llvm::LoadTracingInfo::loadedType |
Definition at line 924 of file StoreValueForwarding.cpp.
| size_t jlm::llvm::LoadTracingInfo::loadedTypeSize |
Definition at line 925 of file StoreValueForwarding.cpp.
| rvsdg::SimpleNode& jlm::llvm::LoadTracingInfo::loadNode |
Definition at line 922 of file StoreValueForwarding.cpp.
|
private |
Definition at line 941 of file StoreValueForwarding.cpp.
|
private |
Definition at line 976 of file StoreValueForwarding.cpp.
|
private |
Definition at line 936 of file StoreValueForwarding.cpp.
| AliasQueryResponseCounter jlm::llvm::LoadTracingInfo::storeAAResponses |
Definition at line 928 of file StoreValueForwarding.cpp.
|
private |
Definition at line 939 of file StoreValueForwarding.cpp.
|
private |
Definition at line 934 of file StoreValueForwarding.cpp.
| std::queue<rvsdg::Input *> jlm::llvm::LoadTracingInfo::unroutedLoopVarPosts |
Definition at line 986 of file StoreValueForwarding.cpp.