Static Value-Flow Analysis
Loading...
Searching...
No Matches
SVF::MSSACHI< Cond > Class Template Reference

#include <MSSAMuChi.h>

Inheritance diagram for SVF::MSSACHI< Cond >:
SVF::MSSADEF SVF::CallCHI< Cond > SVF::EntryCHI< Cond > SVF::StoreCHI< Cond >

Public Types

typedef MSSADEF::DEFTYPE CHITYPE
Public Types inherited from SVF::MSSADEF
enum  DEFTYPE {
  SSACHI , StoreMSSACHI , CallMSSACHI , EntryMSSACHI ,
  SSAPHI
}

Public Member Functions

 MSSACHI (CHITYPE t, const MemRegion *m, Cond c)
 Constructor/Destructor for MSSACHI.
virtual ~MSSACHI ()
void setOpVer (MRVer *v)
 Set operand ver.
MRVer * getOpVer () const
 Get operand ver.
Cond getCond () const
 Get condition.
virtual void dump ()
 Print CHI.
Public Member Functions inherited from SVF::MSSADEF
 MSSADEF (DEFTYPE t, const MemRegion *m)
 Constructor/Destructor for MSSADEF.
virtual ~MSSADEF ()
const MemRegion * getMR () const
 Return memory region.
DEFTYPE getType () const
 Return type of this CHI.
void setResVer (MRVer *v)
 Set result operand ver.
MRVer * getResVer () const
 Set operand vers.
bool operator< (const MSSADEF &rhs) const
 Avoid adding duplicated chis and phis.

Static Public Member Functions

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

Private Attributes

MRVer * opVer
Cond cond

Additional Inherited Members

Protected Attributes inherited from SVF::MSSADEF
DEFTYPE type
const MemRegion * mr
MRVer * resVer

Detailed Description

template<class Cond>
class SVF::MSSACHI< Cond >

Indirect Memory Write

Definition at line 397 of file MSSAMuChi.h.

Member Typedef Documentation

◆ CHITYPE

template<class Cond>
typedef MSSADEF::DEFTYPE SVF::MSSACHI< Cond >::CHITYPE

Definition at line 404 of file MSSAMuChi.h.

Constructor & Destructor Documentation

◆ MSSACHI()

template<class Cond>
SVF::MSSACHI< Cond >::MSSACHI ( CHITYPE t,
const MemRegion * m,
Cond c )
inline

Constructor/Destructor for MSSACHI.

Definition at line 407 of file MSSAMuChi.h.

407 : MSSADEF(t,m), opVer(nullptr), cond(c)
408 {
409
410 }
MRVer * opVer
Definition MSSAMuChi.h:401
MSSADEF(DEFTYPE t, const MemRegion *m)
Constructor/Destructor for MSSADEF.
Definition MSSAMuChi.h:347

◆ ~MSSACHI()

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

Definition at line 411 of file MSSAMuChi.h.

411{}

Member Function Documentation

◆ classof() [1/2]

template<class Cond>
bool SVF::MSSACHI< Cond >::classof ( const MSSACHI< Cond > * chi)
inlinestatic

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

Definition at line 436 of file MSSAMuChi.h.

437 {
438 return true;
439 }

◆ classof() [2/2]

template<class Cond>
bool SVF::MSSACHI< Cond >::classof ( const MSSADEF * chi)
inlinestatic

Definition at line 440 of file MSSAMuChi.h.

441 {
442 return chi->getType() == MSSADEF::EntryMSSACHI ||
445 }
DEFTYPE getType() const
Return type of this CHI.
Definition MSSAMuChi.h:361

◆ dump()

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

Print CHI.

Reimplemented from SVF::MSSADEF.

Reimplemented in SVF::CallCHI< Cond >, SVF::CallCHI< Condition >, SVF::EntryCHI< Cond >, SVF::EntryCHI< Condition >, SVF::StoreCHI< Cond >, and SVF::StoreCHI< Condition >.

Definition at line 449 of file MSSAMuChi.h.

450 {
451 SVFUtil::outs() << "MR_" << this->getMR()->getMRID() << "V_" << this->getResVer()->getSSAVersion() <<
452 " = CHI(MR_" << this->getMR()->getMRID() << "V_" << opVer->getSSAVersion() << ") \t" <<
453 this->getMR()->dumpStr() << "\n";
454 }
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
MRID getMRID() const
Return memory region ID.
Definition MemRegion.h:82
std::string dumpStr() const
Dump string.
Definition MemRegion.h:97
std::ostream & outs()
Overwrite llvm::outs().
Definition SVFUtil.h:58

◆ getCond()

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

Get condition.

Definition at line 429 of file MSSAMuChi.h.

430 {
431 return cond;
432 }

◆ getOpVer()

template<class Cond>
MRVer * SVF::MSSACHI< Cond >::getOpVer ( ) const
inline

Get operand ver.

Definition at line 422 of file MSSAMuChi.h.

423 {
424 assert(opVer!=nullptr && "version is nullptr, did not rename?");
425 return opVer;
426 }

◆ setOpVer()

template<class Cond>
void SVF::MSSACHI< Cond >::setOpVer ( MRVer * v)
inline

Set operand ver.

Definition at line 415 of file MSSAMuChi.h.

416 {
417 assert(v->getMR() == this->getMR() && "inserting different memory region?");
418 opVer = v;
419 }

Member Data Documentation

◆ cond

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

Definition at line 402 of file MSSAMuChi.h.

◆ opVer

template<class Cond>
MRVer* SVF::MSSACHI< Cond >::opVer
private

Definition at line 401 of file MSSAMuChi.h.


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