[PATCH] D154695: [Coroutines] Add an O(n) algorithm for computing the cross suspend point information.
Matthias Braun via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 1 15:28:53 PDT 2023
MatzeB added a comment.
I did spent some more time on the patch yesterday. I believe the indeterminism was somewhat triggered by the existing code in `BlockToIndexMapping`: https://github.com/llvm/llvm-project/blob/main/llvm/lib/Transforms/Coroutines/CoroFrame.cpp#L63 it sorts the blocks by their memory address and as memory address can fluctuate between runs (caused by ASLR etc.) iterating over the Mapping resulting in a nondeterministic order. This doesn't matter when the algorithm always reaches the same solution regardless of the order, but this wasn't the case after the rewrite it seems.
I also did prepare a proposal patch to use initial RPO pass + fixpoint worklist algorithm. Cleaning this up right now for submission / further discussion...
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154695/new/
https://reviews.llvm.org/D154695
More information about the llvm-commits
mailing list