Mercurial > lcfOS
annotate python/optimize.py @ 271:cf7d5fb7d9c8
Reorganization
author | Windel Bouwman |
---|---|
date | Tue, 20 Aug 2013 18:56:02 +0200 |
parents | 5ec7580976d9 |
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 |