LCOV - code coverage report
Current view: top level - include/llvm - LinkAllPasses.h (source / functions) Hit Total Coverage
Test: llvm-toolchain.info Lines: 0 165 0.0 %
Date: 2018-10-20 13:21:21 Functions: 0 1 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       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             : 
      15             : #ifndef LLVM_LINKALLPASSES_H
      16             : #define LLVM_LINKALLPASSES_H
      17             : 
      18             : #include "llvm/ADT/Statistic.h"
      19             : #include "llvm/Analysis/AliasAnalysisEvaluator.h"
      20             : #include "llvm/Analysis/AliasSetTracker.h"
      21             : #include "llvm/Analysis/BasicAliasAnalysis.h"
      22             : #include "llvm/Analysis/CFLAndersAliasAnalysis.h"
      23             : #include "llvm/Analysis/CFLSteensAliasAnalysis.h"
      24             : #include "llvm/Analysis/CallPrinter.h"
      25             : #include "llvm/Analysis/DomPrinter.h"
      26             : #include "llvm/Analysis/GlobalsModRef.h"
      27             : #include "llvm/Analysis/IntervalPartition.h"
      28             : #include "llvm/Analysis/Lint.h"
      29             : #include "llvm/Analysis/Passes.h"
      30             : #include "llvm/Analysis/PostDominators.h"
      31             : #include "llvm/Analysis/RegionPass.h"
      32             : #include "llvm/Analysis/RegionPrinter.h"
      33             : #include "llvm/Analysis/ScalarEvolution.h"
      34             : #include "llvm/Analysis/ScalarEvolutionAliasAnalysis.h"
      35             : #include "llvm/Analysis/ScopedNoAliasAA.h"
      36             : #include "llvm/Analysis/TargetLibraryInfo.h"
      37             : #include "llvm/Analysis/TypeBasedAliasAnalysis.h"
      38             : #include "llvm/CodeGen/Passes.h"
      39             : #include "llvm/IR/Function.h"
      40             : #include "llvm/IR/IRPrintingPasses.h"
      41             : #include "llvm/Support/Valgrind.h"
      42             : #include "llvm/Transforms/AggressiveInstCombine/AggressiveInstCombine.h"
      43             : #include "llvm/Transforms/IPO.h"
      44             : #include "llvm/Transforms/IPO/AlwaysInliner.h"
      45             : #include "llvm/Transforms/IPO/FunctionAttrs.h"
      46             : #include "llvm/Transforms/InstCombine/InstCombine.h"
      47             : #include "llvm/Transforms/Instrumentation.h"
      48             : #include "llvm/Transforms/Instrumentation/BoundsChecking.h"
      49             : #include "llvm/Transforms/ObjCARC.h"
      50             : #include "llvm/Transforms/Scalar.h"
      51             : #include "llvm/Transforms/Scalar/GVN.h"
      52             : #include "llvm/Transforms/Scalar/InstSimplifyPass.h"
      53             : #include "llvm/Transforms/Utils.h"
      54             : #include "llvm/Transforms/Utils/SymbolRewriter.h"
      55             : #include "llvm/Transforms/Utils/UnifyFunctionExitNodes.h"
      56             : #include "llvm/Transforms/Vectorize.h"
      57             : #include <cstdlib>
      58             : 
      59             : namespace {
      60             :   struct ForcePassLinking {
      61           0 :     ForcePassLinking() {
      62             :       // We must reference the passes in such a way that compilers will not
      63             :       // delete it all as dead code, even with whole program optimization,
      64             :       // yet is effectively a NO-OP. As the compiler isn't smart enough
      65             :       // to know that getenv() never returns -1, this will do the job.
      66           0 :       if (std::getenv("bar") != (char*) -1)
      67           0 :         return;
      68             : 
      69           0 :       (void) llvm::createAAEvalPass();
      70           0 :       (void) llvm::createAggressiveDCEPass();
      71           0 :       (void) llvm::createAggressiveInstCombinerPass();
      72           0 :       (void) llvm::createBitTrackingDCEPass();
      73           0 :       (void) llvm::createArgumentPromotionPass();
      74           0 :       (void) llvm::createAlignmentFromAssumptionsPass();
      75           0 :       (void) llvm::createBasicAAWrapperPass();
      76           0 :       (void) llvm::createSCEVAAWrapperPass();
      77           0 :       (void) llvm::createTypeBasedAAWrapperPass();
      78           0 :       (void) llvm::createScopedNoAliasAAWrapperPass();
      79           0 :       (void) llvm::createBoundsCheckingLegacyPass();
      80           0 :       (void) llvm::createBreakCriticalEdgesPass();
      81           0 :       (void) llvm::createCallGraphDOTPrinterPass();
      82           0 :       (void) llvm::createCallGraphViewerPass();
      83           0 :       (void) llvm::createCFGSimplificationPass();
      84           0 :       (void) llvm::createCFLAndersAAWrapperPass();
      85           0 :       (void) llvm::createCFLSteensAAWrapperPass();
      86           0 :       (void) llvm::createStructurizeCFGPass();
      87           0 :       (void) llvm::createLibCallsShrinkWrapPass();
      88           0 :       (void) llvm::createCalledValuePropagationPass();
      89           0 :       (void) llvm::createConstantMergePass();
      90           0 :       (void) llvm::createConstantPropagationPass();
      91           0 :       (void) llvm::createControlHeightReductionLegacyPass();
      92           0 :       (void) llvm::createCostModelAnalysisPass();
      93           0 :       (void) llvm::createDeadArgEliminationPass();
      94           0 :       (void) llvm::createDeadCodeEliminationPass();
      95           0 :       (void) llvm::createDeadInstEliminationPass();
      96           0 :       (void) llvm::createDeadStoreEliminationPass();
      97           0 :       (void) llvm::createDependenceAnalysisWrapperPass();
      98           0 :       (void) llvm::createDomOnlyPrinterPass();
      99           0 :       (void) llvm::createDomPrinterPass();
     100           0 :       (void) llvm::createDomOnlyViewerPass();
     101           0 :       (void) llvm::createDomViewerPass();
     102           0 :       (void) llvm::createGCOVProfilerPass();
     103           0 :       (void) llvm::createPGOInstrumentationGenLegacyPass();
     104           0 :       (void) llvm::createPGOInstrumentationUseLegacyPass();
     105           0 :       (void) llvm::createPGOIndirectCallPromotionLegacyPass();
     106           0 :       (void) llvm::createPGOMemOPSizeOptLegacyPass();
     107           0 :       (void) llvm::createInstrProfilingLegacyPass();
     108           0 :       (void) llvm::createFunctionImportPass();
     109           0 :       (void) llvm::createFunctionInliningPass();
     110           0 :       (void) llvm::createAlwaysInlinerLegacyPass();
     111           0 :       (void) llvm::createGlobalDCEPass();
     112           0 :       (void) llvm::createGlobalOptimizerPass();
     113           0 :       (void) llvm::createGlobalsAAWrapperPass();
     114           0 :       (void) llvm::createGuardWideningPass();
     115           0 :       (void) llvm::createLoopGuardWideningPass();
     116           0 :       (void) llvm::createIPConstantPropagationPass();
     117           0 :       (void) llvm::createIPSCCPPass();
     118           0 :       (void) llvm::createInductiveRangeCheckEliminationPass();
     119           0 :       (void) llvm::createIndVarSimplifyPass();
     120           0 :       (void) llvm::createInstSimplifyLegacyPass();
     121           0 :       (void) llvm::createInstructionCombiningPass();
     122           0 :       (void) llvm::createInternalizePass();
     123           0 :       (void) llvm::createLCSSAPass();
     124           0 :       (void) llvm::createLegacyDivergenceAnalysisPass();
     125           0 :       (void) llvm::createLICMPass();
     126           0 :       (void) llvm::createLoopSinkPass();
     127           0 :       (void) llvm::createLazyValueInfoPass();
     128           0 :       (void) llvm::createLoopExtractorPass();
     129           0 :       (void) llvm::createLoopInterchangePass();
     130           0 :       (void) llvm::createLoopPredicationPass();
     131           0 :       (void) llvm::createLoopSimplifyPass();
     132           0 :       (void) llvm::createLoopSimplifyCFGPass();
     133           0 :       (void) llvm::createLoopStrengthReducePass();
     134           0 :       (void) llvm::createLoopRerollPass();
     135           0 :       (void) llvm::createLoopUnrollPass();
     136           0 :       (void) llvm::createLoopUnrollAndJamPass();
     137           0 :       (void) llvm::createLoopUnswitchPass();
     138           0 :       (void) llvm::createLoopVersioningLICMPass();
     139           0 :       (void) llvm::createLoopIdiomPass();
     140           0 :       (void) llvm::createLoopRotatePass();
     141           0 :       (void) llvm::createLowerExpectIntrinsicPass();
     142           0 :       (void) llvm::createLowerInvokePass();
     143           0 :       (void) llvm::createLowerSwitchPass();
     144           0 :       (void) llvm::createNaryReassociatePass();
     145           0 :       (void) llvm::createObjCARCAAWrapperPass();
     146           0 :       (void) llvm::createObjCARCAPElimPass();
     147           0 :       (void) llvm::createObjCARCExpandPass();
     148           0 :       (void) llvm::createObjCARCContractPass();
     149           0 :       (void) llvm::createObjCARCOptPass();
     150           0 :       (void) llvm::createPAEvalPass();
     151           0 :       (void) llvm::createPromoteMemoryToRegisterPass();
     152           0 :       (void) llvm::createDemoteRegisterToMemoryPass();
     153           0 :       (void) llvm::createPruneEHPass();
     154           0 :       (void) llvm::createPostDomOnlyPrinterPass();
     155           0 :       (void) llvm::createPostDomPrinterPass();
     156           0 :       (void) llvm::createPostDomOnlyViewerPass();
     157           0 :       (void) llvm::createPostDomViewerPass();
     158           0 :       (void) llvm::createReassociatePass();
     159           0 :       (void) llvm::createRegionInfoPass();
     160           0 :       (void) llvm::createRegionOnlyPrinterPass();
     161           0 :       (void) llvm::createRegionOnlyViewerPass();
     162           0 :       (void) llvm::createRegionPrinterPass();
     163           0 :       (void) llvm::createRegionViewerPass();
     164           0 :       (void) llvm::createSCCPPass();
     165           0 :       (void) llvm::createSafeStackPass();
     166           0 :       (void) llvm::createSROAPass();
     167           0 :       (void) llvm::createSingleLoopExtractorPass();
     168           0 :       (void) llvm::createStripSymbolsPass();
     169           0 :       (void) llvm::createStripNonDebugSymbolsPass();
     170           0 :       (void) llvm::createStripDeadDebugInfoPass();
     171           0 :       (void) llvm::createStripDeadPrototypesPass();
     172           0 :       (void) llvm::createTailCallEliminationPass();
     173           0 :       (void) llvm::createJumpThreadingPass();
     174           0 :       (void) llvm::createUnifyFunctionExitNodesPass();
     175           0 :       (void) llvm::createInstCountPass();
     176           0 :       (void) llvm::createConstantHoistingPass();
     177           0 :       (void) llvm::createCodeGenPreparePass();
     178           0 :       (void) llvm::createEntryExitInstrumenterPass();
     179           0 :       (void) llvm::createPostInlineEntryExitInstrumenterPass();
     180           0 :       (void) llvm::createEarlyCSEPass();
     181           0 :       (void) llvm::createGVNHoistPass();
     182           0 :       (void) llvm::createMergedLoadStoreMotionPass();
     183           0 :       (void) llvm::createGVNPass();
     184           0 :       (void) llvm::createNewGVNPass();
     185           0 :       (void) llvm::createMemCpyOptPass();
     186           0 :       (void) llvm::createLoopDeletionPass();
     187           0 :       (void) llvm::createPostDomTree();
     188           0 :       (void) llvm::createInstructionNamerPass();
     189           0 :       (void) llvm::createMetaRenamerPass();
     190           0 :       (void) llvm::createPostOrderFunctionAttrsLegacyPass();
     191           0 :       (void) llvm::createReversePostOrderFunctionAttrsPass();
     192           0 :       (void) llvm::createMergeFunctionsPass();
     193           0 :       (void) llvm::createMergeICmpsPass();
     194           0 :       (void) llvm::createExpandMemCmpPass();
     195             :       std::string buf;
     196           0 :       llvm::raw_string_ostream os(buf);
     197           0 :       (void) llvm::createPrintModulePass(os);
     198           0 :       (void) llvm::createPrintFunctionPass(os);
     199           0 :       (void) llvm::createPrintBasicBlockPass(os);
     200           0 :       (void) llvm::createModuleDebugInfoPrinterPass();
     201           0 :       (void) llvm::createPartialInliningPass();
     202           0 :       (void) llvm::createLintPass();
     203           0 :       (void) llvm::createSinkingPass();
     204           0 :       (void) llvm::createLowerAtomicPass();
     205           0 :       (void) llvm::createCorrelatedValuePropagationPass();
     206           0 :       (void) llvm::createMemDepPrinter();
     207           0 :       (void) llvm::createLoopVectorizePass();
     208           0 :       (void) llvm::createSLPVectorizerPass();
     209           0 :       (void) llvm::createLoadStoreVectorizerPass();
     210           0 :       (void) llvm::createPartiallyInlineLibCallsPass();
     211           0 :       (void) llvm::createScalarizerPass();
     212           0 :       (void) llvm::createSeparateConstOffsetFromGEPPass();
     213           0 :       (void) llvm::createSpeculativeExecutionPass();
     214           0 :       (void) llvm::createSpeculativeExecutionIfHasBranchDivergencePass();
     215           0 :       (void) llvm::createRewriteSymbolsPass();
     216           0 :       (void) llvm::createStraightLineStrengthReducePass();
     217           0 :       (void) llvm::createMemDerefPrinter();
     218           0 :       (void) llvm::createMustExecutePrinter();
     219           0 :       (void) llvm::createFloat2IntPass();
     220           0 :       (void) llvm::createEliminateAvailableExternallyPass();
     221           0 :       (void) llvm::createScalarizeMaskedMemIntrinPass();
     222             : 
     223           0 :       (void)new llvm::IntervalPartition();
     224           0 :       (void)new llvm::ScalarEvolutionWrapperPass();
     225           0 :       llvm::Function::Create(nullptr, llvm::GlobalValue::ExternalLinkage)->viewCFGOnly();
     226           0 :       llvm::RGPassManager RGM;
     227           0 :       llvm::TargetLibraryInfoImpl TLII;
     228             :       llvm::TargetLibraryInfo TLI(TLII);
     229           0 :       llvm::AliasAnalysis AA(TLI);
     230           0 :       llvm::AliasSetTracker X(AA);
     231           0 :       X.add(nullptr, 0, llvm::AAMDNodes()); // for -print-alias-sets
     232           0 :       (void) llvm::AreStatisticsEnabled();
     233           0 :       (void) llvm::sys::RunningOnValgrind();
     234             :     }
     235             :   } ForcePassLinking; // Force link by creating a global definition.
     236             : }
     237             : 
     238             : #endif

Generated by: LCOV version 1.13