[llvm] [Coroutines][LazyCallGraph] resumes are not really SCC (PR #116285)
Tyler Nowicki via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 25 10:39:33 PST 2024
TylerNowicki wrote:
The patch is ready for re-review.
I decided that it makes sense to insert a ref from each new function to all other new functions. This will ensure all new functions are within the same Ref(SCC). A ref from the original function to all new functions was already being added so this is an extension of that. I also updated the comments to reflect this and added an additional check in the assertion, although at this point the assertion may not be necessary because it is adding the refs if they were not already there. Should the debug checks be removed now?
This change works with the current way coroutines are (fully) cloned, because full cloning creates a PHI each in new function that references all other new functions. So, ensuring a ref exists between all new functions in addSplitRefRecursiveFunctions does not change what is already happening. If the cloning is modified to only clone BBs that are in each continuation, then PHI will not be include all new functions. So, ensuring a ref exists between all new functions ensures the Ref(SCC) requirement is met as well.
I will stage my changes for pruning while cloning in future PRs.
https://github.com/llvm/llvm-project/pull/116285
More information about the llvm-commits
mailing list