File tree Expand file tree Collapse file tree 1 file changed +17
-11
lines changed Expand file tree Collapse file tree 1 file changed +17
-11
lines changed Original file line number Diff line number Diff line change 9
9
def intersection_predecessor (node : "Node" ) -> Set ["Node" ]:
10
10
if not node .fathers :
11
11
return set ()
12
- if not any (father .is_reachable for father in node .fathers ):
13
- return set ()
14
-
15
- ret = set ()
16
- for pred in node .fathers :
17
- ret = ret .union (pred .dominators )
18
12
19
- for pred in node .fathers :
20
- if pred .is_reachable :
21
- ret = ret .intersection (pred .dominators )
13
+ # Revert PR1984
14
+ ret = node .fathers [0 ].dominators
15
+ for pred in node .fathers [1 :]:
16
+ ret = ret .intersection (pred .dominators )
17
+ # if not any(father.is_reachable for father in node.fathers):
18
+ # return set()
19
+ #
20
+ # ret = set()
21
+ # for pred in node.fathers:
22
+ # ret = ret.union(pred.dominators)
23
+ #
24
+ # for pred in node.fathers:
25
+ # if pred.is_reachable:
26
+ # ret = ret.intersection(pred.dominators)
22
27
return ret
23
28
24
29
@@ -91,8 +96,9 @@ def compute_dominance_frontier(nodes: List["Node"]) -> None:
91
96
for node in nodes :
92
97
if len (node .fathers ) >= 2 :
93
98
for father in node .fathers :
94
- if not father .is_reachable :
95
- continue
99
+ # Revert PR1984
100
+ # if not father.is_reachable:
101
+ # continue
96
102
runner = father
97
103
# Corner case: if there is a if without else
98
104
# we need to add update the conditional node
You can’t perform that action at this time.
0 commit comments