Jlm
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
jlm::llvm::aa::AgnosticModRefSummarizer Class Referencefinal

Agnostic mod/ref summarizer. More...

#include <AgnosticModRefSummarizer.hpp>

Inheritance diagram for jlm::llvm::aa::AgnosticModRefSummarizer:
Inheritance graph
[legend]
Collaboration diagram for jlm::llvm::aa::AgnosticModRefSummarizer:
Collaboration graph
[legend]

Classes

class  Statistics
 Agnostic mod/ref summarizer statistics. More...
 

Public Member Functions

 ~AgnosticModRefSummarizer () override
 
 AgnosticModRefSummarizer ()
 
 AgnosticModRefSummarizer (const AgnosticModRefSummarizer &)=delete
 
AgnosticModRefSummarizeroperator= (const AgnosticModRefSummarizer &)=delete
 
std::unique_ptr< ModRefSummarySummarizeModRefs (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< ModRefSummaryCreate (const rvsdg::RvsdgModule &rvsdgModule, const PointsToGraph &pointsToGraph, util::StatisticsCollector &statisticsCollector)
 
static std::unique_ptr< ModRefSummaryCreate (const rvsdg::RvsdgModule &rvsdgModule, const PointsToGraph &pointsToGraph)
 

Private Member Functions

void AddPointerTargetsToModRefSet (const rvsdg::Output &output, util::HashSet< PointsToGraph::NodeIndex > &modRefSet) const
 
void AnnotateRegion (const rvsdg::Region &region)
 
void AnnotateSimpleNode (const rvsdg::SimpleNode &node)
 

Static Private Member Functions

static util::HashSet< PointsToGraph::NodeIndexGetAllMemoryNodes (const PointsToGraph &pointsToGraph)
 

Private Attributes

std::unique_ptr< AgnosticModRefSummaryModRefSummary_
 

Detailed Description

Agnostic mod/ref summarizer.

The key idea of the agnostic mod/ref summarizer is that all memory states are routed through all structural nodes regardless of whether these states are required by any simple nodes within the structural nodes. This strategy ensures that the state of a memory location is always present for encoding while avoiding the complexity of an additional analysis for determining the required routing path of the states. The drawback is that a lot of states are routed through structural nodes where they are not needed, potentially leading to a significant runtime of the encoder for bigger RVSDGs.

See also
ModRefSummarizer
MemoryStateEncoder

Definition at line 31 of file AgnosticModRefSummarizer.hpp.

Constructor & Destructor Documentation

◆ ~AgnosticModRefSummarizer()

jlm::llvm::aa::AgnosticModRefSummarizer::~AgnosticModRefSummarizer ( )
overridedefault

◆ AgnosticModRefSummarizer() [1/2]

jlm::llvm::aa::AgnosticModRefSummarizer::AgnosticModRefSummarizer ( )
default

◆ AgnosticModRefSummarizer() [2/2]

jlm::llvm::aa::AgnosticModRefSummarizer::AgnosticModRefSummarizer ( const AgnosticModRefSummarizer )
delete

Member Function Documentation

◆ AddPointerTargetsToModRefSet()

void jlm::llvm::aa::AgnosticModRefSummarizer::AddPointerTargetsToModRefSet ( const rvsdg::Output output,
util::HashSet< PointsToGraph::NodeIndex > &  modRefSet 
) const
private

Helper for adding all memory nodes the given output may target to a Mod/Ref set

Parameters
outputthe pointer typed output
modRefSetthe set of memory nodes that should be expanded with output's targets

Definition at line 191 of file AgnosticModRefSummarizer.cpp.

◆ AnnotateRegion()

void jlm::llvm::aa::AgnosticModRefSummarizer::AnnotateRegion ( const rvsdg::Region region)
private

Recursively traverses the given region, creating Mod/Ref sets for simple nodes.

Parameters
regionthe region to traverse

Definition at line 170 of file AgnosticModRefSummarizer.cpp.

◆ AnnotateSimpleNode()

void jlm::llvm::aa::AgnosticModRefSummarizer::AnnotateSimpleNode ( const rvsdg::SimpleNode node)
private

Creates a Mod/Ref set for the given simple node if it belongs in the Mod/Ref set map. Only nodes that affect memory are given Mod/Ref sets. llvm::CallOperation nodes are not included, as calls are assumed to touch everything.

Parameters
nodethe simple node

Definition at line 212 of file AgnosticModRefSummarizer.cpp.

◆ Create() [1/2]

std::unique_ptr< ModRefSummary > jlm::llvm::aa::AgnosticModRefSummarizer::Create ( const rvsdg::RvsdgModule rvsdgModule,
const PointsToGraph pointsToGraph 
)
static

Creates a AgnosticModRefSummarizer and calls the SummarizeModRefs() method.

Parameters
rvsdgModuleThe RVSDG module for which the ModRefSummary should be computed.
pointsToGraphThe PointsToGraph corresponding to the RVSDG module.
Returns
A new instance of ModRefSummary.

Definition at line 283 of file AgnosticModRefSummarizer.cpp.

◆ Create() [2/2]

std::unique_ptr< ModRefSummary > jlm::llvm::aa::AgnosticModRefSummarizer::Create ( const rvsdg::RvsdgModule rvsdgModule,
const PointsToGraph pointsToGraph,
util::StatisticsCollector statisticsCollector 
)
static

Creates a AgnosticModRefSummarizer and calls the SummarizeModeRefs() method.

Parameters
rvsdgModuleThe RVSDG module for which a ModRefSummary should be computed.
pointsToGraphThe PointsToGraph corresponding to the RVSDG module.
statisticsCollectorThe statistics collector for collecting pass statistics.
Returns
A new instance of ModRefSummary.

Definition at line 273 of file AgnosticModRefSummarizer.cpp.

◆ GetAllMemoryNodes()

util::HashSet< PointsToGraph::NodeIndex > jlm::llvm::aa::AgnosticModRefSummarizer::GetAllMemoryNodes ( const PointsToGraph pointsToGraph)
staticprivate

Creates a set containing all memory nodes in the given pointsToGraph

Definition at line 144 of file AgnosticModRefSummarizer.cpp.

◆ operator=()

AgnosticModRefSummarizer& jlm::llvm::aa::AgnosticModRefSummarizer::operator= ( const AgnosticModRefSummarizer )
delete

◆ SummarizeModRefs()

std::unique_ptr< ModRefSummary > jlm::llvm::aa::AgnosticModRefSummarizer::SummarizeModRefs ( const rvsdg::RvsdgModule rvsdgModule,
const PointsToGraph pointsToGraph,
util::StatisticsCollector statisticsCollector 
)
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.

Parameters
rvsdgModuleThe RVSDG module for which a ModRefSummary should be computed.
pointsToGraphThe points-to graph corresponding to rvsdgModule.
statisticsCollectorThe statistics collector for collecting pass statistics.
Returns
An instance of ModRefSummary.

Implements jlm::llvm::aa::ModRefSummarizer.

Definition at line 121 of file AgnosticModRefSummarizer.cpp.

Member Data Documentation

◆ ModRefSummary_

std::unique_ptr<AgnosticModRefSummary> jlm::llvm::aa::AgnosticModRefSummarizer::ModRefSummary_
private

Definition at line 111 of file AgnosticModRefSummarizer.hpp.


The documentation for this class was generated from the following files: