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 630 of file MSSAMuChi.h.

Member Typedef Documentation

◆ OPVers

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

Definition at line 634 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 642 of file MSSAMuChi.h.

642 :
644 {
645 }
const cJSON *const b
Definition cJSON.h:255
MSSADEF(DEFTYPE t, const MemRegion *m)
Constructor/Destructor for MSSADEF.
Definition MSSAMuChi.h:347
const SVFBasicBlock * bb
Definition MSSAMuChi.h:636
llvm::IRBuilder IRBuilder
Definition BasicTypes.h:76

◆ ~MSSAPHI()

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

Definition at line 646 of file MSSAMuChi.h.

647 {
648 }

Member Function Documentation

◆ classof() [1/2]

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

Definition at line 702 of file MSSAMuChi.h.

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

◆ 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 698 of file MSSAMuChi.h.

699 {
700 return true;
701 }

◆ dump()

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

Print PHI.

Reimplemented from SVF::MSSADEF.

Definition at line 709 of file MSSAMuChi.h.

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

◆ getBasicBlock()

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

Return the basic block.

Definition at line 685 of file MSSAMuChi.h.

686 {
687 return bb;
688 }

◆ getCond()

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

Return condition.

Definition at line 691 of file MSSAMuChi.h.

692 {
693 return cond;
694 }

◆ getOpVer()

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

Get operand ver.

Definition at line 659 of file MSSAMuChi.h.

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

◆ getOpVerNum()

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

Get the number of operand ver.

Definition at line 667 of file MSSAMuChi.h.

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

◆ opVerBegin()

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

Operand ver iterators.

Definition at line 674 of file MSSAMuChi.h.

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

◆ opVerEnd()

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

Definition at line 678 of file MSSAMuChi.h.

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

◆ setOpVer()

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

Set operand ver.

Definition at line 652 of file MSSAMuChi.h.

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

Member Data Documentation

◆ bb

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

Definition at line 636 of file MSSAMuChi.h.

◆ cond

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

Definition at line 638 of file MSSAMuChi.h.

◆ opVers

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

Definition at line 637 of file MSSAMuChi.h.


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