comparison python/optimize.py @ 253:74c6a20302d5

Added better logging
author Windel Bouwman
date Wed, 31 Jul 2013 17:57:03 +0200
parents
children 7416c923a02a
comparison
equal deleted inserted replaced
252:c4370696ccc7 253:74c6a20302d5
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 ir.check()
12 cf.run(ir)
13 dcd.run(ir)
14 ir.check()
15 clr.run(ir)
16 ir.check()
17 m2r.run(ir)
18 ir.check()
19 cse.run(ir)
20 ir.check()
21
22
23