|
LLVM 23.0.0git
|
#include "llvm/Transforms/Coroutines/CoroShape.h"
Classes | |
| struct | AsyncLoweringStorage |
| struct | RetconLoweringStorage |
| struct | SwitchLoweringStorage |
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 |
| 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.
|
default |
Referenced by doSplitCoroutine().
|
inlineexplicit |
Definition at line 253 of file CoroShape.h.
References analyze(), cleanCoroutine(), CoroBegin, F, and invalidateCoroutine().
| void coro::Shape::analyze | ( | Function & | F, |
| SmallVectorImpl< CoroFrameInst * > & | CoroFrames, | ||
| SmallVectorImpl< CoroSaveInst * > & | UnusedCoroSaves ) |
Definition at line 183 of file Coroutines.cpp.
References ABI, 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().
| void coro::Shape::cleanCoroutine | ( | SmallVectorImpl< CoroFrameInst * > & | CoroFrames, |
| SmallVectorImpl< CoroSaveInst * > & | UnusedCoroSaves ) |
Definition at line 471 of file Coroutines.cpp.
References llvm::SmallVectorImpl< T >::clear(), and CoroBegin.
Referenced by Shape().
|
inline |
Definition at line 66 of file CoroShape.h.
References AllocaSpillBlock, CoroAligns, CoroAwaitSuspends, CoroBegin, CoroEnds, CoroIsInRampInsts, CoroSizes, CoroSuspends, FramePtr, SwiftErrorOps, and SymmetricTransfers.
Referenced by analyze().
Allocate memory according to the rules of the active lowering.
| CG | - if non-null, will be updated for the new call |
Definition at line 497 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().
Deallocate memory according to the rules of the active lowering.
| CG | - if non-null, will be updated for the new call |
Definition at line 520 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().
|
inline |
Definition at line 154 of file CoroShape.h.
References ABI, assert(), llvm::coro::Async, llvm::cast(), and CoroBegin.
Referenced by analyze().
|
inline |
Definition at line 164 of file CoroShape.h.
References getIndexType().
Referenced by markCoroutineAsDone().
|
inline |
Definition at line 159 of file CoroShape.h.
References ABI, assert(), llvm::coro::Switch, and SwitchLowering.
Referenced by buildFrameDebugInfo(), and getIndex().
|
inline |
Definition at line 231 of file CoroShape.h.
References llvm::cast(), llvm::dyn_cast(), FramePtr, and I.
Referenced by buildFrameDebugInfo(), llvm::coro::getSpillInsertionPt(), and insertSpills().
|
inline |
Definition at line 225 of file CoroShape.h.
References ABI, llvm::coro::Switch, and SwitchLowering.
Referenced by buildFrameLayout().
|
inline |
Definition at line 211 of file CoroShape.h.
References ABI, llvm::coro::Async, AsyncLowering, llvm::CallingConv::Fast, llvm_unreachable, llvm::coro::Retcon, RetconLowering, llvm::coro::RetconOnce, and llvm::coro::Switch.
|
inline |
Definition at line 174 of file CoroShape.h.
References ABI, llvm::coro::Async, CoroBegin, 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().
|
inline |
Definition at line 149 of file CoroShape.h.
References ABI, assert(), llvm::cast(), CoroBegin, llvm::coro::Retcon, and llvm::coro::RetconOnce.
Referenced by analyze(), and buildFrameLayout().
Definition at line 191 of file CoroShape.h.
References ABI, llvm::ArrayRef(), assert(), CoroBegin, llvm::dyn_cast(), llvm::coro::Retcon, and llvm::coro::RetconOnce.
Definition at line 203 of file CoroShape.h.
References ABI, assert(), llvm::coro::Retcon, RetconLowering, and llvm::coro::RetconOnce.
|
inline |
Definition at line 144 of file CoroShape.h.
References ABI, assert(), llvm::cast(), CoroBegin, and llvm::coro::Switch.
Referenced by analyze(), handleNoSuspendCoroutine(), and llvm::coro::normalizeCoroutine().
|
inline |
Definition at line 168 of file CoroShape.h.
References ABI, assert(), CoroBegin, llvm::PointerType::getUnqual(), and llvm::coro::Switch.
Referenced by buildFrameDebugInfo(), buildFrameLayout(), and markCoroutineAsDone().
| void coro::Shape::invalidateCoroutine | ( | Function & | F, |
| SmallVectorImpl< CoroFrameInst * > & | CoroFrames ) |
Definition at line 341 of file Coroutines.cpp.
References assert(), llvm::changeToUnreachable(), CoroBegin, CoroEnds, CoroSuspends, F, llvm::PointerType::get(), llvm::PoisonValue::get(), and Poison.
Referenced by Shape().
| union { ... } llvm::coro::Shape |
| coro::ABI llvm::coro::Shape::ABI |
Definition at line 97 of file CoroShape.h.
Referenced by analyze(), buildFrameDebugInfo(), buildFrameLayout(), collectFrameAlloca(), createCloneDeclaration(), CreateNewABI(), doSplitCoroutine(), emitAlloc(), emitDealloc(), getAsyncCoroId(), getIndexType(), getPromiseAlloca(), getResumeFunctionCC(), getResumeFunctionType(), getRetconCoroId(), getRetconResultTypes(), getRetconResumeTypes(), getSwitchCoroId(), getSwitchResumePointerType(), handleNoSuspendCoroutine(), insertSpills(), markCoroutineAsDone(), maybeFreeRetconStorage(), llvm::coro::normalizeCoroutine(), removeCoroEndsFromRampFunction(), replaceFallthroughCoroEnd(), replaceFrameSizeAndAlignment(), replaceSwiftErrorOps(), replaceUnwindCoroEnd(), llvm::CoroSplitPass::run(), simplifySuspendPoints(), updateAsyncFuncPointerContextSize(), and updateCallGraphAfterCoroutineSplit().
| BasicBlock* llvm::coro::Shape::AllocaSpillBlock = nullptr |
Definition at line 102 of file CoroShape.h.
Referenced by clear(), and insertSpills().
| AsyncLoweringStorage llvm::coro::Shape::AsyncLowering |
Definition at line 141 of file CoroShape.h.
Referenced by analyze(), buildFrameLayout(), getResumeFunctionCC(), and updateAsyncFuncPointerContextSize().
| SmallVector<CoroAlignInst *, 2> llvm::coro::Shape::CoroAligns |
Definition at line 58 of file CoroShape.h.
Referenced by analyze(), clear(), and replaceFrameSizeAndAlignment().
| SmallVector<CoroAwaitSuspendInst *, 4> llvm::coro::Shape::CoroAwaitSuspends |
Definition at line 60 of file CoroShape.h.
Referenced by analyze(), clear(), and lowerAwaitSuspends().
| CoroBeginInst* llvm::coro::Shape::CoroBegin = nullptr |
Definition at line 54 of file CoroShape.h.
Referenced by analyze(), cleanCoroutine(), clear(), llvm::coro::collectSpillsAndAllocasFromInsts(), createGEPToFramePointer(), CreateNewABI(), createStoreIntoFrame(), doSplitCoroutine(), getAsyncCoroId(), getResumeFunctionType(), getRetconCoroId(), getRetconResultTypes(), llvm::coro::getSpillInsertionPt(), getSwitchCoroId(), getSwitchResumePointerType(), handleNoSuspendCoroutine(), insertSpills(), invalidateCoroutine(), llvm::CoroSplitPass::run(), Shape(), and simplifySuspendPoints().
| SmallVector<AnyCoroEndInst *, 4> llvm::coro::Shape::CoroEnds |
Definition at line 55 of file CoroShape.h.
Referenced by analyze(), clear(), eliminateSwiftErrorArgument(), invalidateCoroutine(), llvm::coro::normalizeCoroutine(), and removeCoroEndsFromRampFunction().
| SmallVector<CoroIsInRampInst *, 2> llvm::coro::Shape::CoroIsInRampInsts |
Definition at line 56 of file CoroShape.h.
Referenced by analyze(), clear(), and removeCoroIsInRampFromRampFunction().
| SmallVector<CoroSizeInst *, 2> llvm::coro::Shape::CoroSizes |
Definition at line 57 of file CoroShape.h.
Referenced by analyze(), clear(), and replaceFrameSizeAndAlignment().
| SmallVector<AnyCoroSuspendInst *, 4> llvm::coro::Shape::CoroSuspends |
Definition at line 59 of file CoroShape.h.
Referenced by analyze(), buildFrameLayout(), clear(), collectFrameAlloca(), doSplitCoroutine(), eliminateSwiftErrorArgument(), invalidateCoroutine(), markCoroutineAsDone(), llvm::coro::normalizeCoroutine(), replaceSwiftErrorOps(), llvm::CoroSplitPass::run(), simplifySuspendPoints(), and sinkLifetimeStartMarkers().
| Align llvm::coro::Shape::FrameAlign |
Definition at line 99 of file CoroShape.h.
Referenced by buildFrameDebugInfo(), buildFrameLayout(), handleNoSuspendCoroutine(), replaceFrameSizeAndAlignment(), and llvm::CoroSplitPass::run().
| Value* llvm::coro::Shape::FramePtr = nullptr |
Definition at line 101 of file CoroShape.h.
Referenced by buildFrameDebugInfo(), clear(), createGEPToFramePointer(), createStoreIntoFrame(), getInsertPtAfterFramePtr(), and removeCoroEndsFromRampFunction().
| uint64_t llvm::coro::Shape::FrameSize = 0 |
Definition at line 100 of file CoroShape.h.
Referenced by buildFrameDebugInfo(), buildFrameLayout(), handleNoSuspendCoroutine(), replaceFrameSizeAndAlignment(), and llvm::CoroSplitPass::run().
| RetconLoweringStorage llvm::coro::Shape::RetconLowering |
Definition at line 140 of file CoroShape.h.
Referenced by analyze(), buildFrameLayout(), emitAlloc(), emitDealloc(), getResumeFunctionCC(), getResumeFunctionType(), getRetconResumeTypes(), and maybeFreeRetconStorage().
| SmallVector<CallInst *, 2> llvm::coro::Shape::SwiftErrorOps |
Definition at line 64 of file CoroShape.h.
Referenced by clear(), emitGetSwiftErrorValue(), emitSetSwiftErrorValue(), and replaceSwiftErrorOps().
| SwitchLoweringStorage llvm::coro::Shape::SwitchLowering |
Definition at line 139 of file CoroShape.h.
Referenced by analyze(), buildFrameDebugInfo(), buildFrameLayout(), collectFrameAlloca(), createSwitchIndexPtr(), getIndexType(), getPromiseAlloca(), hasAccessingPromiseBeforeCB(), markCoroutineAsDone(), llvm::coro::normalizeCoroutine(), and simplifySuspendPoints().
| SmallVector<CallInst *, 2> llvm::coro::Shape::SymmetricTransfers |
Definition at line 61 of file CoroShape.h.
Referenced by clear(), and lowerAwaitSuspend().