LLVM 17.0.0git
|
Classes | |
struct | LowererBase |
struct | Shape |
Enumerations | |
enum class | ABI { Switch , Retcon , RetconOnce , Async } |
Functions | |
bool | declaresAnyIntrinsic (const Module &M) |
bool | declaresIntrinsics (const Module &M, const std::initializer_list< StringRef >) |
void | replaceCoroFree (CoroIdInst *CoroId, bool Elide) |
void | salvageDebugInfo (SmallDenseMap< Argument *, AllocaInst *, 4 > &ArgToAllocaMap, DbgVariableIntrinsic *DVI, bool OptimizeFrame) |
Attempts to rewrite the location operand of debug intrinsics in terms of the coroutine frame pointer, folding pointer offsets into the DIExpression of the intrinsic. | |
bool | defaultMaterializable (Instruction &V) |
Default materializable callback. | |
void | buildCoroutineFrame (Function &F, Shape &Shape, const std::function< bool(Instruction &)> &MaterializableCallback) |
CallInst * | createMustTailCall (DebugLoc Loc, Function *MustTailCallFn, ArrayRef< Value * > Arguments, IRBuilder<> &) |
|
strong |
Definition at line 49 of file CoroInternal.h.
void llvm::coro::buildCoroutineFrame | ( | Function & | F, |
Shape & | Shape, | ||
const std::function< bool(Instruction &)> & | MaterializableCallback | ||
) |
Definition at line 2990 of file CoroFrame.cpp.
References A, llvm::coro::Shape::ABI, Arguments, Builder, buildFrameDebugInfo(), buildFrameType(), cleanupSinglePredPHIs(), llvm::CoroIdInst::clearPromise(), collectFrameAlloca(), llvm::coro::Shape::CoroBegin, llvm::coro::Shape::CoroEnds, llvm::coro::Shape::CoroSuspends, createFramePtr(), createMustTailCall(), doRematerializations(), llvm::ArrayRef< T >::drop_front(), dumpAllocas(), dumpSpills(), eliminateSwiftError(), F, llvm::findDbgValues(), llvm::coro::Shape::FrameTy, llvm::coro::Shape::getSwitchCoroId(), I, insertSpills(), instructions, isCoroutineStructureIntrinsic(), isLocalAlloca(), LLVM_DEBUG, lowerLocalAllocas(), lowerNonLocalAlloca(), llvm::coro::Shape::SwitchLoweringStorage::PromiseAlloca, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::report_fatal_error(), rewritePHIs(), sinkLifetimeStartMarkers(), sinkSpillUsesAfterCoroBegin(), splitAround(), and llvm::coro::Shape::SwitchLowering.
CallInst * llvm::coro::createMustTailCall | ( | DebugLoc | Loc, |
Function * | MustTailCallFn, | ||
ArrayRef< Value * > | Arguments, | ||
IRBuilder<> & | Builder | ||
) |
Definition at line 1683 of file CoroSplit.cpp.
References Arguments, Builder, coerceArguments(), llvm::Function::getCallingConv(), llvm::Function::getFunctionType(), and llvm::CallInst::TCK_MustTail.
Referenced by buildCoroutineFrame(), and splitAsyncCoroutine().
Definition at line 105 of file Coroutines.cpp.
References assert(), CoroIntrinsics, isCoroutineIntrinsicName(), and Name.
Referenced by llvm::CoroConditionalWrapper::run().
bool llvm::coro::declaresIntrinsics | ( | const Module & | M, |
const std::initializer_list< StringRef > | List | ||
) |
Definition at line 117 of file Coroutines.cpp.
References assert(), isCoroutineIntrinsicName(), llvm::List, and Name.
Referenced by declaresCoroCleanupIntrinsics(), declaresCoroEarlyIntrinsics(), and declaresCoroElideIntrinsics().
bool llvm::coro::defaultMaterializable | ( | Instruction & | V | ) |
Default materializable callback.
Definition at line 2245 of file CoroFrame.cpp.
void llvm::coro::replaceCoroFree | ( | CoroIdInst * | CoroId, |
bool | Elide | ||
) |
Definition at line 130 of file Coroutines.cpp.
References llvm::SmallVectorBase< Size_T >::empty(), llvm::SmallVectorTemplateCommon< T, typename >::front(), llvm::ConstantPointerNull::get(), llvm::Value::getContext(), llvm::Type::getInt8PtrTy(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), and llvm::Value::users().
Referenced by handleNoSuspendCoroutine().
void llvm::coro::salvageDebugInfo | ( | SmallDenseMap< Argument *, AllocaInst *, 4 > & | ArgToAllocaMap, |
DbgVariableIntrinsic * | DVI, | ||
bool | OptimizeFrame | ||
) |
Attempts to rewrite the location operand of debug intrinsics in terms of the coroutine frame pointer, folding pointer offsets into the DIExpression of the intrinsic.
If the frame pointer is an Argument, store it into an alloca if OptimizeFrame is false.
Definition at line 2832 of file CoroFrame.cpp.
References llvm::DIExpression::appendOpsToArg(), Builder, llvm::DIExpression::DerefBefore, llvm::SmallVectorBase< Size_T >::empty(), llvm::DIExpression::EntryValue, F, llvm::DbgVariableIntrinsic::getExpression(), llvm::Instruction::getFunction(), llvm::Value::getName(), llvm::DIExpression::getNumLocationOperands(), llvm::Value::getType(), llvm::DbgVariableIntrinsic::getVariableLocationOp(), I, llvm::DIExpression::isEntryValue(), llvm::Instruction::moveBefore(), llvm::DIExpression::prepend(), llvm::DbgVariableIntrinsic::replaceVariableLocationOp(), llvm::salvageDebugInfoImpl(), and llvm::DbgVariableIntrinsic::setExpression().
Referenced by insertSpills(), and splitCoroutine().