comparison python/ir/function.py @ 270:cdc76d183bcc

first register allocator
author Windel Bouwman
date Mon, 19 Aug 2013 21:14:28 +0200
parents 5f8c04a8d26b
children cf7d5fb7d9c8
comparison
equal deleted inserted replaced
269:5f8c04a8d26b 270:cdc76d183bcc
26 for sb in b.Successors: 26 for sb in b.Successors:
27 if sb not in bbs: 27 if sb not in bbs:
28 bbs.append(sb) 28 bbs.append(sb)
29 worklist.append(sb) 29 worklist.append(sb)
30 bbs.remove(self.entry) 30 bbs.remove(self.entry)
31 bbs.remove(self.epiloog) 31 if self.epiloog in bbs:
32 bbs.remove(self.epiloog)
32 bbs.insert(0, self.entry) 33 bbs.insert(0, self.entry)
33 bbs.append(self.epiloog) 34 bbs.append(self.epiloog)
34 return bbs 35 return bbs
35 36
36 def findBasicBlock(self, name): 37 def findBasicBlock(self, name):