[PATCH] D96922: [Coroutine] Check indirect uses of alloca when checking lifetime info
Xun Li via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 24 15:27:54 PST 2021
lxfind added a comment.
In D96922#2581141 <https://reviews.llvm.org/D96922#2581141>, @rjmccall wrote:
> Is there any way we can simplify this problem for ourselves by expecting IR to be emitted differently within coroutines? Because I think the true fundamental problem here is that LLVM's representation of stack allocations is not very good, and we're stuck trying to do an analysis that the representation isn't suited for at all. There's no real chance that LLVM in general is going to move away from `alloca`, but if we can recognize when we're emitting one of these allocations that needs to overlap `coro.begin` or `coro.end` and just do it with a special intrinsic that we treat differently in lowering, that might substantially reduce the difficulty of the problem. If necessary, we can even change the rules for inlining into unsplit coroutines.
Actually, this gives me an idea, perhaps we can emit metadata to the allocas to teach CoroSplit whether one must be on the stack.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96922/new/
https://reviews.llvm.org/D96922
More information about the llvm-commits
mailing list