annotate python/optimize.py @ 278:9fca39eebe50

First implementation of regalloc with coalsesc
author Windel Bouwman
date Sun, 29 Sep 2013 14:08:15 +0200
parents 5ec7580976d9
children 2ccd57b1d78c
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):
268
5ec7580976d9 Op naar tree-IR
Windel Bouwman
parents: 255
diff changeset
6 return
253
74c6a20302d5 Added better logging
Windel Bouwman
parents:
diff changeset
7 cf = ConstantFolder()
74c6a20302d5 Added better logging
Windel Bouwman
parents:
diff changeset
8 dcd = DeadCodeDeleter()
74c6a20302d5 Added better logging
Windel Bouwman
parents:
diff changeset
9 m2r = Mem2RegPromotor()
74c6a20302d5 Added better logging
Windel Bouwman
parents:
diff changeset
10 clr = CleanPass()
74c6a20302d5 Added better logging
Windel Bouwman
parents:
diff changeset
11 cse = CommonSubexpressionElimination()
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 clr.run(ir)
74c6a20302d5 Added better logging
Windel Bouwman
parents:
diff changeset
15 m2r.run(ir)
74c6a20302d5 Added better logging
Windel Bouwman
parents:
diff changeset
16 cse.run(ir)
255
7416c923a02a Added more logging
Windel Bouwman
parents: 253
diff changeset
17 cf.run(ir)
7416c923a02a Added more logging
Windel Bouwman
parents: 253
diff changeset
18 dcd.run(ir)
253
74c6a20302d5 Added better logging
Windel Bouwman
parents:
diff changeset
19
74c6a20302d5 Added better logging
Windel Bouwman
parents:
diff changeset
20
74c6a20302d5 Added better logging
Windel Bouwman
parents:
diff changeset
21