Mercurial > lcfOS
annotate python/optimize.py @ 278:9fca39eebe50
First implementation of regalloc with coalsesc
author | Windel Bouwman |
---|---|
date | Sun, 29 Sep 2013 14:08:15 +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 |