Mercurial > lcfOS
annotate python/ppci/optimize.py @ 300:158068af716c
yafm
author | Windel Bouwman |
---|---|
date | Tue, 03 Dec 2013 18:00:22 +0100 |
parents | python/optimize.py@7b38782ed496 |
children |
rev | line source |
---|---|
253 | 1 from mem2reg import Mem2RegPromotor |
2 from transform import CommonSubexpressionElimination, CleanPass | |
3 from transform import DeadCodeDeleter, ConstantFolder | |
4 | |
5 def optimize(ir): | |
279 | 6 return |
7 cf = ConstantFolder() | |
8 cf.run(ir) | |
268 | 9 return |
253 | 10 dcd = DeadCodeDeleter() |
11 m2r = Mem2RegPromotor() | |
12 clr = CleanPass() | |
13 cse = CommonSubexpressionElimination() | |
14 dcd.run(ir) | |
15 clr.run(ir) | |
16 m2r.run(ir) | |
17 cse.run(ir) | |
255 | 18 cf.run(ir) |
19 dcd.run(ir) |