view python/optimize.py @ 290:7b38782ed496

File moves
author Windel Bouwman
date Sun, 24 Nov 2013 11:24:15 +0100
parents 2ccd57b1d78c
children
line wrap: on
line source

from mem2reg import Mem2RegPromotor
from transform import CommonSubexpressionElimination, CleanPass
from transform import DeadCodeDeleter, ConstantFolder

def optimize(ir):
    return 
    cf = ConstantFolder()
    cf.run(ir)
    return
    dcd = DeadCodeDeleter()
    m2r = Mem2RegPromotor()
    clr = CleanPass()
    cse = CommonSubexpressionElimination()
    dcd.run(ir)
    clr.run(ir)
    m2r.run(ir)
    cse.run(ir)
    cf.run(ir)
    dcd.run(ir)