1 //===-- RegionPrinter.h - Region printer external interface -----*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
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
22 FunctionPass
*createRegionViewerPass();
23 FunctionPass
*createRegionOnlyViewerPass();
24 FunctionPass
*createRegionPrinterPass();
25 FunctionPass
*createRegionOnlyPrinterPass();
28 /// Open a viewer to display the GraphViz vizualization of the analysis
31 /// Practical to call in the debugger.
32 /// Includes the instructions in each BasicBlock.
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.
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.
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
51 /// Useful to call in the debugger.
52 /// Shows only the BasicBlock names without their instructions.
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.
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.
65 /// @param F Function to analyze.
66 void viewRegionOnly(const llvm::Function
*F
);
68 } // End llvm namespace