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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 return getConstantDouble(0); | 323 return getConstantDouble(0); |
324 case IceType_v4i1: | 324 case IceType_v4i1: |
325 case IceType_v8i1: | 325 case IceType_v8i1: |
326 case IceType_v16i1: | 326 case IceType_v16i1: |
327 case IceType_v16i8: | 327 case IceType_v16i8: |
328 case IceType_v8i16: | 328 case IceType_v8i16: |
329 case IceType_v4i32: | 329 case IceType_v4i32: |
330 case IceType_v4f32: { | 330 case IceType_v4f32: { |
331 IceString Str; | 331 IceString Str; |
332 llvm::raw_string_ostream BaseOS(Str); | 332 llvm::raw_string_ostream BaseOS(Str); |
333 Ostream OS(&BaseOS); | 333 BaseOS << "Unsupported constant type: " << Ty; |
334 OS << "Unsupported constant type: " << Ty; | |
335 llvm_unreachable(BaseOS.str().c_str()); | 334 llvm_unreachable(BaseOS.str().c_str()); |
336 } break; | 335 } break; |
337 case IceType_void: | 336 case IceType_void: |
338 case IceType_NUM: | 337 case IceType_NUM: |
339 break; | 338 break; |
340 } | 339 } |
341 llvm_unreachable("Unknown type"); | 340 llvm_unreachable("Unknown type"); |
342 } | 341 } |
343 | 342 |
344 ConstantList GlobalContext::getConstantPool(Type Ty) const { | 343 ConstantList GlobalContext::getConstantPool(Type Ty) const { |
(...skipping 10 matching lines...) Expand all Loading... |
355 return ConstPool->Doubles.getConstantPool(); | 354 return ConstPool->Doubles.getConstantPool(); |
356 case IceType_v4i1: | 355 case IceType_v4i1: |
357 case IceType_v8i1: | 356 case IceType_v8i1: |
358 case IceType_v16i1: | 357 case IceType_v16i1: |
359 case IceType_v16i8: | 358 case IceType_v16i8: |
360 case IceType_v8i16: | 359 case IceType_v8i16: |
361 case IceType_v4i32: | 360 case IceType_v4i32: |
362 case IceType_v4f32: { | 361 case IceType_v4f32: { |
363 IceString Str; | 362 IceString Str; |
364 llvm::raw_string_ostream BaseOS(Str); | 363 llvm::raw_string_ostream BaseOS(Str); |
365 Ostream OS(&BaseOS); | 364 BaseOS << "Unsupported constant type: " << Ty; |
366 OS << "Unsupported constant type: " << Ty; | |
367 llvm_unreachable(BaseOS.str().c_str()); | 365 llvm_unreachable(BaseOS.str().c_str()); |
368 } break; | 366 } break; |
369 case IceType_void: | 367 case IceType_void: |
370 case IceType_NUM: | 368 case IceType_NUM: |
371 break; | 369 break; |
372 } | 370 } |
373 llvm_unreachable("Unknown type"); | 371 llvm_unreachable("Unknown type"); |
374 } | 372 } |
375 | 373 |
376 void Timer::printElapsedUs(GlobalContext *Ctx, const IceString &Tag) const { | 374 void Timer::printElapsedUs(GlobalContext *Ctx, const IceString &Tag) const { |
377 if (Ctx->isVerbose(IceV_Timing)) { | 375 if (Ctx->isVerbose(IceV_Timing)) { |
378 // Prefixing with '#' allows timing strings to be included | 376 // Prefixing with '#' allows timing strings to be included |
379 // without error in textual assembly output. | 377 // without error in textual assembly output. |
380 Ctx->getStrDump() << "# " << getElapsedUs() << " usec " << Tag << "\n"; | 378 Ctx->getStrDump() << "# " << getElapsedUs() << " usec " << Tag << "\n"; |
381 } | 379 } |
382 } | 380 } |
383 | 381 |
384 } // end of namespace Ice | 382 } // end of namespace Ice |
OLD | NEW |