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

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: changes suggested by stichnot 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 cl::desc("Define default global prefix for naming " 75 cl::desc("Define default global prefix for naming "
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
86 cl::opt<bool> DisableIRGeneration("no-ir-gen",
87 cl::desc("Disable generating Subzero IR."));
88 cl::opt<bool> DisableTranslation("notranslate", 86 cl::opt<bool> DisableTranslation("notranslate",
89 cl::desc("Disable Subzero translation")); 87 cl::desc("Disable Subzero translation"));
90 88
91 cl::opt<bool> 89 cl::opt<bool>
92 DumpStats("szstats", 90 DumpStats("szstats",
93 cl::desc("Print statistics after translating each function")); 91 cl::desc("Print statistics after translating each function"));
94 92
95 // TODO(stichnot): The implementation of block profiling introduces some 93 // TODO(stichnot): The implementation of block profiling introduces some
96 // oddities to be aware of. First, empty basic blocks that don't normally 94 // oddities to be aware of. First, empty basic blocks that don't normally
97 // appear in the asm output, may be profiled anyway, so one might see profile 95 // appear in the asm output, may be profiled anyway, so one might see profile
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 void ClFlags::resetClFlags(ClFlags &OutFlags) { 381 void ClFlags::resetClFlags(ClFlags &OutFlags) {
384 // bool fields 382 // bool fields
385 OutFlags.AllowErrorRecovery = false; 383 OutFlags.AllowErrorRecovery = false;
386 OutFlags.AllowExternDefinedSymbols = false; 384 OutFlags.AllowExternDefinedSymbols = false;
387 OutFlags.AllowIacaMarks = false; 385 OutFlags.AllowIacaMarks = false;
388 OutFlags.AllowUninitializedGlobals = false; 386 OutFlags.AllowUninitializedGlobals = false;
389 OutFlags.DataSections = false; 387 OutFlags.DataSections = false;
390 OutFlags.DecorateAsm = false; 388 OutFlags.DecorateAsm = false;
391 OutFlags.DisableHybridAssembly = false; 389 OutFlags.DisableHybridAssembly = false;
392 OutFlags.DisableInternal = false; 390 OutFlags.DisableInternal = false;
393 OutFlags.DisableIRGeneration = false;
394 OutFlags.DisableTranslation = false; 391 OutFlags.DisableTranslation = false;
395 OutFlags.DumpStats = false; 392 OutFlags.DumpStats = false;
396 OutFlags.EnableBlockProfile = false; 393 OutFlags.EnableBlockProfile = false;
397 OutFlags.ForceMemIntrinOpt = false; 394 OutFlags.ForceMemIntrinOpt = false;
398 OutFlags.FunctionSections = false; 395 OutFlags.FunctionSections = false;
399 OutFlags.GenerateUnitTestMessages = false; 396 OutFlags.GenerateUnitTestMessages = false;
400 OutFlags.MockBoundsCheck = false; 397 OutFlags.MockBoundsCheck = false;
401 OutFlags.PhiEdgeSplit = false; 398 OutFlags.PhiEdgeSplit = false;
402 OutFlags.RandomNopInsertion = false; 399 OutFlags.RandomNopInsertion = false;
403 OutFlags.RandomRegAlloc = false; 400 OutFlags.RandomRegAlloc = false;
(...skipping 23 matching lines...) Expand all
427 OutFlags.TestPrefix = ""; 424 OutFlags.TestPrefix = "";
428 OutFlags.TimingFocusOn = ""; 425 OutFlags.TimingFocusOn = "";
429 OutFlags.TranslateOnly = ""; 426 OutFlags.TranslateOnly = "";
430 OutFlags.VerboseFocusOn = ""; 427 OutFlags.VerboseFocusOn = "";
431 // size_t and 64-bit fields. 428 // size_t and 64-bit fields.
432 OutFlags.NumTranslationThreads = 0; 429 OutFlags.NumTranslationThreads = 0;
433 OutFlags.RandomSeed = 0; 430 OutFlags.RandomSeed = 0;
434 } 431 }
435 432
436 void ClFlags::getParsedClFlags(ClFlags &OutFlags) { 433 void ClFlags::getParsedClFlags(ClFlags &OutFlags) {
437 if (::DisableIRGeneration)
438 ::DisableTranslation = true;
439 434
Jim Stichnoth 2015/12/12 15:43:42 remove extra blank line as well
rkotlerimgtec 2015/12/14 03:12:12 Done.
440 Ice::VerboseMask VMask = Ice::IceV_None; 435 Ice::VerboseMask VMask = Ice::IceV_None;
441 // Don't generate verbose messages if routines to dump messages are not 436 // Don't generate verbose messages if routines to dump messages are not
442 // available. 437 // available.
443 if (BuildDefs::dump()) { 438 if (BuildDefs::dump()) {
444 for (unsigned i = 0; i != VerboseList.size(); ++i) 439 for (unsigned i = 0; i != VerboseList.size(); ++i)
445 VMask |= VerboseList[i]; 440 VMask |= VerboseList[i];
446 } 441 }
447 442
448 OutFlags.setAllowErrorRecovery(::AllowErrorRecovery); 443 OutFlags.setAllowErrorRecovery(::AllowErrorRecovery);
449 OutFlags.setAllowExternDefinedSymbols(::AllowExternDefinedSymbols || 444 OutFlags.setAllowExternDefinedSymbols(::AllowExternDefinedSymbols ||
450 ::DisableInternal); 445 ::DisableInternal);
451 OutFlags.setAllowIacaMarks(::AllowIacaMarks); 446 OutFlags.setAllowIacaMarks(::AllowIacaMarks);
452 OutFlags.setAllowUninitializedGlobals(::AllowUninitializedGlobals); 447 OutFlags.setAllowUninitializedGlobals(::AllowUninitializedGlobals);
453 OutFlags.setDataSections(::DataSections); 448 OutFlags.setDataSections(::DataSections);
454 OutFlags.setDecorateAsm(::DecorateAsm); 449 OutFlags.setDecorateAsm(::DecorateAsm);
455 OutFlags.setDefaultFunctionPrefix(::DefaultFunctionPrefix); 450 OutFlags.setDefaultFunctionPrefix(::DefaultFunctionPrefix);
456 OutFlags.setDefaultGlobalPrefix(::DefaultGlobalPrefix); 451 OutFlags.setDefaultGlobalPrefix(::DefaultGlobalPrefix);
457 OutFlags.setDisableHybridAssembly(::DisableHybridAssembly || 452 OutFlags.setDisableHybridAssembly(::DisableHybridAssembly ||
458 (::OutFileType != Ice::FT_Iasm)); 453 (::OutFileType != Ice::FT_Iasm));
459 OutFlags.setDisableInternal(::DisableInternal); 454 OutFlags.setDisableInternal(::DisableInternal);
460 OutFlags.setDisableIRGeneration(::DisableIRGeneration);
461 OutFlags.setDisableTranslation(::DisableTranslation); 455 OutFlags.setDisableTranslation(::DisableTranslation);
462 OutFlags.setDumpStats(::DumpStats); 456 OutFlags.setDumpStats(::DumpStats);
463 OutFlags.setEnableBlockProfile(::EnableBlockProfile); 457 OutFlags.setEnableBlockProfile(::EnableBlockProfile);
464 OutFlags.setForceMemIntrinOpt(::ForceMemIntrinOpt); 458 OutFlags.setForceMemIntrinOpt(::ForceMemIntrinOpt);
465 OutFlags.setFunctionSections(::FunctionSections); 459 OutFlags.setFunctionSections(::FunctionSections);
466 OutFlags.setNumTranslationThreads(::NumThreads); 460 OutFlags.setNumTranslationThreads(::NumThreads);
467 OutFlags.setOptLevel(::OLevel); 461 OutFlags.setOptLevel(::OLevel);
468 OutFlags.setMockBoundsCheck(::MockBoundsCheck); 462 OutFlags.setMockBoundsCheck(::MockBoundsCheck);
469 OutFlags.setPhiEdgeSplit(::EnablePhiEdgeSplit); 463 OutFlags.setPhiEdgeSplit(::EnablePhiEdgeSplit);
470 OutFlags.setRandomSeed(::RandomSeed); 464 OutFlags.setRandomSeed(::RandomSeed);
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 OutFlagsExtra.setGenerateBuildAtts(GenerateBuildAtts); 498 OutFlagsExtra.setGenerateBuildAtts(GenerateBuildAtts);
505 OutFlagsExtra.setLLVMVerboseErrors(LLVMVerboseErrors); 499 OutFlagsExtra.setLLVMVerboseErrors(LLVMVerboseErrors);
506 OutFlagsExtra.setAppName(AppName); 500 OutFlagsExtra.setAppName(AppName);
507 OutFlagsExtra.setInputFileFormat(InputFileFormat); 501 OutFlagsExtra.setInputFileFormat(InputFileFormat);
508 OutFlagsExtra.setIRFilename(IRFilename); 502 OutFlagsExtra.setIRFilename(IRFilename);
509 OutFlagsExtra.setLogFilename(LogFilename); 503 OutFlagsExtra.setLogFilename(LogFilename);
510 OutFlagsExtra.setOutputFilename(OutputFilename); 504 OutFlagsExtra.setOutputFilename(OutputFilename);
511 } 505 }
512 506
513 } // end of namespace Ice 507 } // end of namespace Ice
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698