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 {
21 class FunctionPass;
22 class Function;
23 class RegionInfo;
24 class RegionNode;
25
26 LLVM_ABI FunctionPass *createRegionViewerPass();
28 LLVM_ABI FunctionPass *createRegionPrinterPass();
30
31 template <>
34
35 LLVM_ABI std::string getNodeLabel(RegionNode *Node, RegionNode *Graph);
36 };
37
38#ifndef NDEBUG
39 /// Open a viewer to display the GraphViz vizualization of the analysis
40 /// result.
41 ///
42 /// Practical to call in the debugger.
43 /// Includes the instructions in each BasicBlock.
44 ///
45 /// @param RI The analysis to display.
47
48 /// Analyze the regions of a function and open its GraphViz
49 /// visualization in a viewer.
50 ///
51 /// Useful to call in the debugger.
52 /// Includes the instructions in each BasicBlock.
53 /// The result of a new analysis may differ from the RegionInfo the pass
54 /// manager currently holds.
55 ///
56 /// @param F Function to analyze.
57 void viewRegion(const llvm::Function *F);
58
59 /// Open a viewer to display the GraphViz vizualization of the analysis
60 /// result.
61 ///
62 /// Useful to call in the debugger.
63 /// Shows only the BasicBlock names without their instructions.
64 ///
65 /// @param RI The analysis to display.
67
68 /// Analyze the regions of a function and open its GraphViz
69 /// visualization in a viewer.
70 ///
71 /// Useful to call in the debugger.
72 /// Shows only the BasicBlock names without their instructions.
73 /// The result of a new analysis may differ from the RegionInfo the pass
74 /// manager currently holds.
75 ///
76 /// @param F Function to analyze.
77 void viewRegionOnly(const llvm::Function *F);
78#endif
79} // End llvm namespace
80
81#endif
#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)
static bool isSimple(Instruction *I)
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
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.
DOTGraphTraits(bool isSimple=false)
Definition: RegionPrinter.h:33
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 ...