retdec
inst_opt_pass.h
Go to the documentation of this file.
1 
7 #ifndef RETDEC_BIN2LLVMIR_OPTIMIZATIONS_INST_OPT_INST_OPT_PASS_H
8 #define RETDEC_BIN2LLVMIR_OPTIMIZATIONS_INST_OPT_INST_OPT_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 
15 namespace retdec {
16 namespace bin2llvmir {
17 
18 class InstructionOptimizer : public llvm::ModulePass
19 {
20  public:
21  static char ID;
23  virtual bool runOnModule(llvm::Module& m) override;
24  bool runOnModuleCustom(llvm::Module& m);
25 
26  private:
27  bool run();
28 
29  private:
30  llvm::Module* _module = nullptr;
31 };
32 
33 } // namespace bin2llvmir
34 } // namespace retdec
35 
36 #endif
Definition: inst_opt_pass.h:19
llvm::Module * _module
Definition: inst_opt_pass.h:30
bool run()
Definition: inst_opt_pass.cpp:44
bool runOnModuleCustom(llvm::Module &m)
Definition: inst_opt_pass.cpp:38
InstructionOptimizer()
Definition: inst_opt_pass.cpp:26
static char ID
Definition: inst_opt_pass.h:21
virtual bool runOnModule(llvm::Module &m) override
Definition: inst_opt_pass.cpp:32
The frontend-end part of the decompiler.
Definition: archive_wrapper.h:19