retdec
inst_opt_rda_pass.h
Go to the documentation of this file.
1 
7 #ifndef RETDEC_BIN2LLVMIR_OPTIMIZATIONS_INST_OPT_RDA_INST_OPT_RDA_PASS_H
8 #define RETDEC_BIN2LLVMIR_OPTIMIZATIONS_INST_OPT_RDA_INST_OPT_RDA_PASS_H
9 
10 #include <llvm/IR/Function.h>
11 #include <llvm/IR/Instructions.h>
12 #include <llvm/IR/Module.h>
13 #include <llvm/Pass.h>
14 
16 
17 namespace retdec {
18 namespace bin2llvmir {
19 
20 class InstructionRdaOptimizer : public llvm::ModulePass
21 {
22  public:
23  static char ID;
25  virtual bool runOnModule(llvm::Module& m) override;
26  bool runOnModuleCustom(llvm::Module& m, Abi* abi);
27 
28  private:
29  bool run();
30  bool runOnFunction(llvm::Function* f);
31 
32  private:
33  llvm::Module* _module = nullptr;
34  Abi* _abi = nullptr;
35 };
36 
37 } // namespace bin2llvmir
38 } // namespace retdec
39 
40 #endif
ABI information.
Definition: abi.h:27
Definition: inst_opt_rda_pass.h:21
static char ID
Definition: inst_opt_rda_pass.h:23
InstructionRdaOptimizer()
Definition: inst_opt_rda_pass.cpp:28
Abi * _abi
Definition: inst_opt_rda_pass.h:34
bool runOnFunction(llvm::Function *f)
Definition: inst_opt_rda_pass.cpp:60
virtual bool runOnModule(llvm::Module &m) override
Definition: inst_opt_rda_pass.cpp:34
bool runOnModuleCustom(llvm::Module &m, Abi *abi)
Definition: inst_opt_rda_pass.cpp:41
bool run()
Definition: inst_opt_rda_pass.cpp:48
llvm::Module * _module
Definition: inst_opt_rda_pass.h:33
The frontend-end part of the decompiler.
Definition: archive_wrapper.h:19