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

Side by Side Diff: src/IceGlobalContext.cpp

Issue 547033002: Subzero: Be more strict about i1 calculations. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Make OPTM1 change similar to CHECK change Created 6 years, 3 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 | « crosstest/test_arith_main.cpp ('k') | src/IceTargetLoweringX8632.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/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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 } 283 }
284 284
285 // Transform bar ==> Prefixbar 285 // Transform bar ==> Prefixbar
286 // ^^^^^^ 286 // ^^^^^^
287 return getTestPrefix() + Name; 287 return getTestPrefix() + Name;
288 } 288 }
289 289
290 GlobalContext::~GlobalContext() {} 290 GlobalContext::~GlobalContext() {}
291 291
292 Constant *GlobalContext::getConstantInt(Type Ty, uint64_t ConstantInt64) { 292 Constant *GlobalContext::getConstantInt(Type Ty, uint64_t ConstantInt64) {
293 if (Ty == IceType_i1)
294 ConstantInt64 &= UINT64_C(1);
293 return ConstPool->Integers.getOrAdd(this, Ty, ConstantInt64); 295 return ConstPool->Integers.getOrAdd(this, Ty, ConstantInt64);
294 } 296 }
295 297
296 Constant *GlobalContext::getConstantFloat(float ConstantFloat) { 298 Constant *GlobalContext::getConstantFloat(float ConstantFloat) {
297 return ConstPool->Floats.getOrAdd(this, IceType_f32, ConstantFloat); 299 return ConstPool->Floats.getOrAdd(this, IceType_f32, ConstantFloat);
298 } 300 }
299 301
300 Constant *GlobalContext::getConstantDouble(double ConstantDouble) { 302 Constant *GlobalContext::getConstantDouble(double ConstantDouble) {
301 return ConstPool->Doubles.getOrAdd(this, IceType_f64, ConstantDouble); 303 return ConstPool->Doubles.getOrAdd(this, IceType_f64, ConstantDouble);
302 } 304 }
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 378
377 void Timer::printElapsedUs(GlobalContext *Ctx, const IceString &Tag) const { 379 void Timer::printElapsedUs(GlobalContext *Ctx, const IceString &Tag) const {
378 if (Ctx->isVerbose(IceV_Timing)) { 380 if (Ctx->isVerbose(IceV_Timing)) {
379 // Prefixing with '#' allows timing strings to be included 381 // Prefixing with '#' allows timing strings to be included
380 // without error in textual assembly output. 382 // without error in textual assembly output.
381 Ctx->getStrDump() << "# " << getElapsedUs() << " usec " << Tag << "\n"; 383 Ctx->getStrDump() << "# " << getElapsedUs() << " usec " << Tag << "\n";
382 } 384 }
383 } 385 }
384 386
385 } // end of namespace Ice 387 } // end of namespace Ice
OLDNEW
« no previous file with comments | « crosstest/test_arith_main.cpp ('k') | src/IceTargetLoweringX8632.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698