LLVM 20.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
18
19namespace llvm {
20 class FunctionPass;
21 class Function;
22 class RegionInfo;
23 class RegionNode;
24
25 FunctionPass *createRegionViewerPass();
26 FunctionPass *createRegionOnlyViewerPass();
27 FunctionPass *createRegionPrinterPass();
28 FunctionPass *createRegionOnlyPrinterPass();
29
30 template <>
33
34 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.
56 void 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.
76 void viewRegionOnly(const llvm::Function *F);
77#endif
78} // End llvm namespace
79
80#endif
#define F(x, y, z)
Definition: MD5.cpp:55
static std::string getNodeLabel(const ValueInfo &VI, GlobalValueSummary *GVS)
static bool isSimple(Instruction *I)
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
FunctionPass * createRegionOnlyViewerPass()
FunctionPass * createRegionPrinterPass()
FunctionPass * createRegionOnlyPrinterPass()
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.
DOTGraphTraits(bool isSimple=false)
Definition: RegionPrinter.h:32
DOTGraphTraits - Template class that can be specialized to customize how graphs are converted to 'dot...
DefaultDOTGraphTraits - This class provides the default implementations of all of the DOTGraphTraits ...