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

Side by Side Diff: src/PNaClTranslator.cpp

Issue 1855683002: Subzero: Fix -timing-funcs and -timing-focus flags. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Rebase Created 4 years, 8 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/IceGlobalContext.cpp ('k') | no next file » | 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/PNaClTranslator.cpp - ICE from bitcode -----------------===// 1 //===- subzero/src/PNaClTranslator.cpp - ICE from bitcode -----------------===//
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 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 // created. Also generates a warning if created names may conflict with named 470 // created. Also generates a warning if created names may conflict with named
471 // declarations. 471 // declarations.
472 void installDeclarationName(Ice::GlobalDeclaration *Decl, 472 void installDeclarationName(Ice::GlobalDeclaration *Decl,
473 const std::string &Prefix, const char *DeclType, 473 const std::string &Prefix, const char *DeclType,
474 NaClBcIndexSize_t &NameIndex) { 474 NaClBcIndexSize_t &NameIndex) {
475 if (Decl->hasName()) { 475 if (Decl->hasName()) {
476 Translator.checkIfUnnamedNameSafe(Decl->getName().toString(), DeclType, 476 Translator.checkIfUnnamedNameSafe(Decl->getName().toString(), DeclType,
477 Prefix); 477 Prefix);
478 } else { 478 } else {
479 Ice::GlobalContext *Ctx = Translator.getContext(); 479 Ice::GlobalContext *Ctx = Translator.getContext();
480 if (Ice::BuildDefs::dump() || !Decl->isInternal()) { 480 // Synthesize a dummy name if any of the following is true:
481 // - DUMP is enabled
482 // - The symbol is external
483 // - The -timing-funcs flag is enabled
484 // - The -timing-focus flag is enabled
485 if (Ice::BuildDefs::dump() || !Decl->isInternal() ||
486 Ice::getFlags().getTimeEachFunction() ||
487 !Ice::getFlags().getTimingFocusOn().empty()) {
481 Decl->setName(Ctx, Translator.createUnnamedName(Prefix, NameIndex)); 488 Decl->setName(Ctx, Translator.createUnnamedName(Prefix, NameIndex));
482 } else { 489 } else {
483 Decl->setName(Ctx); 490 Decl->setName(Ctx);
484 } 491 }
485 ++NameIndex; 492 ++NameIndex;
486 } 493 }
487 } 494 }
488 495
489 // Installs names for global variables without names. 496 // Installs names for global variables without names.
490 void installGlobalVarNames() { 497 void installGlobalVarNames() {
(...skipping 2804 matching lines...) Expand 10 before | Expand all | Expand 10 after
3295 raw_string_ostream StrBuf(Buffer); 3302 raw_string_ostream StrBuf(Buffer);
3296 StrBuf << IRFilename << ": Does not contain a module!"; 3303 StrBuf << IRFilename << ": Does not contain a module!";
3297 llvm::report_fatal_error(StrBuf.str()); 3304 llvm::report_fatal_error(StrBuf.str());
3298 } 3305 }
3299 if (InputStreamFile.getBitcodeBytes().getExtent() % 4 != 0) { 3306 if (InputStreamFile.getBitcodeBytes().getExtent() % 4 != 0) {
3300 llvm::report_fatal_error("Bitcode stream should be a multiple of 4 bytes"); 3307 llvm::report_fatal_error("Bitcode stream should be a multiple of 4 bytes");
3301 } 3308 }
3302 } 3309 }
3303 3310
3304 } // end of namespace Ice 3311 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceGlobalContext.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698