Jlm
Loading...
Searching...
No Matches
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
jlm::llvm::NodeReduction Class Referencefinal

#include <NodeReduction.hpp>

Inheritance diagram for jlm::llvm::NodeReduction:
Inheritance graph
[legend]
Collaboration diagram for jlm::llvm::NodeReduction:
Collaboration graph
[legend]

Classes

class  Statistics
 

Public Member Functions

 ~NodeReduction () noexcept override
 
 NodeReduction ()
 
 NodeReduction (const NodeReduction &)=delete
 
 NodeReduction (NodeReduction &&)=delete
 
NodeReductionoperator= (const NodeReduction &)=delete
 
NodeReductionoperator= (NodeReduction &&)=delete
 
void Run (rvsdg::RvsdgModule &rvsdgModule, 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 ReduceNodesInRegion (rvsdg::Region &region)
 
bool ReduceStructuralNode (rvsdg::StructuralNode &structuralNode)
 
bool ReduceGammaNode (rvsdg::GammaNode &gammaNode)
 
bool ReduceSimpleNode (rvsdg::SimpleNode &simpleNode)
 

Private Attributes

std::unique_ptr< StatisticsStatistics_
 

Detailed Description

The node reduction transformation performs a series of peephole optimizations in the RVSDG. The nodes in a region are visited top-down and reductions are performed until a fix-point is reached, i.e., until no peephole optimization can be applied any longer to any node in a region.

Definition at line 33 of file NodeReduction.hpp.

Constructor & Destructor Documentation

◆ ~NodeReduction()

jlm::llvm::NodeReduction::~NodeReduction ( )
overridedefaultnoexcept

◆ NodeReduction() [1/3]

jlm::llvm::NodeReduction::NodeReduction ( )

Definition at line 293 of file NodeReduction.cpp.

◆ NodeReduction() [2/3]

jlm::llvm::NodeReduction::NodeReduction ( const NodeReduction )
delete

◆ NodeReduction() [3/3]

jlm::llvm::NodeReduction::NodeReduction ( NodeReduction &&  )
delete

Member Function Documentation

◆ operator=() [1/2]

NodeReduction & jlm::llvm::NodeReduction::operator= ( const NodeReduction )
delete

◆ operator=() [2/2]

NodeReduction & jlm::llvm::NodeReduction::operator= ( NodeReduction &&  )
delete

◆ ReduceGammaNode()

bool jlm::llvm::NodeReduction::ReduceGammaNode ( rvsdg::GammaNode gammaNode)
private

Definition at line 376 of file NodeReduction.cpp.

◆ ReduceNodesInRegion()

void jlm::llvm::NodeReduction::ReduceNodesInRegion ( rvsdg::Region region)
private

Definition at line 314 of file NodeReduction.cpp.

◆ ReduceSimpleNode()

bool jlm::llvm::NodeReduction::ReduceSimpleNode ( rvsdg::SimpleNode simpleNode)
private

Definition at line 389 of file NodeReduction.cpp.

◆ ReduceStructuralNode()

bool jlm::llvm::NodeReduction::ReduceStructuralNode ( rvsdg::StructuralNode structuralNode)
private

Reduces the structural node structuralNode.

Note
This method only returns true if the node itself could be reduced, but not if any of the nodes in its subregions could be reduced.
Parameters
structuralNodeThe structural node that is supposed to be reduced.
Returns
True, if the structural node could be reduced, otherwise false.

Definition at line 349 of file NodeReduction.cpp.

◆ Run()

void jlm::llvm::NodeReduction::Run ( rvsdg::RvsdgModule module,
util::StatisticsCollector statisticsCollector 
)
overridevirtual

Perform RVSDG transformation.

Note
This method is expected to be called multiple times. An implementation is required to reset the objects' internal state to ensure correct behavior after every invocation.
Parameters
moduleRVSDG module the transformation is performed on.
statisticsCollectorStatistics collector for collecting transformation statistics.

Implements jlm::rvsdg::Transformation.

Definition at line 298 of file NodeReduction.cpp.

Member Data Documentation

◆ Statistics_

std::unique_ptr<Statistics> jlm::llvm::NodeReduction::Statistics_
private

Definition at line 77 of file NodeReduction.hpp.


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