Static Value-Flow Analysis
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
SVF::WTO< GraphT >::WTOCycleDepthBuilder Class Referencefinal

Visitor to build the cycle depths of each node. More...

#include <WTO.h>

Inheritance diagram for SVF::WTO< GraphT >::WTOCycleDepthBuilder:
SVF::WTOComponentVisitor< GraphT >

Public Member Functions

 WTOCycleDepthBuilder (NodeRefToWTOCycleDepthPtr &nodeToWTOCycleDepth)
 
void visit (const WTOCycleT &cycle) override
 Visit the given cycle.
 
void visit (const WTONodeT &node) override
 Visit the given node.
 
- Public Member Functions inherited from SVF::WTOComponentVisitor< GraphT >
 WTOComponentVisitor ()=default
 Default constructor.
 
 WTOComponentVisitor (const WTOComponentVisitor &) noexcept=default
 Copy constructor.
 
 WTOComponentVisitor (WTOComponentVisitor &&) noexcept=default
 Move constructor.
 
WTOComponentVisitoroperator= (const WTOComponentVisitor &) noexcept=default
 Copy assignment operator.
 
WTOComponentVisitoroperator= (WTOComponentVisitor &&) noexcept=default
 Move assignment operator.
 
virtual ~WTOComponentVisitor ()=default
 Destructor.
 

Private Attributes

WTOCycleDepthPtr _wtoCycleDepth
 
NodeRefToWTOCycleDepthPtr_nodeToWTOCycleDepth
 

Additional Inherited Members

- Public Types inherited from SVF::WTOComponentVisitor< GraphT >
typedef WTONode< GraphTWTONodeT
 
typedef WTOCycle< GraphTWTOCycleT
 

Detailed Description

template<typename GraphT>
class SVF::WTO< GraphT >::WTOCycleDepthBuilder

Visitor to build the cycle depths of each node.

Definition at line 684 of file WTO.h.

Constructor & Destructor Documentation

◆ WTOCycleDepthBuilder()

template<typename GraphT >
SVF::WTO< GraphT >::WTOCycleDepthBuilder::WTOCycleDepthBuilder ( NodeRefToWTOCycleDepthPtr nodeToWTOCycleDepth)
inlineexplicit

Definition at line 691 of file WTO.h.

693 : _wtoCycleDepth(std::make_shared<GraphTWTOCycleDepth>()),
695 {
696 }
NodeRefToWTOCycleDepthPtr & _nodeToWTOCycleDepth
Definition WTO.h:688
WTOCycleDepthPtr _wtoCycleDepth
Definition WTO.h:687
llvm::IRBuilder IRBuilder
Definition BasicTypes.h:74

Member Function Documentation

◆ visit() [1/2]

template<typename GraphT >
void SVF::WTO< GraphT >::WTOCycleDepthBuilder::visit ( const WTOCycleT )
inlineoverridevirtual

Visit the given cycle.

Implements SVF::WTOComponentVisitor< GraphT >.

Definition at line 698 of file WTO.h.

699 {
700 const NodeT* head = cycle.head()->getICFGNode();
702 _nodeToWTOCycleDepth.insert(std::make_pair(head, _wtoCycleDepth));
704 std::make_shared<GraphTWTOCycleDepth>(*_wtoCycleDepth);
705 _wtoCycleDepth->add(head);
706 for (auto it = cycle.begin(), et = cycle.end(); it != et; ++it)
707 {
708 (*it)->accept(*this);
709 }
711 }
GraphT::NodeType NodeT
Definition WTO.h:524
std::shared_ptr< GraphTWTOCycleDepth > WTOCycleDepthPtr
Definition WTO.h:542

◆ visit() [2/2]

template<typename GraphT >
void SVF::WTO< GraphT >::WTOCycleDepthBuilder::visit ( const WTONodeT )
inlineoverridevirtual

Visit the given node.

Implements SVF::WTOComponentVisitor< GraphT >.

Definition at line 713 of file WTO.h.

714 {
716 std::make_pair(node.getICFGNode(), _wtoCycleDepth));
717 }

Member Data Documentation

◆ _nodeToWTOCycleDepth

template<typename GraphT >
NodeRefToWTOCycleDepthPtr& SVF::WTO< GraphT >::WTOCycleDepthBuilder::_nodeToWTOCycleDepth
private

Definition at line 688 of file WTO.h.

◆ _wtoCycleDepth

template<typename GraphT >
WTOCycleDepthPtr SVF::WTO< GraphT >::WTOCycleDepthBuilder::_wtoCycleDepth
private

Definition at line 687 of file WTO.h.


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