retdec
remove_useless_casts_optimizer.h
Go to the documentation of this file.
1 
7 #ifndef RETDEC_LLVMIR2HLL_OPTIMIZER_OPTIMIZERS_REMOVE_USELESS_CASTS_OPTIMIZER_H
8 #define RETDEC_LLVMIR2HLL_OPTIMIZER_OPTIMIZERS_REMOVE_USELESS_CASTS_OPTIMIZER_H
9 
12 
13 namespace retdec {
14 namespace llvmir2hll {
15 
43 public:
45 
46  virtual std::string getId() const override { return "RemoveUselessCasts"; }
47 
48 private:
52  virtual void visit(ShPtr<AssignStmt> stmt) override;
54 
56 };
57 
58 } // namespace llvmir2hll
59 } // namespace retdec
60 
61 #endif
A base class of all function optimizers.
Definition: func_optimizer.h:44
ShPtr< Module > module
The module that is being optimized.
Definition: optimizer.h:79
virtual void visit(ShPtr< GlobalVarDef > varDef) override
Definition: ordered_all_visitor.cpp:95
Removes useless casts from a module.
Definition: remove_useless_casts_optimizer.h:42
RemoveUselessCastsOptimizer(ShPtr< Module > module)
Constructs a new optimizer.
Definition: remove_useless_casts_optimizer.cpp:27
bool tryOptimizationCase1(ShPtr< AssignStmt > stmt)
Tries to optimize the given statement according case (1) in the class description.
Definition: remove_useless_casts_optimizer.cpp:48
virtual void visit(ShPtr< GlobalVarDef > varDef) override
Definition: ordered_all_visitor.cpp:95
virtual std::string getId() const override
Returns the ID of the optimizer.
Definition: remove_useless_casts_optimizer.h:46
A base class of all function optimizers.
A library providing API for working with back-end IR.
std::shared_ptr< T > ShPtr
An alias for a shared pointer.
Definition: smart_ptr.h:18
Definition: archive_wrapper.h:19
Declarations, aliases, macros, etc. for the use of smart pointers.