|
Jlm
|
Region-aware mod/ref summarizer. More...
#include <RegionAwareModRefSummarizer.hpp>


Classes | |
| struct | Context |
| class | Statistics |
| Region-aware mod/ref summarizer statistics. More... | |
Public Member Functions | |
| ~RegionAwareModRefSummarizer () noexcept override | |
| RegionAwareModRefSummarizer () | |
| RegionAwareModRefSummarizer (const RegionAwareModRefSummarizer &)=delete | |
| RegionAwareModRefSummarizer & | operator= (const RegionAwareModRefSummarizer &)=delete |
| std::unique_ptr< ModRefSummary > | SummarizeModRefs (const rvsdg::RvsdgModule &rvsdgModule, const PointsToGraph &pointsToGraph, util::StatisticsCollector &statisticsCollector) override |
Public Member Functions inherited from jlm::llvm::aa::ModRefSummarizer | |
| virtual | ~ModRefSummarizer () noexcept=default |
Static Public Member Functions | |
| static std::unique_ptr< ModRefSummary > | Create (const rvsdg::RvsdgModule &rvsdgModule, const PointsToGraph &pointsToGraph, util::StatisticsCollector &statisticsCollector) |
| static std::unique_ptr< ModRefSummary > | Create (const rvsdg::RvsdgModule &rvsdgModule, const PointsToGraph &pointsToGraph) |
Static Private Member Functions | |
| static util::HashSet< PointsToGraph::NodeIndex > | CreateSimpleAllocaSet (const PointsToGraph &pointsToGraph) |
| static std::string | CallGraphSCCsToString (const RegionAwareModRefSummarizer &summarizer) |
| static std::string | ToRegionTree (const rvsdg::Graph &rvsdg, const RegionAwareModRefSummary &modRefSummary) |
Private Attributes | |
| std::unique_ptr< RegionAwareModRefSummary > | ModRefSummary_ |
| std::unique_ptr< Context > | Context_ |
Region-aware mod/ref summarizer.
The key idea of the region-aware memory mod/ref summarizer is to only route memory locations into structural nodes if the memory is actually used within its regions. This ensures that no superfluous states will be routed through structural nodes and renders them independent if they do not reference the same memory location. The region-aware analysis proceeds as follows:
Definition at line 58 of file RegionAwareModRefSummarizer.hpp.
|
overridedefaultnoexcept |
|
default |
|
delete |
|
private |
Defines a set of memory nodes to be blocked from the ModRefSet with the given index. A ModRefSet can have at most one such blocklist. The reference to the blocklist must stay valid until solving is finished.
Note: The blocklist only prevents propagation during solving, so the user must avoid adding blocked memory nodes manually.
Definition at line 994 of file RegionAwareModRefSummarizer.cpp.
|
private |
Adds the fact that everything in the ModRefSet from should also be included in the ModRefSet to.
Definition at line 986 of file RegionAwareModRefSummarizer.cpp.
|
private |
Helper function for filling ModRefSets based on the pointer being operated on
| modRefSetIndex | the index of the ModRefSet representing some memory operation |
| origin | the output producing the pointer value being operated on |
| minTargetSize | an optional size requirement for targeted memory locations |
| lambda | the function the operation is happening in |
Definition at line 1131 of file RegionAwareModRefSummarizer.cpp.
|
private |
Definition at line 1202 of file RegionAwareModRefSummarizer.cpp.
|
private |
Definition at line 1268 of file RegionAwareModRefSummarizer.cpp.
|
private |
Definition at line 1220 of file RegionAwareModRefSummarizer.cpp.
|
private |
Creates ModRefSets for regions and nodes within the function. The flow of MemoryNodes between sets is modeled by adding edges to the constraint graph.
Definition at line 1003 of file RegionAwareModRefSummarizer.cpp.
|
private |
Definition at line 1174 of file RegionAwareModRefSummarizer.cpp.
|
private |
Definition at line 1211 of file RegionAwareModRefSummarizer.cpp.
|
private |
Definition at line 1235 of file RegionAwareModRefSummarizer.cpp.
|
private |
Definition at line 1252 of file RegionAwareModRefSummarizer.cpp.
|
private |
Recursive call used to create ModRefSets for the given region, its nodes and its sub-regions.
| region | the region to create ModRefSets for. |
| lambda | the function this region belongs to |
Definition at line 1029 of file RegionAwareModRefSummarizer.cpp.
|
private |
Definition at line 1079 of file RegionAwareModRefSummarizer.cpp.
|
private |
Definition at line 1188 of file RegionAwareModRefSummarizer.cpp.
|
private |
Definition at line 1063 of file RegionAwareModRefSummarizer.cpp.
|
staticprivate |
Helper function for debugging, listing out all functions, grouped by call graph SCC.
Definition at line 1460 of file RegionAwareModRefSummarizer.cpp.
|
private |
Performs external compaction in the given function.
Definition at line 1387 of file RegionAwareModRefSummarizer.cpp.
|
static |
Creates a RegionAwareModRefSummarizer and calls the SummarizeModRefs() method.
| rvsdgModule | The RVSDG module for which the ModRefSummary should be computed. |
| pointsToGraph | The PointsToGraph corresponding to the RVSDG module. |
Definition at line 1547 of file RegionAwareModRefSummarizer.cpp.
|
static |
Creates a RegionAwareModRefSummarizer and calls the SummarizeModRefs() method.
| rvsdgModule | The RVSDG module for which the ModRefSummary should be computed. |
| pointsToGraph | The PointsToGraph corresponding to the RVSDG module. |
| statisticsCollector | The statistics collector for collecting pass statistics. |
Definition at line 1537 of file RegionAwareModRefSummarizer.cpp.
|
private |
Creates a call graph including all functions in the module, and groups all functions into SCCs. The resulting SCCs and topological order will be stored in the Context_ field.
| rvsdgModule | the module for which a mod/ref summary is computed. |
Definition at line 632 of file RegionAwareModRefSummarizer.cpp.
|
private |
Creates one ModRefSet which is responsible for representing all reads and writes that may happen in external functions.
Definition at line 960 of file RegionAwareModRefSummarizer.cpp.
|
private |
Creates subsets of the allocas defined in each region in the program, containing only the allocas that are determined to be non-reentrant. The requirements are:
Definition at line 902 of file RegionAwareModRefSummarizer.cpp.
|
staticprivate |
Creates a set containing all simple Allocas is the PointsToGraph. An Alloca is simple if it is only reachable from other simple Allocas, or from RegisterNodes, in the PointsToGraph.
Definition at line 818 of file RegionAwareModRefSummarizer.cpp.
|
private |
Goes through all ModRefSets in all functions, and keeps track of memory nodes that always appear alongside the external memory node. These memory nodes are compressible, and can be removed from all ModRefSets in the function.
Definition at line 1375 of file RegionAwareModRefSummarizer.cpp.
|
private |
Helper function for recursively finding all ModRefSets in the given node.
| node | the node to traverse, including any subregions. |
| modRefSets | the hash set in which all found ModRefSets are placed. |
Definition at line 1435 of file RegionAwareModRefSummarizer.cpp.
|
private |
For each SCC in the call graph, determines which allocas can be known to not be live when a function from the SCC is at the top of the call stack.
Definition at line 774 of file RegionAwareModRefSummarizer.cpp.
|
private |
Gets the set of simple alloca nodes that it is possible to reach from region's arguments. Reachability is defined in terms of the PointsToGraph. A simple alloca is by definition only reachable from register nodes and other simple alloca nodes, so other types of memory nodes in the points-to graph can be ignored.
| region | the region whose arguments are checked |
Definition at line 858 of file RegionAwareModRefSummarizer.cpp.
|
private |
Uses the call graph to determine if the given function can ever be involved in a recursive chain of function calls.
| lambda | the function in question. |
Definition at line 895 of file RegionAwareModRefSummarizer.cpp.
|
delete |
|
private |
Uses the simple and complex constraints to propagate MemoryNodes between ModRefSets until all constraints are satisfied.
Definition at line 1316 of file RegionAwareModRefSummarizer.cpp.
|
overridevirtual |
Computes the memory nodes that are required at the entry and exit of a region, or at the entry/exit of a call node.
| rvsdgModule | The RVSDG module for which a ModRefSummary should be computed. |
| pointsToGraph | The points-to graph corresponding to rvsdgModule. |
| statisticsCollector | The statistics collector for collecting pass statistics. |
Implements jlm::llvm::aa::ModRefSummarizer.
Definition at line 525 of file RegionAwareModRefSummarizer.cpp.
|
staticprivate |
Converts rvsdg to an annotated region tree. This method is very useful for debugging the RegionAwareMemoryNodeProvider.
| rvsdg | The RVSDG that is converted to a region tree. |
| modRefSummary | The Mod/Ref summary used for annotating the region tree. |
Definition at line 1482 of file RegionAwareModRefSummarizer.cpp.
|
private |
For all ModRefSets where a blocklist is defined, checks that none of the MemoryNodes from the blocklist have been added to the ModRefSet.
Definition at line 1359 of file RegionAwareModRefSummarizer.cpp.
|
private |
Definition at line 313 of file RegionAwareModRefSummarizer.hpp.
|
private |
The Mod/Ref summary produced by this summarizer
Definition at line 311 of file RegionAwareModRefSummarizer.hpp.