diff python/registerallocator.py @ 280:02385f62f250

Rework from str interface to Instruction interface
author Windel Bouwman
date Sat, 02 Nov 2013 10:03:26 +0100
parents 2ccd57b1d78c
children
line wrap: on
line diff
--- a/python/registerallocator.py	Sat Oct 12 09:56:23 2013 +0200
+++ b/python/registerallocator.py	Sat Nov 02 10:03:26 2013 +0100
@@ -44,7 +44,6 @@
         """ 1. Construct interference graph from instruction list """
         self.f.cfg = FlowGraph(self.f.instructions)
         self.f.ig = InterferenceGraph(self.f.cfg)
-        self.printLive()
 
         self.Node = self.f.ig.getNode
 
@@ -53,7 +52,6 @@
         self.precolored = set(self.Node(tmp) for tmp in pre_tmp)
         self.workSet = set(self.f.ig.nodes - self.precolored)
 
-        # Make degree table:
         for n in self.precolored:
             n.addDegree = 100 + len(self.f.ig.nodes) + self.K
 
@@ -61,10 +59,8 @@
         self.color = {}
         for tmp, c in self.f.tempMap.items():
             self.color[self.Node(tmp)] = c
-        dict(self.f.tempMap) # start with pre-colored
 
         self.moves = [i for i in self.f.instructions if i.ismove]
-        print(self.moves)
         for mv in self.moves:
             self.Node(mv.src[0]).moves.add(mv)
             self.Node(mv.dst[0]).moves.add(mv)