Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(428)

Side by Side Diff: src/IceClFlags.cpp

Issue 1522433004: eliminate code related to --no-ir-gen (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 "unnamed globals"), 76 "unnamed globals"),
77 cl::init("Global")); 77 cl::init("Global"));
78 78
79 cl::opt<bool> DisableHybridAssembly( 79 cl::opt<bool> DisableHybridAssembly(
80 "no-hybrid-asm", cl::desc("Disable hybrid assembly when -filetype=iasm"), 80 "no-hybrid-asm", cl::desc("Disable hybrid assembly when -filetype=iasm"),
81 cl::init(false)); 81 cl::init(false));
82 82
83 cl::opt<bool> DisableInternal("externalize", 83 cl::opt<bool> DisableInternal("externalize",
84 cl::desc("Externalize all symbols")); 84 cl::desc("Externalize all symbols"));
85 // Note: Modifiable only if ALLOW_DISABLE_IR_GEN. 85 // Note: Modifiable only if ALLOW_DISABLE_IR_GEN.
86 cl::opt<bool> DisableIRGeneration("no-ir-gen", 86 cl::opt<bool> DisableIRGeneration("no-ir-gen",
Jim Stichnoth 2015/12/12 04:11:02 remove this
rkotlerimgtec 2015/12/12 05:33:03 Done.
87 cl::desc("Disable generating Subzero IR.")); 87 cl::desc("Disable generating Subzero IR."));
88 cl::opt<bool> DisableTranslation("notranslate", 88 cl::opt<bool> DisableTranslation("notranslate",
89 cl::desc("Disable Subzero translation")); 89 cl::desc("Disable Subzero translation"));
90 90
91 cl::opt<bool> 91 cl::opt<bool>
92 DumpStats("szstats", 92 DumpStats("szstats",
93 cl::desc("Print statistics after translating each function")); 93 cl::desc("Print statistics after translating each function"));
94 94
95 // TODO(stichnot): The implementation of block profiling introduces some 95 // TODO(stichnot): The implementation of block profiling introduces some
96 // oddities to be aware of. First, empty basic blocks that don't normally 96 // oddities to be aware of. First, empty basic blocks that don't normally
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 void ClFlags::resetClFlags(ClFlags &OutFlags) { 383 void ClFlags::resetClFlags(ClFlags &OutFlags) {
384 // bool fields 384 // bool fields
385 OutFlags.AllowErrorRecovery = false; 385 OutFlags.AllowErrorRecovery = false;
386 OutFlags.AllowExternDefinedSymbols = false; 386 OutFlags.AllowExternDefinedSymbols = false;
387 OutFlags.AllowIacaMarks = false; 387 OutFlags.AllowIacaMarks = false;
388 OutFlags.AllowUninitializedGlobals = false; 388 OutFlags.AllowUninitializedGlobals = false;
389 OutFlags.DataSections = false; 389 OutFlags.DataSections = false;
390 OutFlags.DecorateAsm = false; 390 OutFlags.DecorateAsm = false;
391 OutFlags.DisableHybridAssembly = false; 391 OutFlags.DisableHybridAssembly = false;
392 OutFlags.DisableInternal = false; 392 OutFlags.DisableInternal = false;
393 OutFlags.DisableIRGeneration = false; 393 OutFlags.DisableIRGeneration = false;
Jim Stichnoth 2015/12/12 04:11:02 remove this
rkotlerimgtec 2015/12/12 05:33:03 Done.
394 OutFlags.DisableTranslation = false; 394 OutFlags.DisableTranslation = false;
395 OutFlags.DumpStats = false; 395 OutFlags.DumpStats = false;
396 OutFlags.EnableBlockProfile = false; 396 OutFlags.EnableBlockProfile = false;
397 OutFlags.ForceMemIntrinOpt = false; 397 OutFlags.ForceMemIntrinOpt = false;
398 OutFlags.FunctionSections = false; 398 OutFlags.FunctionSections = false;
399 OutFlags.GenerateUnitTestMessages = false; 399 OutFlags.GenerateUnitTestMessages = false;
400 OutFlags.MockBoundsCheck = false; 400 OutFlags.MockBoundsCheck = false;
401 OutFlags.PhiEdgeSplit = false; 401 OutFlags.PhiEdgeSplit = false;
402 OutFlags.RandomNopInsertion = false; 402 OutFlags.RandomNopInsertion = false;
403 OutFlags.RandomRegAlloc = false; 403 OutFlags.RandomRegAlloc = false;
(...skipping 23 matching lines...) Expand all
427 OutFlags.TestPrefix = ""; 427 OutFlags.TestPrefix = "";
428 OutFlags.TimingFocusOn = ""; 428 OutFlags.TimingFocusOn = "";
429 OutFlags.TranslateOnly = ""; 429 OutFlags.TranslateOnly = "";
430 OutFlags.VerboseFocusOn = ""; 430 OutFlags.VerboseFocusOn = "";
431 // size_t and 64-bit fields. 431 // size_t and 64-bit fields.
432 OutFlags.NumTranslationThreads = 0; 432 OutFlags.NumTranslationThreads = 0;
433 OutFlags.RandomSeed = 0; 433 OutFlags.RandomSeed = 0;
434 } 434 }
435 435
436 void ClFlags::getParsedClFlags(ClFlags &OutFlags) { 436 void ClFlags::getParsedClFlags(ClFlags &OutFlags) {
437 if (::DisableIRGeneration) 437 if (::DisableIRGeneration)
Jim Stichnoth 2015/12/12 04:11:02 remove this
rkotlerimgtec 2015/12/12 05:33:03 Done.
438 ::DisableTranslation = true; 438 ::DisableTranslation = true;
439 439
440 Ice::VerboseMask VMask = Ice::IceV_None; 440 Ice::VerboseMask VMask = Ice::IceV_None;
441 // Don't generate verbose messages if routines to dump messages are not 441 // Don't generate verbose messages if routines to dump messages are not
442 // available. 442 // available.
443 if (BuildDefs::dump()) { 443 if (BuildDefs::dump()) {
444 for (unsigned i = 0; i != VerboseList.size(); ++i) 444 for (unsigned i = 0; i != VerboseList.size(); ++i)
445 VMask |= VerboseList[i]; 445 VMask |= VerboseList[i];
446 } 446 }
447 447
448 OutFlags.setAllowErrorRecovery(::AllowErrorRecovery); 448 OutFlags.setAllowErrorRecovery(::AllowErrorRecovery);
449 OutFlags.setAllowExternDefinedSymbols(::AllowExternDefinedSymbols || 449 OutFlags.setAllowExternDefinedSymbols(::AllowExternDefinedSymbols ||
450 ::DisableInternal); 450 ::DisableInternal);
451 OutFlags.setAllowIacaMarks(::AllowIacaMarks); 451 OutFlags.setAllowIacaMarks(::AllowIacaMarks);
452 OutFlags.setAllowUninitializedGlobals(::AllowUninitializedGlobals); 452 OutFlags.setAllowUninitializedGlobals(::AllowUninitializedGlobals);
453 OutFlags.setDataSections(::DataSections); 453 OutFlags.setDataSections(::DataSections);
454 OutFlags.setDecorateAsm(::DecorateAsm); 454 OutFlags.setDecorateAsm(::DecorateAsm);
455 OutFlags.setDefaultFunctionPrefix(::DefaultFunctionPrefix); 455 OutFlags.setDefaultFunctionPrefix(::DefaultFunctionPrefix);
456 OutFlags.setDefaultGlobalPrefix(::DefaultGlobalPrefix); 456 OutFlags.setDefaultGlobalPrefix(::DefaultGlobalPrefix);
457 OutFlags.setDisableHybridAssembly(::DisableHybridAssembly || 457 OutFlags.setDisableHybridAssembly(::DisableHybridAssembly ||
458 (::OutFileType != Ice::FT_Iasm)); 458 (::OutFileType != Ice::FT_Iasm));
459 OutFlags.setDisableInternal(::DisableInternal); 459 OutFlags.setDisableInternal(::DisableInternal);
460 OutFlags.setDisableIRGeneration(::DisableIRGeneration);
461 OutFlags.setDisableTranslation(::DisableTranslation); 460 OutFlags.setDisableTranslation(::DisableTranslation);
462 OutFlags.setDumpStats(::DumpStats); 461 OutFlags.setDumpStats(::DumpStats);
463 OutFlags.setEnableBlockProfile(::EnableBlockProfile); 462 OutFlags.setEnableBlockProfile(::EnableBlockProfile);
464 OutFlags.setForceMemIntrinOpt(::ForceMemIntrinOpt); 463 OutFlags.setForceMemIntrinOpt(::ForceMemIntrinOpt);
465 OutFlags.setFunctionSections(::FunctionSections); 464 OutFlags.setFunctionSections(::FunctionSections);
466 OutFlags.setNumTranslationThreads(::NumThreads); 465 OutFlags.setNumTranslationThreads(::NumThreads);
467 OutFlags.setOptLevel(::OLevel); 466 OutFlags.setOptLevel(::OLevel);
468 OutFlags.setMockBoundsCheck(::MockBoundsCheck); 467 OutFlags.setMockBoundsCheck(::MockBoundsCheck);
469 OutFlags.setPhiEdgeSplit(::EnablePhiEdgeSplit); 468 OutFlags.setPhiEdgeSplit(::EnablePhiEdgeSplit);
470 OutFlags.setRandomSeed(::RandomSeed); 469 OutFlags.setRandomSeed(::RandomSeed);
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 OutFlagsExtra.setGenerateBuildAtts(GenerateBuildAtts); 503 OutFlagsExtra.setGenerateBuildAtts(GenerateBuildAtts);
505 OutFlagsExtra.setLLVMVerboseErrors(LLVMVerboseErrors); 504 OutFlagsExtra.setLLVMVerboseErrors(LLVMVerboseErrors);
506 OutFlagsExtra.setAppName(AppName); 505 OutFlagsExtra.setAppName(AppName);
507 OutFlagsExtra.setInputFileFormat(InputFileFormat); 506 OutFlagsExtra.setInputFileFormat(InputFileFormat);
508 OutFlagsExtra.setIRFilename(IRFilename); 507 OutFlagsExtra.setIRFilename(IRFilename);
509 OutFlagsExtra.setLogFilename(LogFilename); 508 OutFlagsExtra.setLogFilename(LogFilename);
510 OutFlagsExtra.setOutputFilename(OutputFilename); 509 OutFlagsExtra.setOutputFilename(OutputFilename);
511 } 510 }
512 511
513 } // end of namespace Ice 512 } // end of namespace Ice
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698