LLVM 20.0.0git
CoroAnnotationElide.h
Go to the documentation of this file.
1//===- CoroAnnotationElide.h - Elide attributed safe coroutine calls ------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// \file
10// This pass transforms all Call or Invoke instructions that are annotated
11// "coro_elide_safe" to call the `.noalloc` variant of coroutine instead.
12// The frame of the callee coroutine is allocated inside the caller. A pointer
13// to the allocated frame will be passed into the `.noalloc` ramp function.
14//
15//===----------------------------------------------------------------------===//
16
17#ifndef LLVM_TRANSFORMS_COROUTINES_COROANNOTATIONELIDE_H
18#define LLVM_TRANSFORMS_COROUTINES_COROANNOTATIONELIDE_H
19
22#include "llvm/IR/PassManager.h"
23
24namespace llvm {
25
26struct CoroAnnotationElidePass : PassInfoMixin<CoroAnnotationElidePass> {
28
31
32 static bool isRequired() { return false; }
33};
34} // end namespace llvm
35
36#endif // LLVM_TRANSFORMS_COROUTINES_COROANNOTATIONELIDE_H
This header provides classes for managing passes over SCCs of the call graph.
This header defines various interfaces for pass management in LLVM.
Implements a lazy call graph analysis and related passes for the new pass manager.
A container for analyses that lazily runs them and caches their results.
Definition: PassManager.h:253
An SCC of the call graph.
A lazily constructed view of the call graph of a module.
A set of analyses that are preserved following a run of a transformation pass.
Definition: Analysis.h:111
@ C
The default llvm calling convention, compatible with C.
Definition: CallingConv.h:34
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
Support structure for SCC passes to communicate updates the call graph back to the CGSCC pass manager...
PreservedAnalyses run(LazyCallGraph::SCC &C, CGSCCAnalysisManager &AM, LazyCallGraph &CG, CGSCCUpdateResult &UR)
A CRTP mix-in to automatically provide informational APIs needed for passes.
Definition: PassManager.h:69