LLVM 22.0.0git
Coroutines.cpp File Reference

Go to the source code of this file.

Functions

static CoroSaveInstcreateCoroSave (CoroBeginInst *CoroBegin, CoroSuspendInst *SuspendInst)
static void propagateCallAttrsFromCallee (CallInst *Call, Function *Callee)
static void addCallToCallGraph (CallGraph *CG, CallInst *Call, Function *Callee)
static void fail (const Instruction *I, const char *Reason, Value *V)
static void checkWFRetconPrototype (const AnyCoroIdRetconInst *I, Value *V)
 Check that the given value is a well-formed prototype for the llvm.coro.id.retcon.
static void checkWFAlloc (const Instruction *I, Value *V)
 Check that the given value is a well-formed allocator.
static void checkWFDealloc (const Instruction *I, Value *V)
 Check that the given value is a well-formed deallocator.
static void checkConstantInt (const Instruction *I, Value *V, const char *Reason)
static void checkAsyncFuncPointer (const Instruction *I, Value *V)
static void checkAsyncContextProjectFunction (const Instruction *I, Function *F)

Variables

static Intrinsic::ID NonOverloadedCoroIntrinsics []

Function Documentation

◆ addCallToCallGraph()

void addCallToCallGraph ( CallGraph * CG,
CallInst * Call,
Function * Callee )
static

Definition at line 504 of file Coroutines.cpp.

References Call.

Referenced by llvm::coro::Shape::emitAlloc(), and llvm::coro::Shape::emitDealloc().

◆ checkAsyncContextProjectFunction()

void checkAsyncContextProjectFunction ( const Instruction * I,
Function * F )
static

Definition at line 667 of file Coroutines.cpp.

References llvm::cast(), F, fail(), and I.

Referenced by llvm::CoroSuspendAsyncInst::checkWellFormed().

◆ checkAsyncFuncPointer()

void checkAsyncFuncPointer ( const Instruction * I,
Value * V )
static

Definition at line 651 of file Coroutines.cpp.

References llvm::dyn_cast(), fail(), and I.

Referenced by llvm::CoroIdAsyncInst::checkWellFormed().

◆ checkConstantInt()

void checkConstantInt ( const Instruction * I,
Value * V,
const char * Reason )
static

◆ checkWFAlloc()

void checkWFAlloc ( const Instruction * I,
Value * V )
static

Check that the given value is a well-formed allocator.

Definition at line 605 of file Coroutines.cpp.

References llvm::dyn_cast(), F, fail(), and I.

Referenced by llvm::AnyCoroIdRetconInst::checkWellFormed().

◆ checkWFDealloc()

void checkWFDealloc ( const Instruction * I,
Value * V )
static

Check that the given value is a well-formed deallocator.

Definition at line 620 of file Coroutines.cpp.

References llvm::dyn_cast(), F, fail(), and I.

Referenced by llvm::AnyCoroIdRetconInst::checkWellFormed().

◆ checkWFRetconPrototype()

void checkWFRetconPrototype ( const AnyCoroIdRetconInst * I,
Value * V )
static

Check that the given value is a well-formed prototype for the llvm.coro.id.retcon.

  • intrinsics.

Definition at line 569 of file Coroutines.cpp.

References llvm::dyn_cast(), F, fail(), I, and llvm::isa().

Referenced by llvm::AnyCoroIdRetconInst::checkWellFormed().

◆ createCoroSave()

◆ fail()

void fail ( const Instruction * I,
const char * Reason,
Value * V )
static

Definition at line 554 of file Coroutines.cpp.

References llvm::errs(), I, and llvm::report_fatal_error().

◆ propagateCallAttrsFromCallee()

void propagateCallAttrsFromCallee ( CallInst * Call,
Function * Callee )
static

Definition at line 499 of file Coroutines.cpp.

References Call.

Referenced by llvm::coro::Shape::emitAlloc(), and llvm::coro::Shape::emitDealloc().

Variable Documentation

◆ NonOverloadedCoroIntrinsics

Intrinsic::ID NonOverloadedCoroIntrinsics[]
static

Definition at line 67 of file Coroutines.cpp.

Referenced by llvm::coro::declaresAnyIntrinsic().