1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00
llvm-mirror/lib/Transforms
Xun Li 6b5a85d5d6 [coroutine] should disable inline before calling coro split
This is a rework of D85812, which didn't land.
When callee coroutine function is inlined into caller coroutine function before coro-split pass, llvm will emits "coroutine should have exactly one defining @llvm.coro.begin". It seems that coro-early pass can not handle this quiet well.
So we believe that unsplited coroutine function should not be inlined.
This patch fix such issue by not inlining function if it has attribute "coroutine.presplit" (it means the function has not been splited) to fix this issue
test plan: check-llvm, check-clang

In D85812, there was suggestions on moving the macros to Attributes.td to avoid circular header dependency issue.
I believe it's not worth doing just to be able to use one constant string in one place.
Today, there are already 3 possible attribute values for "coroutine.presplit": c6543cc6b8/llvm/lib/Transforms/Coroutines/CoroInternal.h (L40-L42)
If we move them into Attributes.td, we would be adding 3 new attributes to EnumAttr, just to support this, which I think is an overkill.

Instead, I think the best way to do this is to add an API in Function class that checks whether this function is a coroutine, by checking the attribute by name directly.

Differential Revision: https://reviews.llvm.org/D92706
2020-12-08 08:53:08 -08:00
..
AggressiveInstCombine llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
CFGuard llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
Coroutines [Coroutines] Add DW_OP_deref for transformed dbg.value intrinsic. 2020-12-07 10:24:44 +08:00
Hello
HelloNew llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
InstCombine [InstCombine] Remove replacePointer (NFC) 2020-12-06 10:24:08 -08:00
Instrumentation [ICP] Don't promote when target not defined in module 2020-12-08 07:45:36 -08:00
IPO [coroutine] should disable inline before calling coro split 2020-12-08 08:53:08 -08:00
ObjCARC [NFC] Reduce include files dependency. 2020-12-03 18:25:05 +03:00
Scalar [LICM][docs] Document that LICM is also a canonicalization transform. NFC. 2020-12-08 11:56:35 +00:00
Utils [VNCoercion] Disallow coercion between different ni addrspaces 2020-12-07 20:19:48 -05:00
Vectorize [SLP] fix typo in debug string; NFC 2020-12-07 15:09:21 -05:00
CMakeLists.txt Reland [docs][NewPM] Add docs for writing NPM passes 2020-09-14 16:06:19 -07:00