LLVM 22.0.0git
RegionPrinter.h
Go to the documentation of this file.
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.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_ANALYSIS_REGIONPRINTER_H
15#define LLVM_ANALYSIS_REGIONPRINTER_H
16
19
20namespace llvm {
21class FunctionPass;
22class Function;
23class RegionInfo;
24class RegionNode;
25
30
31template <> struct DOTGraphTraits<RegionNode *> : public DefaultDOTGraphTraits {
33
34 LLVM_ABI std::string getNodeLabel(RegionNode *Node, RegionNode *Graph);
35};
36
37#ifndef NDEBUG
38/// Open a viewer to display the GraphViz vizualization of the analysis
39/// result.
40///
41/// Practical to call in the debugger.
42/// Includes the instructions in each BasicBlock.
43///
44/// @param RI The analysis to display.
46
47/// Analyze the regions of a function and open its GraphViz
48/// visualization in a viewer.
49///
50/// Useful to call in the debugger.
51/// Includes the instructions in each BasicBlock.
52/// The result of a new analysis may differ from the RegionInfo the pass
53/// manager currently holds.
54///
55/// @param F Function to analyze.
56void viewRegion(const llvm::Function *F);
57
58/// Open a viewer to display the GraphViz vizualization of the analysis
59/// result.
60///
61/// Useful to call in the debugger.
62/// Shows only the BasicBlock names without their instructions.
63///
64/// @param RI The analysis to display.
66
67/// Analyze the regions of a function and open its GraphViz
68/// visualization in a viewer.
69///
70/// Useful to call in the debugger.
71/// Shows only the BasicBlock names without their instructions.
72/// The result of a new analysis may differ from the RegionInfo the pass
73/// manager currently holds.
74///
75/// @param F Function to analyze.
77#endif // NDEBUG
78
79} // namespace llvm
80
81#endif // LLVM_ANALYSIS_REGIONPRINTER_H
#define LLVM_ABI
Definition Compiler.h:213
#define F(x, y, z)
Definition MD5.cpp:55
static std::string getNodeLabel(const ValueInfo &VI, GlobalValueSummary *GVS)
FunctionPass class - This class is used to implement most global optimizations.
Definition Pass.h:314
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI FunctionPass * createRegionOnlyViewerPass()
LLVM_ABI FunctionPass * createRegionPrinterPass()
LLVM_ABI FunctionPass * createRegionOnlyPrinterPass()
LLVM_ABI FunctionPass * createRegionViewerPass()
void viewRegion(llvm::RegionInfo *RI)
Open a viewer to display the GraphViz vizualization of the analysis result.
void viewRegionOnly(llvm::RegionInfo *RI)
Open a viewer to display the GraphViz vizualization of the analysis result.
DefaultDOTGraphTraits(bool simple=false)