Static Value-Flow Analysis
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
SVF::MSSAPHI< Cond > Class Template Reference

#include <MSSAMuChi.h>

Inheritance diagram for SVF::MSSAPHI< Cond >:
SVF::MSSADEF

Public Types

typedef Map< u32_t, const MRVer * > OPVers
 
- Public Types inherited from SVF::MSSADEF
enum  DEFTYPE {
  SSACHI , StoreMSSACHI , CallMSSACHI , EntryMSSACHI ,
  SSAPHI
}
 

Public Member Functions

 MSSAPHI (const SVFBasicBlock *b, const MemRegion *m, Cond c=true)
 Constructors for PHI.
 
virtual ~MSSAPHI ()
 
void setOpVer (const MRVer *v, u32_t pos)
 Set operand ver.
 
const MRVergetOpVer (u32_t pos) const
 Get operand ver.
 
u32_t getOpVerNum () const
 Get the number of operand ver.
 
OPVers::const_iterator opVerBegin () const
 Operand ver iterators.
 
OPVers::const_iterator opVerEnd () const
 
const SVFBasicBlockgetBasicBlock () const
 Return the basic block.
 
Cond getCond () const
 Return condition.
 
virtual void dump ()
 Print PHI.
 
- Public Member Functions inherited from SVF::MSSADEF
 MSSADEF (DEFTYPE t, const MemRegion *m)
 Constructor/Destructor for MSSADEF.
 
virtual ~MSSADEF ()
 
const MemRegiongetMR () const
 Return memory region.
 
DEFTYPE getType () const
 Return type of this CHI.
 
void setResVer (MRVer *v)
 Set result operand ver.
 
MRVergetResVer () const
 Set operand vers.
 
bool operator< (const MSSADEF &rhs) const
 Avoid adding duplicated chis and phis.
 

Static Public Member Functions

static bool classof (const MSSAPHI *phi)
 Methods for support type inquiry through isa, cast, and dyn_cast:
 
static bool classof (const MSSADEF *phi)
 

Private Attributes

const SVFBasicBlockbb
 
OPVers opVers
 
Cond cond
 

Additional Inherited Members

- Protected Attributes inherited from SVF::MSSADEF
DEFTYPE type
 
const MemRegionmr
 
MRVerresVer
 

Detailed Description

template<class Cond>
class SVF::MSSAPHI< Cond >

Definition at line 629 of file MSSAMuChi.h.

Member Typedef Documentation

◆ OPVers

template<class Cond >
typedef Map<u32_t,const MRVer*> SVF::MSSAPHI< Cond >::OPVers

Definition at line 633 of file MSSAMuChi.h.

Constructor & Destructor Documentation

◆ MSSAPHI()

template<class Cond >
SVF::MSSAPHI< Cond >::MSSAPHI ( const SVFBasicBlock b,
const MemRegion m,
Cond  c = true 
)
inline

Constructors for PHI.

Definition at line 641 of file MSSAMuChi.h.

641 :
643 {
644 }
const cJSON *const b
Definition cJSON.h:255
MSSADEF(DEFTYPE t, const MemRegion *m)
Constructor/Destructor for MSSADEF.
Definition MSSAMuChi.h:346
const SVFBasicBlock * bb
Definition MSSAMuChi.h:635
llvm::IRBuilder IRBuilder
Definition BasicTypes.h:74

◆ ~MSSAPHI()

template<class Cond >
virtual SVF::MSSAPHI< Cond >::~MSSAPHI ( )
inlinevirtual

Definition at line 645 of file MSSAMuChi.h.

646 {
647 }

Member Function Documentation

◆ classof() [1/2]

template<class Cond >
static bool SVF::MSSAPHI< Cond >::classof ( const MSSADEF phi)
inlinestatic

Definition at line 701 of file MSSAMuChi.h.

702 {
703 return phi->getType() == MSSADEF::SSAPHI ;
704 }

◆ classof() [2/2]

template<class Cond >
static bool SVF::MSSAPHI< Cond >::classof ( const MSSAPHI< Cond > *  phi)
inlinestatic

