Mercurial > lcfOS
comparison python/ppci/codegen/interferencegraph.py @ 313:04cf4d26a3bc
Added constant function
author | Windel Bouwman |
---|---|
date | Wed, 18 Dec 2013 18:02:26 +0100 |
parents | 6753763d3bec |
children | 38f5f298ce0e |
comparison
equal
deleted
inserted
replaced
312:2c9768114877 | 313:04cf4d26a3bc |
---|---|
39 n.live_in = n.uses | (n.live_out - n.defs) | 39 n.live_in = n.uses | (n.live_out - n.defs) |
40 if n.Succ: | 40 if n.Succ: |
41 n.live_out = set.union(*(s.live_in for s in n.Succ)) | 41 n.live_out = set.union(*(s.live_in for s in n.Succ)) |
42 else: | 42 else: |
43 n.live_out = set() | 43 n.live_out = set() |
44 n.live_out = n.live_out | n.defs | |
44 change = change or (_in != n.live_in) or (_out != n.live_out) | 45 change = change or (_in != n.live_in) or (_out != n.live_out) |
45 | 46 |
46 # Construct interference graph: | 47 # Construct interference graph: |
47 for n in flowgraph.nodes: | 48 for n in flowgraph.nodes: |
48 for tmp in n.live_out: | 49 for tmp in n.live_out: |