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 685 of file WTO.h.

Constructor & Destructor Documentation

◆ WTOCycleDepthBuilder()

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

Definition at line 692 of file WTO.h.

694 : _wtoCycleDepth(std::make_shared<GraphTWTOCycleDepth>()),
696 {
697 }
NodeRefToWTOCycleDepthPtr & _nodeToWTOCycleDepth
Definition WTO.h:689
WTOCycleDepthPtr _wtoCycleDepth
Definition WTO.h:688
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 699 of file WTO.h.

700 {
701 const NodeT* head = cycle.head()->getICFGNode();
703 _nodeToWTOCycleDepth.insert(std::make_pair(head, _wtoCycleDepth));
705 std::make_shared<GraphTWTOCycleDepth>(*_wtoCycleDepth);
706 _wtoCycleDepth->add(head);
707 for (auto it = cycle.begin(), et = cycle.end(); it != et; ++it)
708 {
709 (*it)->accept(*this);
710 }
712 }
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 714 of file WTO.h.

715 {
717 std::make_pair(node.getICFGNode(), _wtoCycleDepth));
718 }

Member Data Documentation

◆ _nodeToWTOCycleDepth

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

Definition at line 689 of file WTO.h.

◆ _wtoCycleDepth

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

Definition at line 688 of file WTO.h.


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