diff python/testir.py @ 177:460db5669efa

Added clean pass for IR
author Windel Bouwman
date Mon, 22 Apr 2013 23:54:54 +0200
parents 5fd02aa38b42
children 25a0753da4cf
line wrap: on
line diff
--- a/python/testir.py	Sat Apr 20 12:00:51 2013 +0200
+++ b/python/testir.py	Mon Apr 22 23:54:54 2013 +0200
@@ -34,6 +34,8 @@
    //   return y - 33;
    //}
 
+   res = res + (x + 2 * y) + (x + 2 * y) + (2*8) + (2*8);
+
    if (x > 13)
    {
       while (y > 1337)
@@ -57,10 +59,14 @@
    cf = transform.ConstantFolder()
    dcd = transform.DeadCodeDeleter()
    m2r = transform.Mem2RegPromotor()
+   clr = transform.CleanPass()
    ir.check()
    cf.run(ir)
    dcd.run(ir)
+   clr.run(ir)
    m2r.run(ir)
+   for bb in ir.BasicBlocks:
+      bb.dag = x86.Dag(bb)
    #ir.dump()
 
    # Dump a graphiz file: