llvm.org GIT mirror llvm / 1b27914 include / llvm / LinkAllPasses.h
1b27914

Tree @1b27914 (Download .tar.gz)

LinkAllPasses.h @1b27914

037ce98
3469538
e89c7c6
4b807e0
7ed47a1
 
3469538
4b807e0
 
04317cc
037ce98
4b807e0
 
 
62c5105
 
4b807e0
62c5105
a125cac
b839c55
62c5105
255f89f
62c5105
 
d8c5ec6
f96b006
62c5105
06deda2
0b8c9a8
8a5351f
4b807e0
255f89f
24c4898
4b807e0
35c1630
1b27914
255f89f
9b2b56e
4b807e0
 
534927d
 
9b2b56e
b99468d
 
9b2b56e
 
b99468d
4b807e0
534927d
b99468d
534927d
472c791
b99468d
1d6c2d7
534927d
e703fcb
2385e0e
c182cb5
16fd27b
5c525b5
b99468d
a125cac
 
b99468d
bf301d5
ad966ea
b99468d
 
6bed58e
b99468d
 
 
 
ad43499
b839c55
 
 
 
e229248
70b0751
b99468d
3d566dd
b99468d
 
06deda2
b99468d
 
 
 
e5551ed
5d0f7af
 
11f510b
b99468d
10f2d13
bf65268
b99468d
 
bebe48d
b99468d
 
b0db161
6116fb1
9da9934
b99468d
 
534927d
9fbd318
2f6263c
9fbd318
 
 
daa09d0
e60f69c
105b2f5
b99468d
b839c55
 
 
 
b99468d
f96b006
 
 
 
 
b99468d
 
 
bf65268
f17fc46
26d1429
5f2e468
b99468d
8383a7b
bf65268
62c5105
943ce55
dbe0dec
12be936
9d01d42
1ad2cb7
a723d1e
0396cd3
5771d6c
3793325
95f1ef4
9e89ba3
579a024
e703fcb
 
 
ef0b145
ca39902
113902e
28a193e
3bababf
25e9405
ead0109
43ff68d
ae3b652
8383b53
de5e5ec
a8a7099
0f77879
167a57c
35c1630
62c5105
 
 
e703fcb
0e122d1
e703fcb
 
814a2ff
b99468d
13ec702
410354f
4b807e0
 
//===- llvm/LinkAllPasses.h ------------ Reference All Passes ---*- C++ -*-===//
//
//                      The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This header file pulls in all transformation and analysis passes for tools
// like opt and bugpoint that need this functionality.
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LINKALLPASSES_H
#define LLVM_LINKALLPASSES_H

#include "llvm/Analysis/AliasSetTracker.h"
#include "llvm/Analysis/CallPrinter.h"
#include "llvm/Analysis/DomPrinter.h"
#include "llvm/Analysis/IntervalPartition.h"
#include "llvm/Analysis/Lint.h"
#include "llvm/Analysis/Passes.h"
#include "llvm/Analysis/PostDominators.h"
#include "llvm/Analysis/RegionPass.h"
#include "llvm/Analysis/RegionPrinter.h"
#include "llvm/Analysis/ScalarEvolution.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/IRPrintingPasses.h"
#include "llvm/Transforms/IPO.h"
#include "llvm/Transforms/Instrumentation.h"
#include "llvm/Transforms/ObjCARC.h"
#include "llvm/Transforms/Scalar.h"
#include "llvm/Transforms/Utils/SymbolRewriter.h"
#include "llvm/Transforms/Utils/UnifyFunctionExitNodes.h"
#include "llvm/Transforms/Vectorize.h"
#include <cstdlib>

