Mercurial > lcfOS
annotate python/optimize.py @ 267:e7c8f7eb3f59
Added tag Working chain 1 for changeset 649884d9dc61
author | Windel Bouwman |
---|---|
date | Mon, 12 Aug 2013 20:14:47 +0200 |
parents | 7416c923a02a |
children | 5ec7580976d9 |
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): | |
6 cf = ConstantFolder() | |
7 dcd = DeadCodeDeleter() | |
8 m2r = Mem2RegPromotor() | |
9 clr = CleanPass() | |
10 cse = CommonSubexpressionElimination() | |
11 cf.run(ir) | |
12 dcd.run(ir) | |
13 clr.run(ir) | |
14 m2r.run(ir) | |
15 cse.run(ir) | |
255 | 16 cf.run(ir) |
17 dcd.run(ir) | |
253 | 18 |
19 | |
20 |