annotate python/ppci/optimize.py @ 357:818be710e13d

Added acceptance function to burg
author Windel Bouwman
date Fri, 14 Mar 2014 15:14:29 +0100
parents 158068af716c
children
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):
279
2ccd57b1d78c Fix register allocator to do burn2 OK
Windel Bouwman
parents: 268
diff changeset
6 return
2ccd57b1d78c Fix register allocator to do burn2 OK
Windel Bouwman
parents: 268
diff changeset
7 cf = ConstantFolder()
2ccd57b1d78c Fix register allocator to do burn2 OK
Windel Bouwman
parents: 268
diff changeset
8 cf.run(ir)
268
5ec7580976d9 Op naar tree-IR
Windel Bouwman
parents: 255
diff changeset
9 return
253
74c6a20302d5 Added better logging
Windel Bouwman
parents:
diff changeset
10 dcd = DeadCodeDeleter()
74c6a20302d5 Added better logging
Windel Bouwman
parents:
diff changeset
11 m2r = Mem2RegPromotor()
74c6a20302d5 Added better logging
Windel Bouwman
parents:
diff changeset
12 clr = CleanPass()
74c6a20302d5 Added better logging
Windel Bouwman
parents:
diff changeset
13 cse = CommonSubexpressionElimination()
74c6a20302d5 Added better logging
Windel Bouwman
parents:
diff changeset
14 dcd.run(ir)
74c6a20302d5 Added better logging
Windel Bouwman
parents:
diff changeset
15 clr.run(ir)
74c6a20302d5 Added better logging
Windel Bouwman
parents:
diff changeset
16 m2r.run(ir)
74c6a20302d5 Added better logging
Windel Bouwman
parents:
diff changeset
17 cse.run(ir)
255
7416c923a02a Added more logging
Windel Bouwman
parents: 253
diff changeset
18 cf.run(ir)
7416c923a02a Added more logging
Windel Bouwman
parents: 253
diff changeset
19 dcd.run(ir)