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

Side by Side Diff: src/IceClFlags.cpp

Issue 1260093003: Introduce the ability to insert IACA (Intel Architecture Code Analyzer) marks to (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 years, 4 months 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
« no previous file with comments | « src/IceClFlags.h ('k') | src/IceGlobalContext.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 16 matching lines...) Expand all
27 27
28 // Options which are captured in Ice::ClFlags and propagated. 28 // Options which are captured in Ice::ClFlags and propagated.
29 29
30 namespace { 30 namespace {
31 31
32 cl::opt<bool> AllowErrorRecovery( 32 cl::opt<bool> AllowErrorRecovery(
33 "allow-pnacl-reader-error-recovery", 33 "allow-pnacl-reader-error-recovery",
34 cl::desc("Allow error recovery when reading PNaCl bitcode."), 34 cl::desc("Allow error recovery when reading PNaCl bitcode."),
35 cl::init(false)); 35 cl::init(false));
36 36
37 cl::opt<bool> AllowIacaMarks(
38 "allow-iaca-marks",
39 cl::desc("Allow IACA (Intel Architecture Code Analyzer) marks to be "
40 "inserted. These binaries are not executable."),
41 cl::init(false));
42
37 // This is currently needed by crosstest.py. 43 // This is currently needed by crosstest.py.
38 cl::opt<bool> AllowUninitializedGlobals( 44 cl::opt<bool> AllowUninitializedGlobals(
39 "allow-uninitialized-globals", 45 "allow-uninitialized-globals",
40 cl::desc("Allow global variables to be uninitialized")); 46 cl::desc("Allow global variables to be uninitialized"));
41 47
42 cl::opt<bool> 48 cl::opt<bool>
43 DataSections("fdata-sections", 49 DataSections("fdata-sections",
44 cl::desc("Emit (global) data into separate sections")); 50 cl::desc("Emit (global) data into separate sections"));
45 51
46 cl::opt<bool> DecorateAsm( 52 cl::opt<bool> DecorateAsm(
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 namespace Ice { 340 namespace Ice {
335 341
336 void ClFlags::parseFlags(int argc, char **argv) { 342 void ClFlags::parseFlags(int argc, char **argv) {
337 cl::ParseCommandLineOptions(argc, argv); 343 cl::ParseCommandLineOptions(argc, argv);
338 AppName = IceString(argv[0]); 344 AppName = IceString(argv[0]);
339 } 345 }
340 346
341 void ClFlags::resetClFlags(ClFlags &OutFlags) { 347 void ClFlags::resetClFlags(ClFlags &OutFlags) {
342 // bool fields 348 // bool fields
343 OutFlags.AllowErrorRecovery = false; 349 OutFlags.AllowErrorRecovery = false;
350 OutFlags.AllowIacaMarks = false;
344 OutFlags.AllowUninitializedGlobals = false; 351 OutFlags.AllowUninitializedGlobals = false;
345 OutFlags.DataSections = false; 352 OutFlags.DataSections = false;
346 OutFlags.DecorateAsm = false; 353 OutFlags.DecorateAsm = false;
347 OutFlags.DisableInternal = false; 354 OutFlags.DisableInternal = false;
348 OutFlags.DisableIRGeneration = false; 355 OutFlags.DisableIRGeneration = false;
349 OutFlags.DisableTranslation = false; 356 OutFlags.DisableTranslation = false;
350 OutFlags.DumpStats = false; 357 OutFlags.DumpStats = false;
351 OutFlags.EnableBlockProfile = false; 358 OutFlags.EnableBlockProfile = false;
352 OutFlags.FunctionSections = false; 359 OutFlags.FunctionSections = false;
353 OutFlags.GenerateUnitTestMessages = false; 360 OutFlags.GenerateUnitTestMessages = false;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 398
392 Ice::VerboseMask VMask = Ice::IceV_None; 399 Ice::VerboseMask VMask = Ice::IceV_None;
393 // Don't generate verbose messages if routines 400 // Don't generate verbose messages if routines
394 // to dump messages are not available. 401 // to dump messages are not available.
395 if (BuildDefs::dump()) { 402 if (BuildDefs::dump()) {
396 for (unsigned i = 0; i != VerboseList.size(); ++i) 403 for (unsigned i = 0; i != VerboseList.size(); ++i)
397 VMask |= VerboseList[i]; 404 VMask |= VerboseList[i];
398 } 405 }
399 406
400 OutFlags.setAllowErrorRecovery(::AllowErrorRecovery); 407 OutFlags.setAllowErrorRecovery(::AllowErrorRecovery);
408 OutFlags.setAllowIacaMarks(::AllowIacaMarks);
401 OutFlags.setAllowUninitializedGlobals(::AllowUninitializedGlobals); 409 OutFlags.setAllowUninitializedGlobals(::AllowUninitializedGlobals);
402 OutFlags.setDataSections(::DataSections); 410 OutFlags.setDataSections(::DataSections);
403 OutFlags.setDecorateAsm(::DecorateAsm); 411 OutFlags.setDecorateAsm(::DecorateAsm);
404 OutFlags.setDefaultFunctionPrefix(::DefaultFunctionPrefix); 412 OutFlags.setDefaultFunctionPrefix(::DefaultFunctionPrefix);
405 OutFlags.setDefaultGlobalPrefix(::DefaultGlobalPrefix); 413 OutFlags.setDefaultGlobalPrefix(::DefaultGlobalPrefix);
406 OutFlags.setDisableInternal(::DisableInternal); 414 OutFlags.setDisableInternal(::DisableInternal);
407 OutFlags.setDisableIRGeneration(::DisableIRGeneration); 415 OutFlags.setDisableIRGeneration(::DisableIRGeneration);
408 OutFlags.setDisableTranslation(::DisableTranslation); 416 OutFlags.setDisableTranslation(::DisableTranslation);
409 OutFlags.setDumpStats(::DumpStats); 417 OutFlags.setDumpStats(::DumpStats);
410 OutFlags.setEnableBlockProfile(::EnableBlockProfile); 418 OutFlags.setEnableBlockProfile(::EnableBlockProfile);
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 OutFlagsExtra.setGenerateBuildAtts(GenerateBuildAtts); 456 OutFlagsExtra.setGenerateBuildAtts(GenerateBuildAtts);
449 OutFlagsExtra.setLLVMVerboseErrors(LLVMVerboseErrors); 457 OutFlagsExtra.setLLVMVerboseErrors(LLVMVerboseErrors);
450 OutFlagsExtra.setAppName(AppName); 458 OutFlagsExtra.setAppName(AppName);
451 OutFlagsExtra.setInputFileFormat(InputFileFormat); 459 OutFlagsExtra.setInputFileFormat(InputFileFormat);
452 OutFlagsExtra.setIRFilename(IRFilename); 460 OutFlagsExtra.setIRFilename(IRFilename);
453 OutFlagsExtra.setLogFilename(LogFilename); 461 OutFlagsExtra.setLogFilename(LogFilename);
454 OutFlagsExtra.setOutputFilename(OutputFilename); 462 OutFlagsExtra.setOutputFilename(OutputFilename);
455 } 463 }
456 464
457 } // end of namespace Ice 465 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceClFlags.h ('k') | src/IceGlobalContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698