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

Constructor & Destructor Documentation

◆ WTOCycleDepthBuilder()

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

Definition at line 690 of file WTO.h.

692 : _wtoCycleDepth(std::make_shared<GraphTWTOCycleDepth>()),
694 {
695 }
NodeRefToWTOCycleDepthPtr & _nodeToWTOCycleDepth
Definition WTO.h:687
WTOCycleDepthPtr _wtoCycleDepth
Definition WTO.h:686
llvm::IRBuilder IRBuilder
Definition BasicTypes.h:76

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

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

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

713 {
715 std::make_pair(node.getICFGNode(), _wtoCycleDepth));
716 }

Member Data Documentation

◆ _nodeToWTOCycleDepth

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

Definition at line 687 of file WTO.h.

◆ _wtoCycleDepth

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

Definition at line 686 of file WTO.h.


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