summaryrefslogtreecommitdiffstats
path: root/llvm/tools/opt/opt.cpp
diff options
context:
space:
mode:
authorMehdi Amini <mehdi.amini@apple.com>2016-04-12 21:35:18 +0000
committerMehdi Amini <mehdi.amini@apple.com>2016-04-12 21:35:18 +0000
commit68da426eeaea586d8e21fe1a18b2220630ba22ac (patch)
treec0ea1c710573fd1c57c06be60e40ac353701815c /llvm/tools/opt/opt.cpp
parent32ad24d4efae1484a73e91257f8fe3d1c8bcf7be (diff)
downloadbcm5719-llvm-68da426eeaea586d8e21fe1a18b2220630ba22ac.tar.gz
bcm5719-llvm-68da426eeaea586d8e21fe1a18b2220630ba22ac.zip
Move summary creation out of llvm-as into opt
Summary: Let keep llvm-as "dumb": it converts textual IR to bitcode. This commit removes the dependency from llvm-as to libLLVMAnalysis. We'll add back summary in llvm-as if we get to a textual representation for it at some point. In the meantime, opt seems like a better place for that. Reviewers: tejohnson Subscribers: joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D19032 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266131
Diffstat (limited to 'llvm/tools/opt/opt.cpp')
-rw-r--r--llvm/tools/opt/opt.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/llvm/tools/opt/opt.cpp b/llvm/tools/opt/opt.cpp
index e374e1f5446..9a920ad6baf 100644
--- a/llvm/tools/opt/opt.cpp
+++ b/llvm/tools/opt/opt.cpp
@@ -158,6 +158,12 @@ DisableSLPVectorization("disable-slp-vectorization",
cl::desc("Disable the slp vectorization pass"),
cl::init(false));
+static cl::opt<bool> EmitSummaryIndex("module-summary",
+ cl::desc("Emit module summary index"),
+ cl::init(false));
+
+static cl::opt<bool> EmitModuleHash("module-hash", cl::desc("Emit module hash"),
+ cl::init(false));
static cl::opt<bool>
DisableSimplifyLibCalls("disable-simplify-libcalls",
@@ -617,7 +623,8 @@ int main(int argc, char **argv) {
if (OutputAssembly)
Passes.add(createPrintModulePass(*OS, "", PreserveAssemblyUseListOrder));
else
- Passes.add(createBitcodeWriterPass(*OS, PreserveBitcodeUseListOrder));
+ Passes.add(createBitcodeWriterPass(*OS, PreserveBitcodeUseListOrder,
+ EmitSummaryIndex, EmitModuleHash));
}
// Before executing passes, print the final values of the LLVM options.
OpenPOWER on IntegriCloud