1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
llvm-mirror/lib/Transforms/Coroutines
Jun Ma 801dde651c [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
2020-03-24 13:41:55 +08:00
..
CMakeLists.txt
CoroCleanup.cpp [Coroutines][4/6] New pass manager: coro-cleanup 2020-02-19 00:30:27 -05:00
CoroEarly.cpp Coroutines: avoid use of deprecated CreateLoad and CreateCall methods 2020-02-18 00:24:09 +01:00
CoroElide.cpp [Coroutines] Optimized coroutine elision based on reachability 2020-03-05 14:43:50 +08:00
CoroFrame.cpp [Coroutines] Also check lifetime intrinsic for local variable when build 2020-03-24 13:41:55 +08:00
CoroInstr.h
CoroInternal.h
CoroSplit.cpp [Coroutines] Also check lifetime intrinsic for local variable when build 2020-03-24 13:41:55 +08:00
Coroutines.cpp [LLVM-C] Add bindings for addCoroutinePassesToExtensionPoints 2020-02-24 20:15:51 +01:00
LLVMBuild.txt