Mercurial > lcfOS
view python/optimize.py @ 277:046017431c6a
Started register allocator
author | Windel Bouwman |
---|---|
date | Thu, 26 Sep 2013 21:14:25 +0200 |
parents | 5ec7580976d9 |
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)