[Alignment][NFC] Migrate Instructions to Align
[llvm-core.git] / include / llvm / Transforms / Coroutines.h
blob9df3ec0f3ef4f4162a7c81009024eea61b8f4866
1 //===-- Coroutines.h - Coroutine Transformations ----------------*- C++ -*-===//
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 // Declare accessor functions for coroutine lowering passes.
9 //===----------------------------------------------------------------------===//
11 #ifndef LLVM_TRANSFORMS_COROUTINES_H
12 #define LLVM_TRANSFORMS_COROUTINES_H
14 namespace llvm {
16 class Pass;
17 class PassManagerBuilder;
19 /// Add all coroutine passes to appropriate extension points.
20 void addCoroutinePassesToExtensionPoints(PassManagerBuilder &Builder);
22 /// Lower coroutine intrinsics that are not needed by later passes.
23 Pass *createCoroEarlyPass();
25 /// Split up coroutines into multiple functions driving their state machines.
26 Pass *createCoroSplitPass();
28 /// Analyze coroutines use sites, devirtualize resume/destroy calls and elide
29 /// heap allocation for coroutine frame where possible.
30 Pass *createCoroElidePass();
32 /// Lower all remaining coroutine intrinsics.
33 Pass *createCoroCleanupPass();
37 #endif