OLD | NEW |
1 //===- subzero/src/IceGlobalContext.cpp - Global context defs -------------===// | 1 //===- subzero/src/IceGlobalContext.cpp - Global context defs -------------===// |
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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 } | 303 } |
304 | 304 |
305 Constant *GlobalContext::getConstantFloat(float ConstantFloat) { | 305 Constant *GlobalContext::getConstantFloat(float ConstantFloat) { |
306 return ConstPool->Floats.getOrAdd(this, IceType_f32, ConstantFloat); | 306 return ConstPool->Floats.getOrAdd(this, IceType_f32, ConstantFloat); |
307 } | 307 } |
308 | 308 |
309 Constant *GlobalContext::getConstantDouble(double ConstantDouble) { | 309 Constant *GlobalContext::getConstantDouble(double ConstantDouble) { |
310 return ConstPool->Doubles.getOrAdd(this, IceType_f64, ConstantDouble); | 310 return ConstPool->Doubles.getOrAdd(this, IceType_f64, ConstantDouble); |
311 } | 311 } |
312 | 312 |
313 Constant *GlobalContext::getConstantSym(Type Ty, int64_t Offset, | 313 Constant *GlobalContext::getConstantSym(Type Ty, RelocOffsetT Offset, |
314 const IceString &Name, | 314 const IceString &Name, |
315 bool SuppressMangling) { | 315 bool SuppressMangling) { |
316 return ConstPool->Relocatables.getOrAdd( | 316 return ConstPool->Relocatables.getOrAdd( |
317 this, Ty, RelocatableTuple(Offset, Name, SuppressMangling)); | 317 this, Ty, RelocatableTuple(Offset, Name, SuppressMangling)); |
318 } | 318 } |
319 | 319 |
320 Constant *GlobalContext::getConstantUndef(Type Ty) { | 320 Constant *GlobalContext::getConstantUndef(Type Ty) { |
321 return ConstPool->Undefs.getOrAdd(this, Ty); | 321 return ConstPool->Undefs.getOrAdd(this, Ty); |
322 } | 322 } |
323 | 323 |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 } | 435 } |
436 | 436 |
437 TimerMarker::TimerMarker(TimerIdT ID, const Cfg *Func) | 437 TimerMarker::TimerMarker(TimerIdT ID, const Cfg *Func) |
438 : ID(ID), Ctx(Func->getContext()), | 438 : ID(ID), Ctx(Func->getContext()), |
439 Active(Func->getFocusedTiming() || Ctx->getFlags().SubzeroTimingEnabled) { | 439 Active(Func->getFocusedTiming() || Ctx->getFlags().SubzeroTimingEnabled) { |
440 if (Active) | 440 if (Active) |
441 Ctx->pushTimer(ID); | 441 Ctx->pushTimer(ID); |
442 } | 442 } |
443 | 443 |
444 } // end of namespace Ice | 444 } // end of namespace Ice |
OLD | NEW |