Skip to content

Commit

Permalink
avoid key shuffling with networkx.Graph
Browse files Browse the repository at this point in the history
  • Loading branch information
miklos1 committed Dec 12, 2016
1 parent 955d29d commit 9f5050b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion coffee/rewriter.py
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ def sharing_graph_rewrite(self):
self.licm('only_const').licm('only_outlinear')

# Transform the expression based on the sharing graph
nodes, edges = sgraph.nodes(), sgraph.edges()
nodes = [n for n in nodes if n in sgraph.nodes()]
if not (nodes and all(sgraph.degree(n) > 0 for n in nodes)):
self.factorize(mode='heuristic')
self.licm('only_const').licm('only_outlinear')
Expand Down

0 comments on commit 9f5050b

Please sign in to comment.