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

Side by Side Diff: src/IceGlobalContext.cpp

Issue 455593004: Subzero: Add a random number generator. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Rebase Created 6 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/IceGlobalContext.h ('k') | src/IceRNG.h » ('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/IceGlobalContext.cpp - Global context defs ---*- C++ -*-===// 1 //===- subzero/src/IceGlobalContext.cpp - Global context defs ---*- C++ -*-===//
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 // This file defines aspects of the compilation that persist across 10 // This file defines aspects of the compilation that persist across
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 TypePool<RelocatableTuple, ConstantRelocatable> Relocatables; 113 TypePool<RelocatableTuple, ConstantRelocatable> Relocatables;
114 UndefPool Undefs; 114 UndefPool Undefs;
115 }; 115 };
116 116
117 GlobalContext::GlobalContext(llvm::raw_ostream *OsDump, 117 GlobalContext::GlobalContext(llvm::raw_ostream *OsDump,
118 llvm::raw_ostream *OsEmit, VerboseMask Mask, 118 llvm::raw_ostream *OsEmit, VerboseMask Mask,
119 TargetArch Arch, OptLevel Opt, 119 TargetArch Arch, OptLevel Opt,
120 IceString TestPrefix, const ClFlags &Flags) 120 IceString TestPrefix, const ClFlags &Flags)
121 : StrDump(OsDump), StrEmit(OsEmit), VMask(Mask), 121 : StrDump(OsDump), StrEmit(OsEmit), VMask(Mask),
122 ConstPool(new ConstantPool()), Arch(Arch), Opt(Opt), 122 ConstPool(new ConstantPool()), Arch(Arch), Opt(Opt),
123 TestPrefix(TestPrefix), Flags(Flags), HasEmittedFirstMethod(false) {} 123 TestPrefix(TestPrefix), Flags(Flags), HasEmittedFirstMethod(false),
124 RNG("") {}
124 125
125 // Scan a string for S[0-9A-Z]*_ patterns and replace them with 126 // Scan a string for S[0-9A-Z]*_ patterns and replace them with
126 // S<num>_ where <num> is the next base-36 value. If a type name 127 // S<num>_ where <num> is the next base-36 value. If a type name
127 // legitimately contains that pattern, then the substitution will be 128 // legitimately contains that pattern, then the substitution will be
128 // made in error and most likely the link will fail. In this case, 129 // made in error and most likely the link will fail. In this case,
129 // the test classes can be rewritten not to use that pattern, which is 130 // the test classes can be rewritten not to use that pattern, which is
130 // much simpler and more reliable than implementing a full demangling 131 // much simpler and more reliable than implementing a full demangling
131 // parser. Another substitution-in-error may occur if a type 132 // parser. Another substitution-in-error may occur if a type
132 // identifier ends with the pattern S[0-9A-Z]*, because an immediately 133 // identifier ends with the pattern S[0-9A-Z]*, because an immediately
133 // following substitution string like "S1_" or "PS1_" may be combined 134 // following substitution string like "S1_" or "PS1_" may be combined
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 376
376 void Timer::printElapsedUs(GlobalContext *Ctx, const IceString &Tag) const { 377 void Timer::printElapsedUs(GlobalContext *Ctx, const IceString &Tag) const {
377 if (Ctx->isVerbose(IceV_Timing)) { 378 if (Ctx->isVerbose(IceV_Timing)) {
378 // Prefixing with '#' allows timing strings to be included 379 // Prefixing with '#' allows timing strings to be included
379 // without error in textual assembly output. 380 // without error in textual assembly output.
380 Ctx->getStrDump() << "# " << getElapsedUs() << " usec " << Tag << "\n"; 381 Ctx->getStrDump() << "# " << getElapsedUs() << " usec " << Tag << "\n";
381 } 382 }
382 } 383 }
383 384
384 } // end of namespace Ice 385 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceGlobalContext.h ('k') | src/IceRNG.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698