hdl.xfrm: avoid cycles in union-find graph in LHSGroupAnalyzer.

This commit is contained in:
whitequark 2018-12-22 22:19:14 +00:00
parent 3448953f61
commit 621dddebfd
2 changed files with 16 additions and 0 deletions

View file

@ -298,6 +298,8 @@ class LHSGroupAnalyzer(StatementVisitor):
root_group = self.find(root)
for leaf in leaves:
leaf_group = self.find(leaf)
if root_group == leaf_group:
continue
self.unions[leaf_group] = root_group
def groups(self):