optinsn_t Struct Referenceabstract

User defined callbacks to optimize individual microcode instructions. More...

Public Member Functions

virtual int func (mblock_t *blk, minsn_t *ins)=0
 Optimize an instruction. More...
 

Detailed Description

User defined callbacks to optimize individual microcode instructions.

Examples:
hexrays_sample10.cpp.

Definition at line 294 of file hexrays.hpp.

Member Function Documentation

◆ func()

virtual int optinsn_t::func ( mblock_t blk,
minsn_t ins 
)
pure virtual

Optimize an instruction.

Parameters
blkcurrent basic block. maybe NULL, which means that the instruction must be optimized without context
insinstruction to optimize; it may be a sub-instruction of some other instruction. such sub-instructions may be optimized up to "mov x,x". for example: add x,0,x => mov x,x. top level instruction may be optimized up to "nop".
Returns
number of changes made to the instruction.
Examples:
hexrays_sample10.cpp.