7 #ifndef RETDEC_BIN2LLVMIR_OPTIMIZATIONS_TYPES_PROPAGATOR_TYPES_PROPAGATOR_H
8 #define RETDEC_BIN2LLVMIR_OPTIMIZATIONS_TYPES_PROPAGATOR_TYPES_PROPAGATOR_H
11 #include <unordered_map>
12 #include <unordered_set>
14 #include <llvm/IR/Function.h>
15 #include <llvm/IR/Module.h>
16 #include <llvm/Pass.h>
35 using EqSet = std::unordered_set<llvm::Value*>;
43 std::queue<llvm::Value*>& toProcess,
47 llvm::Instruction* user,
48 std::queue<llvm::Value*>& toProcess,
56 std::queue<llvm::Value*>& toProcess);
Definition: reaching_definitions.h:121
Definition: types_propagator.h:25
void processValue(std::queue< llvm::Value * > &toProcess, EqSet &eqSet)
Definition: types_propagator.cpp:128
Abi * _abi
Definition: types_propagator.h:60
std::unordered_set< llvm::Value * > EqSet
Definition: types_propagator.h:35
bool wasProcessed(llvm::Value *val)
Definition: types_propagator.cpp:240
EqSets _eqSets
Definition: types_propagator.h:64
std::unordered_map< llvm::Value *, EqSet * > _val2eqSet
Definition: types_propagator.h:65
bool skipRootProcessing(llvm::Value *val)
Definition: types_propagator.cpp:100
std::list< EqSet > EqSets
Definition: types_propagator.h:36
EqSet * getEqSetForValue(llvm::Value *val)
Definition: types_propagator.cpp:233
void buildEquationSets()
Definition: types_propagator.cpp:78
virtual bool runOnModule(llvm::Module &m) override
Definition: types_propagator.cpp:33
bool run()
Definition: types_propagator.cpp:49
ReachingDefinitionsAnalysis _RDA
Definition: types_propagator.h:63
void processUserInstruction(llvm::Value *val, llvm::Instruction *user, std::queue< llvm::Value * > &toProcess, EqSet &eqSet)
Definition: types_propagator.cpp:154
static char ID
Definition: types_propagator.h:27
TypesPropagator()
Definition: types_propagator.cpp:27
bool runOnModuleCustom(llvm::Module &m, Abi *abi)
Definition: types_propagator.cpp:40
void addToProcessQueue(llvm::Value *val, std::queue< llvm::Value * > &toProcess)
Definition: types_propagator.cpp:245
void processRoot(llvm::Value *val)
Definition: types_propagator.cpp:111
llvm::Module * _module
Definition: types_propagator.h:59
The frontend-end part of the decompiler.
Definition: archive_wrapper.h:19
Reaching definitions analysis (RDA) builds UD and DU chains.