[PATCH] D55966: Ensure coro split pass only spills variables dominated by CoroBegin
Gor Nishanov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 9 16:34:12 PST 2019
GorNishanov requested changes to this revision.
GorNishanov added inline comments.
This revision now requires changes to proceed.
================
Comment at: lib/Transforms/Coroutines/CoroFrame.cpp:932
for (User *U : A.users())
- if (Checker.isDefinitionAcrossSuspend(A, U))
+ if (Checker.isDefinitionAcrossSuspend(A, U) && !A.getType()->isPointerTy())
Spills.emplace_back(&A, U);
----------------
This does not look right. It states that we never spill arguments that are pointer types, whether we use them across suspend point or not.
Any access to those arguments after suspend point will be garbage.
To observe, add `i16* %x` argument that you will use after suspend (either on resume path or destroy path` and observe that in .resume or .destroy parts of the coroutine any access to %x will be replaced with `undef`
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55966/new/
https://reviews.llvm.org/D55966
More information about the llvm-commits
mailing list