Mercurial > lcfOS
annotate 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 |
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): | |
268 | 6 return |
253 | 7 cf = ConstantFolder() |
8 dcd = DeadCodeDeleter() | |
9 m2r = Mem2RegPromotor() | |
10 clr = CleanPass() | |
11 cse = CommonSubexpressionElimination() | |
12 cf.run(ir) | |
13 dcd.run(ir) | |
14 clr.run(ir) | |
15 m2r.run(ir) | |
16 cse.run(ir) | |
255 | 17 cf.run(ir) |
18 dcd.run(ir) | |
253 | 19 |
20 | |
21 |