PassRegistry.def 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. //===- PassRegistry.def - Registry of passes --------------------*- C++ -*-===//
  2. //
  3. // The LLVM Compiler Infrastructure
  4. //
  5. // This file is distributed under the University of Illinois Open Source
  6. // License. See LICENSE.TXT for details.
  7. //
  8. //===----------------------------------------------------------------------===//
  9. //
  10. // This file is used as the registry of passes that are part of the core LLVM
  11. // libraries. This file describes both transformation passes and analyses
  12. // Analyses are registered while transformation passes have names registered
  13. // that can be used when providing a textual pass pipeline.
  14. //
  15. //===----------------------------------------------------------------------===//
  16. #ifndef MODULE_ANALYSIS
  17. #define MODULE_ANALYSIS(NAME, CREATE_PASS)
  18. #endif
  19. MODULE_ANALYSIS("lcg", LazyCallGraphAnalysis())
  20. MODULE_ANALYSIS("no-op-module", NoOpModuleAnalysis())
  21. MODULE_ANALYSIS("targetlibinfo", TargetLibraryAnalysis())
  22. #undef MODULE_ANALYSIS
  23. #ifndef MODULE_PASS
  24. #define MODULE_PASS(NAME, CREATE_PASS)
  25. #endif
  26. MODULE_PASS("invalidate<all>", InvalidateAllAnalysesPass())
  27. MODULE_PASS("no-op-module", NoOpModulePass())
  28. MODULE_PASS("print", PrintModulePass(dbgs()))
  29. MODULE_PASS("print-cg", LazyCallGraphPrinterPass(dbgs()))
  30. MODULE_PASS("verify", VerifierPass())
  31. #undef MODULE_PASS
  32. #ifndef CGSCC_ANALYSIS
  33. #define CGSCC_ANALYSIS(NAME, CREATE_PASS)
  34. #endif
  35. CGSCC_ANALYSIS("no-op-cgscc", NoOpCGSCCAnalysis())
  36. #undef CGSCC_ANALYSIS
  37. #ifndef CGSCC_PASS
  38. #define CGSCC_PASS(NAME, CREATE_PASS)
  39. #endif
  40. CGSCC_PASS("invalidate<all>", InvalidateAllAnalysesPass())
  41. CGSCC_PASS("no-op-cgscc", NoOpCGSCCPass())
  42. #undef CGSCC_PASS
  43. #ifndef FUNCTION_ANALYSIS
  44. #define FUNCTION_ANALYSIS(NAME, CREATE_PASS)
  45. #endif
  46. FUNCTION_ANALYSIS("assumptions", AssumptionAnalysis())
  47. FUNCTION_ANALYSIS("domtree", DominatorTreeAnalysis())
  48. FUNCTION_ANALYSIS("loops", LoopAnalysis())
  49. FUNCTION_ANALYSIS("no-op-function", NoOpFunctionAnalysis())
  50. FUNCTION_ANALYSIS("targetlibinfo", TargetLibraryAnalysis())
  51. FUNCTION_ANALYSIS("targetir",
  52. TM ? TM->getTargetIRAnalysis() : TargetIRAnalysis())
  53. #undef FUNCTION_ANALYSIS
  54. #ifndef FUNCTION_PASS
  55. #define FUNCTION_PASS(NAME, CREATE_PASS)
  56. #endif
  57. FUNCTION_PASS("early-cse", EarlyCSEPass())
  58. FUNCTION_PASS("instcombine", InstCombinePass())
  59. FUNCTION_PASS("invalidate<all>", InvalidateAllAnalysesPass())
  60. FUNCTION_PASS("no-op-function", NoOpFunctionPass())
  61. FUNCTION_PASS("lower-expect", LowerExpectIntrinsicPass())
  62. FUNCTION_PASS("print", PrintFunctionPass(dbgs()))
  63. FUNCTION_PASS("print<assumptions>", AssumptionPrinterPass(dbgs()))
  64. FUNCTION_PASS("print<domtree>", DominatorTreePrinterPass(dbgs()))
  65. FUNCTION_PASS("print<loops>", LoopPrinterPass(dbgs()))
  66. FUNCTION_PASS("simplify-cfg", SimplifyCFGPass())
  67. FUNCTION_PASS("verify", VerifierPass())
  68. FUNCTION_PASS("verify<domtree>", DominatorTreeVerifierPass())
  69. #undef FUNCTION_PASS