diff python/ppci/optimize.py @ 300:158068af716c

yafm
author Windel Bouwman
date Tue, 03 Dec 2013 18:00:22 +0100
parents python/optimize.py@7b38782ed496
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/python/ppci/optimize.py	Tue Dec 03 18:00:22 2013 +0100
@@ -0,0 +1,19 @@
+from mem2reg import Mem2RegPromotor
+from transform import CommonSubexpressionElimination, CleanPass
+from transform import DeadCodeDeleter, ConstantFolder
+
+def optimize(ir):
+    return 
+    cf = ConstantFolder()
+    cf.run(ir)
+    return
+    dcd = DeadCodeDeleter()
+    m2r = Mem2RegPromotor()
+    clr = CleanPass()
+    cse = CommonSubexpressionElimination()
+    dcd.run(ir)
+    clr.run(ir)
+    m2r.run(ir)
+    cse.run(ir)
+    cf.run(ir)
+    dcd.run(ir)