annotate python/optimize.py @ 253:74c6a20302d5

Added better logging
author Windel Bouwman
date Wed, 31 Jul 2013 17:57:03 +0200
parents
children 7416c923a02a
rev   line source
253
74c6a20302d5 Added better logging
Windel Bouwman
parents:
diff changeset
1 from mem2reg import Mem2RegPromotor
74c6a20302d5 Added better logging
Windel Bouwman
parents:
diff changeset
2 from transform import CommonSubexpressionElimination, CleanPass
74c6a20302d5 Added better logging
Windel Bouwman
parents:
diff changeset
3 from transform import DeadCodeDeleter, ConstantFolder
74c6a20302d5 Added better logging
Windel Bouwman
parents:
diff changeset
4
74c6a20302d5 Added better logging
Windel Bouwman
parents:
diff changeset
5 def optimize(ir):
74c6a20302d5 Added better logging
Windel Bouwman
parents:
diff changeset
6 cf = ConstantFolder()
74c6a20302d5 Added better logging
Windel Bouwman
parents:
diff changeset
7 dcd = DeadCodeDeleter()
74c6a20302d5 Added better logging
Windel Bouwman
parents:
diff changeset
8 m2r = Mem2RegPromotor()
74c6a20302d5 Added better logging
Windel Bouwman
parents:
diff changeset
9 clr = CleanPass()
74c6a20302d5 Added better logging
Windel Bouwman
parents:
diff changeset
10 cse = CommonSubexpressionElimination()
74c6a20302d5 Added better logging
Windel Bouwman
parents:
diff changeset
11 ir.check()
74c6a20302d5 Added better logging
Windel Bouwman
parents:
diff changeset
12 cf.run(ir)
74c6a20302d5 Added better logging
Windel Bouwman
parents:
diff changeset
13 dcd.run(ir)
74c6a20302d5 Added better logging
Windel Bouwman
parents:
diff changeset
14 ir.check()
74c6a20302d5 Added better logging
Windel Bouwman
parents:
diff changeset
15 clr.run(ir)
74c6a20302d5 Added better logging
Windel Bouwman
parents:
diff changeset
16 ir.check()
74c6a20302d5 Added better logging
Windel Bouwman
parents:
diff changeset
17 m2r.run(ir)
74c6a20302d5 Added better logging
Windel Bouwman
parents:
diff changeset
18 ir.check()
74c6a20302d5 Added better logging
Windel Bouwman
parents:
diff changeset
19 cse.run(ir)
74c6a20302d5 Added better logging
Windel Bouwman
parents:
diff changeset
20 ir.check()
74c6a20302d5 Added better logging
Windel Bouwman
parents:
diff changeset
21
74c6a20302d5 Added better logging
Windel Bouwman
parents:
diff changeset
22
74c6a20302d5 Added better logging
Windel Bouwman
parents:
diff changeset
23