retdec
stack_pointer_ops.h
Go to the documentation of this file.
1 
7 #ifndef RETDEC_BIN2LLVMIR_OPTIMIZATIONS_STACK_POINTER_OPS_STACK_POINTER_OPS_H
8 #define RETDEC_BIN2LLVMIR_OPTIMIZATIONS_STACK_POINTER_OPS_STACK_POINTER_OPS_H
9 
10 #include <llvm/IR/Function.h>
11 #include <llvm/IR/Module.h>
12 #include <llvm/Pass.h>
13 
15 
16 namespace retdec {
17 namespace bin2llvmir {
18 
19 class StackPointerOpsRemove : public llvm::ModulePass
20 {
21  public:
22  static char ID;
24  virtual bool runOnModule(llvm::Module& m) override;
25  bool runOnModuleCustom(llvm::Module& m, Abi* a);
26 
27  private:
28  bool run();
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: stack_pointer_ops.h:20
bool removeStackPointerStores()
Definition: stack_pointer_ops.cpp:69
bool run()
Definition: stack_pointer_ops.cpp:60
virtual bool runOnModule(llvm::Module &m) override
Definition: stack_pointer_ops.cpp:42
bool removePreservationStores()
Definition: stack_pointer_ops.cpp:113
static char ID
Definition: stack_pointer_ops.h:22
llvm::Module * _module
Definition: stack_pointer_ops.h:33
Abi * _abi
Definition: stack_pointer_ops.h:34
bool runOnModuleCustom(llvm::Module &m, Abi *a)
Definition: stack_pointer_ops.cpp:49
StackPointerOpsRemove()
Definition: stack_pointer_ops.cpp:36
The frontend-end part of the decompiler.
Definition: archive_wrapper.h:19