Mercurial > lcfOS
comparison 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 |
comparison
equal
deleted
inserted
replaced
267:e7c8f7eb3f59 | 268:5ec7580976d9 |
---|---|
1 from mem2reg import Mem2RegPromotor | 1 from mem2reg import Mem2RegPromotor |
2 from transform import CommonSubexpressionElimination, CleanPass | 2 from transform import CommonSubexpressionElimination, CleanPass |
3 from transform import DeadCodeDeleter, ConstantFolder | 3 from transform import DeadCodeDeleter, ConstantFolder |
4 | 4 |
5 def optimize(ir): | 5 def optimize(ir): |
6 return | |
6 cf = ConstantFolder() | 7 cf = ConstantFolder() |
7 dcd = DeadCodeDeleter() | 8 dcd = DeadCodeDeleter() |
8 m2r = Mem2RegPromotor() | 9 m2r = Mem2RegPromotor() |
9 clr = CleanPass() | 10 clr = CleanPass() |
10 cse = CommonSubexpressionElimination() | 11 cse = CommonSubexpressionElimination() |