Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

179 lines
7.6 KiB

  1. //===- llvm/LinkAllPasses.h ------------ Reference All 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 header file pulls in all transformation and analysis passes for tools
  11. // like opt and bugpoint that need this functionality.
  12. //
  13. //===----------------------------------------------------------------------===//
  14. #ifndef LLVM_LINKALLPASSES_H
  15. #define LLVM_LINKALLPASSES_H
  16. #include "llvm/Analysis/AliasSetTracker.h"
  17. #include "llvm/Analysis/CallPrinter.h"
  18. #include "llvm/Analysis/DomPrinter.h"
  19. #include "llvm/Analysis/FindUsedTypes.h"
  20. #include "llvm/Analysis/IntervalPartition.h"
  21. #include "llvm/Analysis/Lint.h"
  22. #include "llvm/Analysis/Passes.h"
  23. #include "llvm/Analysis/PostDominators.h"
  24. #include "llvm/Analysis/RegionPass.h"
  25. #include "llvm/Analysis/RegionPrinter.h"
  26. #include "llvm/Analysis/ScalarEvolution.h"
  27. #include "llvm/Assembly/PrintModulePass.h"
  28. #include "llvm/CodeGen/Passes.h"
  29. #include "llvm/IR/Function.h"
  30. #include "llvm/Transforms/IPO.h"
  31. #include "llvm/Transforms/Instrumentation.h"
  32. #include "llvm/Transforms/ObjCARC.h"
  33. #include "llvm/Transforms/Scalar.h"
  34. #include "llvm/Transforms/Utils/UnifyFunctionExitNodes.h"
  35. #include "llvm/Transforms/Vectorize.h"
  36. #include <cstdlib>
  37. namespace {
  38. struct ForcePassLinking {
  39. ForcePassLinking() {
  40. // We must reference the passes in such a way that compilers will not
  41. // delete it all as dead code, even with whole program optimization,
  42. // yet is effectively a NO-OP. As the compiler isn't smart enough
  43. // to know that getenv() never returns -1, this will do the job.
  44. if (std::getenv("bar") != (char*) -1)
  45. return;
  46. (void) llvm::createAAEvalPass();
  47. (void) llvm::createAggressiveDCEPass();
  48. (void) llvm::createAliasAnalysisCounterPass();
  49. (void) llvm::createAliasDebugger();
  50. (void) llvm::createArgumentPromotionPass();
  51. (void) llvm::createBasicAliasAnalysisPass();
  52. (void) llvm::createLibCallAliasAnalysisPass(0);
  53. (void) llvm::createScalarEvolutionAliasAnalysisPass();
  54. (void) llvm::createTypeBasedAliasAnalysisPass();
  55. (void) llvm::createBlockPlacementPass();
  56. (void) llvm::createBoundsCheckingPass();
  57. (void) llvm::createBreakCriticalEdgesPass();
  58. (void) llvm::createCallGraphPrinterPass();
  59. (void) llvm::createCallGraphViewerPass();
  60. (void) llvm::createCFGSimplificationPass();
  61. (void) llvm::createConstantMergePass();
  62. (void) llvm::createConstantPropagationPass();
  63. (void) llvm::createCostModelAnalysisPass();
  64. (void) llvm::createDeadArgEliminationPass();
  65. (void) llvm::createDeadCodeEliminationPass();
  66. (void) llvm::createDeadInstEliminationPass();
  67. (void) llvm::createDeadStoreEliminationPass();
  68. (void) llvm::createDependenceAnalysisPass();
  69. (void) llvm::createDomOnlyPrinterPass();
  70. (void) llvm::createDomPrinterPass();
  71. (void) llvm::createDomOnlyViewerPass();
  72. (void) llvm::createDomViewerPass();
  73. (void) llvm::createEdgeProfilerPass();
  74. (void) llvm::createOptimalEdgeProfilerPass();
  75. (void) llvm::createPathProfilerPass();
  76. (void) llvm::createGCOVProfilerPass();
  77. (void) llvm::createFunctionInliningPass();
  78. (void) llvm::createAlwaysInlinerPass();
  79. (void) llvm::createGlobalDCEPass();
  80. (void) llvm::createGlobalOptimizerPass();
  81. (void) llvm::createGlobalsModRefPass();
  82. (void) llvm::createIPConstantPropagationPass();
  83. (void) llvm::createIPSCCPPass();
  84. (void) llvm::createIndVarSimplifyPass();
  85. (void) llvm::createInstructionCombiningPass();
  86. (void) llvm::createInternalizePass();
  87. (void) llvm::createLCSSAPass();
  88. (void) llvm::createLICMPass();
  89. (void) llvm::createLazyValueInfoPass();
  90. (void) llvm::createLoopExtractorPass();
  91. (void) llvm::createLoopSimplifyPass();
  92. (void) llvm::createLoopStrengthReducePass();
  93. (void) llvm::createLoopUnrollPass();
  94. (void) llvm::createLoopUnswitchPass();
  95. (void) llvm::createLoopIdiomPass();
  96. (void) llvm::createLoopRotatePass();
  97. (void) llvm::createLowerExpectIntrinsicPass();
  98. (void) llvm::createLowerInvokePass();
  99. (void) llvm::createLowerSwitchPass();
  100. (void) llvm::createNoAAPass();
  101. (void) llvm::createNoProfileInfoPass();
  102. (void) llvm::createObjCARCAliasAnalysisPass();
  103. (void) llvm::createObjCARCAPElimPass();
  104. (void) llvm::createObjCARCExpandPass();
  105. (void) llvm::createObjCARCContractPass();
  106. (void) llvm::createObjCARCOptPass();
  107. (void) llvm::createProfileEstimatorPass();
  108. (void) llvm::createProfileVerifierPass();
  109. (void) llvm::createPathProfileVerifierPass();
  110. (void) llvm::createProfileLoaderPass();
  111. (void) llvm::createProfileMetadataLoaderPass();
  112. (void) llvm::createPathProfileLoaderPass();
  113. (void) llvm::createPromoteMemoryToRegisterPass();
  114. (void) llvm::createDemoteRegisterToMemoryPass();
  115. (void) llvm::createPruneEHPass();
  116. (void) llvm::createPostDomOnlyPrinterPass();
  117. (void) llvm::createPostDomPrinterPass();
  118. (void) llvm::createPostDomOnlyViewerPass();
  119. (void) llvm::createPostDomViewerPass();
  120. (void) llvm::createReassociatePass();
  121. (void) llvm::createRegionInfoPass();
  122. (void) llvm::createRegionOnlyPrinterPass();
  123. (void) llvm::createRegionOnlyViewerPass();
  124. (void) llvm::createRegionPrinterPass();
  125. (void) llvm::createRegionViewerPass();
  126. (void) llvm::createSCCPPass();
  127. (void) llvm::createScalarReplAggregatesPass();
  128. (void) llvm::createSimplifyLibCallsPass();
  129. (void) llvm::createSingleLoopExtractorPass();
  130. (void) llvm::createStripSymbolsPass();
  131. (void) llvm::createStripNonDebugSymbolsPass();
  132. (void) llvm::createStripDeadDebugInfoPass();
  133. (void) llvm::createStripDeadPrototypesPass();
  134. (void) llvm::createTailCallEliminationPass();
  135. (void) llvm::createJumpThreadingPass();
  136. (void) llvm::createUnifyFunctionExitNodesPass();
  137. (void) llvm::createInstCountPass();
  138. (void) llvm::createCodeGenPreparePass();
  139. (void) llvm::createEarlyCSEPass();
  140. (void) llvm::createGVNPass();
  141. (void) llvm::createMemCpyOptPass();
  142. (void) llvm::createLoopDeletionPass();
  143. (void) llvm::createPostDomTree();
  144. (void) llvm::createInstructionNamerPass();
  145. (void) llvm::createMetaRenamerPass();
  146. (void) llvm::createFunctionAttrsPass();
  147. (void) llvm::createMergeFunctionsPass();
  148. (void) llvm::createPrintModulePass(0);
  149. (void) llvm::createPrintFunctionPass("", 0);
  150. (void) llvm::createPrintBasicBlockPass(0);
  151. (void) llvm::createModuleDebugInfoPrinterPass();
  152. (void) llvm::createPartialInliningPass();
  153. (void) llvm::createLintPass();
  154. (void) llvm::createSinkingPass();
  155. (void) llvm::createLowerAtomicPass();
  156. (void) llvm::createCorrelatedValuePropagationPass();
  157. (void) llvm::createMemDepPrinter();
  158. (void) llvm::createInstructionSimplifierPass();
  159. (void) llvm::createLoopVectorizePass();
  160. (void) llvm::createSLPVectorizerPass();
  161. (void) llvm::createBBVectorizePass();
  162. (void)new llvm::IntervalPartition();
  163. (void)new llvm::FindUsedTypes();
  164. (void)new llvm::ScalarEvolution();
  165. ((llvm::Function*)0)->viewCFGOnly();
  166. llvm::RGPassManager RGM;
  167. ((llvm::RegionPass*)0)->runOnRegion((llvm::Region*)0, RGM);
  168. llvm::AliasSetTracker X(*(llvm::AliasAnalysis*)0);
  169. X.add((llvm::Value*)0, 0, 0); // for -print-alias-sets
  170. }
  171. } ForcePassLinking; // Force link by creating a global definition.
  172. }
  173. #endif