LLVM: llvm::coro::Shape Struct Reference (original) (raw)
#include "[llvm/Transforms/Coroutines/CoroShape.h](CoroShape%5F8h%5Fsource.html)"
| Public Attributes | |
|---|---|
| CoroBeginInst * | CoroBegin = nullptr |
| SmallVector< AnyCoroEndInst *, 4 > | CoroEnds |
| SmallVector< CoroIsInRampInst *, 2 > | CoroIsInRampInsts |
| SmallVector< CoroSizeInst *, 2 > | CoroSizes |
| SmallVector< CoroAlignInst *, 2 > | CoroAligns |
| SmallVector< AnyCoroSuspendInst *, 4 > | CoroSuspends |
| SmallVector< CoroAwaitSuspendInst *, 4 > | CoroAwaitSuspends |
| SmallVector< CallInst *, 2 > | SymmetricTransfers |
| SmallVector< CallInst *, 2 > | SwiftErrorOps |
| coro::ABI | ABI |
| StructType * | FrameTy = nullptr |
| Align | FrameAlign |
| uint64_t | FrameSize = 0 |
| Value * | FramePtr = nullptr |
| BasicBlock * | AllocaSpillBlock = nullptr |
| union { | |
| SwitchLoweringStorage SwitchLowering | |
| RetconLoweringStorage RetconLowering | |
| AsyncLoweringStorage AsyncLowering | |
| }; |
Definition at line 53 of file CoroShape.h.
◆ Shape() [1/2]
| llvm::coro::Shape::Shape ( ) | default |
|---|
◆ Shape() [2/2]
| llvm::coro::Shape::Shape ( Function & F) | inlineexplicit |
|---|
◆ analyze()
Definition at line 182 of file Coroutines.cpp.
References ABI, assert(), llvm::coro::Async, AsyncLowering, llvm::cast(), clear(), CoroAligns, CoroAwaitSuspends, CoroBegin, CoroEnds, CoroIsInRampInsts, CoroSizes, CoroSuspends, llvm::dyn_cast(), F, getAsyncCoroId(), getRetconCoroId(), getSwitchCoroId(), I, II, instructions, llvm::isa(), llvm_unreachable, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::report_fatal_error(), llvm::coro::Retcon, RetconLowering, llvm::coro::RetconOnce, std::swap(), llvm::coro::Switch, and SwitchLowering.
Referenced by Shape().
◆ cleanCoroutine()
◆ clear()
| void llvm::coro::Shape::clear ( ) | inline |
|---|
Definition at line 66 of file CoroShape.h.
References AllocaSpillBlock, CoroAligns, CoroAwaitSuspends, CoroBegin, CoroEnds, CoroIsInRampInsts, CoroSizes, CoroSuspends, FramePtr, FrameTy, SwiftErrorOps, and SymmetricTransfers.
Referenced by analyze().
◆ emitAlloc()
Allocate memory according to the rules of the active lowering.
Parameters
| CG | - if non-null, will be updated for the new call |
|---|
Definition at line 509 of file Coroutines.cpp.
References ABI, addCallToCallGraph(), llvm::Alloc, llvm::coro::Async, Call, llvm_unreachable, propagateCallAttrsFromCallee(), llvm::coro::Retcon, RetconLowering, llvm::coro::RetconOnce, Size, and llvm::coro::Switch.
Referenced by lowerNonLocalAlloca().
◆ emitDealloc()
Deallocate memory according to the rules of the active lowering.
Parameters
| CG | - if non-null, will be updated for the new call |
|---|
Definition at line 532 of file Coroutines.cpp.
References ABI, addCallToCallGraph(), llvm::coro::Async, Call, llvm_unreachable, propagateCallAttrsFromCallee(), llvm::coro::Retcon, RetconLowering, llvm::coro::RetconOnce, and llvm::coro::Switch.
Referenced by lowerNonLocalAlloca(), and maybeFreeRetconStorage().
◆ getAsyncCoroId()
◆ getIndex()
◆ getIndexType()
| IntegerType * llvm::coro::Shape::getIndexType ( ) const | inline |
|---|
◆ getInsertPtAfterFramePtr()
◆ getPromiseAlloca()
| AllocaInst * llvm::coro::Shape::getPromiseAlloca ( ) const | inline |
|---|
◆ getResumeFunctionCC()
◆ getResumeFunctionType()
| FunctionType * llvm::coro::Shape::getResumeFunctionType ( ) const | inline |
|---|
Definition at line 195 of file CoroShape.h.
References ABI, llvm::coro::Async, FrameTy, llvm::FunctionType::get(), llvm::PointerType::getUnqual(), llvm::Type::getVoidTy(), llvm_unreachable, llvm::coro::Retcon, RetconLowering, llvm::coro::RetconOnce, and llvm::coro::Switch.
Referenced by createCloneDeclaration(), and replaceFallthroughCoroEnd().
◆ getRetconCoroId()
◆ getRetconResultTypes()
| ArrayRef< Type * > llvm::coro::Shape::getRetconResultTypes ( ) const | inline |
|---|
◆ getRetconResumeTypes()
| ArrayRef< Type * > llvm::coro::Shape::getRetconResumeTypes ( ) const | inline |
|---|
◆ getSwitchCoroId()
| CoroIdInst * llvm::coro::Shape::getSwitchCoroId ( ) const | inline |
|---|
◆ getSwitchIndexField()
| unsigned llvm::coro::Shape::getSwitchIndexField ( ) const | inline |
|---|
◆ getSwitchResumePointerType()
| PointerType * llvm::coro::Shape::getSwitchResumePointerType ( ) const | inline |
|---|
◆ initABI()
| LLVM_ABI void llvm::coro::Shape::initABI | ( | ) |
|---|
◆ invalidateCoroutine()
◆ [union]
◆ ABI
Definition at line 114 of file CoroShape.h.
Referenced by analyze(), buildFrameDebugInfo(), buildFrameType(), collectFrameAlloca(), createCloneDeclaration(), CreateNewABI(), doSplitCoroutine(), emitAlloc(), emitDealloc(), getAsyncCoroId(), getIndexType(), getPromiseAlloca(), getResumeFunctionCC(), getResumeFunctionType(), getRetconCoroId(), getRetconResultTypes(), getRetconResumeTypes(), getSwitchCoroId(), getSwitchIndexField(), getSwitchResumePointerType(), handleNoSuspendCoroutine(), insertSpills(), markCoroutineAsDone(), maybeFreeRetconStorage(), llvm::coro::normalizeCoroutine(), removeCoroEndsFromRampFunction(), replaceFallthroughCoroEnd(), replaceFrameSizeAndAlignment(), replaceSwiftErrorOps(), replaceUnwindCoroEnd(), llvm::CoroSplitPass::run(), simplifySuspendPoints(), updateAsyncFuncPointerContextSize(), and updateCallGraphAfterCoroutineSplit().
◆ AllocaSpillBlock
BasicBlock* llvm::coro::Shape::AllocaSpillBlock = nullptr
◆ AsyncLowering
◆ CoroAligns
◆ CoroAwaitSuspends
◆ CoroBegin
Definition at line 54 of file CoroShape.h.
Referenced by analyze(), cleanCoroutine(), clear(), llvm::coro::collectSpillsAndAllocasFromInsts(), CreateNewABI(), doSplitCoroutine(), getAsyncCoroId(), getRetconCoroId(), getRetconResultTypes(), llvm::coro::getSpillInsertionPt(), getSwitchCoroId(), handleNoSuspendCoroutine(), insertSpills(), invalidateCoroutine(), llvm::CoroSplitPass::run(), Shape(), and simplifySuspendPoints().
◆ CoroEnds
◆ CoroIsInRampInsts
◆ CoroSizes
◆ CoroSuspends
Definition at line 59 of file CoroShape.h.
Referenced by analyze(), buildFrameType(), clear(), collectFrameAlloca(), doSplitCoroutine(), eliminateSwiftErrorArgument(), invalidateCoroutine(), markCoroutineAsDone(), llvm::coro::normalizeCoroutine(), replaceSwiftErrorOps(), llvm::CoroSplitPass::run(), simplifySuspendPoints(), and sinkLifetimeStartMarkers().
◆ FrameAlign
Align llvm::coro::Shape::FrameAlign
◆ FramePtr
Value* llvm::coro::Shape::FramePtr = nullptr
◆ FrameSize
uint64_t llvm::coro::Shape::FrameSize = 0
◆ FrameTy
◆ RetconLowering
◆ SwiftErrorOps
◆ SwitchLowering
◆ SymmetricTransfers
The documentation for this struct was generated from the following files:
- include/llvm/Transforms/Coroutines/CoroShape.h
- lib/Transforms/Coroutines/Coroutines.cpp