IDAPython 8.4
Loading...
Searching...
No Matches
optinsn_t Class Reference

Proxy of C++ optinsn_t class.

Inheritance diagram for optinsn_t:

Public Member Functions

"int" func (self, *args)
 func(self, blk, ins, optflags) -> int Optimize an instruction.
 
"void" install (self, *args)
 install(self)
 
"bool" remove (self, *args)
 remove(self) -> bool
 
 __init__ (self, *args)
 init(self) -> optinsn_t
 
 __disown__ (self)
 

Properties

 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
* args )
Parameters
selfPyObject *

Member Function Documentation

◆ __disown__()

__disown__ ( self)

◆ func()

"int" func ( self,
* args )
Parameters
blk(C++: mblock_t *) current basic block. maybe nullptr, which means that the instruction must be optimized without context
ins(C++: minsn_t *) 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(C++: int) combination of optimization flags bits
Returns
: number of changes made to the instruction. if after this call the instruction's use/def lists have changed, you must mark the block level lists as dirty (see mark_lists_dirty)

◆ install()

"void" install ( self,
* args )

◆ remove()

"bool" remove ( self,
* args )

Property Documentation

◆ thisown

thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
static

The documentation for this class was generated from the following file: