blob: d83b65de4ccadb13e09e0e80ebf6f24fda1acf6f [file] [log] [blame]
Teresa Johnson9ba95f92016-08-11 14:58:12 +00001//===-LTOBackend.cpp - LLVM Link Time Optimizer Backend -------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file implements the "backend" phase of LTO, i.e. it performs
11// optimization and code generation on a loaded module. It is generally used
12// internally by the LTO class but can also be used independently, for example
13// to implement a standalone ThinLTO backend.
14//
15//===----------------------------------------------------------------------===//
16
17#include "llvm/LTO/LTOBackend.h"
Davide Italianoec9612d2016-09-07 17:46:16 +000018#include "llvm/Analysis/AliasAnalysis.h"
19#include "llvm/Analysis/CGSCCPassManager.h"
20#include "llvm/Analysis/LoopPassManager.h"
Teresa Johnson9ba95f92016-08-11 14:58:12 +000021#include "llvm/Analysis/TargetLibraryInfo.h"
22#include "llvm/Analysis/TargetTransformInfo.h"
23#include "llvm/Bitcode/ReaderWriter.h"
24#include "llvm/IR/LegacyPassManager.h"
Davide Italianoec9612d2016-09-07 17:46:16 +000025#include "llvm/IR/PassManager.h"
26#include "llvm/IR/Verifier.h"
Mehdi Amini970800e2016-08-17 06:23:09 +000027#include "llvm/LTO/LTO.h"
Davide Italianodc8e07b2016-09-16 16:05:25 +000028#include "llvm/LTO/legacy/UpdateCompilerUsed.h"
Teresa Johnson9ba95f92016-08-11 14:58:12 +000029#include "llvm/MC/SubtargetFeature.h"
Davide Italianoec9612d2016-09-07 17:46:16 +000030#include "llvm/Passes/PassBuilder.h"
Teresa Johnson9ba95f92016-08-11 14:58:12 +000031#include "llvm/Support/Error.h"
32#include "llvm/Support/FileSystem.h"
33#include "llvm/Support/TargetRegistry.h"
34#include "llvm/Support/ThreadPool.h"
35#include "llvm/Target/TargetMachine.h"
36#include "llvm/Transforms/IPO.h"
37#include "llvm/Transforms/IPO/PassManagerBuilder.h"
38#include "llvm/Transforms/Utils/FunctionImportUtils.h"
39#include "llvm/Transforms/Utils/SplitModule.h"
40
41using namespace llvm;
42using namespace lto;
43
Davide Italianoa416d112016-09-17 22:32:42 +000044LLVM_ATTRIBUTE_NORETURN void reportOpenError(StringRef Path, Twine Msg) {
45 errs() << "failed to open " << Path << ": " << Msg << '\n';
46 errs().flush();
47 exit(1);
48}
49
Teresa Johnson9ba95f92016-08-11 14:58:12 +000050Error Config::addSaveTemps(std::string OutputFileName,
51 bool UseInputModulePath) {
52 ShouldDiscardValueNames = false;
53
54 std::error_code EC;
55 ResolutionFile = llvm::make_unique<raw_fd_ostream>(
Mehdi Aminieccffad2016-08-18 00:12:33 +000056 OutputFileName + "resolution.txt", EC, sys::fs::OpenFlags::F_Text);
Teresa Johnson9ba95f92016-08-11 14:58:12 +000057 if (EC)
58 return errorCodeToError(EC);
59
60 auto setHook = [&](std::string PathSuffix, ModuleHookFn &Hook) {
61 // Keep track of the hook provided by the linker, which also needs to run.
62 ModuleHookFn LinkerHook = Hook;
Mehdi Aminif8c2f082016-08-22 16:17:40 +000063 Hook = [=](unsigned Task, const Module &M) {
Teresa Johnson9ba95f92016-08-11 14:58:12 +000064 // If the linker's hook returned false, we need to pass that result
65 // through.
66 if (LinkerHook && !LinkerHook(Task, M))
67 return false;
68
69 std::string PathPrefix;
70 // If this is the combined module (not a ThinLTO backend compile) or the
71 // user hasn't requested using the input module's path, emit to a file
72 // named from the provided OutputFileName with the Task ID appended.
73 if (M.getModuleIdentifier() == "ld-temp.o" || !UseInputModulePath) {
Mehdi Aminieccffad2016-08-18 00:12:33 +000074 PathPrefix = OutputFileName + utostr(Task);
Teresa Johnson9ba95f92016-08-11 14:58:12 +000075 } else
76 PathPrefix = M.getModuleIdentifier();
77 std::string Path = PathPrefix + "." + PathSuffix + ".bc";
78 std::error_code EC;
79 raw_fd_ostream OS(Path, EC, sys::fs::OpenFlags::F_None);
Davide Italianoa416d112016-09-17 22:32:42 +000080 // Because -save-temps is a debugging feature, we report the error
81 // directly and exit.
82 if (EC)
83 reportOpenError(Path, EC.message());
Teresa Johnson9ba95f92016-08-11 14:58:12 +000084 WriteBitcodeToFile(&M, OS, /*ShouldPreserveUseListOrder=*/false);
85 return true;
86 };
87 };
88
89 setHook("0.preopt", PreOptModuleHook);
90 setHook("1.promote", PostPromoteModuleHook);
91 setHook("2.internalize", PostInternalizeModuleHook);
92 setHook("3.import", PostImportModuleHook);
93 setHook("4.opt", PostOptModuleHook);
94 setHook("5.precodegen", PreCodeGenModuleHook);
95
96 CombinedIndexHook = [=](const ModuleSummaryIndex &Index) {
Mehdi Aminieccffad2016-08-18 00:12:33 +000097 std::string Path = OutputFileName + "index.bc";
Teresa Johnson9ba95f92016-08-11 14:58:12 +000098 std::error_code EC;
99 raw_fd_ostream OS(Path, EC, sys::fs::OpenFlags::F_None);
Davide Italianoa416d112016-09-17 22:32:42 +0000100 // Because -save-temps is a debugging feature, we report the error
101 // directly and exit.
102 if (EC)
103 reportOpenError(Path, EC.message());
Teresa Johnson9ba95f92016-08-11 14:58:12 +0000104 WriteIndexToFile(Index, OS);
105 return true;
106 };
107
108 return Error();
109}
110
111namespace {
112
113std::unique_ptr<TargetMachine>
Davide Italiano24c29b12016-09-07 01:08:31 +0000114createTargetMachine(Config &Conf, StringRef TheTriple,
115 const Target *TheTarget) {
Teresa Johnson9ba95f92016-08-11 14:58:12 +0000116 SubtargetFeatures Features;
117 Features.getDefaultSubtargetFeatures(Triple(TheTriple));
Davide Italiano24c29b12016-09-07 01:08:31 +0000118 for (const std::string &A : Conf.MAttrs)
Teresa Johnson9ba95f92016-08-11 14:58:12 +0000119 Features.AddFeature(A);
120
121 return std::unique_ptr<TargetMachine>(TheTarget->createTargetMachine(
Davide Italiano24c29b12016-09-07 01:08:31 +0000122 TheTriple, Conf.CPU, Features.getString(), Conf.Options, Conf.RelocModel,
123 Conf.CodeModel, Conf.CGOptLevel));
Teresa Johnson9ba95f92016-08-11 14:58:12 +0000124}
125
Davide Italianoec9612d2016-09-07 17:46:16 +0000126static void runNewPMCustomPasses(Module &Mod, TargetMachine *TM,
127 std::string PipelineDesc,
Davide Italiano14e9e8a2016-09-16 21:03:21 +0000128 std::string AAPipelineDesc,
Davide Italianoec9612d2016-09-07 17:46:16 +0000129 bool DisableVerify) {
130 PassBuilder PB(TM);
131 AAManager AA;
Davide Italiano14e9e8a2016-09-16 21:03:21 +0000132
133 // Parse a custom AA pipeline if asked to.
134 if (!AAPipelineDesc.empty())
135 if (!PB.parseAAPipeline(AA, AAPipelineDesc))
136 report_fatal_error("unable to parse AA pipeline description: " +
137 AAPipelineDesc);
138
Davide Italianoec9612d2016-09-07 17:46:16 +0000139 LoopAnalysisManager LAM;
140 FunctionAnalysisManager FAM;
141 CGSCCAnalysisManager CGAM;
142 ModuleAnalysisManager MAM;
143
144 // Register the AA manager first so that our version is the one used.
145 FAM.registerPass([&] { return std::move(AA); });
146
147 // Register all the basic analyses with the managers.
148 PB.registerModuleAnalyses(MAM);
149 PB.registerCGSCCAnalyses(CGAM);
150 PB.registerFunctionAnalyses(FAM);
151 PB.registerLoopAnalyses(LAM);
152 PB.crossRegisterProxies(LAM, FAM, CGAM, MAM);
153
154 ModulePassManager MPM;
155
156 // Always verify the input.
157 MPM.addPass(VerifierPass());
158
159 // Now, add all the passes we've been requested to.
160 if (!PB.parsePassPipeline(MPM, PipelineDesc))
161 report_fatal_error("unable to parse pass pipeline description: " +
162 PipelineDesc);
163
164 if (!DisableVerify)
165 MPM.addPass(VerifierPass());
166 MPM.run(Mod, MAM);
167}
168
Davide Italiano24c29b12016-09-07 01:08:31 +0000169static void runOldPMPasses(Config &Conf, Module &Mod, TargetMachine *TM,
Davide Italiano1e9d3d32016-08-31 17:02:44 +0000170 bool IsThinLto) {
Teresa Johnson9ba95f92016-08-11 14:58:12 +0000171 legacy::PassManager passes;
172 passes.add(createTargetTransformInfoWrapperPass(TM->getTargetIRAnalysis()));
173
174 PassManagerBuilder PMB;
175 PMB.LibraryInfo = new TargetLibraryInfoImpl(Triple(TM->getTargetTriple()));
176 PMB.Inliner = createFunctionInliningPass();
177 // Unconditionally verify input since it is not verified before this
178 // point and has unknown origin.
179 PMB.VerifyInput = true;
Davide Italiano24c29b12016-09-07 01:08:31 +0000180 PMB.VerifyOutput = !Conf.DisableVerify;
Teresa Johnson9ba95f92016-08-11 14:58:12 +0000181 PMB.LoopVectorize = true;
182 PMB.SLPVectorize = true;
Davide Italiano24c29b12016-09-07 01:08:31 +0000183 PMB.OptLevel = Conf.OptLevel;
Teresa Johnson9ba95f92016-08-11 14:58:12 +0000184 if (IsThinLto)
185 PMB.populateThinLTOPassManager(passes);
186 else
187 PMB.populateLTOPassManager(passes);
Davide Italiano24c29b12016-09-07 01:08:31 +0000188 passes.run(Mod);
Davide Italiano1e9d3d32016-08-31 17:02:44 +0000189}
Teresa Johnson9ba95f92016-08-11 14:58:12 +0000190
Davide Italiano24c29b12016-09-07 01:08:31 +0000191bool opt(Config &Conf, TargetMachine *TM, unsigned Task, Module &Mod,
Davide Italiano1e9d3d32016-08-31 17:02:44 +0000192 bool IsThinLto) {
Davide Italiano24c29b12016-09-07 01:08:31 +0000193 Mod.setDataLayout(TM->createDataLayout());
Davide Italianoec9612d2016-09-07 17:46:16 +0000194 if (Conf.OptPipeline.empty())
195 runOldPMPasses(Conf, Mod, TM, IsThinLto);
196 else
Davide Italiano14e9e8a2016-09-16 21:03:21 +0000197 runNewPMCustomPasses(Mod, TM, Conf.OptPipeline, Conf.AAPipeline,
198 Conf.DisableVerify);
Davide Italiano24c29b12016-09-07 01:08:31 +0000199 return !Conf.PostOptModuleHook || Conf.PostOptModuleHook(Task, Mod);
Teresa Johnson9ba95f92016-08-11 14:58:12 +0000200}
201
Mehdi Aminiadc0e262016-08-23 21:30:12 +0000202/// Monolithic LTO does not support caching (yet), this is a convenient wrapper
203/// around AddOutput to workaround this.
204static AddOutputFn getUncachedOutputWrapper(AddOutputFn &AddOutput,
205 unsigned Task) {
206 return [Task, &AddOutput](unsigned TaskId) {
207 auto Output = AddOutput(Task);
208 if (Output->isCachingEnabled() && Output->tryLoadFromCache(""))
209 report_fatal_error("Cache hit without a valid key?");
Mehdi Aminiadc0e262016-08-23 21:30:12 +0000210 assert(Task == TaskId && "Unexpexted TaskId mismatch");
211 return Output;
212 };
213}
214
Davide Italiano24c29b12016-09-07 01:08:31 +0000215void codegen(Config &Conf, TargetMachine *TM, AddOutputFn AddOutput,
216 unsigned Task, Module &Mod) {
217 if (Conf.PreCodeGenModuleHook && !Conf.PreCodeGenModuleHook(Task, Mod))
Teresa Johnson9ba95f92016-08-11 14:58:12 +0000218 return;
219
Mehdi Amini970800e2016-08-17 06:23:09 +0000220 auto Output = AddOutput(Task);
221 std::unique_ptr<raw_pwrite_stream> OS = Output->getStream();
Teresa Johnson9ba95f92016-08-11 14:58:12 +0000222 legacy::PassManager CodeGenPasses;
223 if (TM->addPassesToEmitFile(CodeGenPasses, *OS,
224 TargetMachine::CGFT_ObjectFile))
225 report_fatal_error("Failed to setup codegen");
Davide Italiano24c29b12016-09-07 01:08:31 +0000226 CodeGenPasses.run(Mod);
Teresa Johnson9ba95f92016-08-11 14:58:12 +0000227}
228
Mehdi Amini970800e2016-08-17 06:23:09 +0000229void splitCodeGen(Config &C, TargetMachine *TM, AddOutputFn AddOutput,
Teresa Johnson9ba95f92016-08-11 14:58:12 +0000230 unsigned ParallelCodeGenParallelismLevel,
Davide Italiano24c29b12016-09-07 01:08:31 +0000231 std::unique_ptr<Module> Mod) {
Teresa Johnson9ba95f92016-08-11 14:58:12 +0000232 ThreadPool CodegenThreadPool(ParallelCodeGenParallelismLevel);
233 unsigned ThreadCount = 0;
234 const Target *T = &TM->getTarget();
235
236 SplitModule(
Davide Italiano24c29b12016-09-07 01:08:31 +0000237 std::move(Mod), ParallelCodeGenParallelismLevel,
Teresa Johnson9ba95f92016-08-11 14:58:12 +0000238 [&](std::unique_ptr<Module> MPart) {
239 // We want to clone the module in a new context to multi-thread the
240 // codegen. We do it by serializing partition modules to bitcode
241 // (while still on the main thread, in order to avoid data races) and
242 // spinning up new threads which deserialize the partitions into
243 // separate contexts.
244 // FIXME: Provide a more direct way to do this in LLVM.
245 SmallString<0> BC;
246 raw_svector_ostream BCOS(BC);
247 WriteBitcodeToFile(MPart.get(), BCOS);
248
249 // Enqueue the task
250 CodegenThreadPool.async(
251 [&](const SmallString<0> &BC, unsigned ThreadId) {
252 LTOLLVMContext Ctx(C);
253 ErrorOr<std::unique_ptr<Module>> MOrErr = parseBitcodeFile(
254 MemoryBufferRef(StringRef(BC.data(), BC.size()), "ld-temp.o"),
255 Ctx);
256 if (!MOrErr)
257 report_fatal_error("Failed to read bitcode");
258 std::unique_ptr<Module> MPartInCtx = std::move(MOrErr.get());
259
260 std::unique_ptr<TargetMachine> TM =
261 createTargetMachine(C, MPartInCtx->getTargetTriple(), T);
Mehdi Aminiadc0e262016-08-23 21:30:12 +0000262
263 codegen(C, TM.get(),
264 getUncachedOutputWrapper(AddOutput, ThreadId), ThreadId,
265 *MPartInCtx);
Teresa Johnson9ba95f92016-08-11 14:58:12 +0000266 },
267 // Pass BC using std::move to ensure that it get moved rather than
268 // copied into the thread's context.
269 std::move(BC), ThreadCount++);
270 },
271 false);
272}
273
Davide Italiano24c29b12016-09-07 01:08:31 +0000274Expected<const Target *> initAndLookupTarget(Config &C, Module &Mod) {
Teresa Johnson9ba95f92016-08-11 14:58:12 +0000275 if (!C.OverrideTriple.empty())
Davide Italiano24c29b12016-09-07 01:08:31 +0000276 Mod.setTargetTriple(C.OverrideTriple);
277 else if (Mod.getTargetTriple().empty())
278 Mod.setTargetTriple(C.DefaultTriple);
Teresa Johnson9ba95f92016-08-11 14:58:12 +0000279
280 std::string Msg;
Davide Italiano24c29b12016-09-07 01:08:31 +0000281 const Target *T = TargetRegistry::lookupTarget(Mod.getTargetTriple(), Msg);
Teresa Johnson9ba95f92016-08-11 14:58:12 +0000282 if (!T)
283 return make_error<StringError>(Msg, inconvertibleErrorCode());
284 return T;
285}
286
287}
288
Davide Italianodc8e07b2016-09-16 16:05:25 +0000289static void handleAsmUndefinedRefs(Module &Mod, TargetMachine &TM) {
290 // Collect the list of undefined symbols used in asm and update
291 // llvm.compiler.used to prevent optimization to drop these from the output.
292 StringSet<> AsmUndefinedRefs;
293 object::IRObjectFile::CollectAsmUndefinedRefs(
294 Triple(Mod.getTargetTriple()), Mod.getModuleInlineAsm(),
295 [&AsmUndefinedRefs](StringRef Name, object::BasicSymbolRef::Flags Flags) {
296 if (Flags & object::BasicSymbolRef::SF_Undefined)
297 AsmUndefinedRefs.insert(Name);
298 });
299 updateCompilerUsed(Mod, TM, AsmUndefinedRefs);
300}
301
Mehdi Amini970800e2016-08-17 06:23:09 +0000302Error lto::backend(Config &C, AddOutputFn AddOutput,
Teresa Johnson9ba95f92016-08-11 14:58:12 +0000303 unsigned ParallelCodeGenParallelismLevel,
Davide Italiano24c29b12016-09-07 01:08:31 +0000304 std::unique_ptr<Module> Mod) {
305 Expected<const Target *> TOrErr = initAndLookupTarget(C, *Mod);
Teresa Johnson9ba95f92016-08-11 14:58:12 +0000306 if (!TOrErr)
307 return TOrErr.takeError();
308
309 std::unique_ptr<TargetMachine> TM =
Davide Italiano24c29b12016-09-07 01:08:31 +0000310 createTargetMachine(C, Mod->getTargetTriple(), *TOrErr);
Teresa Johnson9ba95f92016-08-11 14:58:12 +0000311
Davide Italianodc8e07b2016-09-16 16:05:25 +0000312 handleAsmUndefinedRefs(*Mod, *TM);
313
Mehdi Aminid310b472016-08-22 06:25:41 +0000314 if (!C.CodeGenOnly)
Davide Italiano24c29b12016-09-07 01:08:31 +0000315 if (!opt(C, TM.get(), 0, *Mod, /*IsThinLto=*/false))
Mehdi Aminid310b472016-08-22 06:25:41 +0000316 return Error();
Teresa Johnson9ba95f92016-08-11 14:58:12 +0000317
Mehdi Aminiadc0e262016-08-23 21:30:12 +0000318 if (ParallelCodeGenParallelismLevel == 1) {
Davide Italiano24c29b12016-09-07 01:08:31 +0000319 codegen(C, TM.get(), getUncachedOutputWrapper(AddOutput, 0), 0, *Mod);
Mehdi Aminiadc0e262016-08-23 21:30:12 +0000320 } else {
Mehdi Amini970800e2016-08-17 06:23:09 +0000321 splitCodeGen(C, TM.get(), AddOutput, ParallelCodeGenParallelismLevel,
Davide Italiano24c29b12016-09-07 01:08:31 +0000322 std::move(Mod));
Mehdi Aminiadc0e262016-08-23 21:30:12 +0000323 }
Teresa Johnson9ba95f92016-08-11 14:58:12 +0000324 return Error();
325}
326
Mehdi Amini970800e2016-08-17 06:23:09 +0000327Error lto::thinBackend(Config &Conf, unsigned Task, AddOutputFn AddOutput,
Mehdi Aminiacc50c42016-08-16 00:44:46 +0000328 Module &Mod, ModuleSummaryIndex &CombinedIndex,
Teresa Johnson9ba95f92016-08-11 14:58:12 +0000329 const FunctionImporter::ImportMapTy &ImportList,
330 const GVSummaryMapTy &DefinedGlobals,
331 MapVector<StringRef, MemoryBufferRef> &ModuleMap) {
Mehdi Aminiacc50c42016-08-16 00:44:46 +0000332 Expected<const Target *> TOrErr = initAndLookupTarget(Conf, Mod);
Teresa Johnson9ba95f92016-08-11 14:58:12 +0000333 if (!TOrErr)
334 return TOrErr.takeError();
335
336 std::unique_ptr<TargetMachine> TM =
Mehdi Aminiacc50c42016-08-16 00:44:46 +0000337 createTargetMachine(Conf, Mod.getTargetTriple(), *TOrErr);
Teresa Johnson9ba95f92016-08-11 14:58:12 +0000338
Davide Italianodc8e07b2016-09-16 16:05:25 +0000339 handleAsmUndefinedRefs(Mod, *TM);
340
Mehdi Aminid310b472016-08-22 06:25:41 +0000341 if (Conf.CodeGenOnly) {
342 codegen(Conf, TM.get(), AddOutput, Task, Mod);
343 return Error();
344 }
345
Mehdi Aminiacc50c42016-08-16 00:44:46 +0000346 if (Conf.PreOptModuleHook && !Conf.PreOptModuleHook(Task, Mod))
Teresa Johnson9ba95f92016-08-11 14:58:12 +0000347 return Error();
348
Mehdi Aminiacc50c42016-08-16 00:44:46 +0000349 renameModuleForThinLTO(Mod, CombinedIndex);
Teresa Johnson9ba95f92016-08-11 14:58:12 +0000350
Mehdi Amini8ac7b322016-08-18 00:59:24 +0000351 thinLTOResolveWeakForLinkerModule(Mod, DefinedGlobals);
352
Mehdi Aminiacc50c42016-08-16 00:44:46 +0000353 if (Conf.PostPromoteModuleHook && !Conf.PostPromoteModuleHook(Task, Mod))
Teresa Johnson9ba95f92016-08-11 14:58:12 +0000354 return Error();
355
356 if (!DefinedGlobals.empty())
Mehdi Aminiacc50c42016-08-16 00:44:46 +0000357 thinLTOInternalizeModule(Mod, DefinedGlobals);
Teresa Johnson9ba95f92016-08-11 14:58:12 +0000358
Mehdi Aminiacc50c42016-08-16 00:44:46 +0000359 if (Conf.PostInternalizeModuleHook &&
360 !Conf.PostInternalizeModuleHook(Task, Mod))
Teresa Johnson9ba95f92016-08-11 14:58:12 +0000361 return Error();
362
363 auto ModuleLoader = [&](StringRef Identifier) {
Mehdi Amini9ec5a612016-08-23 16:53:34 +0000364 assert(Mod.getContext().isODRUniquingDebugTypes() &&
Davide Italiano63e8f442016-09-14 18:48:43 +0000365 "ODR Type uniquing should be enabled on the context");
Teresa Johnson9ba95f92016-08-11 14:58:12 +0000366 return std::move(getLazyBitcodeModule(MemoryBuffer::getMemBuffer(
367 ModuleMap[Identifier], false),
Mehdi Aminiacc50c42016-08-16 00:44:46 +0000368 Mod.getContext(),
Teresa Johnson9ba95f92016-08-11 14:58:12 +0000369 /*ShouldLazyLoadMetadata=*/true)
370 .get());
371 };
372
373 FunctionImporter Importer(CombinedIndex, ModuleLoader);
Mehdi Aminiacc50c42016-08-16 00:44:46 +0000374 Importer.importFunctions(Mod, ImportList);
Teresa Johnson9ba95f92016-08-11 14:58:12 +0000375
Mehdi Aminiacc50c42016-08-16 00:44:46 +0000376 if (Conf.PostImportModuleHook && !Conf.PostImportModuleHook(Task, Mod))
Teresa Johnson9ba95f92016-08-11 14:58:12 +0000377 return Error();
378
Mehdi Aminiacc50c42016-08-16 00:44:46 +0000379 if (!opt(Conf, TM.get(), Task, Mod, /*IsThinLto=*/true))
Teresa Johnson9ba95f92016-08-11 14:58:12 +0000380 return Error();
381
Mehdi Amini970800e2016-08-17 06:23:09 +0000382 codegen(Conf, TM.get(), AddOutput, Task, Mod);
Teresa Johnson9ba95f92016-08-11 14:58:12 +0000383 return Error();
384}