Public Member Functions | |
def | ira_regs_ids |
def | sort_dst |
def | dst_trackback |
def | gen_graph |
def | graph |
def | remove_dead_instr |
def | init_useful_instr |
def | remove_dead_code |
def | set_dead_regs |
def | add_unused_regs |
def | dump_bloc_state |
def | compute_reach_block |
def | compute_reach |
def | dead_simp |
def | gen_equations |
def | sizeof_char |
def | sizeof_short |
def | sizeof_int |
def | sizeof_long |
def | sizeof_pointer |
Static Public Member Functions | |
def | print_set |
Public Attributes | |
g | |
Private Member Functions | |
def | _mark_useful_code |
def | _test_kill_reach_fix |
Definition at line 17 of file analysis.py.
|
private |
Mark useful statements using previous reach analysis Source : Kennedy, K. (1979). A survey of data flow analysis techniques. IBM Thomas J. Watson Research Division, Algorithm MK Return a set of triplets (block, instruction number, instruction) of useful instructions PRE: compute_reach(self)
Definition at line 186 of file analysis.py.
|
private |
Return True iff a fixed point has been reached during reach analysis
Definition at line 311 of file analysis.py.
def miasm2.ir.analysis.ira.add_unused_regs | ( | self | ) |
Definition at line 238 of file analysis.py.
def miasm2.ir.analysis.ira.compute_reach | ( | self | ) |
Compute reach, defout and kill sets until a fixed point is reached. Source : Kennedy, K. (1979). A survey of data flow analysis techniques. IBM Thomas J. Watson Research Division, page 43 PRE: gen_graph()
Definition at line 326 of file analysis.py.
def miasm2.ir.analysis.ira.compute_reach_block | ( | self, | |
irb | |||
) |
Variable influence computation for a single block @irb: irbloc instance PRE: init_reach()
Definition at line 267 of file analysis.py.
def miasm2.ir.analysis.ira.dead_simp | ( | self | ) |
This function is used to analyse relation of a * complete function * This means the blocks under study represent a solid full function graph. Source : Kennedy, K. (1979). A survey of data flow analysis techniques. IBM Thomas J. Watson Research Division, page 43 PRE: gen_graph()
Definition at line 343 of file analysis.py.
def miasm2.ir.analysis.ira.dst_trackback | ( | self, | |
b | |||
) |
Definition at line 40 of file analysis.py.
def miasm2.ir.analysis.ira.dump_bloc_state | ( | self, | |
irb | |||
) |
Definition at line 249 of file analysis.py.
def miasm2.ir.analysis.ira.gen_equations | ( | self | ) |
def miasm2.ir.analysis.ira.gen_graph | ( | self, | |
link_all = True |
|||
) |
Gen irbloc digraph @link_all: also gen edges to non present irblocs
Definition at line 68 of file analysis.py.
def miasm2.ir.analysis.ira.graph | ( | self | ) |
def miasm2.ir.analysis.ira.init_useful_instr | ( | self | ) |
Computes a set of triples (block, instruction number, instruction) containing initially useful instructions : - Instructions affecting final value of return registers - Instructions affecting IRDst register - Instructions writing in memory - Function call instructions Return set of intial useful instructions
Definition at line 140 of file analysis.py.
def miasm2.ir.analysis.ira.ira_regs_ids | ( | self | ) |
|
static |
Print each triplet contained in a set @v_set: set containing triplets elements
Definition at line 242 of file analysis.py.
def miasm2.ir.analysis.ira.remove_dead_code | ( | self | ) |
Remove dead instructions in each block of the graph using the reach analysis . Returns True if a block has been modified PRE : compute_reach(self)
Definition at line 223 of file analysis.py.
def miasm2.ir.analysis.ira.remove_dead_instr | ( | self, | |
irb, | |||
useful | |||
) |
Remove dead affectations using previous reaches analysis @irb: irbloc instance @useful: useful statements from previous reach analysis Return True iff the block state has changed PRE: compute_reach(self)
Definition at line 120 of file analysis.py.
def miasm2.ir.analysis.ira.set_dead_regs | ( | self, | |
b | |||
) |
Definition at line 235 of file analysis.py.
def miasm2.ir.analysis.ira.sizeof_char | ( | self | ) |
Definition at line 381 of file analysis.py.
def miasm2.ir.analysis.ira.sizeof_int | ( | self | ) |
Definition at line 389 of file analysis.py.
def miasm2.ir.analysis.ira.sizeof_long | ( | self | ) |
Definition at line 393 of file analysis.py.
def miasm2.ir.analysis.ira.sizeof_pointer | ( | self | ) |
Definition at line 397 of file analysis.py.
def miasm2.ir.analysis.ira.sizeof_short | ( | self | ) |
Definition at line 385 of file analysis.py.
def miasm2.ir.analysis.ira.sort_dst | ( | self, | |
todo, | |||
done | |||
) |
Definition at line 23 of file analysis.py.
miasm2.ir.analysis.ira.g |
Definition at line 73 of file analysis.py.