RegionPrinter.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===-- RegionPrinter.h - Region printer external interface -----*- C++ -*-===//
  7. //
  8. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  9. // See https://llvm.org/LICENSE.txt for license information.
  10. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  11. //
  12. //===----------------------------------------------------------------------===//
  13. //
  14. // This file defines external functions that can be called to explicitly
  15. // instantiate the region printer.
  16. //
  17. //===----------------------------------------------------------------------===//
  18. #ifndef LLVM_ANALYSIS_REGIONPRINTER_H
  19. #define LLVM_ANALYSIS_REGIONPRINTER_H
  20. namespace llvm {
  21. class FunctionPass;
  22. class Function;
  23. class RegionInfo;
  24. FunctionPass *createRegionViewerPass();
  25. FunctionPass *createRegionOnlyViewerPass();
  26. FunctionPass *createRegionPrinterPass();
  27. FunctionPass *createRegionOnlyPrinterPass();
  28. #ifndef NDEBUG
  29. /// Open a viewer to display the GraphViz vizualization of the analysis
  30. /// result.
  31. ///
  32. /// Practical to call in the debugger.
  33. /// Includes the instructions in each BasicBlock.
  34. ///
  35. /// @param RI The analysis to display.
  36. void viewRegion(llvm::RegionInfo *RI);
  37. /// Analyze the regions of a function and open its GraphViz
  38. /// visualization in a viewer.
  39. ///
  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.
  44. ///
  45. /// @param F Function to analyze.
  46. void viewRegion(const llvm::Function *F);
  47. /// Open a viewer to display the GraphViz vizualization of the analysis
  48. /// result.
  49. ///
  50. /// Useful to call in the debugger.
  51. /// Shows only the BasicBlock names without their instructions.
  52. ///
  53. /// @param RI The analysis to display.
  54. void viewRegionOnly(llvm::RegionInfo *RI);
  55. /// Analyze the regions of a function and open its GraphViz
  56. /// visualization in a viewer.
  57. ///
  58. /// Useful to call in the debugger.
  59. /// Shows only the BasicBlock names without their instructions.
  60. /// The result of a new analysis may differ from the RegionInfo the pass
  61. /// manager currently holds.
  62. ///
  63. /// @param F Function to analyze.
  64. void viewRegionOnly(const llvm::Function *F);
  65. #endif
  66. } // End llvm namespace
  67. #endif
  68. #ifdef __GNUC__
  69. #pragma GCC diagnostic pop
  70. #endif