IDA C++ SDK 9.2
|
User defined callback to optimize individual microcode instructions. More...
#include <hexrays.hpp>
Public Member Functions | |
virtual | ~optinsn_t () |
virtual int idaapi | func (mblock_t *blk, minsn_t *ins, int optflags)=0 |
Optimize an instruction. |
User defined callback to optimize individual microcode instructions.
|
inlinevirtual |
Optimize an instruction.
blk | current basic block. maybe nullptr, which means that the instruction must be optimized without context |
ins | instruction to optimize; it is always a top-level instruction. the callback may not delete the instruction but may convert it into nop (see mblock_t::make_nop). to optimize sub-instructions, visit them using minsn_visitor_t. sub-instructions may not be converted into nop but can be converted to "mov x,x". for example: add x,0,x => mov x,x this callback may change other instructions in the block, but should do this with care, e.g. to no break the propagation algorithm if called with OPTI_NO_LDXOPT. |
optflags | combination of optimization flags bits |