|
Jlm
|
Store Value Forwarding Optimization. More...
#include <StoreValueForwarding.hpp>


Classes | |
| struct | Context |
| class | Statistics |
| Store Value Forwarding Statistics class. More... | |
| struct | TracedDelta |
Public Member Functions | |
| ~StoreValueForwarding () noexcept override | |
| StoreValueForwarding () | |
| StoreValueForwarding (const StoreValueForwarding &)=delete | |
| StoreValueForwarding (StoreValueForwarding &&)=delete | |
| StoreValueForwarding & | operator= (const StoreValueForwarding &)=delete |
| StoreValueForwarding & | operator= (StoreValueForwarding &&)=delete |
| void | Run (rvsdg::RvsdgModule &module, util::StatisticsCollector &statisticsCollector) override |
| Perform RVSDG transformation. | |
Public Member Functions inherited from jlm::rvsdg::Transformation | |
| virtual | ~Transformation () noexcept |
| Transformation (std::string_view Name) | |
| const std::string_view & | GetName () const noexcept |
| void | Run (RvsdgModule &module) |
| Perform RVSDG transformation. | |
Private Member Functions | |
| void | traverseInterProceduralRegion (rvsdg::Region ®ion) |
| void | traverseIntraProceduralRegion (rvsdg::Region ®ion) |
| void | processLoad (rvsdg::SimpleNode &loadNode) |
| void | processLoadWithoutMemoryStates (rvsdg::SimpleNode &loadNode) |
| std::optional< TracedDelta > | traceLoadWithoutMemoryStates (const rvsdg::SimpleNode &loadNode) |
| void | forwardLoadWithoutMemoryStates (rvsdg::SimpleNode &loadNode, const TracedDelta &tracedDelta) |
| void | processLoadWithMemoryStates (rvsdg::SimpleNode &loadNode) |
| void | forwardValueOrigins (LoadTracingInfo &tracingInfo) |
| rvsdg::Output & | getValueOriginOutput (ValueOrigin storeValueOrigin, rvsdg::Region &targetRegion, LoadTracingInfo &tracingInfo) |
| void | connectUnroutedLoopPosts (LoadTracingInfo &tracingInfo) |
| rvsdg::Output & | routeOutputToRegion (rvsdg::Output &output, rvsdg::Region ®ion) |
Private Attributes | |
| std::unique_ptr< Context > | context_ |
Store Value Forwarding Optimization.
Store Value Forwarding is an optimization that forwards store values to eliminate redundant loads.
Definition at line 30 of file StoreValueForwarding.hpp.
|
overridedefaultnoexcept |
| jlm::llvm::StoreValueForwarding::StoreValueForwarding | ( | ) |
Definition at line 237 of file StoreValueForwarding.cpp.
|
delete |
|
delete |
|
private |
In getValueOriginOutput(), all loop variables are created as invariant, to avoid recursive function calls looping around the graph. Instead, the post results of all created loop variables are added to a queue, and properly diverted to their correct origins by this function.
Definition at line 1492 of file StoreValueForwarding.cpp.
|
private |
Forwards a traced LoadNonVolatileOperation node without memory states.
| loadNode | The LoadNonVolatileOperation node to handle. |
| tracedDelta | The TracedDelta information of loadNode. |
Definition at line 1301 of file StoreValueForwarding.cpp.
|
private |
Performs store value forwarding to the load node represented by the given tracingInfo. Uses the metadata stored during tracing to replace the value output of the load node with the last value that was stored to the memory loaded by it.
| tracingInfo | the metadata created during store value origin tracing. |
Definition at line 1338 of file StoreValueForwarding.cpp.
|
private |
Gets an output providing the value stored at the given storeValueOrigin. The returned output is in the specified targetRegion. It must be the same region as the storeValueOrigin itself, or a parent region. Getting it may involve routing and creating new structural node inputs and outputs.
| storeValueOrigin | the origin of the last stored value along some memory state. |
| targetRegion | the region the returned output should be in. |
| tracingInfo | the metadata created during store value origin tracing. |
Definition at line 1368 of file StoreValueForwarding.cpp.
|
delete |
|
delete |
|
private |
Process a non-volatile load node during traversal
| loadNode | the load node to handle |
Definition at line 983 of file StoreValueForwarding.cpp.
|
private |
Process a LoadNonVolatileOperation node with no memory states during traversal
| loadNode | The LoadNonVolatileOperation node to handle |
Definition at line 1000 of file StoreValueForwarding.cpp.
|
private |
Process a LoadNonVolatileOperation node with memory states during traversal
| loadNode | The LoadNonVolatileOperation node to handle |
Definition at line 1026 of file StoreValueForwarding.cpp.
|
private |
Helper for routing outputs that memoizes the routing to avoid creating duplicate inputs and outputs in structural nodes. The output must be in the region, or in an ancestor of the region.
| output | the output to route |
| region | the destination of the routing |
region that provides the same value as output Definition at line 1514 of file StoreValueForwarding.cpp.
|
overridevirtual |
Perform RVSDG transformation.
| module | RVSDG module the transformation is performed on. |
| statisticsCollector | Statistics collector for collecting transformation statistics. |
Implements jlm::rvsdg::Transformation.
Definition at line 1603 of file StoreValueForwarding.cpp.
|
private |
Try to trace a LoadNonVolatileOperation node without memory states to a delta node.
| loadNode | The LoadNonVolatileOperation node to handle |
Definition at line 1045 of file StoreValueForwarding.cpp.
|
private |
Traverse the given inter-procedural region
| region | the region to traverse |
Definition at line 242 of file StoreValueForwarding.cpp.
|
private |
Traverse the given intra-procedural region
| region | the region to traverse |
Definition at line 269 of file StoreValueForwarding.cpp.
|
private |
Definition at line 174 of file StoreValueForwarding.hpp.