Methods for support type inquiry through isa, cast, and dyn_cast:

Definition at line 697 of file MSSAMuChi.h.

698 {
699 return true;
700 }

◆ dump()

template<class Cond >
virtual void SVF::MSSAPHI< Cond >::dump ( )
inlinevirtual

Print PHI.

Reimplemented from SVF::MSSADEF.

Definition at line 708 of file MSSAMuChi.h.

709 {
710 SVFUtil::outs() << this->getMR()->getMRID() << "V_" << this->getResVer()->getSSAVersion() <<
711 " = PHI(";
712 for(OPVers::iterator it = opVers.begin(), eit = opVers.end(); it!=eit; ++it)
713 SVFUtil::outs() << "MR_" << this->getMR()->getMRID() << "V_" << it->second->getSSAVersion() << ", ";
714
715 SVFUtil::outs() << ")\n";
716 }
MRVERSION getSSAVersion() const
Return SSA version.
Definition MSSAMuChi.h:69
MRVer * getResVer() const
Set operand vers.
Definition MSSAMuChi.h:373
const MemRegion * getMR() const
Return memory region.
Definition MSSAMuChi.h:354
OPVers opVers
Definition MSSAMuChi.h:636
MRID getMRID() const
Return memory region ID.
Definition MemRegion.h:78
std::ostream & outs()
Overwrite llvm::outs()
Definition SVFUtil.h:50

◆ getBasicBlock()

template<class Cond >
const SVFBasicBlock * SVF::MSSAPHI< Cond >::getBasicBlock ( ) const
inline

Return the basic block.

Definition at line 684 of file MSSAMuChi.h.

685 {
686 return bb;
687 }

◆ getCond()

template<class Cond >
Cond SVF::MSSAPHI< Cond >::getCond ( ) const
inline

Return condition.

Definition at line 690 of file MSSAMuChi.h.

691 {
692 return cond;
693 }

◆ getOpVer()

template<class Cond >
const MRVer * SVF::MSSAPHI< Cond >::getOpVer ( u32_t  pos) const
inline

Get operand ver.

Definition at line 658 of file MSSAMuChi.h.

659 {
660 OPVers::const_iterator it = opVers.find(pos);
661 assert(it!=opVers.end() && "version is nullptr, did not rename?");
662 return it->second;
663 }

◆ getOpVerNum()

template<class Cond >
u32_t SVF::MSSAPHI< Cond >::getOpVerNum ( ) const
inline

Get the number of operand ver.

Definition at line 666 of file MSSAMuChi.h.

667 {
668 return opVers.size();
669 }

◆ opVerBegin()

template<class Cond >
OPVers::const_iterator SVF::MSSAPHI< Cond >::opVerBegin ( ) const
inline

Operand ver iterators.

Definition at line 673 of file MSSAMuChi.h.

674 {
675 return opVers.begin();
676 }

◆ opVerEnd()

template<class Cond >
OPVers::const_iterator SVF::MSSAPHI< Cond >::opVerEnd ( ) const
inline

Definition at line 677 of file MSSAMuChi.h.

678 {
679 return opVers.end();
680 }

◆ setOpVer()

template<class Cond >
void SVF::MSSAPHI< Cond >::setOpVer ( const MRVer v,
u32_t  pos 
)
inline

Set operand ver.

Definition at line 651 of file MSSAMuChi.h.

652 {
653 assert(v->getMR() == this->getMR() && "inserting different memory region?");
654 opVers[pos] = v;
655 }

Member Data Documentation

◆ bb

template<class Cond >
const SVFBasicBlock* SVF::MSSAPHI< Cond >::bb
private

Definition at line 635 of file MSSAMuChi.h.

◆ cond

template<class Cond >
Cond SVF::MSSAPHI< Cond >::cond
private

Definition at line 637 of file MSSAMuChi.h.

◆ opVers

template<class Cond >
OPVers SVF::MSSAPHI< Cond >::opVers
private

Definition at line 636 of file MSSAMuChi.h.


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