|
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 55 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 924 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 916 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 1049 of file RegionAwareModRefSummarizer.cpp.
|
private |
Definition at line 1120 of file RegionAwareModRefSummarizer.cpp.
|
private |
Definition at line 1170 of file RegionAwareModRefSummarizer.cpp.
|
private |
Definition at line 1138 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 933 of file RegionAwareModRefSummarizer.cpp.
|
private |
Definition at line 1092 of file RegionAwareModRefSummarizer.cpp.
|
private |
Definition at line 1129 of file RegionAwareModRefSummarizer.cpp.
|
private |
Definition at line 1153 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 951 of file RegionAwareModRefSummarizer.cpp.
|
private |
Definition at line 1001 of file RegionAwareModRefSummarizer.cpp.
|
private |
Definition at line 1106 of file RegionAwareModRefSummarizer.cpp.
|
private |
Definition at line 985 of file RegionAwareModRefSummarizer.cpp.
|
staticprivate |
Helper function for debugging, listing out all functions, grouped by call graph SCC.
Definition at line 1277 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 1364 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 1354 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 562 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 890 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 832 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 748 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 704 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 788 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 825 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 1218 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 467 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 1299 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 1261 of file RegionAwareModRefSummarizer.cpp.
|
private |
Definition at line 285 of file RegionAwareModRefSummarizer.hpp.
|
private |
The Mod/Ref summary produced by this summarizer
Definition at line 283 of file RegionAwareModRefSummarizer.hpp.