LLVM  15.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 
20 namespace llvm {
21  class FunctionPass;
22  class Function;
23  class RegionInfo;
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.
45  void viewRegion(llvm::RegionInfo *RI);
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
RegionInfo.h
llvm::DOTGraphTraits< RegionNode * >::DOTGraphTraits
DOTGraphTraits(bool isSimple=false)
Definition: RegionPrinter.h:32
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:17
llvm::createRegionOnlyPrinterPass
FunctionPass * createRegionOnlyPrinterPass()
Definition: RegionPrinter.cpp:207
llvm::Function
Definition: Function.h:60
F
#define F(x, y, z)
Definition: MD5.cpp:55
llvm::RegionNode
Definition: RegionInfo.h:879
llvm::DOTGraphTraits
DOTGraphTraits - Template class that can be specialized to customize how graphs are converted to 'dot...
Definition: DOTGraphTraits.h:166
llvm::createRegionViewerPass
FunctionPass * createRegionViewerPass()
Definition: RegionPrinter.cpp:211
llvm::RegionInfo
Definition: RegionInfo.h:900
Node
Definition: ItaniumDemangle.h:155
DOTGraphTraitsPass.h
isSimple
static bool isSimple(Instruction *I)
Definition: SLPVectorizer.cpp:664
llvm::viewRegion
void viewRegion(llvm::RegionInfo *RI)
Open a viewer to display the GraphViz vizualization of the analysis result.
Definition: RegionPrinter.cpp:245
llvm::createRegionOnlyViewerPass
FunctionPass * createRegionOnlyViewerPass()
Definition: RegionPrinter.cpp:215
llvm::DefaultDOTGraphTraits
DefaultDOTGraphTraits - This class provides the default implementations of all of the DOTGraphTraits ...
Definition: DOTGraphTraits.h:28
getNodeLabel
static std::string getNodeLabel(const ValueInfo &VI, GlobalValueSummary *GVS)
Definition: ModuleSummaryIndex.cpp:482
llvm::createRegionPrinterPass
FunctionPass * createRegionPrinterPass()
Definition: RegionPrinter.cpp:205
llvm::viewRegionOnly
void viewRegionOnly(llvm::RegionInfo *RI)
Open a viewer to display the GraphViz vizualization of the analysis result.
Definition: RegionPrinter.cpp:251
llvm::codeview::PublicSymFlags::Function
@ Function