[RISCV] Fix mgather -> riscv.masked.strided.load combine not extending indices (...
[llvm-project.git] / llvm / lib / Transforms / Coroutines / CoroConditionalWrapper.cpp
blob3e71e58bb1de46133e1e6f6e100f51977dbe75f8
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 //===----------------------------------------------------------------------===//
9 #include "llvm/Transforms/Coroutines/CoroConditionalWrapper.h"
10 #include "CoroInternal.h"
11 #include "llvm/IR/Module.h"
13 using namespace llvm;
15 CoroConditionalWrapper::CoroConditionalWrapper(ModulePassManager &&PM)
16 : PM(std::move(PM)) {}
18 PreservedAnalyses CoroConditionalWrapper::run(Module &M,
19 ModuleAnalysisManager &AM) {
20 if (!coro::declaresAnyIntrinsic(M))
21 return PreservedAnalyses::all();
23 return PM.run(M, AM);
26 void CoroConditionalWrapper::printPipeline(
27 raw_ostream &OS, function_ref<StringRef(StringRef)> MapClassName2PassName) {
28 OS << "coro-cond";
29 OS << '(';
30 PM.printPipeline(OS, MapClassName2PassName);
31 OS << ')';