• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/contrib/llvm-project/llvm/lib/Transforms/Coroutines/

Lines Matching refs:coro

94 coro::LowererBase::LowererBase(Module &M)
102 // llvm.coro.subfn.addr. It generates the following sequence:
104 // call i8* @llvm.coro.subfn.addr(i8* %Arg, i8 %index)
107 Value *coro::LowererBase::makeSubFnCall(Value *Arg, int Index,
126 "llvm.coro.alloc",
127 "llvm.coro.begin",
128 "llvm.coro.destroy",
129 "llvm.coro.done",
130 "llvm.coro.end",
131 "llvm.coro.frame",
132 "llvm.coro.free",
133 "llvm.coro.id",
134 "llvm.coro.id.retcon",
135 "llvm.coro.id.retcon.once",
136 "llvm.coro.noop",
137 "llvm.coro.param",
138 "llvm.coro.prepare.retcon",
139 "llvm.coro.promise",
140 "llvm.coro.resume",
141 "llvm.coro.save",
142 "llvm.coro.size",
143 "llvm.coro.subfn.addr",
144 "llvm.coro.suspend",
145 "llvm.coro.suspend.retcon",
153 bool coro::declaresIntrinsics(const Module &M,
164 // Replace all coro.frees associated with the provided CoroId either with 'null'
166 void coro::replaceCoroFree(CoroIdInst *CoroId, bool Elide) {
207 void coro::updateCallGraph(Function &ParentFunc, ArrayRef<Function *> NewFuncs,
225 static void clear(coro::Shape &Shape) {
248 void coro::Shape::buildFrom(Function &F) {
292 // Ignore coro id's that aren't pre-split.
299 "coroutine should have exactly one defining @llvm.coro.begin");
310 // Make sure that the fallthrough coro.end is the first element in the
315 "Only one coro.end can be marked as fallthrough");
324 // If for some reason, we were not able to find coro.begin, bailout.
326 // Replace coro.frame which are supposed to be lowered to the result of
327 // coro.begin with undef.
334 // Replace all coro.suspend with undef and remove related coro.saves if
343 // Replace all coro.ends with unreachable instruction.
354 this->ABI = coro::ABI::Switch;
366 report_fatal_error("coro.id must be paired with coro.suspend");
380 ? coro::ABI::Retcon
381 : coro::ABI::RetconOnce);
400 report_fatal_error("coro.id.retcon.* must be paired with "
401 "coro.suspend.retcon");
423 report_fatal_error("argument to coro.suspend.retcon does not "
432 report_fatal_error("wrong number of arguments to coro.suspend.retcon");
451 report_fatal_error("wrong number of results from coro.suspend.retcon");
459 report_fatal_error("result from coro.suspend.retcon does not "
468 llvm_unreachable("coro.begin is not dependent on a coro.id call");
471 // The coro.free intrinsic is always lowered to the result of coro.begin.
478 if (ABI == coro::ABI::Switch &&
483 // Remove orphaned coro.saves.
498 Value *coro::Shape::emitAlloc(IRBuilder<> &Builder, Value *Size,
501 case coro::ABI::Switch:
502 llvm_unreachable("can't allocate memory in coro switch-lowering");
504 case coro::ABI::Retcon:
505 case coro::ABI::RetconOnce: {
516 llvm_unreachable("Unknown coro::ABI enum");
519 void coro::Shape::emitDealloc(IRBuilder<> &Builder, Value *Ptr,
522 case coro::ABI::Switch:
523 llvm_unreachable("can't allocate memory in coro switch-lowering");
525 case coro::ABI::Retcon:
526 case coro::ABI::RetconOnce: {
536 llvm_unreachable("Unknown coro::ABI enum");
553 /// llvm.coro.id.retcon.* intrinsics.
557 fail(I, "llvm.coro.id.retcon.* prototype not a Function", V);
573 fail(I, "llvm.coro.id.retcon prototype must return pointer as first "
578 fail(I, "llvm.coro.id.retcon prototype return type must be same as"
581 // No meaningful validation to do here for llvm.coro.id.unique.once.
585 fail(I, "llvm.coro.id.retcon.* prototype must take pointer as "
593 fail(I, "llvm.coro.* allocator not a Function", V);
597 fail(I, "llvm.coro.* allocator must return a pointer", F);
601 fail(I, "llvm.coro.* allocator must take integer as only param", F);
608 fail(I, "llvm.coro.* deallocator not a Function", V);
612 fail(I, "llvm.coro.* deallocator must return void", F);
616 fail(I, "llvm.coro.* deallocator must take pointer as only param", F);
628 "size argument to coro.id.retcon.* must be constant");
630 "alignment argument to coro.id.retcon.* must be constant");