blob: ef05f549fbc199d0c9e5ef07f8d302fb0f24d304 [file] [log] [blame]
//===-- Coroutines.h - Coroutine Transformations ----------------*- C++ -*-===//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
// Declare accessor functions for coroutine lowering passes.
namespace llvm {
class Pass;
class PassManagerBuilder;
/// Add all coroutine passes to appropriate extension points.
void addCoroutinePassesToExtensionPoints(PassManagerBuilder &Builder);
/// Lower coroutine intrinsics that are not needed by later passes.
Pass *createCoroEarlyLegacyPass();
/// Split up coroutines into multiple functions driving their state machines.
Pass *createCoroSplitLegacyPass();
/// Analyze coroutines use sites, devirtualize resume/destroy calls and elide
/// heap allocation for coroutine frame where possible.
Pass *createCoroElideLegacyPass();
/// Lower all remaining coroutine intrinsics.
Pass *createCoroCleanupLegacyPass();