summaryrefslogtreecommitdiffstats
path: root/llvm/tools/opt/opt.cpp
diff options
context:
space:
mode:
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