OLD | NEW |
1 //===- subzero/src/IceClFlags.cpp - Command line flags and parsing --------===// | 1 //===- subzero/src/IceClFlags.cpp - Command line flags and parsing --------===// |
2 // | 2 // |
3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 /// | 9 /// |
10 /// \file | 10 /// \file |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 | 213 |
214 cl::opt<std::string> TimingFocusOn( | 214 cl::opt<std::string> TimingFocusOn( |
215 "timing-focus", | 215 "timing-focus", |
216 cl::desc("Break down timing for a specific function (use '*' for all)"), | 216 cl::desc("Break down timing for a specific function (use '*' for all)"), |
217 cl::init("")); | 217 cl::init("")); |
218 | 218 |
219 cl::opt<std::string> | 219 cl::opt<std::string> |
220 TranslateOnly("translate-only", | 220 TranslateOnly("translate-only", |
221 cl::desc("Translate only the given function"), cl::init("")); | 221 cl::desc("Translate only the given function"), cl::init("")); |
222 | 222 |
| 223 cl::opt<bool> UseNonsfi("nonsfi", cl::desc("Enable Non-SFI mode")); |
| 224 |
223 cl::opt<bool> UseSandboxing("sandbox", cl::desc("Use sandboxing")); | 225 cl::opt<bool> UseSandboxing("sandbox", cl::desc("Use sandboxing")); |
224 | 226 |
225 cl::opt<std::string> VerboseFocusOn( | 227 cl::opt<std::string> VerboseFocusOn( |
226 "verbose-focus", | 228 "verbose-focus", |
227 cl::desc("Override with -verbose=none except for the specified function"), | 229 cl::desc("Override with -verbose=none except for the specified function"), |
228 cl::init("")); | 230 cl::init("")); |
229 | 231 |
230 cl::opt<Ice::FileType> OutFileType( | 232 cl::opt<Ice::FileType> OutFileType( |
231 "filetype", cl::desc("Output file type"), cl::init(Ice::FT_Iasm), | 233 "filetype", cl::desc("Output file type"), cl::init(Ice::FT_Iasm), |
232 cl::values(clEnumValN(Ice::FT_Elf, "obj", "Native ELF object ('.o') file"), | 234 cl::values(clEnumValN(Ice::FT_Elf, "obj", "Native ELF object ('.o') file"), |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 OutFlags.RandomNopInsertion = false; | 401 OutFlags.RandomNopInsertion = false; |
400 OutFlags.RandomRegAlloc = false; | 402 OutFlags.RandomRegAlloc = false; |
401 OutFlags.RepeatRegAlloc = false; | 403 OutFlags.RepeatRegAlloc = false; |
402 OutFlags.ReorderBasicBlocks = false; | 404 OutFlags.ReorderBasicBlocks = false; |
403 OutFlags.ReorderFunctions = false; | 405 OutFlags.ReorderFunctions = false; |
404 OutFlags.ReorderGlobalVariables = false; | 406 OutFlags.ReorderGlobalVariables = false; |
405 OutFlags.ReorderPooledConstants = false; | 407 OutFlags.ReorderPooledConstants = false; |
406 OutFlags.SkipUnimplemented = false; | 408 OutFlags.SkipUnimplemented = false; |
407 OutFlags.SubzeroTimingEnabled = false; | 409 OutFlags.SubzeroTimingEnabled = false; |
408 OutFlags.TimeEachFunction = false; | 410 OutFlags.TimeEachFunction = false; |
| 411 OutFlags.UseNonsfi = false; |
409 OutFlags.UseSandboxing = false; | 412 OutFlags.UseSandboxing = false; |
410 // Enum and integer fields. | 413 // Enum and integer fields. |
411 OutFlags.Opt = Opt_m1; | 414 OutFlags.Opt = Opt_m1; |
412 OutFlags.OutFileType = FT_Iasm; | 415 OutFlags.OutFileType = FT_Iasm; |
413 OutFlags.RandomMaxNopsPerInstruction = 0; | 416 OutFlags.RandomMaxNopsPerInstruction = 0; |
414 OutFlags.RandomNopProbabilityAsPercentage = 0; | 417 OutFlags.RandomNopProbabilityAsPercentage = 0; |
415 OutFlags.RandomizeAndPoolImmediatesOption = RPI_None; | 418 OutFlags.RandomizeAndPoolImmediatesOption = RPI_None; |
416 OutFlags.RandomizeAndPoolImmediatesThreshold = 0xffff; | 419 OutFlags.RandomizeAndPoolImmediatesThreshold = 0xffff; |
417 OutFlags.ReorderFunctionsWindowSize = 8; | 420 OutFlags.ReorderFunctionsWindowSize = 8; |
418 OutFlags.TArch = TargetArch_NUM; | 421 OutFlags.TArch = TargetArch_NUM; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 OutFlags.setShouldReorderPooledConstants(::ReorderPooledConstants); | 478 OutFlags.setShouldReorderPooledConstants(::ReorderPooledConstants); |
476 OutFlags.setSkipUnimplemented(::SkipUnimplemented); | 479 OutFlags.setSkipUnimplemented(::SkipUnimplemented); |
477 OutFlags.setSubzeroTimingEnabled(::SubzeroTimingEnabled); | 480 OutFlags.setSubzeroTimingEnabled(::SubzeroTimingEnabled); |
478 OutFlags.setTargetArch(::TargetArch); | 481 OutFlags.setTargetArch(::TargetArch); |
479 OutFlags.setTargetInstructionSet(::TargetInstructionSet); | 482 OutFlags.setTargetInstructionSet(::TargetInstructionSet); |
480 OutFlags.setTestPrefix(::TestPrefix); | 483 OutFlags.setTestPrefix(::TestPrefix); |
481 OutFlags.setTestStackExtra(::TestStackExtra); | 484 OutFlags.setTestStackExtra(::TestStackExtra); |
482 OutFlags.setTimeEachFunction(::TimeEachFunction); | 485 OutFlags.setTimeEachFunction(::TimeEachFunction); |
483 OutFlags.setTimingFocusOn(::TimingFocusOn); | 486 OutFlags.setTimingFocusOn(::TimingFocusOn); |
484 OutFlags.setTranslateOnly(::TranslateOnly); | 487 OutFlags.setTranslateOnly(::TranslateOnly); |
| 488 OutFlags.setUseNonsfi(::UseNonsfi); |
485 OutFlags.setUseSandboxing(::UseSandboxing); | 489 OutFlags.setUseSandboxing(::UseSandboxing); |
486 OutFlags.setVerboseFocusOn(::VerboseFocusOn); | 490 OutFlags.setVerboseFocusOn(::VerboseFocusOn); |
487 OutFlags.setOutFileType(::OutFileType); | 491 OutFlags.setOutFileType(::OutFileType); |
488 OutFlags.setMaxNopsPerInstruction(::MaxNopsPerInstruction); | 492 OutFlags.setMaxNopsPerInstruction(::MaxNopsPerInstruction); |
489 OutFlags.setNopProbabilityAsPercentage(::NopProbabilityAsPercentage); | 493 OutFlags.setNopProbabilityAsPercentage(::NopProbabilityAsPercentage); |
490 OutFlags.setVerbose(VMask); | 494 OutFlags.setVerbose(VMask); |
491 } | 495 } |
492 | 496 |
493 void ClFlags::getParsedClFlagsExtra(ClFlagsExtra &OutFlagsExtra) { | 497 void ClFlags::getParsedClFlagsExtra(ClFlagsExtra &OutFlagsExtra) { |
494 OutFlagsExtra.setAlwaysExitSuccess(AlwaysExitSuccess); | 498 OutFlagsExtra.setAlwaysExitSuccess(AlwaysExitSuccess); |
495 OutFlagsExtra.setBitcodeAsText(BitcodeAsText); | 499 OutFlagsExtra.setBitcodeAsText(BitcodeAsText); |
496 OutFlagsExtra.setBuildOnRead(BuildOnRead); | 500 OutFlagsExtra.setBuildOnRead(BuildOnRead); |
497 OutFlagsExtra.setGenerateBuildAtts(GenerateBuildAtts); | 501 OutFlagsExtra.setGenerateBuildAtts(GenerateBuildAtts); |
498 OutFlagsExtra.setLLVMVerboseErrors(LLVMVerboseErrors); | 502 OutFlagsExtra.setLLVMVerboseErrors(LLVMVerboseErrors); |
499 OutFlagsExtra.setAppName(AppName); | 503 OutFlagsExtra.setAppName(AppName); |
500 OutFlagsExtra.setInputFileFormat(InputFileFormat); | 504 OutFlagsExtra.setInputFileFormat(InputFileFormat); |
501 OutFlagsExtra.setIRFilename(IRFilename); | 505 OutFlagsExtra.setIRFilename(IRFilename); |
502 OutFlagsExtra.setLogFilename(LogFilename); | 506 OutFlagsExtra.setLogFilename(LogFilename); |
503 OutFlagsExtra.setOutputFilename(OutputFilename); | 507 OutFlagsExtra.setOutputFilename(OutputFilename); |
504 } | 508 } |
505 | 509 |
506 } // end of namespace Ice | 510 } // end of namespace Ice |
OLD | NEW |