namespace {
  struct ForcePassLinking {
    ForcePassLinking() {
      // We must reference the passes in such a way that compilers will not
      // delete it all as dead code, even with whole program optimization,
      // yet is effectively a NO-OP. As the compiler isn't smart enough
      // to know that getenv() never returns -1, this will do the job.
      if (std::getenv("bar") != (char*) -1)
        return;

      (void) llvm::createAAEvalPass();
      (void) llvm::createAggressiveDCEPass();
      (void) llvm::createAliasAnalysisCounterPass();
      (void) llvm::createAliasDebugger();
      (void) llvm::createArgumentPromotionPass();
      (void) llvm::createAlignmentFromAssumptionsPass();
      (void) llvm::createBasicAliasAnalysisPass();
      (void) llvm::createLibCallAliasAnalysisPass(nullptr);
      (void) llvm::createScalarEvolutionAliasAnalysisPass();
      (void) llvm::createTypeBasedAliasAnalysisPass();
      (void) llvm::createScopedNoAliasAAPass();
      (void) llvm::createBoundsCheckingPass();
      (void) llvm::createBreakCriticalEdgesPass();
      (void) llvm::createCallGraphPrinterPass();
      (void) llvm::createCallGraphViewerPass();
      (void) llvm::createCFGSimplificationPass();
      (void) llvm::createCFLAliasAnalysisPass();
      (void) llvm::createStructurizeCFGPass();
      (void) llvm::createConstantMergePass();
      (void) llvm::createConstantPropagationPass();
      (void) llvm::createCostModelAnalysisPass();
      (void) llvm::createDeadArgEliminationPass();
      (void) llvm::createDeadCodeEliminationPass();
      (void) llvm::createDeadInstEliminationPass();
      (void) llvm::createDeadStoreEliminationPass();
      (void) llvm::createDependenceAnalysisPass();
      (void) llvm::createDomOnlyPrinterPass();
      (void) llvm::createDomPrinterPass();
      (void) llvm::createDomOnlyViewerPass();
      (void) llvm::createDomViewerPass();
      (void) llvm::createGCOVProfilerPass();
      (void) llvm::createInstrProfilingPass();
      (void) llvm::createFunctionInliningPass();
      (void) llvm::createAlwaysInlinerPass();
      (void) llvm::createGlobalDCEPass();
      (void) llvm::createGlobalOptimizerPass();
      (void) llvm::createGlobalsModRefPass();
      (void) llvm::createIPConstantPropagationPass();
      (void) llvm::createIPSCCPPass();
      (void) llvm::createIndVarSimplifyPass();
      (void) llvm::createInstructionCombiningPass();
      (void) llvm::createInternalizePass();
      (void) llvm::createJumpInstrTableInfoPass();
      (void) llvm::createJumpInstrTablesPass();
      (void) llvm::createLCSSAPass();
      (void) llvm::createLICMPass();
      (void) llvm::createLazyValueInfoPass();
      (void) llvm::createLoopExtractorPass();
      (void) llvm::createLoopSimplifyPass();
      (void) llvm::createLoopStrengthReducePass();
      (void) llvm::createLoopRerollPass();
      (void) llvm::createLoopUnrollPass();
      (void) llvm::createLoopUnswitchPass();
      (void) llvm::createLoopIdiomPass();
      (void) llvm::createLoopRotatePass();
      (void) llvm::createLowerExpectIntrinsicPass();
      (void) llvm::createLowerInvokePass();
      (void) llvm::createLowerSwitchPass();
      (void) llvm::createNoAAPass();
      (void) llvm::createObjCARCAliasAnalysisPass();
      (void) llvm::createObjCARCAPElimPass();
      (void) llvm::createObjCARCExpandPass();
      (void) llvm::createObjCARCContractPass();
      (void) llvm::createObjCARCOptPass();
      (void) llvm::createPAEvalPass();
      (void) llvm::createPromoteMemoryToRegisterPass();
      (void) llvm::createDemoteRegisterToMemoryPass();
      (void) llvm::createPruneEHPass();
      (void) llvm::createPostDomOnlyPrinterPass();
      (void) llvm::createPostDomPrinterPass();
      (void) llvm::createPostDomOnlyViewerPass();
      (void) llvm::createPostDomViewerPass();
      (void) llvm::createReassociatePass();
      (void) llvm::createRegionInfoPass();
      (void) llvm::createRegionOnlyPrinterPass();
      (void) llvm::createRegionOnlyViewerPass();
      (void) llvm::createRegionPrinterPass();
      (void) llvm::createRegionViewerPass();
      (void) llvm::createSCCPPass();
      (void) llvm::createScalarReplAggregatesPass();
      (void) llvm::createSingleLoopExtractorPass();
      (void) llvm::createStripSymbolsPass();
      (void) llvm::createStripNonDebugSymbolsPass();
      (void) llvm::createStripDeadDebugInfoPass();
      (void) llvm::createStripDeadPrototypesPass();
      (void) llvm::createTailCallEliminationPass();
      (void) llvm::createJumpThreadingPass();
      (void) llvm::createUnifyFunctionExitNodesPass();
      (void) llvm::createInstCountPass();
      (void) llvm::createConstantHoistingPass();
      (void) llvm::createCodeGenPreparePass();
      (void) llvm::createEarlyCSEPass();
      (void) llvm::createMergedLoadStoreMotionPass();
      (void) llvm::createGVNPass();
      (void) llvm::createMemCpyOptPass();
      (void) llvm::createLoopDeletionPass();
      (void) llvm::createPostDomTree();
      (void) llvm::createInstructionNamerPass();
      (void) llvm::createMetaRenamerPass();
      (void) llvm::createFunctionAttrsPass();
      (void) llvm::createMergeFunctionsPass();
      (void) llvm::createPrintModulePass(*(llvm::raw_ostream*)nullptr);
      (void) llvm::createPrintFunctionPass(*(llvm::raw_ostream*)nullptr);
      (void) llvm::createPrintBasicBlockPass(*(llvm::raw_ostream*)nullptr);
      (void) llvm::createModuleDebugInfoPrinterPass();
      (void) llvm::createPartialInliningPass();
      (void) llvm::createLintPass();
      (void) llvm::createSinkingPass();
      (void) llvm::createLowerAtomicPass();
      (void) llvm::createCorrelatedValuePropagationPass();
      (void) llvm::createMemDepPrinter();
      (void) llvm::createInstructionSimplifierPass();
      (void) llvm::createLoopVectorizePass();
      (void) llvm::createSLPVectorizerPass();
      (void) llvm::createBBVectorizePass();
      (void) llvm::createPartiallyInlineLibCallsPass();
      (void) llvm::createScalarizerPass();
      (void) llvm::createSeparateConstOffsetFromGEPPass();
      (void) llvm::createRewriteSymbolsPass();

      (void)new llvm::IntervalPartition();
      (void)new llvm::ScalarEvolution();
      ((llvm::Function*)nullptr)->viewCFGOnly();
      llvm::RGPassManager RGM;
      ((llvm::RegionPass*)nullptr)->runOnRegion((llvm::Region*)nullptr, RGM);
      llvm::AliasSetTracker X(*(llvm::AliasAnalysis*)nullptr);
      X.add(nullptr, 0, llvm::AAMDNodes()); // for -print-alias-sets
    }
  } ForcePassLinking; // Force link by creating a global definition.
}

#endif