mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 19:52:54 +01:00
6b5a85d5d6
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":
|
||
---|---|---|
.. | ||
AlwaysInliner.cpp | ||
Annotation2Metadata.cpp | ||
ArgumentPromotion.cpp | ||
Attributor.cpp | ||
AttributorAttributes.cpp | ||
BarrierNoopPass.cpp | ||
BlockExtractor.cpp | ||
CalledValuePropagation.cpp | ||
CMakeLists.txt | ||
ConstantMerge.cpp | ||
CrossDSOCFI.cpp | ||
DeadArgumentElimination.cpp | ||
ElimAvailExtern.cpp | ||
ExtractGV.cpp | ||
ForceFunctionAttrs.cpp | ||
FunctionAttrs.cpp | ||
FunctionImport.cpp | ||
GlobalDCE.cpp | ||
GlobalOpt.cpp | ||
GlobalSplit.cpp | ||
HotColdSplitting.cpp | ||
InferFunctionAttrs.cpp | ||
Inliner.cpp | ||
InlineSimple.cpp | ||
Internalize.cpp | ||
IPO.cpp | ||
LoopExtractor.cpp | ||
LowerTypeTests.cpp | ||
MergeFunctions.cpp | ||
OpenMPOpt.cpp | ||
PartialInlining.cpp | ||
PassManagerBuilder.cpp | ||
PruneEH.cpp | ||
SampleContextTracker.cpp | ||
SampleProfile.cpp | ||
SampleProfileProbe.cpp | ||
SCCP.cpp | ||
StripDeadPrototypes.cpp | ||
StripSymbols.cpp | ||
SyntheticCountsPropagation.cpp | ||
ThinLTOBitcodeWriter.cpp | ||
WholeProgramDevirt.cpp |