LLVM 20.0.0git
CoroConditionalWrapper.cpp
Go to the documentation of this file.
1//===- CoroConditionalWrapper.cpp -----------------------------------------===//
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
10#include "CoroInternal.h"
11#include "llvm/IR/Module.h"
12
13using namespace llvm;
14
16 : PM(std::move(PM)) {}
17
22
23 return PM.run(M, AM);
24}
25
27 raw_ostream &OS, function_ref<StringRef(StringRef)> MapClassName2PassName) {
28 OS << "coro-cond";
29 OS << '(';
30 PM.printPipeline(OS, MapClassName2PassName);
31 OS << ')';
32}
Module.h This file contains the declarations for the Module class.
raw_pwrite_stream & OS
A container for analyses that lazily runs them and caches their results.
Definition: PassManager.h:253
A Module instance is used to store all the information related to an LLVM module.
Definition: Module.h:65
void printPipeline(raw_ostream &OS, function_ref< StringRef(StringRef)> MapClassName2PassName)
Definition: PassManager.h:178
PreservedAnalyses run(IRUnitT &IR, AnalysisManagerT &AM, ExtraArgTs... ExtraArgs)
Run all of the passes in this manager over the given unit of IR.
A set of analyses that are preserved following a run of a transformation pass.
Definition: Analysis.h:111
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
Definition: Analysis.h:117
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
An efficient, type-erasing, non-owning reference to a callable.
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:52
bool declaresAnyIntrinsic(const Module &M)
Definition: Coroutines.cpp:103
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Definition: STLExtras.h:1856
Implement std::hash so that hash_code can be used in STL containers.
Definition: BitVector.h:858
PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM)
void printPipeline(raw_ostream &OS, function_ref< StringRef(StringRef)> MapClassName2PassName)
CoroConditionalWrapper(ModulePassManager &&)