retdec
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
retdec::bin2llvmir::Collector Class Reference

#include <collector.h>

Inheritance diagram for retdec::bin2llvmir::Collector:
Inheritance graph
[legend]
Collaboration diagram for retdec::bin2llvmir::Collector:
Collaboration graph
[legend]

Public Types

typedef std::unique_ptr< CollectorPtr
 

Public Member Functions

 Collector (const Abi *abi, llvm::Module *m, const ReachingDefinitionsAnalysis *rda)
 
virtual ~Collector ()=default
 
virtual void collectCallArgs (CallEntry *ce) const
 
virtual void collectCallRets (CallEntry *ce) const
 
virtual void collectDefArgs (DataFlowEntry *de) const
 
virtual void collectDefRets (DataFlowEntry *de) const
 
virtual void collectCallSpecificTypes (CallEntry *ce) const
 

Protected Member Functions

void collectRetStores (ReturnEntry *re) const
 
void collectStoresBeforeInstruction (llvm::Instruction *i, std::vector< llvm::StoreInst * > &stores) const
 
void collectLoadsAfterInstruction (llvm::Instruction *i, std::vector< llvm::LoadInst * > &loads) const
 
bool collectLoadsAfterInstruction (llvm::Instruction *i, std::vector< llvm::LoadInst * > &loads, std::set< llvm::Value * > &excluded) const
 
void collectStoresInSinglePredecessors (llvm::Instruction *i, std::vector< llvm::StoreInst * > &stores) const
 
void collectStoresRecursively (llvm::Instruction *i, std::vector< llvm::StoreInst * > &stores, std::map< llvm::BasicBlock *, std::set< llvm::Value * >> &seen) const
 
bool collectStoresInInstructionBlock (llvm::Instruction *i, std::set< llvm::Value * > &values, std::vector< llvm::StoreInst * > &stores) const
 
bool extractFormatString (CallEntry *ce) const
 
bool storesString (llvm::StoreInst *si, std::string &str) const
 
llvm::Value * getRoot (llvm::Value *i) const
 
llvm::Value * _getRoot (llvm::Value *i, std::set< llvm::Value * > &seen) const
 

Protected Attributes

const Abi_abi
 
llvm::Module * _module
 
const ReachingDefinitionsAnalysis_rda
 

Member Typedef Documentation

◆ Ptr

Constructor & Destructor Documentation

◆ Collector()

retdec::bin2llvmir::Collector::Collector ( const Abi abi,
llvm::Module *  m,
const ReachingDefinitionsAnalysis rda 
)

◆ ~Collector()

virtual retdec::bin2llvmir::Collector::~Collector ( )
virtualdefault

Member Function Documentation

◆ _getRoot()

llvm::Value * retdec::bin2llvmir::Collector::_getRoot ( llvm::Value *  i,
std::set< llvm::Value * > &  seen 
) const
protected

◆ collectCallArgs()

void retdec::bin2llvmir::Collector::collectCallArgs ( CallEntry ce) const
virtual

◆ collectCallRets()

void retdec::bin2llvmir::Collector::collectCallRets ( CallEntry ce) const
virtual

◆ collectCallSpecificTypes()

void retdec::bin2llvmir::Collector::collectCallSpecificTypes ( CallEntry ce) const
virtual

◆ collectDefArgs()

void retdec::bin2llvmir::Collector::collectDefArgs ( DataFlowEntry de) const
virtual

◆ collectDefRets()

void retdec::bin2llvmir::Collector::collectDefRets ( DataFlowEntry de) const
virtual

◆ collectLoadsAfterInstruction() [1/2]

void retdec::bin2llvmir::Collector::collectLoadsAfterInstruction ( llvm::Instruction *  i,
std::vector< llvm::LoadInst * > &  loads 
) const
protected

◆ collectLoadsAfterInstruction() [2/2]

bool retdec::bin2llvmir::Collector::collectLoadsAfterInstruction ( llvm::Instruction *  i,
std::vector< llvm::LoadInst * > &  loads,
std::set< llvm::Value * > &  excluded 
) const
protected

◆ collectRetStores()

void retdec::bin2llvmir::Collector::collectRetStores ( ReturnEntry re) const
protected

◆ collectStoresBeforeInstruction()

void retdec::bin2llvmir::Collector::collectStoresBeforeInstruction ( llvm::Instruction *  i,
std::vector< llvm::StoreInst * > &  stores 
) const
protected

◆ collectStoresInInstructionBlock()

bool retdec::bin2llvmir::Collector::collectStoresInInstructionBlock ( llvm::Instruction *  i,
std::set< llvm::Value * > &  values,
std::vector< llvm::StoreInst * > &  stores 
) const
protected

◆ collectStoresInSinglePredecessors()

void retdec::bin2llvmir::Collector::collectStoresInSinglePredecessors ( llvm::Instruction *  i,
std::vector< llvm::StoreInst * > &  stores 
) const
protected

◆ collectStoresRecursively()

void retdec::bin2llvmir::Collector::collectStoresRecursively ( llvm::Instruction *  i,
std::vector< llvm::StoreInst * > &  stores,
std::map< llvm::BasicBlock *, std::set< llvm::Value * >> &  seen 
) const
protected

◆ extractFormatString()

bool retdec::bin2llvmir::Collector::extractFormatString ( CallEntry ce) const
protected

◆ getRoot()

llvm::Value * retdec::bin2llvmir::Collector::getRoot ( llvm::Value *  i) const
protected

◆ storesString()

bool retdec::bin2llvmir::Collector::storesString ( llvm::StoreInst *  si,
std::string &  str 
) const
protected

Member Data Documentation

◆ _abi

const Abi* retdec::bin2llvmir::Collector::_abi
protected

◆ _module

llvm::Module* retdec::bin2llvmir::Collector::_module
protected

◆ _rda

const ReachingDefinitionsAnalysis* retdec::bin2llvmir::Collector::_rda
protected

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