blob: 8299cfde28b9f843edcc70ebfdd95a7583fc6fcd [file] [log] [blame]
Olivier Deprezf4ef2d02021-04-20 13:36:24 +02001//===------ DumpModulePass.h ------------------------------------*- 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 module to a file.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef POLLY_SUPPORT_DUMPMODULEPASS_H
14#define POLLY_SUPPORT_DUMPMODULEPASS_H
15
16namespace llvm {
17class StringRef;
18class ModulePass;
19} // namespace llvm
20
21namespace polly {
22/// Create a pass that prints the module into a file.
23///
24/// The meaning of @p Filename depends on @p IsSuffix. If IsSuffix==false, then
25/// the module is written to the @p Filename. If it is true, the filename is
26/// generated from the module's name, @p Filename with an '.ll' extension.
27///
28/// The intent of IsSuffix is to avoid the file being overwritten when
29/// processing multiple modules and/or with multiple dump passes in the
30/// pipeline.
31llvm::ModulePass *createDumpModulePass(llvm::StringRef Filename, bool IsSuffix);
32} // namespace polly
33
34namespace llvm {
35class PassRegistry;
36void initializeDumpModulePass(llvm::PassRegistry &);
37} // namespace llvm
38
39#endif /* POLLY_SUPPORT_DUMPMODULEPASS_H */