| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 cl::alias AllowExternDefinedSymbolsA( | 43 cl::alias AllowExternDefinedSymbolsA( |
| 44 "allow-extern", cl::desc("Alias for --allow-externally-defined-symbols"), | 44 "allow-extern", cl::desc("Alias for --allow-externally-defined-symbols"), |
| 45 cl::NotHidden, cl::aliasopt(AllowExternDefinedSymbols)); | 45 cl::NotHidden, cl::aliasopt(AllowExternDefinedSymbols)); |
| 46 | 46 |
| 47 cl::opt<bool> AllowIacaMarks( | 47 cl::opt<bool> AllowIacaMarks( |
| 48 "allow-iaca-marks", | 48 "allow-iaca-marks", |
| 49 cl::desc("Allow IACA (Intel Architecture Code Analyzer) marks to be " | 49 cl::desc("Allow IACA (Intel Architecture Code Analyzer) marks to be " |
| 50 "inserted. These binaries are not executable."), | 50 "inserted. These binaries are not executable."), |
| 51 cl::init(false)); | 51 cl::init(false)); |
| 52 | 52 |
| 53 cl::opt<bool> AllowUnsafeIas( | |
| 54 "unsafe-ias", | |
| 55 cl::desc("Convert (potentially broken) instructions to bytes in " | |
| 56 "integrated assembler."), | |
| 57 cl::init(false)); | |
| 58 | |
| 59 // This is currently needed by crosstest.py. | 53 // This is currently needed by crosstest.py. |
| 60 cl::opt<bool> AllowUninitializedGlobals( | 54 cl::opt<bool> AllowUninitializedGlobals( |
| 61 "allow-uninitialized-globals", | 55 "allow-uninitialized-globals", |
| 62 cl::desc("Allow global variables to be uninitialized")); | 56 cl::desc("Allow global variables to be uninitialized")); |
| 63 | 57 |
| 64 cl::opt<bool> | 58 cl::opt<bool> |
| 65 DataSections("fdata-sections", | 59 DataSections("fdata-sections", |
| 66 cl::desc("Emit (global) data into separate sections")); | 60 cl::desc("Emit (global) data into separate sections")); |
| 67 | 61 |
| 68 cl::opt<bool> DecorateAsm( | 62 cl::opt<bool> DecorateAsm( |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 void ClFlags::parseFlags(int argc, char **argv) { | 377 void ClFlags::parseFlags(int argc, char **argv) { |
| 384 cl::ParseCommandLineOptions(argc, argv); | 378 cl::ParseCommandLineOptions(argc, argv); |
| 385 AppName = IceString(argv[0]); | 379 AppName = IceString(argv[0]); |
| 386 } | 380 } |
| 387 | 381 |
| 388 void ClFlags::resetClFlags(ClFlags &OutFlags) { | 382 void ClFlags::resetClFlags(ClFlags &OutFlags) { |
| 389 // bool fields | 383 // bool fields |
| 390 OutFlags.AllowErrorRecovery = false; | 384 OutFlags.AllowErrorRecovery = false; |
| 391 OutFlags.AllowExternDefinedSymbols = false; | 385 OutFlags.AllowExternDefinedSymbols = false; |
| 392 OutFlags.AllowIacaMarks = false; | 386 OutFlags.AllowIacaMarks = false; |
| 393 OutFlags.AllowUnsafeIas = false; | |
| 394 OutFlags.AllowUninitializedGlobals = false; | 387 OutFlags.AllowUninitializedGlobals = false; |
| 395 OutFlags.DataSections = false; | 388 OutFlags.DataSections = false; |
| 396 OutFlags.DecorateAsm = false; | 389 OutFlags.DecorateAsm = false; |
| 397 OutFlags.DisableHybridAssembly = false; | 390 OutFlags.DisableHybridAssembly = false; |
| 398 OutFlags.DisableInternal = false; | 391 OutFlags.DisableInternal = false; |
| 399 OutFlags.DisableIRGeneration = false; | 392 OutFlags.DisableIRGeneration = false; |
| 400 OutFlags.DisableTranslation = false; | 393 OutFlags.DisableTranslation = false; |
| 401 OutFlags.DumpStats = false; | 394 OutFlags.DumpStats = false; |
| 402 OutFlags.EnableBlockProfile = false; | 395 OutFlags.EnableBlockProfile = false; |
| 403 OutFlags.ForceMemIntrinOpt = false; | 396 OutFlags.ForceMemIntrinOpt = false; |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 OutFlags.setAllowUninitializedGlobals(::AllowUninitializedGlobals); | 451 OutFlags.setAllowUninitializedGlobals(::AllowUninitializedGlobals); |
| 459 OutFlags.setDataSections(::DataSections); | 452 OutFlags.setDataSections(::DataSections); |
| 460 OutFlags.setDecorateAsm(::DecorateAsm); | 453 OutFlags.setDecorateAsm(::DecorateAsm); |
| 461 OutFlags.setDefaultFunctionPrefix(::DefaultFunctionPrefix); | 454 OutFlags.setDefaultFunctionPrefix(::DefaultFunctionPrefix); |
| 462 OutFlags.setDefaultGlobalPrefix(::DefaultGlobalPrefix); | 455 OutFlags.setDefaultGlobalPrefix(::DefaultGlobalPrefix); |
| 463 OutFlags.setDisableHybridAssembly(::DisableHybridAssembly || | 456 OutFlags.setDisableHybridAssembly(::DisableHybridAssembly || |
| 464 (::OutFileType != Ice::FT_Iasm)); | 457 (::OutFileType != Ice::FT_Iasm)); |
| 465 OutFlags.setDisableInternal(::DisableInternal); | 458 OutFlags.setDisableInternal(::DisableInternal); |
| 466 OutFlags.setDisableIRGeneration(::DisableIRGeneration); | 459 OutFlags.setDisableIRGeneration(::DisableIRGeneration); |
| 467 OutFlags.setDisableTranslation(::DisableTranslation); | 460 OutFlags.setDisableTranslation(::DisableTranslation); |
| 468 OutFlags.setAllowUnsafeIas(::AllowUnsafeIas); | |
| 469 OutFlags.setDumpStats(::DumpStats); | 461 OutFlags.setDumpStats(::DumpStats); |
| 470 OutFlags.setEnableBlockProfile(::EnableBlockProfile); | 462 OutFlags.setEnableBlockProfile(::EnableBlockProfile); |
| 471 OutFlags.setForceMemIntrinOpt(::ForceMemIntrinOpt); | 463 OutFlags.setForceMemIntrinOpt(::ForceMemIntrinOpt); |
| 472 OutFlags.setFunctionSections(::FunctionSections); | 464 OutFlags.setFunctionSections(::FunctionSections); |
| 473 OutFlags.setNumTranslationThreads(::NumThreads); | 465 OutFlags.setNumTranslationThreads(::NumThreads); |
| 474 OutFlags.setOptLevel(::OLevel); | 466 OutFlags.setOptLevel(::OLevel); |
| 475 OutFlags.setMockBoundsCheck(::MockBoundsCheck); | 467 OutFlags.setMockBoundsCheck(::MockBoundsCheck); |
| 476 OutFlags.setPhiEdgeSplit(::EnablePhiEdgeSplit); | 468 OutFlags.setPhiEdgeSplit(::EnablePhiEdgeSplit); |
| 477 OutFlags.setRandomSeed(::RandomSeed); | 469 OutFlags.setRandomSeed(::RandomSeed); |
| 478 OutFlags.setRandomizeAndPoolImmediatesOption( | 470 OutFlags.setRandomizeAndPoolImmediatesOption( |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 511 OutFlagsExtra.setGenerateBuildAtts(GenerateBuildAtts); | 503 OutFlagsExtra.setGenerateBuildAtts(GenerateBuildAtts); |
| 512 OutFlagsExtra.setLLVMVerboseErrors(LLVMVerboseErrors); | 504 OutFlagsExtra.setLLVMVerboseErrors(LLVMVerboseErrors); |
| 513 OutFlagsExtra.setAppName(AppName); | 505 OutFlagsExtra.setAppName(AppName); |
| 514 OutFlagsExtra.setInputFileFormat(InputFileFormat); | 506 OutFlagsExtra.setInputFileFormat(InputFileFormat); |
| 515 OutFlagsExtra.setIRFilename(IRFilename); | 507 OutFlagsExtra.setIRFilename(IRFilename); |
| 516 OutFlagsExtra.setLogFilename(LogFilename); | 508 OutFlagsExtra.setLogFilename(LogFilename); |
| 517 OutFlagsExtra.setOutputFilename(OutputFilename); | 509 OutFlagsExtra.setOutputFilename(OutputFilename); |
| 518 } | 510 } |
| 519 | 511 |
| 520 } // end of namespace Ice | 512 } // end of namespace Ice |
| OLD | NEW |