1 //===- LinkAllVMCore.h - Reference All VMCore Code --------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file was developed by Reid Spencer and is distributed under the
6 // University of Illinois Open Source License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This header file pulls in all analysis passes for tools like analyze and
11 // bugpoint that need this functionality.
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_LINKALLVMCORE_H
16 #define LLVM_LINKALLVMCORE_H
18 #include <llvm/Support/IncludeFile.h>
19 #include <llvm/Module.h>
20 #include <llvm/IntrinsicInst.h>
21 #include <llvm/IntrinsicInst.h>
22 #include <llvm/Instructions.h>
23 #include <llvm/Analysis/Dominators.h>
24 #include <llvm/Analysis/Verifier.h>
27 struct ForceVMCoreLinking {
28 ForceVMCoreLinking() {
29 // We must reference the passes in such a way that compilers will not
30 // delete it all as dead code, even with whole program optimization,
31 // yet is effectively a NO-OP. As the compiler isn't smart enough
32 // to know that getenv() never returns -1, this will do the job.
33 if (std::getenv("bar") != (char*) -1)
36 (void)new llvm::LocalDataStructures();
37 (void)new llvm::BUDataStructures();
38 (void)new llvm::TDDataStructures();
39 (void)new llvm::CompleteBUDataStructures();
40 (void)new llvm::EquivClassGraphs();
41 (void)llvm::createDataStructureStatsPass();
42 (void)llvm::createDataStructureGraphCheckerPass();
43 (void)llvm::createProfileLoaderPass();
44 (void)llvm::createNoProfileInfoPass();
45 (void)llvm::createInstCountPass();
46 (void)new llvm::IntervalPartition();
47 (void)new llvm::ImmediateDominators();
48 (void)new llvm::PostDominatorSet();
49 (void)new llvm::FindUsedTypes();
50 (void)new llvm::ScalarEvolution();
51 (void)new llvm::CallTargetFinder();
52 ((llvm::Function*)0)->viewCFGOnly();
53 llvm::AliasSetTracker X(*(llvm::AliasAnalysis*)0);
54 X.add((llvm::Value*)0, 0); // for -print-alias-sets