aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorJun Ma <JunMa@linux.alibaba.com>2020-03-10 18:32:55 +0800
committerJun Ma <JunMa@linux.alibaba.com>2020-03-24 13:41:55 +0800
commita44de12ab2193c14b6f0ff8cbea8f276cbf10159 (patch)
treec93b1ff7a45b8018cbb9fc44f91f76f7dd48b1ed /clang/lib/Frontend/CompilerInvocation.cpp
parentd0f4af8f3088f72df7fea9983127cbeeebbef6a1 (diff)
downloadllvm-a44de12ab2193c14b6f0ff8cbea8f276cbf10159.zip
llvm-a44de12ab2193c14b6f0ff8cbea8f276cbf10159.tar.gz
llvm-a44de12ab2193c14b6f0ff8cbea8f276cbf10159.tar.bz2
[Coroutines] Also check lifetime intrinsic for local variable when build
coroutine frame Currently we move all allocas into the frame when build coroutine frame in CoroSplit pass. However, this can be relaxed. Since CoroSplit pass run after Inline pass, we can use lifetime intrinsic to do such analysis: If the scope of lifetime intrinsic is not across any suspend point, rather than move the allocas to frame, we can just move them to entry bb of corresponding function. This reduce the frame size. More importantly, this also avoid data race in multithread environment. Consider one inline function by coroutine: it starts a thread which access local variables, while after inline the movement of allocs to frame also access them. cause data race. Differential Revision: https://reviews.llvm.org/D75664
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions