Latest available version: IDA and decompilers v8.4.240320sp1 see all releases
Hex-Rays logo State-of-the-art binary code analysis tools
email icon
optblock_t Struct Referenceabstract

User defined callback to optimize microcode blocks. More...

#include <hexrays.hpp>

Public Member Functions

virtual int func (mblock_t *blk)=0
 Optimize a block. More...
 

Detailed Description

User defined callback to optimize microcode blocks.

Examples
hexrays_sample11.cpp.

Definition at line 2139 of file hexrays.hpp.

Member Function Documentation

◆ func()

virtual int optblock_t::func ( mblock_t blk)
pure virtual

Optimize a block.

This function usually performs the optimizations that require analyzing the entire block and/or its neighbors. For example it can recognize patterns and perform conversions like: b0: b0: ... ... jnz x, 0, @b2 => jnz x, 0, @b2 b1: b1: add x, 0, y mov x, y ... ...

Parameters
blkBasic block to optimize as a whole.
Returns
number of changes made to the block. See also mark_lists_dirty.
Examples
hexrays_sample11.cpp.