2006-08-21 05:37:03 +00:00
|
|
|
//===- llvm/LinkAllPasses.h ------------ Reference All Passes ---*- C++ -*-===//
|
2005-04-21 20:59:05 +00:00
|
|
|
//
|
2005-01-07 07:46:40 +00:00
|
|
|
// The LLVM Compiler Infrastructure
|
2005-01-06 06:02:53 +00:00
|
|
|
//
|
2007-12-29 19:59:42 +00:00
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
2005-04-21 20:59:05 +00:00
|
|
|
//
|
2005-01-06 06:02:53 +00:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
2006-08-21 05:37:03 +00:00
|
|
|
// This header file pulls in all transformation and analysis passes for tools
|
|
|
|
// like opt and bugpoint that need this functionality.
|
2005-01-06 06:02:53 +00:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2006-08-21 05:34:03 +00:00
|
|
|
#ifndef LLVM_LINKALLPASSES_H
|
|
|
|
#define LLVM_LINKALLPASSES_H
|
2005-01-06 06:02:53 +00:00
|
|
|
|
2006-08-21 05:34:03 +00:00
|
|
|
#include "llvm/Analysis/AliasSetTracker.h"
|
2009-10-18 04:10:40 +00:00
|
|
|
#include "llvm/Analysis/DomPrinter.h"
|
2006-08-21 05:34:03 +00:00
|
|
|
#include "llvm/Analysis/FindUsedTypes.h"
|
|
|
|
#include "llvm/Analysis/IntervalPartition.h"
|
|
|
|
#include "llvm/Analysis/Passes.h"
|
2009-07-14 18:44:28 +00:00
|
|
|
#include "llvm/Analysis/PointerTracking.h"
|
2006-08-21 05:34:03 +00:00
|
|
|
#include "llvm/Analysis/PostDominators.h"
|
|
|
|
#include "llvm/Analysis/ScalarEvolution.h"
|
2008-10-21 23:33:38 +00:00
|
|
|
#include "llvm/Assembly/PrintModulePass.h"
|
2005-01-08 18:15:23 +00:00
|
|
|
#include "llvm/CodeGen/Passes.h"
|
2006-08-21 05:34:03 +00:00
|
|
|
#include "llvm/Function.h"
|
2005-01-06 06:02:53 +00:00
|
|
|
#include "llvm/Transforms/Instrumentation.h"
|
|
|
|
#include "llvm/Transforms/IPO.h"
|
|
|
|
#include "llvm/Transforms/Scalar.h"
|
|
|
|
#include "llvm/Transforms/Utils/UnifyFunctionExitNodes.h"
|
2005-10-24 00:08:51 +00:00
|
|
|
#include <cstdlib>
|
2005-01-06 06:02:53 +00:00
|
|
|
|
|
|
|
namespace {
|
2005-01-08 22:01:16 +00:00
|
|
|
struct ForcePassLinking {
|
|
|
|
ForcePassLinking() {
|
2005-10-24 00:08:51 +00:00
|
|
|
// We must reference the passes in such a way that compilers will not
|
2005-01-07 07:44:02 +00:00
|
|
|
// delete it all as dead code, even with whole program optimization,
|
|
|
|
// yet is effectively a NO-OP. As the compiler isn't smart enough
|
2005-10-24 00:08:51 +00:00
|
|
|
// to know that getenv() never returns -1, this will do the job.
|
|
|
|
if (std::getenv("bar") != (char*) -1)
|
2005-01-07 07:44:02 +00:00
|
|
|
return;
|
2005-01-06 06:02:53 +00:00
|
|
|
|
2005-01-08 22:01:16 +00:00
|
|
|
(void) llvm::createAAEvalPass();
|
2005-01-07 07:44:02 +00:00
|
|
|
(void) llvm::createAggressiveDCEPass();
|
2005-01-08 22:01:16 +00:00
|
|
|
(void) llvm::createAliasAnalysisCounterPass();
|
2006-11-14 05:21:04 +00:00
|
|
|
(void) llvm::createAliasDebugger();
|
2005-01-07 07:44:02 +00:00
|
|
|
(void) llvm::createArgumentPromotionPass();
|
2008-03-07 21:07:34 +00:00
|
|
|
(void) llvm::createStructRetPromotionPass();
|
2005-01-08 22:01:16 +00:00
|
|
|
(void) llvm::createBasicAliasAnalysisPass();
|
2008-05-07 19:53:05 +00:00
|
|
|
(void) llvm::createLibCallAliasAnalysisPass(0);
|
2009-08-26 14:53:06 +00:00
|
|
|
(void) llvm::createScalarEvolutionAliasAnalysisPass();
|
2005-01-08 17:21:40 +00:00
|
|
|
(void) llvm::createBlockPlacementPass();
|
2005-01-07 07:44:02 +00:00
|
|
|
(void) llvm::createBreakCriticalEdgesPass();
|
|
|
|
(void) llvm::createCFGSimplificationPass();
|
|
|
|
(void) llvm::createConstantMergePass();
|
|
|
|
(void) llvm::createConstantPropagationPass();
|
|
|
|
(void) llvm::createDeadArgEliminationPass();
|
|
|
|
(void) llvm::createDeadCodeEliminationPass();
|
|
|
|
(void) llvm::createDeadInstEliminationPass();
|
|
|
|
(void) llvm::createDeadStoreEliminationPass();
|
|
|
|
(void) llvm::createDeadTypeEliminationPass();
|
2009-10-18 04:10:40 +00:00
|
|
|
(void) llvm::createDomOnlyPrinterPass();
|
|
|
|
(void) llvm::createDomPrinterPass();
|
|
|
|
(void) llvm::createDomOnlyViewerPass();
|
|
|
|
(void) llvm::createDomViewerPass();
|
2005-01-07 07:44:02 +00:00
|
|
|
(void) llvm::createEdgeProfilerPass();
|
2009-09-01 19:05:58 +00:00
|
|
|
(void) llvm::createOptimalEdgeProfilerPass();
|
2005-01-07 07:44:02 +00:00
|
|
|
(void) llvm::createFunctionInliningPass();
|
2008-09-03 20:24:05 +00:00
|
|
|
(void) llvm::createAlwaysInlinerPass();
|
2005-01-07 07:44:02 +00:00
|
|
|
(void) llvm::createGlobalDCEPass();
|
|
|
|
(void) llvm::createGlobalOptimizerPass();
|
2005-01-08 18:15:23 +00:00
|
|
|
(void) llvm::createGlobalsModRefPass();
|
2005-01-07 07:44:02 +00:00
|
|
|
(void) llvm::createIPConstantPropagationPass();
|
|
|
|
(void) llvm::createIPSCCPPass();
|
|
|
|
(void) llvm::createIndVarSimplifyPass();
|
|
|
|
(void) llvm::createInstructionCombiningPass();
|
2005-10-19 01:41:47 +00:00
|
|
|
(void) llvm::createInternalizePass(false);
|
2006-05-26 13:58:26 +00:00
|
|
|
(void) llvm::createLCSSAPass();
|
2005-01-07 07:44:02 +00:00
|
|
|
(void) llvm::createLICMPass();
|
2009-11-11 00:22:30 +00:00
|
|
|
(void) llvm::createLazyValueInfoPass();
|
2009-03-19 17:29:04 +00:00
|
|
|
(void) llvm::createLiveValuesPass();
|
2009-06-24 21:29:13 +00:00
|
|
|
(void) llvm::createLoopDependenceAnalysisPass();
|
2005-01-08 17:21:40 +00:00
|
|
|
(void) llvm::createLoopExtractorPass();
|
2005-01-07 07:44:02 +00:00
|
|
|
(void) llvm::createLoopSimplifyPass();
|
|
|
|
(void) llvm::createLoopStrengthReducePass();
|
|
|
|
(void) llvm::createLoopUnrollPass();
|
|
|
|
(void) llvm::createLoopUnswitchPass();
|
2007-04-07 04:43:02 +00:00
|
|
|
(void) llvm::createLoopRotatePass();
|
2007-08-07 00:25:56 +00:00
|
|
|
(void) llvm::createLoopIndexSplitPass();
|
2005-01-07 07:44:02 +00:00
|
|
|
(void) llvm::createLowerInvokePass();
|
|
|
|
(void) llvm::createLowerSetJmpPass();
|
|
|
|
(void) llvm::createLowerSwitchPass();
|
2005-01-08 22:01:16 +00:00
|
|
|
(void) llvm::createNoAAPass();
|
|
|
|
(void) llvm::createNoProfileInfoPass();
|
2009-08-08 18:44:18 +00:00
|
|
|
(void) llvm::createProfileEstimatorPass();
|
2009-09-01 08:48:42 +00:00
|
|
|
(void) llvm::createProfileVerifierPass();
|
2005-01-10 03:56:27 +00:00
|
|
|
(void) llvm::createProfileLoaderPass();
|
2005-03-28 02:52:28 +00:00
|
|
|
(void) llvm::createPromoteMemoryToRegisterPass();
|
2005-11-10 02:07:45 +00:00
|
|
|
(void) llvm::createDemoteRegisterToMemoryPass();
|
2005-01-07 07:44:02 +00:00
|
|
|
(void) llvm::createPruneEHPass();
|
2009-10-18 04:10:40 +00:00
|
|
|
(void) llvm::createPostDomOnlyPrinterPass();
|
|
|
|
(void) llvm::createPostDomPrinterPass();
|
|
|
|
(void) llvm::createPostDomOnlyViewerPass();
|
|
|
|
(void) llvm::createPostDomViewerPass();
|
2005-01-07 07:44:02 +00:00
|
|
|
(void) llvm::createReassociatePass();
|
|
|
|
(void) llvm::createSCCPPass();
|
|
|
|
(void) llvm::createScalarReplAggregatesPass();
|
2005-04-26 02:57:49 +00:00
|
|
|
(void) llvm::createSimplifyLibCallsPass();
|
2008-11-04 23:41:45 +00:00
|
|
|
(void) llvm::createSimplifyHalfPowrLibCallsPass();
|
2005-01-07 07:44:02 +00:00
|
|
|
(void) llvm::createSingleLoopExtractorPass();
|
2005-01-08 17:21:40 +00:00
|
|
|
(void) llvm::createStripSymbolsPass();
|
2008-11-18 21:34:39 +00:00
|
|
|
(void) llvm::createStripNonDebugSymbolsPass();
|
2008-02-22 18:39:29 +00:00
|
|
|
(void) llvm::createStripDeadPrototypesPass();
|
2005-01-07 07:44:02 +00:00
|
|
|
(void) llvm::createTailCallEliminationPass();
|
|
|
|
(void) llvm::createTailDuplicationPass();
|
2008-04-20 20:35:01 +00:00
|
|
|
(void) llvm::createJumpThreadingPass();
|
2005-01-08 17:21:40 +00:00
|
|
|
(void) llvm::createUnifyFunctionExitNodesPass();
|
2006-08-21 05:34:03 +00:00
|
|
|
(void) llvm::createInstCountPass();
|
2007-03-31 04:06:36 +00:00
|
|
|
(void) llvm::createCodeGenPreparePass();
|
2007-07-24 17:55:58 +00:00
|
|
|
(void) llvm::createGVNPass();
|
2008-04-09 08:23:16 +00:00
|
|
|
(void) llvm::createMemCpyOptPass();
|
2008-04-29 20:06:54 +00:00
|
|
|
(void) llvm::createLoopDeletionPass();
|
2008-05-29 17:00:13 +00:00
|
|
|
(void) llvm::createPostDomTree();
|
|
|
|
(void) llvm::createPostDomFrontier();
|
2008-08-23 06:07:02 +00:00
|
|
|
(void) llvm::createInstructionNamerPass();
|
2008-09-03 21:00:28 +00:00
|
|
|
(void) llvm::createPartialSpecializationPass();
|
2008-12-31 16:14:43 +00:00
|
|
|
(void) llvm::createFunctionAttrsPass();
|
2008-11-02 05:52:50 +00:00
|
|
|
(void) llvm::createMergeFunctionsPass();
|
2008-10-21 23:33:38 +00:00
|
|
|
(void) llvm::createPrintModulePass(0);
|
|
|
|
(void) llvm::createPrintFunctionPass("", 0);
|
2008-12-16 09:09:19 +00:00
|
|
|
(void) llvm::createDbgInfoPrinterPass();
|
2009-06-14 08:26:32 +00:00
|
|
|
(void) llvm::createPartialInliningPass();
|
2009-07-03 19:28:36 +00:00
|
|
|
(void) llvm::createSSIPass();
|
2009-07-09 15:33:55 +00:00
|
|
|
(void) llvm::createSSIEverythingPass();
|
2009-10-26 19:12:14 +00:00
|
|
|
(void) llvm::createGEPSplitterPass();
|
2009-10-26 23:56:52 +00:00
|
|
|
(void) llvm::createSCCVNPass();
|
2009-10-28 07:03:15 +00:00
|
|
|
(void) llvm::createABCDPass();
|
2006-08-21 05:34:03 +00:00
|
|
|
|
|
|
|
(void)new llvm::IntervalPartition();
|
|
|
|
(void)new llvm::FindUsedTypes();
|
|
|
|
(void)new llvm::ScalarEvolution();
|
2009-07-14 18:44:28 +00:00
|
|
|
(void)new llvm::PointerTracking();
|
2006-08-21 05:34:03 +00:00
|
|
|
((llvm::Function*)0)->viewCFGOnly();
|
|
|
|
llvm::AliasSetTracker X(*(llvm::AliasAnalysis*)0);
|
|
|
|
X.add((llvm::Value*)0, 0); // for -print-alias-sets
|
2005-01-07 07:44:02 +00:00
|
|
|
}
|
2006-08-01 14:21:23 +00:00
|
|
|
} ForcePassLinking; // Force link by creating a global definition.
|
2006-02-22 16:23:43 +00:00
|
|
|
}
|
2005-01-06 06:02:53 +00:00
|
|
|
|
|
|
|
#endif
|