Olivier Deprez | f4ef2d0 | 2021-04-20 13:36:24 +0200 | [diff] [blame] | 1 | //===------ 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 | |
| 16 | namespace llvm { |
| 17 | class StringRef; |
| 18 | class ModulePass; |
| 19 | } // namespace llvm |
| 20 | |
| 21 | namespace 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. |
| 31 | llvm::ModulePass *createDumpModulePass(llvm::StringRef Filename, bool IsSuffix); |
| 32 | } // namespace polly |
| 33 | |
| 34 | namespace llvm { |
| 35 | class PassRegistry; |
| 36 | void initializeDumpModulePass(llvm::PassRegistry &); |
| 37 | } // namespace llvm |
| 38 | |
| 39 | #endif /* POLLY_SUPPORT_DUMPMODULEPASS_H */ |