jon.recoil.org

Module X86_peephole_rules

module DLL = Oxcaml_utils.Doubly_linked_list
type peephole_stats

Statistics for peephole optimizations

val create_peephole_stats : unit -> peephole_stats
val peephole_stats_to_counters : peephole_stats -> Profile.Counters.t
val apply : peephole_stats -> X86_ast.asm_line DLL.cell -> X86_peephole_utils.rule_result

Apply all peephole rewrite rules to a cell. Returns Matched with continuation cell if a rule was applied, No_match otherwise.