retdec
|
#include <simple_types.h>
Public Member Functions | |
EqSet (std::size_t id) | |
void | insert (Config *config, llvm::Value *v, eSourcePriority p=eSourcePriority::PRIORITY_NONE) |
void | insert (llvm::Type *t, eSourcePriority p=eSourcePriority::PRIORITY_NONE) |
void | propagate (llvm::Module *module) |
void | apply (llvm::Module *module, Config *config, FileImage *objf, std::unordered_set< llvm::Instruction * > &instToErase) |
Public Attributes | |
const std::size_t | id |
Each instance gets its own unique ID for debug print purposes. More... | |
TypeEntry | masterType |
Type of an entire equivalence set. More... | |
ValueEntrySet | valSet |
Values in the set. More... | |
TypeEntrySet | typeSet |
This allows to add certain types to set without having a value for them. More... | |
EquationEntrySet | equationSet |
Private Member Functions | |
llvm::Type * | getHigherPriorityType (llvm::Module *module, llvm::Type *t1, llvm::Type *t2) |
llvm::Type * | getHigherPriorityTypePrivate (llvm::Module *module, llvm::Type *t1, llvm::Type *t2, std::unordered_set< llvm::Type * > &seen) |
Friends | |
std::ostream & | operator<< (std::ostream &out, const EqSet &eq) |
Equivalence set – object in set have to same type.
retdec::bin2llvmir::EqSet::EqSet | ( | std::size_t | id | ) |
void retdec::bin2llvmir::EqSet::apply | ( | llvm::Module * | module, |
Config * | config, | ||
FileImage * | objf, | ||
std::unordered_set< llvm::Instruction * > & | instToErase | ||
) |
|
private |
See getHigherPriorityTypePrivate()
comment.
|
private |
This method defines ordering of types. It takes 2 types and return a 'higher' of them.
module | Module used to get bitsize of type values. |
t1 | First type. |
t2 | Second type. |
seen | Set of all already seen types. Used to protect itself against infinite recursion. |
void retdec::bin2llvmir::EqSet::insert | ( | Config * | config, |
llvm::Value * | v, | ||
eSourcePriority | p = eSourcePriority::PRIORITY_NONE |
||
) |
void retdec::bin2llvmir::EqSet::insert | ( | llvm::Type * | t, |
eSourcePriority | p = eSourcePriority::PRIORITY_NONE |
||
) |
void retdec::bin2llvmir::EqSet::propagate | ( | llvm::Module * | module | ) |
|
friend |
EquationEntrySet retdec::bin2llvmir::EqSet::equationSet |
This allows to propagate type to another equivalence set, which may not have the same type as this set. E.g. this=pointer(other).
const std::size_t retdec::bin2llvmir::EqSet::id |
Each instance gets its own unique ID for debug print purposes.
TypeEntry retdec::bin2llvmir::EqSet::masterType |
Type of an entire equivalence set.
TypeEntrySet retdec::bin2llvmir::EqSet::typeSet |
This allows to add certain types to set without having a value for them.
ValueEntrySet retdec::bin2llvmir::EqSet::valSet |
Values in the set.