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 *getConstantInt1(int8_t ConstantInt1); |
117 Constant *getConstantInt64(Type Ty, uint64_t ConstantInt64); | 117 Constant *getConstantInt8(int8_t ConstantInt8); |
| 118 Constant *getConstantInt16(int16_t ConstantInt16); |
| 119 Constant *getConstantInt32(int32_t ConstantInt32); |
| 120 Constant *getConstantInt64(int64_t ConstantInt64); |
118 Constant *getConstantFloat(float Value); | 121 Constant *getConstantFloat(float Value); |
119 Constant *getConstantDouble(double Value); | 122 Constant *getConstantDouble(double Value); |
120 // Returns a symbolic constant. | 123 // Returns a symbolic constant. |
121 Constant *getConstantSym(Type Ty, RelocOffsetT Offset, | 124 Constant *getConstantSym(RelocOffsetT Offset, const IceString &Name = "", |
122 const IceString &Name = "", | |
123 bool SuppressMangling = false); | 125 bool SuppressMangling = false); |
124 // Returns an undef. | 126 // Returns an undef. |
125 Constant *getConstantUndef(Type Ty); | 127 Constant *getConstantUndef(Type Ty); |
126 // Returns a zero value. | 128 // Returns a zero value. |
127 Constant *getConstantZero(Type Ty); | 129 Constant *getConstantZero(Type Ty); |
128 // getConstantPool() returns a copy of the constant pool for | 130 // getConstantPool() returns a copy of the constant pool for |
129 // constants of a given type. | 131 // constants of a given type. |
130 ConstantList getConstantPool(Type Ty) const; | 132 ConstantList getConstantPool(Type Ty) const; |
131 // Returns a new function declaration, allocated in an internal | 133 // Returns a new function declaration, allocated in an internal |
132 // memory pool. Ownership of the function is maintained by this | 134 // memory pool. Ownership of the function is maintained by this |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 | 243 |
242 private: | 244 private: |
243 TimerIdT ID; | 245 TimerIdT ID; |
244 GlobalContext *const Ctx; | 246 GlobalContext *const Ctx; |
245 const bool Active; | 247 const bool Active; |
246 }; | 248 }; |
247 | 249 |
248 } // end of namespace Ice | 250 } // end of namespace Ice |
249 | 251 |
250 #endif // SUBZERO_SRC_ICEGLOBALCONTEXT_H | 252 #endif // SUBZERO_SRC_ICEGLOBALCONTEXT_H |
OLD | NEW |