CodeGen.cpp 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. //===-- CodeGen.cpp -------------------------------------------------------===//
  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 implements the common initialization routines for the
  10. // CodeGen library.
  11. //
  12. //===----------------------------------------------------------------------===//
  13. #include "llvm-c/Initialization.h"
  14. #include "llvm/InitializePasses.h"
  15. #include "llvm/PassRegistry.h"
  16. using namespace llvm;
  17. /// initializeCodeGen - Initialize all passes linked into the CodeGen library.
  18. void llvm::initializeCodeGen(PassRegistry &Registry) {
  19. initializeAtomicExpandPass(Registry);
  20. initializeBasicBlockSectionsPass(Registry);
  21. initializeBranchFolderPassPass(Registry);
  22. initializeBranchRelaxationPass(Registry);
  23. initializeCFGuardLongjmpPass(Registry);
  24. initializeCFIInstrInserterPass(Registry);
  25. initializeCheckDebugMachineModulePass(Registry);
  26. initializeCodeGenPreparePass(Registry);
  27. initializeDeadMachineInstructionElimPass(Registry);
  28. initializeDebugifyMachineModulePass(Registry);
  29. initializeDetectDeadLanesPass(Registry);
  30. initializeDwarfEHPrepareLegacyPassPass(Registry);
  31. initializeEarlyIfConverterPass(Registry);
  32. initializeEarlyIfPredicatorPass(Registry);
  33. initializeEarlyMachineLICMPass(Registry);
  34. initializeEarlyTailDuplicatePass(Registry);
  35. initializeExpandMemCmpPassPass(Registry);
  36. initializeExpandPostRAPass(Registry);
  37. initializeFEntryInserterPass(Registry);
  38. initializeFinalizeISelPass(Registry);
  39. initializeFinalizeMachineBundlesPass(Registry);
  40. initializeFixupStatepointCallerSavedPass(Registry);
  41. initializeFuncletLayoutPass(Registry);
  42. initializeGCMachineCodeAnalysisPass(Registry);
  43. initializeGCModuleInfoPass(Registry);
  44. initializeHardwareLoopsPass(Registry);
  45. initializeIfConverterPass(Registry);
  46. initializeImplicitNullChecksPass(Registry);
  47. initializeIndirectBrExpandPassPass(Registry);
  48. initializeInterleavedLoadCombinePass(Registry);
  49. initializeInterleavedAccessPass(Registry);
  50. initializeLiveDebugValuesPass(Registry);
  51. initializeLiveDebugVariablesPass(Registry);
  52. initializeLiveIntervalsPass(Registry);
  53. initializeLiveRangeShrinkPass(Registry);
  54. initializeLiveStacksPass(Registry);
  55. initializeLiveVariablesPass(Registry);
  56. initializeLocalStackSlotPassPass(Registry);
  57. initializeLowerIntrinsicsPass(Registry);
  58. initializeMIRAddFSDiscriminatorsPass(Registry);
  59. initializeMIRCanonicalizerPass(Registry);
  60. initializeMIRNamerPass(Registry);
  61. initializeMIRProfileLoaderPassPass(Registry);
  62. initializeMachineBlockFrequencyInfoPass(Registry);
  63. initializeMachineBlockPlacementPass(Registry);
  64. initializeMachineBlockPlacementStatsPass(Registry);
  65. initializeMachineCSEPass(Registry);
  66. initializeMachineCombinerPass(Registry);
  67. initializeMachineCopyPropagationPass(Registry);
  68. initializeMachineCycleInfoPrinterPassPass(Registry);
  69. initializeMachineCycleInfoWrapperPassPass(Registry);
  70. initializeMachineDominatorTreePass(Registry);
  71. initializeMachineFunctionPrinterPassPass(Registry);
  72. initializeMachineLICMPass(Registry);
  73. initializeMachineLoopInfoPass(Registry);
  74. initializeMachineModuleInfoWrapperPassPass(Registry);
  75. initializeMachineOptimizationRemarkEmitterPassPass(Registry);
  76. initializeMachineOutlinerPass(Registry);
  77. initializeMachinePipelinerPass(Registry);
  78. initializeModuloScheduleTestPass(Registry);
  79. initializeMachinePostDominatorTreePass(Registry);
  80. initializeMachineRegionInfoPassPass(Registry);
  81. initializeMachineSchedulerPass(Registry);
  82. initializeMachineSinkingPass(Registry);
  83. initializeMachineVerifierPassPass(Registry);
  84. initializeOptimizePHIsPass(Registry);
  85. initializePEIPass(Registry);
  86. initializePHIEliminationPass(Registry);
  87. initializePatchableFunctionPass(Registry);
  88. initializePeepholeOptimizerPass(Registry);
  89. initializePostMachineSchedulerPass(Registry);
  90. initializePostRAHazardRecognizerPass(Registry);
  91. initializePostRAMachineSinkingPass(Registry);
  92. initializePostRASchedulerPass(Registry);
  93. initializePreISelIntrinsicLoweringLegacyPassPass(Registry);
  94. initializeProcessImplicitDefsPass(Registry);
  95. initializeRABasicPass(Registry);
  96. initializeRAGreedyPass(Registry);
  97. initializeRegAllocFastPass(Registry);
  98. initializeRegUsageInfoCollectorPass(Registry);
  99. initializeRegUsageInfoPropagationPass(Registry);
  100. initializeRegisterCoalescerPass(Registry);
  101. initializeRemoveRedundantDebugValuesPass(Registry);
  102. initializeRenameIndependentSubregsPass(Registry);
  103. initializeSafeStackLegacyPassPass(Registry);
  104. initializeShadowStackGCLoweringPass(Registry);
  105. initializeShrinkWrapPass(Registry);
  106. initializeSjLjEHPreparePass(Registry);
  107. initializeSlotIndexesPass(Registry);
  108. initializeStackColoringPass(Registry);
  109. initializeStackMapLivenessPass(Registry);
  110. initializeStackProtectorPass(Registry);
  111. initializeStackSlotColoringPass(Registry);
  112. initializeStripDebugMachineModulePass(Registry);
  113. initializeTailDuplicatePass(Registry);
  114. initializeTargetPassConfigPass(Registry);
  115. initializeTwoAddressInstructionPassPass(Registry);
  116. initializeTypePromotionPass(Registry);
  117. initializeUnpackMachineBundlesPass(Registry);
  118. initializeUnreachableBlockElimLegacyPassPass(Registry);
  119. initializeUnreachableMachineBlockElimPass(Registry);
  120. initializeVirtRegMapPass(Registry);
  121. initializeVirtRegRewriterPass(Registry);
  122. initializeWasmEHPreparePass(Registry);
  123. initializeWinEHPreparePass(Registry);
  124. initializeXRayInstrumentationPass(Registry);
  125. }
  126. void LLVMInitializeCodeGen(LLVMPassRegistryRef R) {
  127. initializeCodeGen(*unwrap(R));
  128. }