| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |