| OLD | NEW |
| 1 //===- subzero/src/IceGlobalContext.h - Global context defs -----*- C++ -*-===// | 1 //===- subzero/src/IceGlobalContext.h - 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 declares aspects of the compilation that persist across | 10 // This file declares aspects of the compilation that persist across |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 // rather than once per function. | 106 // rather than once per function. |
| 107 bool testAndSetHasEmittedFirstMethod() { | 107 bool testAndSetHasEmittedFirstMethod() { |
| 108 bool HasEmitted = HasEmittedFirstMethod; | 108 bool HasEmitted = HasEmittedFirstMethod; |
| 109 HasEmittedFirstMethod = true; | 109 HasEmittedFirstMethod = true; |
| 110 return HasEmitted; | 110 return HasEmitted; |
| 111 } | 111 } |
| 112 | 112 |
| 113 // Manage Constants. | 113 // Manage Constants. |
| 114 // getConstant*() functions are not const because they might add | 114 // getConstant*() functions are not const because they might add |
| 115 // something to the constant pool. | 115 // something to the constant pool. |
| 116 Constant *getConstantInt32(Type Ty, uint32_t ConstantInt32); | 116 Constant *getConstantInt(Type Ty, int64_t Value); |
| 117 Constant *getConstantInt64(Type Ty, uint64_t ConstantInt64); | 117 Constant *getConstantInt1(int8_t ConstantInt1); |
| 118 Constant *getConstantInt8(int8_t ConstantInt8); |
| 119 Constant *getConstantInt16(int16_t ConstantInt16); |
| 120 Constant *getConstantInt32(int32_t ConstantInt32); |
| 121 Constant *getConstantInt64(int64_t ConstantInt64); |
| 118 Constant *getConstantFloat(float Value); | 122 Constant *getConstantFloat(float Value); |
| 119 Constant *getConstantDouble(double Value); | 123 Constant *getConstantDouble(double Value); |
| 120 // Returns a symbolic constant. | 124 // Returns a symbolic constant. |
| 121 Constant *getConstantSym(Type Ty, RelocOffsetT Offset, | 125 Constant *getConstantSym(RelocOffsetT Offset, const IceString &Name, |
| 122 const IceString &Name = "", | 126 bool SuppressMangling); |
| 123 bool SuppressMangling = false); | |
| 124 // Returns an undef. | 127 // Returns an undef. |
| 125 Constant *getConstantUndef(Type Ty); | 128 Constant *getConstantUndef(Type Ty); |
| 126 // Returns a zero value. | 129 // Returns a zero value. |
| 127 Constant *getConstantZero(Type Ty); | 130 Constant *getConstantZero(Type Ty); |
| 128 // getConstantPool() returns a copy of the constant pool for | 131 // getConstantPool() returns a copy of the constant pool for |
| 129 // constants of a given type. | 132 // constants of a given type. |
| 130 ConstantList getConstantPool(Type Ty) const; | 133 ConstantList getConstantPool(Type Ty) const; |
| 131 // Returns a new function declaration, allocated in an internal | 134 // Returns a new function declaration, allocated in an internal |
| 132 // memory pool. Ownership of the function is maintained by this | 135 // memory pool. Ownership of the function is maintained by this |
| 133 // class instance. | 136 // class instance. |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 | 244 |
| 242 private: | 245 private: |
| 243 TimerIdT ID; | 246 TimerIdT ID; |
| 244 GlobalContext *const Ctx; | 247 GlobalContext *const Ctx; |
| 245 const bool Active; | 248 const bool Active; |
| 246 }; | 249 }; |
| 247 | 250 |
| 248 } // end of namespace Ice | 251 } // end of namespace Ice |
| 249 | 252 |
| 250 #endif // SUBZERO_SRC_ICEGLOBALCONTEXT_H | 253 #endif // SUBZERO_SRC_ICEGLOBALCONTEXT_H |
| OLD | NEW |