LLVM
10.0.0svn
|
#include "Transforms/Coroutines/CoroInternal.h"
Classes | |
struct | RetconLoweringStorage |
struct | SwitchFieldIndex |
struct | SwitchLoweringStorage |
Public Member Functions | |
CoroIdInst * | getSwitchCoroId () const |
AnyCoroIdRetconInst * | getRetconCoroId () const |
IntegerType * | getIndexType () const |
ConstantInt * | getIndex (uint64_t Value) const |
PointerType * | getSwitchResumePointerType () const |
FunctionType * | getResumeFunctionType () const |
ArrayRef< Type * > | getRetconResultTypes () const |
ArrayRef< Type * > | getRetconResumeTypes () const |
CallingConv::ID | getResumeFunctionCC () const |
unsigned | getFirstSpillFieldIndex () const |
AllocaInst * | getPromiseAlloca () const |
Value * | emitAlloc (IRBuilder<> &Builder, Value *Size, CallGraph *CG) const |
Allocate memory according to the rules of the active lowering. More... | |
void | emitDealloc (IRBuilder<> &Builder, Value *Ptr, CallGraph *CG) const |
Deallocate memory according to the rules of the active lowering. More... | |
Shape ()=default | |
Shape (Function &F) | |
void | buildFrom (Function &F) |
Public Attributes | |
CoroBeginInst * | CoroBegin |
SmallVector< CoroEndInst *, 4 > | CoroEnds |
SmallVector< CoroSizeInst *, 2 > | CoroSizes |
SmallVector< AnyCoroSuspendInst *, 4 > | CoroSuspends |
SmallVector< CallInst *, 2 > | SwiftErrorOps |
coro::ABI | ABI |
StructType * | FrameTy |
Instruction * | FramePtr |
BasicBlock * | AllocaSpillBlock |
union { | |
SwitchLoweringStorage SwitchLowering | |
RetconLoweringStorage RetconLowering | |
}; | |
Definition at line 87 of file CoroInternal.h.
|
default |
|
inlineexplicit |
Definition at line 234 of file CoroInternal.h.
References llvm::coro::buildCoroutineFrame(), and F().
void coro::Shape::buildFrom | ( | Function & | F | ) |
Definition at line 248 of file Coroutines.cpp.
References llvm::changeToUnreachable(), clear(), createCoroSave(), llvm::Type::dump(), llvm::Value::dump(), llvm::dyn_cast(), E, llvm::AttributeList::FunctionIndex, llvm::UndefValue::get(), llvm::Function::getContext(), llvm::Type::getInt8PtrTy(), I, llvm::instructions(), llvm::CastInst::isBitCastable(), llvm::Type::isVoidTy(), llvm_unreachable, llvm::NoAlias, llvm::NVPTXISD::Prototype, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::SmallVectorTemplateBase< T >::push_back(), llvm::report_fatal_error(), llvm::coro::Retcon, llvm::coro::RetconOnce, llvm::AttributeList::ReturnIndex, SI, llvm::ArrayRef< T >::size(), std::swap(), llvm::coro::Switch, and llvm::RegState::Undef.
Allocate memory according to the rules of the active lowering.
CG | - if non-null, will be updated for the new call |
Definition at line 498 of file Coroutines.cpp.
References llvm_unreachable, llvm::coro::Retcon, llvm::coro::RetconOnce, and llvm::coro::Switch.
Referenced by splitRetconCoroutine().
Deallocate memory according to the rules of the active lowering.
CG | - if non-null, will be updated for the new call |
Definition at line 519 of file Coroutines.cpp.
References addCallToCallGraph(), llvm::IRBuilder< T, Inserter >::CreateBitCast(), llvm::IRBuilder< T, Inserter >::CreateCall(), LLVM_ATTRIBUTE_NORETURN, llvm_unreachable, propagateCallAttrsFromCallee(), llvm::coro::Retcon, llvm::coro::RetconOnce, and llvm::coro::Switch.
Referenced by maybeFreeRetconStorage().
|
inline |
Definition at line 205 of file CoroInternal.h.
References llvm_unreachable, llvm::coro::Retcon, llvm::coro::RetconOnce, and llvm::coro::Switch.
|
inline |
Definition at line 148 of file CoroInternal.h.
References llvm::ConstantInt::get().
Referenced by createResumeEntryBlock().
|
inline |
Definition at line 143 of file CoroInternal.h.
References assert(), llvm::StructType::getElementType(), and llvm::coro::Switch.
Referenced by createResumeEntryBlock().
|
inline |
Definition at line 217 of file CoroInternal.h.
References Size, and llvm::coro::Switch.
Referenced by buildFrameType(), and insertSpills().
|
inline |
Definition at line 193 of file CoroInternal.h.
References llvm::CallingConv::Fast, llvm_unreachable, llvm::coro::Retcon, llvm::coro::RetconOnce, and llvm::coro::Switch.
|
inline |
Definition at line 158 of file CoroInternal.h.
References llvm_unreachable, llvm::coro::Retcon, llvm::coro::RetconOnce, and llvm::coro::Switch.
Referenced by createCloneDeclaration().
|
inline |
Definition at line 137 of file CoroInternal.h.
References assert(), llvm::CoroBeginInst::getId(), llvm::coro::Retcon, and llvm::coro::RetconOnce.
Referenced by buildFrameType().
Definition at line 171 of file CoroInternal.h.
References assert(), llvm::Instruction::getFunction(), llvm::Function::getFunctionType(), llvm::coro::Retcon, and llvm::coro::RetconOnce.
Referenced by splitRetconCoroutine().
Definition at line 184 of file CoroInternal.h.
References assert(), llvm::coro::Retcon, and llvm::coro::RetconOnce.
|
inline |
Definition at line 132 of file CoroInternal.h.
References assert(), llvm::CoroBeginInst::getId(), and llvm::coro::Switch.
Referenced by llvm::coro::buildCoroutineFrame(), setCoroInfo(), and updateCoroFrame().
|
inline |
Definition at line 152 of file CoroInternal.h.
References assert(), llvm::StructType::getElementType(), and llvm::coro::Switch.
union { ... } |
coro::ABI llvm::coro::Shape::ABI |
Definition at line 106 of file CoroInternal.h.
Referenced by llvm::coro::buildCoroutineFrame(), buildFrameType(), createResumeEntryBlock(), handleNoSuspendCoroutine(), insertSpills(), maybeFreeRetconStorage(), setCoroInfo(), simplifySuspendPoints(), splitCoroutine(), splitRetconCoroutine(), splitSwitchCoroutine(), and updateCoroFrame().
BasicBlock* llvm::coro::Shape::AllocaSpillBlock |
Definition at line 110 of file CoroInternal.h.
Referenced by clear(), and insertSpills().
CoroBeginInst* llvm::coro::Shape::CoroBegin |
Definition at line 88 of file CoroInternal.h.
Referenced by llvm::coro::buildCoroutineFrame(), clear(), handleNoSuspendCoroutine(), insertSpills(), simplifySuspendPoints(), splitCoroutine(), and splitRetconCoroutine().
SmallVector<CoroEndInst *, 4> llvm::coro::Shape::CoroEnds |
Definition at line 89 of file CoroInternal.h.
Referenced by llvm::coro::buildCoroutineFrame(), and clear().
SmallVector<CoroSizeInst *, 2> llvm::coro::Shape::CoroSizes |
Definition at line 90 of file CoroInternal.h.
Referenced by clear(), and replaceFrameSize().
SmallVector<AnyCoroSuspendInst *, 4> llvm::coro::Shape::CoroSuspends |
Definition at line 91 of file CoroInternal.h.
Referenced by llvm::coro::buildCoroutineFrame(), buildFrameType(), clear(), createResumeEntryBlock(), eliminateSwiftErrorArgument(), simplifySuspendPoints(), splitCoroutine(), and splitRetconCoroutine().
Instruction* llvm::coro::Shape::FramePtr |
Definition at line 109 of file CoroInternal.h.
Referenced by clear(), createResumeEntryBlock(), splitRetconCoroutine(), and updateCoroFrame().
StructType* llvm::coro::Shape::FrameTy |
Definition at line 108 of file CoroInternal.h.
Referenced by clear(), createResumeEntryBlock(), handleNoSuspendCoroutine(), insertSpills(), replaceFrameSize(), splitRetconCoroutine(), and updateCoroFrame().
RetconLoweringStorage llvm::coro::Shape::RetconLowering |
Definition at line 129 of file CoroInternal.h.
Referenced by buildFrameType(), maybeFreeRetconStorage(), and splitRetconCoroutine().
SmallVector<CallInst*, 2> llvm::coro::Shape::SwiftErrorOps |
Definition at line 92 of file CoroInternal.h.
Referenced by emitGetSwiftErrorValue(), emitSetSwiftErrorValue(), and replaceSwiftErrorOps().
SwitchLoweringStorage llvm::coro::Shape::SwitchLowering |
Definition at line 128 of file CoroInternal.h.
Referenced by llvm::coro::buildCoroutineFrame(), and createResumeEntryBlock().