12 #ifndef LLVM_LIB_TRANSFORMS_COROUTINES_COROINTERNAL_H
13 #define LLVM_LIB_TRANSFORMS_COROUTINES_COROINTERNAL_H
38 #define CORO_PRESPLIT_ATTR "coroutine.presplit"
39 #define UNPREPARED_FOR_SPLIT "0"
40 #define PREPARED_FOR_SPLIT "1"
42 #define CORO_DEVIRT_TRIGGER_FN "coro.devirt.trigger"
79 LastKnownField = IndexField
90 assert(FrameTy &&
"frame type not assigned");
91 return cast<IntegerType>(FrameTy->getElementType(IndexField));
CoroBeginInst * CoroBegin
This represents the llvm.coro.alloc instruction.
void initializeCoroEarlyPass(PassRegistry &)
A Module instance is used to store all the information related to an LLVM module. ...
void initializeCoroElidePass(PassRegistry &)
ConstantInt * getIndex(uint64_t Value) const
PointerType *const Int8Ptr
Class to represent struct types.
void updateCallGraph(Function &Caller, ArrayRef< Function * > Funcs, CallGraph &CG, CallGraphSCC &SCC)
Class to represent function types.
void initializeCoroSplitPass(PassRegistry &)
FunctionType *const ResumeFnType
SmallVector< CoroSizeInst *, 2 > CoroSizes
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
SmallVector< CoroSuspendInst *, 4 > CoroSuspends
Class to represent pointers.
void replaceAllCoroFrees(CoroBeginInst *CB, Value *Replacement)
LLVM Basic Block Representation.
This is an important class for using LLVM in a threaded context.
#define LLVM_LIBRARY_VISIBILITY
LLVM_LIBRARY_VISIBILITY - If a class marked with this attribute is linked into a shared library...
Class to represent integer types.
void replaceAllCoroAllocs(CoroBeginInst *CB, bool Replacement)
This is the shared class of boolean and integer constants.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
A constant pointer value that points to null.
ConstantPointerNull *const NullPtr
void buildCoroutineFrame(Function &F, Shape &Shape)
static Constant * get(Type *Ty, uint64_t V, bool isSigned=false)
If Ty is a vector type, return a Constant with a splat of the given value.
This class represents the llvm.coro.begin instruction.
Value * makeSubFnCall(Value *Arg, int Index, Instruction *InsertPt)
void initializeCoroCleanupPass(PassRegistry &)
The basic data container for the call graph of a Module of IR.
SwitchInst * ResumeSwitch
IntegerType * getIndexType() const
void replaceCoroFree(CoroIdInst *CoroId, bool Elide)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
SmallVector< CoroEndInst *, 4 > CoroEnds
AllocaInst * PromiseAlloca
LLVM Value Representation.
CallGraphSCC - This is a single SCC that a CallGraphSCCPass is run on.
bool declaresIntrinsics(Module &M, std::initializer_list< StringRef >)
BasicBlock * AllocaSpillBlock
an instruction to allocate memory on the stack