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
 
NodeReduction & operator= (const NodeReduction &)=delete
 
NodeReduction & operator= (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 reduceThetaNode (rvsdg::ThetaNode &thetaNode)
 
bool ReduceSimpleNode (rvsdg::SimpleNode &simpleNode)
 

Private Attributes

std::unique_ptr< Statistics > Statistics_
 

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 34 of file NodeReduction.hpp.

Constructor & Destructor Documentation

◆ ~NodeReduction()

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

◆ NodeReduction() [1/3]

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

Definition at line 320 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 410 of file NodeReduction.cpp.

◆ ReduceNodesInRegion()

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

Definition at line 341 of file NodeReduction.cpp.

◆ ReduceSimpleNode()

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

Definition at line 433 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 376 of file NodeReduction.cpp.

◆ reduceThetaNode()

bool jlm::llvm::NodeReduction::reduceThetaNode ( rvsdg::ThetaNode &  thetaNode)
private

Definition at line 423 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 325 of file NodeReduction.cpp.

Member Data Documentation

◆ Statistics_

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

Definition at line 81 of file NodeReduction.hpp.


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