Skip to content

Commit 07c625b

Browse files
committed
[pmo] Eliminate non-determinism by unmixing some iteration order/sorting bisection code.
Specifically, I was abusing some sorting behavior on some arrays that I really needed to iterate over == non-determinism. To work around these issues, I made two changes: 1. Rather than using a bit vector to mark copy_values that were handled as part of phi handling and thus needing a way to map copy_value -> bit vector index, I instead just added a separate small ptr set called copyValueProcessedWithPhiNodes. 2. I refactored/changed how copy cleanups were inserted for phi nodes by constructing a flat 2d-array that is stable sorted by the index of the incoming value associated with the cleanups. An incoming value's index is the count of the copy cleanup when we see it for the first time. Thus when we do the stable sort we will be visiting in cleanup insertion order and also will be doing insertion order along the incomingValue axis.
1 parent 6759d82 commit 07c625b

File tree

1 file changed

+183
-135
lines changed

1 file changed

+183
-135
lines changed

0 commit comments

Comments
 (0)