[Alignment][NFC] Support compile time constants
[llvm-core.git] / include / llvm / Analysis / RegionPrinter.h
blob154ac35c486adb10c04fdbceea72a2d7566c7370
1 //===-- RegionPrinter.h - Region printer external interface -----*- 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 // This file defines external functions that can be called to explicitly
10 // instantiate the region printer.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_ANALYSIS_REGIONPRINTER_H
15 #define LLVM_ANALYSIS_REGIONPRINTER_H
17 namespace llvm {
18 class FunctionPass;
19 class Function;
20 class RegionInfo;
22 FunctionPass *createRegionViewerPass();
23 FunctionPass *createRegionOnlyViewerPass();
24 FunctionPass *createRegionPrinterPass();
25 FunctionPass *createRegionOnlyPrinterPass();
27 #ifndef NDEBUG
28 /// Open a viewer to display the GraphViz vizualization of the analysis
29 /// result.
30 ///
31 /// Practical to call in the debugger.
32 /// Includes the instructions in each BasicBlock.
33 ///
34 /// @param RI The analysis to display.
35 void viewRegion(llvm::RegionInfo *RI);
37 /// Analyze the regions of a function and open its GraphViz
38 /// visualization in a viewer.
39 ///
40 /// Useful to call in the debugger.
41 /// Includes the instructions in each BasicBlock.
42 /// The result of a new analysis may differ from the RegionInfo the pass
43 /// manager currently holds.
44 ///
45 /// @param F Function to analyze.
46 void viewRegion(const llvm::Function *F);
48 /// Open a viewer to display the GraphViz vizualization of the analysis
49 /// result.
50 ///
51 /// Useful to call in the debugger.
52 /// Shows only the BasicBlock names without their instructions.
53 ///
54 /// @param RI The analysis to display.
55 void viewRegionOnly(llvm::RegionInfo *RI);
57 /// Analyze the regions of a function and open its GraphViz
58 /// visualization in a viewer.
59 ///
60 /// Useful to call in the debugger.
61 /// Shows only the BasicBlock names without their instructions.
62 /// The result of a new analysis may differ from the RegionInfo the pass
63 /// manager currently holds.
64 ///
65 /// @param F Function to analyze.
66 void viewRegionOnly(const llvm::Function *F);
67 #endif
68 } // End llvm namespace
70 #endif