diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/llvm-as/llvm-as.cpp | 5 | ||||
-rw-r--r-- | tools/llvm-diff/llvm-diff.cpp | 4 | ||||
-rw-r--r-- | tools/llvm-dis/llvm-dis.cpp | 3 | ||||
-rw-r--r-- | tools/llvm-extract/llvm-extract.cpp | 4 | ||||
-rw-r--r-- | tools/llvm-link/llvm-link.cpp | 5 | ||||
-rw-r--r-- | tools/llvm-nm/llvm-nm.cpp | 5 | ||||
-rw-r--r-- | tools/llvm-prof/llvm-prof.cpp | 3 | ||||
-rw-r--r-- | tools/llvm-stress/llvm-stress.cpp | 4 |
8 files changed, 33 insertions, 0 deletions
diff --git a/tools/llvm-as/llvm-as.cpp b/tools/llvm-as/llvm-as.cpp index b2e44ef9d3..9d5e96d965 100644 --- a/tools/llvm-as/llvm-as.cpp +++ b/tools/llvm-as/llvm-as.cpp @@ -20,6 +20,7 @@ #include "llvm/Assembly/Parser.h" #include "llvm/Bitcode/ReaderWriter.h" #include "llvm/IR/Module.h" +#include "llvm/PassManager.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/ManagedStatic.h" #include "llvm/Support/PrettyStackTrace.h" @@ -89,6 +90,10 @@ int main(int argc, char **argv) { PrettyStackTraceProgram X(argc, argv); LLVMContext &Context = getGlobalContext(); llvm_shutdown_obj Y; // Call llvm_shutdown() on exit. + + // Initialize PassManager for -time-passes support. + initializePassManager(); + cl::ParseCommandLineOptions(argc, argv, "llvm .ll -> .bc assembler\n"); // Parse the file now... diff --git a/tools/llvm-diff/llvm-diff.cpp b/tools/llvm-diff/llvm-diff.cpp index f70219eaf5..62fc026327 100644 --- a/tools/llvm-diff/llvm-diff.cpp +++ b/tools/llvm-diff/llvm-diff.cpp @@ -20,6 +20,7 @@ #include "llvm/IR/Module.h" #include "llvm/IR/Type.h" #include "llvm/IRReader/IRReader.h" +#include "llvm/PassManager.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/SourceMgr.h" @@ -67,6 +68,9 @@ static cl::list<std::string> GlobalsToCompare(cl::Positional, cl::desc("<globals to compare>")); int main(int argc, char **argv) { + // Initialize PassManager for -time-passes support. + initializePassManager(); + cl::ParseCommandLineOptions(argc, argv); LLVMContext Context; diff --git a/tools/llvm-dis/llvm-dis.cpp b/tools/llvm-dis/llvm-dis.cpp index 87eb34708a..f31cbd4d2c 100644 --- a/tools/llvm-dis/llvm-dis.cpp +++ b/tools/llvm-dis/llvm-dis.cpp @@ -23,6 +23,7 @@ #include "llvm/IR/IntrinsicInst.h" #include "llvm/IR/Module.h" #include "llvm/IR/Type.h" +#include "llvm/PassManager.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/DataStream.h" #include "llvm/Support/FormattedStream.h" @@ -119,6 +120,8 @@ int main(int argc, char **argv) { LLVMContext &Context = getGlobalContext(); llvm_shutdown_obj Y; // Call llvm_shutdown() on exit. + // Initialize PassManager for -time-passes support. + initializePassManager(); cl::ParseCommandLineOptions(argc, argv, "llvm .bc -> .ll disassembler\n"); diff --git a/tools/llvm-extract/llvm-extract.cpp b/tools/llvm-extract/llvm-extract.cpp index dc1a410953..99131764f3 100644 --- a/tools/llvm-extract/llvm-extract.cpp +++ b/tools/llvm-extract/llvm-extract.cpp @@ -96,6 +96,10 @@ int main(int argc, char **argv) { LLVMContext &Context = getGlobalContext(); llvm_shutdown_obj Y; // Call llvm_shutdown() on exit. + + // Initialize PassManager for -time-passes support. + initializePassManager(); + cl::ParseCommandLineOptions(argc, argv, "llvm extractor\n"); // Use lazy loading, since we only care about selected global values. diff --git a/tools/llvm-link/llvm-link.cpp b/tools/llvm-link/llvm-link.cpp index 99cca2322d..8e7d4b01df 100644 --- a/tools/llvm-link/llvm-link.cpp +++ b/tools/llvm-link/llvm-link.cpp @@ -18,6 +18,7 @@ #include "llvm/IR/LLVMContext.h" #include "llvm/IR/Module.h" #include "llvm/IRReader/IRReader.h" +#include "llvm/PassManager.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/ManagedStatic.h" #include "llvm/Support/Path.h" @@ -73,6 +74,10 @@ int main(int argc, char **argv) { LLVMContext &Context = getGlobalContext(); llvm_shutdown_obj Y; // Call llvm_shutdown() on exit. + + // Initialize PassManager for -time-passes support. + initializePassManager(); + cl::ParseCommandLineOptions(argc, argv, "llvm linker\n"); unsigned BaseArg = 0; diff --git a/tools/llvm-nm/llvm-nm.cpp b/tools/llvm-nm/llvm-nm.cpp index 01dd1c33fd..45309c0714 100644 --- a/tools/llvm-nm/llvm-nm.cpp +++ b/tools/llvm-nm/llvm-nm.cpp @@ -22,6 +22,7 @@ #include "llvm/Object/Archive.h" #include "llvm/Object/MachOUniversal.h" #include "llvm/Object/ObjectFile.h" +#include "llvm/PassManager.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/FileSystem.h" #include "llvm/Support/Format.h" @@ -446,6 +447,10 @@ int main(int argc, char **argv) { PrettyStackTraceProgram X(argc, argv); llvm_shutdown_obj Y; // Call llvm_shutdown() on exit. + + // Initialize PassManager for -time-passes support. + initializePassManager(); + cl::ParseCommandLineOptions(argc, argv, "llvm symbol table dumper\n"); // llvm-nm only reads binary files. diff --git a/tools/llvm-prof/llvm-prof.cpp b/tools/llvm-prof/llvm-prof.cpp index 52d0130069..e36441d6f1 100644 --- a/tools/llvm-prof/llvm-prof.cpp +++ b/tools/llvm-prof/llvm-prof.cpp @@ -260,6 +260,9 @@ int main(int argc, char **argv) { LLVMContext &Context = getGlobalContext(); llvm_shutdown_obj Y; // Call llvm_shutdown() on exit. + // Initialize PassManager for -time-passes support. + initializePassManager(); + cl::ParseCommandLineOptions(argc, argv, "llvm profile dump decoder\n"); // Read in the bitcode file... diff --git a/tools/llvm-stress/llvm-stress.cpp b/tools/llvm-stress/llvm-stress.cpp index 15f7abf70e..6f2224221d 100644 --- a/tools/llvm-stress/llvm-stress.cpp +++ b/tools/llvm-stress/llvm-stress.cpp @@ -681,6 +681,10 @@ void IntroduceControlFlow(Function *F, Random &R) { int main(int argc, char **argv) { // Init LLVM, call llvm_shutdown() on exit, parse args, etc. llvm::PrettyStackTraceProgram X(argc, argv); + + // Initialize PassManager for -time-passes support. + initializePassManager(); + cl::ParseCommandLineOptions(argc, argv, "llvm codegen stress-tester\n"); llvm_shutdown_obj Y; |