Polly 22.0.0git
DumpFunctionPass.h
Go to the documentation of this file.
1//===------ DumpFunctionPass.cpp --------------------------------*- 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//
9// Write a function to a file.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef POLLY_SUPPORT_DUMPFUNCTIONPASS_H
14#define POLLY_SUPPORT_DUMPFUNCTIONPASS_H
15
16#include "llvm/IR/PassManager.h"
17#include <string>
18
19namespace polly {
20
21/// A pass that isolates a function into a new Module and writes it into a file.
22struct DumpFunctionPass final : llvm::PassInfoMixin<DumpFunctionPass> {
23 std::string Suffix;
24
25 DumpFunctionPass(std::string Suffix) : Suffix(std::move(Suffix)) {}
26
27 llvm::PreservedAnalyses run(llvm::Function &F,
28 llvm::FunctionAnalysisManager &AM);
29};
30} // namespace polly
31
32#endif /* POLLY_SUPPORT_DUMPFUNCTIONPASS_H */
DumpFunctionPass(std::string Suffix)
llvm::PreservedAnalyses run(llvm::Function &F, llvm::FunctionAnalysisManager &AM)