comparison python/ir/function.py @ 177:460db5669efa

Added clean pass for IR
author Windel Bouwman
date Mon, 22 Apr 2013 23:54:54 +0200
parents c1d2b6b9f9a7
children d77cb5962cc5
comparison
equal deleted inserted replaced
176:5fd02aa38b42 177:460db5669efa
7 self.entry = None 7 self.entry = None
8 def __repr__(self): 8 def __repr__(self):
9 return 'Function {0}'.format(self.name) 9 return 'Function {0}'.format(self.name)
10 def addBB(self, bb): 10 def addBB(self, bb):
11 self.bbs.append(bb) 11 self.bbs.append(bb)
12 bb.parent = self
13 def removeBasicBlock(self, bb):
14 self.bbs.remove(bb)
15 bb.parent = None
12 def getBBs(self): 16 def getBBs(self):
13 return self.bbs 17 return self.bbs
14 BasicBlocks = property(getBBs) 18 BasicBlocks = property(getBBs)
15 19
16 20