Mercurial > lcfOS
view python/optimize.py @ 268:5ec7580976d9
Op naar tree-IR
author | Windel Bouwman |
---|---|
date | Wed, 14 Aug 2013 20:12:40 +0200 |
parents | 7416c923a02a |
children | 2ccd57b1d78c |
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() dcd = DeadCodeDeleter() m2r = Mem2RegPromotor() clr = CleanPass() cse = CommonSubexpressionElimination() cf.run(ir) dcd.run(ir) clr.run(ir) m2r.run(ir) cse.run(ir) cf.run(ir) dcd.run(ir)