blob: aa4b4b63ce49a35b0d1de5fcb37eb2e0f65e2a55 [file] [log] [blame]
Jan Voung44c3a802015-03-27 16:29:08 -07001//===- subzero/src/IceClFlags.cpp - Command line flags and parsing --------===//
2//
3// The Subzero Code Generator
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
Andrew Scull9612d322015-07-06 14:53:25 -07009///
10/// \file
11/// This file defines commandline flags parsing.
12/// This currently relies on llvm::cl to parse. In the future, the minimal
13/// build can have a simpler parser.
14///
Jan Voung44c3a802015-03-27 16:29:08 -070015//===----------------------------------------------------------------------===//
16
Jan Voung44c3a802015-03-27 16:29:08 -070017#include "IceClFlags.h"
John Porto67f8de92015-06-25 10:14:17 -070018
Jan Voung44c3a802015-03-27 16:29:08 -070019#include "IceClFlagsExtra.h"
Jim Stichnoth98da9662015-06-27 06:38:08 -070020
21#pragma clang diagnostic push
22#pragma clang diagnostic ignored "-Wunused-parameter"
John Porto67f8de92015-06-25 10:14:17 -070023#include "llvm/Support/CommandLine.h"
Jim Stichnoth98da9662015-06-27 06:38:08 -070024#pragma clang diagnostic pop
Jan Voung44c3a802015-03-27 16:29:08 -070025
26namespace cl = llvm::cl;
27
28// Options which are captured in Ice::ClFlags and propagated.
29
30namespace {
31
32cl::opt<bool> AllowErrorRecovery(
33 "allow-pnacl-reader-error-recovery",
34 cl::desc("Allow error recovery when reading PNaCl bitcode."),
35 cl::init(false));
36
37// This is currently needed by crosstest.py.
38cl::opt<bool> AllowUninitializedGlobals(
39 "allow-uninitialized-globals",
40 cl::desc("Allow global variables to be uninitialized"));
41
42cl::opt<bool>
43 DataSections("fdata-sections",
44 cl::desc("Emit (global) data into separate sections"));
45
46cl::opt<bool> DecorateAsm(
47 "asm-verbose",
48 cl::desc("Decorate textual asm output with register liveness info"));
49
50cl::opt<std::string>
51 DefaultFunctionPrefix("default-function-prefix",
52 cl::desc("Define default function prefix for naming "
53 "unnamed functions"),
54 cl::init("Function"));
55
56cl::opt<std::string>
57 DefaultGlobalPrefix("default-global-prefix",
58 cl::desc("Define default global prefix for naming "
59 "unnamed globals"),
60 cl::init("Global"));
61cl::opt<bool> DisableInternal("externalize",
62 cl::desc("Externalize all symbols"));
63// Note: Modifiable only if ALLOW_DISABLE_IR_GEN.
64cl::opt<bool> DisableIRGeneration("no-ir-gen",
65 cl::desc("Disable generating Subzero IR."));
66cl::opt<bool> DisableTranslation("notranslate",
67 cl::desc("Disable Subzero translation"));
68
69cl::opt<bool>
70 DumpStats("szstats",
71 cl::desc("Print statistics after translating each function"));
72
John Portof8b4cc82015-06-09 18:06:19 -070073cl::opt<bool> EnableBlockProfile(
74 "enable-block-profile",
75 cl::desc("If true, instrument basic blocks, and output profiling "
76 "information to stdout at the end of program execution."),
77 cl::init(false));
78
Jan Voung44c3a802015-03-27 16:29:08 -070079cl::opt<bool>
80 FunctionSections("ffunction-sections",
81 cl::desc("Emit functions into separate sections"));
82
83// Number of translation threads (in addition to the parser thread and
84// the emitter thread). The special case of 0 means purely
85// sequential, i.e. parser, translator, and emitter all within the
86// same single thread. (This may need a slight rework if we expand to
87// multiple parser or emitter threads.)
88cl::opt<uint32_t> NumThreads(
89 "threads",
90 cl::desc("Number of translation threads (0 for purely sequential)"),
91 // TODO(stichnot): Settle on a good default. Consider
92 // something related to std::thread::hardware_concurrency().
93 cl::init(2));
94
95cl::opt<Ice::OptLevel> OLevel(cl::desc("Optimization level"),
96 cl::init(Ice::Opt_m1), cl::value_desc("level"),
97 cl::values(clEnumValN(Ice::Opt_m1, "Om1", "-1"),
98 clEnumValN(Ice::Opt_m1, "O-1", "-1"),
99 clEnumValN(Ice::Opt_0, "O0", "0"),
100 clEnumValN(Ice::Opt_1, "O1", "1"),
101 clEnumValN(Ice::Opt_2, "O2", "2"),
102 clEnumValEnd));
103
104cl::opt<bool>
105 EnablePhiEdgeSplit("phi-edge-split",
106 cl::desc("Enable edge splitting for Phi lowering"),
107 cl::init(true));
108
109// TODO(stichnot): See if we can easily use LLVM's -rng-seed option
110// and implementation. I expect the implementation is different and
111// therefore the tests would need to be changed.
112cl::opt<unsigned long long>
113 RandomSeed("sz-seed", cl::desc("Seed the random number generator"),
Qining Lu253dc8a2015-06-22 10:10:23 -0700114 cl::init(1));
Jan Voung44c3a802015-03-27 16:29:08 -0700115
116cl::opt<bool> ShouldDoNopInsertion("nop-insertion",
117 cl::desc("Randomly insert NOPs"),
118 cl::init(false));
119
120cl::opt<bool>
121 RandomizeRegisterAllocation("randomize-regalloc",
122 cl::desc("Randomize register allocation"),
123 cl::init(false));
124
Jan Voungb2d50842015-05-12 09:53:50 -0700125cl::opt<bool> SkipUnimplemented(
126 "skip-unimplemented",
127 cl::desc("Skip through unimplemented lowering code instead of aborting."),
128 cl::init(false));
129
Jan Voung44c3a802015-03-27 16:29:08 -0700130cl::opt<bool> SubzeroTimingEnabled(
131 "timing", cl::desc("Enable breakdown timing of Subzero translation"));
132
133cl::opt<Ice::TargetArch> TargetArch(
134 "target", cl::desc("Target architecture:"), cl::init(Ice::Target_X8632),
135 cl::values(
136 clEnumValN(Ice::Target_X8632, "x8632", "x86-32"),
137 clEnumValN(Ice::Target_X8632, "x86-32", "x86-32 (same as x8632)"),
138 clEnumValN(Ice::Target_X8632, "x86_32", "x86-32 (same as x8632)"),
139 clEnumValN(Ice::Target_X8664, "x8664", "x86-64"),
140 clEnumValN(Ice::Target_X8664, "x86-64", "x86-64 (same as x8664)"),
141 clEnumValN(Ice::Target_X8664, "x86_64", "x86-64 (same as x8664)"),
142 clEnumValN(Ice::Target_ARM32, "arm", "arm32"),
143 clEnumValN(Ice::Target_ARM32, "arm32", "arm32 (same as arm)"),
Jim Stichnoth6da4cef2015-06-11 13:26:33 -0700144 clEnumValN(Ice::Target_ARM64, "arm64", "arm64"),
145 clEnumValN(Ice::Target_MIPS32, "mips", "mips32"),
146 clEnumValN(Ice::Target_MIPS32, "mips32", "mips32 (same as mips)"),
147 clEnumValEnd));
Jan Voung28068ad2015-07-31 12:58:46 -0700148
149cl::opt<uint32_t> TestStackExtra(
150 "test-stack-extra",
151 cl::desc(
152 "Extra amount of stack to add to the frame in bytes (for testing)."),
153 cl::init(0));
154
Jan Voung44c3a802015-03-27 16:29:08 -0700155cl::opt<Ice::TargetInstructionSet> TargetInstructionSet(
156 "mattr", cl::desc("Target architecture attributes"),
Jan Voungd062f732015-06-15 17:17:31 -0700157 cl::init(Ice::BaseInstructionSet),
158 cl::values(clEnumValN(Ice::BaseInstructionSet, "base",
159 "Target chooses baseline instruction set (default)"),
160 clEnumValN(Ice::X86InstructionSet_SSE2, "sse2",
161 "Enable X86 SSE2 instructions"),
Jan Voung44c3a802015-03-27 16:29:08 -0700162 clEnumValN(Ice::X86InstructionSet_SSE4_1, "sse4.1",
Jan Voungd062f732015-06-15 17:17:31 -0700163 "Enable X86 SSE 4.1 instructions"),
164 clEnumValN(Ice::ARM32InstructionSet_Neon, "neon",
165 "Enable ARM Neon instructions"),
166 clEnumValN(Ice::ARM32InstructionSet_HWDivArm, "hwdiv-arm",
167 "Enable ARM integer divide instructions in ARM mode"),
Jan Voung44c3a802015-03-27 16:29:08 -0700168 clEnumValEnd));
169cl::opt<std::string>
170 TestPrefix("prefix",
171 cl::desc("Prepend a prefix to symbol names for testing"),
172 cl::init(""), cl::value_desc("prefix"));
173
174cl::opt<bool> TimeEachFunction(
175 "timing-funcs", cl::desc("Print total translation time for each function"));
176
177cl::opt<std::string> TimingFocusOn(
178 "timing-focus",
179 cl::desc("Break down timing for a specific function (use '*' for all)"),
180 cl::init(""));
181
182cl::opt<std::string>
183 TranslateOnly("translate-only",
184 cl::desc("Translate only the given function"), cl::init(""));
185
186cl::opt<bool> UseSandboxing("sandbox", cl::desc("Use sandboxing"));
187
188cl::opt<std::string> VerboseFocusOn(
189 "verbose-focus",
190 cl::desc("Temporarily enable full verbosity for a specific function"),
191 cl::init(""));
192
193cl::opt<Ice::FileType> OutFileType(
194 "filetype", cl::desc("Output file type"), cl::init(Ice::FT_Iasm),
195 cl::values(clEnumValN(Ice::FT_Elf, "obj", "Native ELF object ('.o') file"),
196 clEnumValN(Ice::FT_Asm, "asm", "Assembly ('.s') file"),
197 clEnumValN(Ice::FT_Iasm, "iasm",
198 "Low-level integrated assembly ('.s') file"),
199 clEnumValEnd));
200
201cl::opt<int> MaxNopsPerInstruction(
202 "max-nops-per-instruction",
203 cl::desc("Max number of nops to insert per instruction"), cl::init(1));
204
205cl::opt<int> NopProbabilityAsPercentage(
206 "nop-insertion-percentage",
207 cl::desc("Nop insertion probability as percentage"), cl::init(10));
208
209cl::list<Ice::VerboseItem> VerboseList(
210 "verbose", cl::CommaSeparated,
211 cl::desc("Verbose options (can be comma-separated):"),
212 cl::values(
213 clEnumValN(Ice::IceV_Instructions, "inst", "Print basic instructions"),
214 clEnumValN(Ice::IceV_Deleted, "del", "Include deleted instructions"),
215 clEnumValN(Ice::IceV_InstNumbers, "instnum",
216 "Print instruction numbers"),
217 clEnumValN(Ice::IceV_Preds, "pred", "Show predecessors"),
218 clEnumValN(Ice::IceV_Succs, "succ", "Show successors"),
219 clEnumValN(Ice::IceV_Liveness, "live", "Liveness information"),
220 clEnumValN(Ice::IceV_RegOrigins, "orig", "Physical register origins"),
221 clEnumValN(Ice::IceV_LinearScan, "regalloc", "Linear scan details"),
222 clEnumValN(Ice::IceV_Frame, "frame", "Stack frame layout details"),
223 clEnumValN(Ice::IceV_AddrOpt, "addropt", "Address mode optimization"),
224 clEnumValN(Ice::IceV_Random, "random", "Randomization details"),
Jim Stichnotha59ae6f2015-05-17 10:11:41 -0700225 clEnumValN(Ice::IceV_Folding, "fold", "Instruction folding details"),
Jim Stichnothe4f65d82015-06-17 22:16:02 -0700226 clEnumValN(Ice::IceV_RMW, "rmw", "ReadModifyWrite optimization"),
Jan Voung44c3a802015-03-27 16:29:08 -0700227 clEnumValN(Ice::IceV_All, "all", "Use all verbose options"),
228 clEnumValN(Ice::IceV_Most, "most",
229 "Use all verbose options except 'regalloc'"),
230 clEnumValN(Ice::IceV_None, "none", "No verbosity"), clEnumValEnd));
231
232// Options not captured in Ice::ClFlags and propagated.
233
234cl::opt<bool> AlwaysExitSuccess(
235 "exit-success", cl::desc("Exit with success status, even if errors found"),
236 cl::init(false));
237
238// Note: While this flag isn't used in the minimal build, we keep this
239// flag so that tests can set this command-line flag without concern
240// to the type of build. We double check that this flag at runtime
241// to make sure the consistency is maintained.
242cl::opt<bool>
243 BuildOnRead("build-on-read",
244 cl::desc("Build ICE instructions when reading bitcode"),
245 cl::init(true));
246
247cl::opt<llvm::NaClFileFormat> InputFileFormat(
248 "bitcode-format", cl::desc("Define format of input file:"),
249 cl::values(clEnumValN(llvm::LLVMFormat, "llvm", "LLVM file (default)"),
250 clEnumValN(llvm::PNaClFormat, "pnacl", "PNaCl bitcode file"),
251 clEnumValEnd),
252 cl::init(llvm::LLVMFormat));
253
254cl::opt<bool> GenerateBuildAtts(
255 "build-atts", cl::desc("Generate list of build attributes associated with "
256 "this executable."),
257 cl::init(false));
258
259cl::opt<std::string> IRFilename(cl::Positional, cl::desc("<IR file>"),
260 cl::init("-"));
261cl::opt<std::string> LogFilename("log", cl::desc("Set log filename"),
262 cl::init("-"), cl::value_desc("filename"));
263cl::opt<bool> LLVMVerboseErrors(
264 "verbose-llvm-parse-errors",
265 cl::desc("Print out more descriptive PNaCl bitcode parse errors when "
266 "building LLVM IR first"),
267 cl::init(false));
268cl::opt<std::string> OutputFilename("o", cl::desc("Override output filename"),
269 cl::init("-"), cl::value_desc("filename"));
270
271Ice::IceString AppName;
272
Qining Lu253dc8a2015-06-22 10:10:23 -0700273// Define the command line options for immediates pooling and randomization
274cl::opt<Ice::RandomizeAndPoolImmediatesEnum> RandomizeAndPoolImmediatesOption(
275 "randomize-pool-immediates",
276 cl::desc("Randomize or pooling the representation of immediates"),
277 cl::init(Ice::RPI_None),
278 cl::values(clEnumValN(Ice::RPI_None, "none",
279 "Do not randomize or pooling immediates (default)"),
280 clEnumValN(Ice::RPI_Randomize, "randomize",
281 "Turn on immediate constants blinding"),
282 clEnumValN(Ice::RPI_Pool, "pool",
283 "Turn on immediate constants pooling"),
284 clEnumValEnd));
285// Command line option for x86 immediate integer randomization/pooling
286// threshold. Immediates whose representation are between:
287// -RandomizeAndPoolImmediatesThreshold/2 and
288// +RandomizeAndPoolImmediatesThreshold/2 will be randomized or pooled.
289cl::opt<uint32_t> RandomizeAndPoolImmediatesThreshold(
290 "randomize-pool-threshold",
291 cl::desc("The threshold for immediates randomization and pooling"),
292 cl::init(0xffff));
293
Qining Lu969f6a32015-07-31 09:58:34 -0700294// Command line option for turning on basic block shuffling.
295cl::opt<bool> ReorderBasicBlocks(
296 "reorder-basic-blocks",
297 cl::desc("Shuffle the layout of basic blocks in each functions"),
298 cl::init(false));
299
Qining Lu7cd53512015-06-26 09:36:00 -0700300// Command line option for turning on function layout reordering.
301cl::opt<bool> ReorderFunctions(
302 "reorder-functions",
303 cl::desc("Reorder the layout of functions in TEXT section"),
304 cl::init(false));
305
306// Command line option for the shuffling window size for function reordering.
307// The default size is 8.
308cl::opt<uint32_t> ReorderFunctionsWindowSize(
309 "reorder-functions-window-size",
310 cl::desc("The shuffling window size for function reordering. 1 or 0 means "
311 "no effective shuffling."),
312 cl::init(8));
313
314// Command line option for turning on global variable layout reordering.
315cl::opt<bool> ReorderGlobalVariables(
316 "reorder-global-variables",
317 cl::desc("Reorder the layout of global variables in NON TEXT section"),
318 cl::init(false));
319
320// Command line option for turning on layout reordering in constant pools.
321cl::opt<bool> ReorderPooledConstants(
322 "reorder-pooled-constants",
323 cl::desc("Reorder the layout of constants in constant pools"),
324 cl::init(false));
325
Karl Schimpfcb6e95a2015-07-23 09:10:03 -0700326// Command line option for accepting textual bitcode.
327cl::opt<bool> BitcodeAsText(
328 "bitcode-as-text",
329 cl::desc(
330 "Accept textual form of PNaCl bitcode records (i.e. not .ll assembly)"),
331 cl::init(false));
Jan Voung44c3a802015-03-27 16:29:08 -0700332} // end of anonymous namespace
333
334namespace Ice {
335
336void ClFlags::parseFlags(int argc, char **argv) {
337 cl::ParseCommandLineOptions(argc, argv);
338 AppName = IceString(argv[0]);
339}
340
Karl Schimpfd8b32892015-04-16 15:47:25 -0700341void ClFlags::resetClFlags(ClFlags &OutFlags) {
342 // bool fields
343 OutFlags.AllowErrorRecovery = false;
344 OutFlags.AllowUninitializedGlobals = false;
345 OutFlags.DataSections = false;
346 OutFlags.DecorateAsm = false;
347 OutFlags.DisableInternal = false;
348 OutFlags.DisableIRGeneration = false;
349 OutFlags.DisableTranslation = false;
350 OutFlags.DumpStats = false;
John Portof8b4cc82015-06-09 18:06:19 -0700351 OutFlags.EnableBlockProfile = false;
Karl Schimpfd8b32892015-04-16 15:47:25 -0700352 OutFlags.FunctionSections = false;
353 OutFlags.GenerateUnitTestMessages = false;
354 OutFlags.PhiEdgeSplit = false;
355 OutFlags.RandomNopInsertion = false;
356 OutFlags.RandomRegAlloc = false;
Qining Lu969f6a32015-07-31 09:58:34 -0700357 OutFlags.ReorderBasicBlocks = false;
Qining Lu7cd53512015-06-26 09:36:00 -0700358 OutFlags.ReorderFunctions = false;
359 OutFlags.ReorderGlobalVariables = false;
360 OutFlags.ReorderPooledConstants = false;
Jan Voungb2d50842015-05-12 09:53:50 -0700361 OutFlags.SkipUnimplemented = false;
Karl Schimpfd8b32892015-04-16 15:47:25 -0700362 OutFlags.SubzeroTimingEnabled = false;
363 OutFlags.TimeEachFunction = false;
364 OutFlags.UseSandboxing = false;
365 // Enum and integer fields.
366 OutFlags.Opt = Opt_m1;
367 OutFlags.OutFileType = FT_Iasm;
368 OutFlags.RandomMaxNopsPerInstruction = 0;
369 OutFlags.RandomNopProbabilityAsPercentage = 0;
Qining Lu7cd53512015-06-26 09:36:00 -0700370 OutFlags.RandomizeAndPoolImmediatesOption = RPI_None;
371 OutFlags.RandomizeAndPoolImmediatesThreshold = 0xffff;
372 OutFlags.ReorderFunctionsWindowSize = 8;
Karl Schimpfd8b32892015-04-16 15:47:25 -0700373 OutFlags.TArch = TargetArch_NUM;
Jan Voung28068ad2015-07-31 12:58:46 -0700374 OutFlags.TestStackExtra = 0;
Karl Schimpfd8b32892015-04-16 15:47:25 -0700375 OutFlags.VMask = IceV_None;
376 // IceString fields.
377 OutFlags.DefaultFunctionPrefix = "";
378 OutFlags.DefaultGlobalPrefix = "";
379 OutFlags.TestPrefix = "";
380 OutFlags.TimingFocusOn = "";
381 OutFlags.TranslateOnly = "";
382 OutFlags.VerboseFocusOn = "";
383 // size_t and 64-bit fields.
384 OutFlags.NumTranslationThreads = 0;
385 OutFlags.RandomSeed = 0;
386}
387
Jan Voung44c3a802015-03-27 16:29:08 -0700388void ClFlags::getParsedClFlags(ClFlags &OutFlags) {
389 if (::DisableIRGeneration)
390 ::DisableTranslation = true;
391
392 Ice::VerboseMask VMask = Ice::IceV_None;
393 // Don't generate verbose messages if routines
394 // to dump messages are not available.
Jim Stichnoth20b71f52015-06-24 15:52:24 -0700395 if (BuildDefs::dump()) {
Jan Voung44c3a802015-03-27 16:29:08 -0700396 for (unsigned i = 0; i != VerboseList.size(); ++i)
397 VMask |= VerboseList[i];
398 }
399
400 OutFlags.setAllowErrorRecovery(::AllowErrorRecovery);
401 OutFlags.setAllowUninitializedGlobals(::AllowUninitializedGlobals);
402 OutFlags.setDataSections(::DataSections);
403 OutFlags.setDecorateAsm(::DecorateAsm);
404 OutFlags.setDefaultFunctionPrefix(::DefaultFunctionPrefix);
405 OutFlags.setDefaultGlobalPrefix(::DefaultGlobalPrefix);
406 OutFlags.setDisableInternal(::DisableInternal);
407 OutFlags.setDisableIRGeneration(::DisableIRGeneration);
408 OutFlags.setDisableTranslation(::DisableTranslation);
409 OutFlags.setDumpStats(::DumpStats);
John Portof8b4cc82015-06-09 18:06:19 -0700410 OutFlags.setEnableBlockProfile(::EnableBlockProfile);
Jan Voung44c3a802015-03-27 16:29:08 -0700411 OutFlags.setFunctionSections(::FunctionSections);
412 OutFlags.setNumTranslationThreads(::NumThreads);
413 OutFlags.setOptLevel(::OLevel);
Jim Stichnotha3f57b92015-07-30 12:46:04 -0700414 OutFlags.setPhiEdgeSplit(::EnablePhiEdgeSplit);
Jan Voung44c3a802015-03-27 16:29:08 -0700415 OutFlags.setRandomSeed(::RandomSeed);
Qining Lu969f6a32015-07-31 09:58:34 -0700416 OutFlags.setRandomizeAndPoolImmediatesOption(
417 ::RandomizeAndPoolImmediatesOption);
418 OutFlags.setRandomizeAndPoolImmediatesThreshold(
419 ::RandomizeAndPoolImmediatesThreshold);
420 OutFlags.setReorderFunctionsWindowSize(::ReorderFunctionsWindowSize);
421 OutFlags.setShouldReorderBasicBlocks(::ReorderBasicBlocks);
Jan Voung44c3a802015-03-27 16:29:08 -0700422 OutFlags.setShouldDoNopInsertion(::ShouldDoNopInsertion);
423 OutFlags.setShouldRandomizeRegAlloc(::RandomizeRegisterAllocation);
Qining Lu969f6a32015-07-31 09:58:34 -0700424 OutFlags.setShouldReorderFunctions(::ReorderFunctions);
425 OutFlags.setShouldReorderGlobalVariables(::ReorderGlobalVariables);
426 OutFlags.setShouldReorderPooledConstants(::ReorderPooledConstants);
Jan Voungb2d50842015-05-12 09:53:50 -0700427 OutFlags.setSkipUnimplemented(::SkipUnimplemented);
Jan Voung44c3a802015-03-27 16:29:08 -0700428 OutFlags.setSubzeroTimingEnabled(::SubzeroTimingEnabled);
429 OutFlags.setTargetArch(::TargetArch);
430 OutFlags.setTargetInstructionSet(::TargetInstructionSet);
431 OutFlags.setTestPrefix(::TestPrefix);
Jan Voung28068ad2015-07-31 12:58:46 -0700432 OutFlags.setTestStackExtra(::TestStackExtra);
Jan Voung44c3a802015-03-27 16:29:08 -0700433 OutFlags.setTimeEachFunction(::TimeEachFunction);
434 OutFlags.setTimingFocusOn(::TimingFocusOn);
435 OutFlags.setTranslateOnly(::TranslateOnly);
436 OutFlags.setUseSandboxing(::UseSandboxing);
437 OutFlags.setVerboseFocusOn(::VerboseFocusOn);
438 OutFlags.setOutFileType(::OutFileType);
439 OutFlags.setMaxNopsPerInstruction(::MaxNopsPerInstruction);
440 OutFlags.setNopProbabilityAsPercentage(::NopProbabilityAsPercentage);
441 OutFlags.setVerbose(VMask);
Jan Voung44c3a802015-03-27 16:29:08 -0700442}
443
444void ClFlags::getParsedClFlagsExtra(ClFlagsExtra &OutFlagsExtra) {
445 OutFlagsExtra.setAlwaysExitSuccess(AlwaysExitSuccess);
Karl Schimpfcb6e95a2015-07-23 09:10:03 -0700446 OutFlagsExtra.setBitcodeAsText(BitcodeAsText);
Jan Voung44c3a802015-03-27 16:29:08 -0700447 OutFlagsExtra.setBuildOnRead(BuildOnRead);
448 OutFlagsExtra.setGenerateBuildAtts(GenerateBuildAtts);
449 OutFlagsExtra.setLLVMVerboseErrors(LLVMVerboseErrors);
450 OutFlagsExtra.setAppName(AppName);
451 OutFlagsExtra.setInputFileFormat(InputFileFormat);
452 OutFlagsExtra.setIRFilename(IRFilename);
453 OutFlagsExtra.setLogFilename(LogFilename);
454 OutFlagsExtra.setOutputFilename(OutputFilename);
455}
456
457} // end of namespace Ice